mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-03 22:43:30 +01:00
radxa/rock-5b: init
This commit is contained in:
1 parent
28f2a7454f
commit
ab84bd93a3
3 files changed
+33
No files matched your search
@@ -0,0 +1,31 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.hardware.radxa.rock-5b;
|
||||
rkCfg = config.hardware.rockchip;
|
||||
in {
|
||||
imports = [
|
||||
../.
|
||||
../../rockchip
|
||||
];
|
||||
|
||||
options.hardware.radxa.rock-5b = {
|
||||
platformFirmware = lib.mkPackageOption pkgs "ubootRock5ModelB" { };
|
||||
};
|
||||
|
||||
config = {
|
||||
hardware = {
|
||||
radxa.enable = true;
|
||||
rockchip = {
|
||||
rk3588.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
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user