mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 16:57:14 +08:00
rockchip: support generic firmware installation
This commit is contained in:
committed by
mergify[bot]
parent
ab84bd93a3
commit
0b2e2fe9b3
@@ -2,29 +2,18 @@
|
||||
, 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
|
||||
'';
|
||||
platformFirmware = pkgs.ubootRockPi4;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user