Files
nixos-hardware/radxa/rock-4c-plus/default.nix
ZHANG Yuntian 80340dcf86 rockchip/rk3399: reverse dependency order
This order works better when we have more SoCs.
2025-02-24 08:22:39 +00:00

32 lines
698 B
Nix

{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.radxa.rock-4c-plus;
rkCfg = config.hardware.rockchip;
in {
imports = [
../.
../../rockchip
];
options.hardware.radxa.rock-4c-plus = {
platformFirmware = lib.mkPackageOption pkgs "ubootRock4CPlus" { };
};
config = {
hardware = {
radxa.enable = true;
rockchip = {
rk3399.enable = true;
diskoExtraPostVM = ''
dd conv=notrunc,fsync if=${cfg.platformFirmware}/idbloader.img of=$out/${rkCfg.diskoImageName} bs=512 seek=64
dd conv=notrunc,fsync if=${cfg.platformFirmware}/u-boot.itb of=$out/${rkCfg.diskoImageName} bs=512 seek=16384
'';
};
};
};
}