radxa/rock-pi-4: init

This commit is contained in:
ZHANG Yuntian authored and mergify[bot] committed 2025-02-24 08:22:39 +00:00
1 parent 80340dcf86
commit 79bc209be8
3 files changed
+33

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
{ lib
, pkgs
, config
, ...
}:
let
cfg = config.hardware.radxa.rock-pi-4;
rkCfg = config.hardware.rockchip;
in {
imports = [
../.
../../rockchip
];
options.hardware.radxa.rock-pi-4 = {
platformFirmware = lib.mkPackageOption pkgs "ubootRockPi4" { };
};
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
'';
};
};
};
}