mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 16:57:14 +08:00
radxa/rock-4c-plus: init
This commit is contained in:
committed by
mergify[bot]
parent
52047449bf
commit
68cc7a876b
31
radxa/rock-4c-plus/default.nix
Normal file
31
radxa/rock-4c-plus/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.hardware.radxa.rock-4c-plus;
|
||||
rkCfg = config.hardware.rockchip;
|
||||
in {
|
||||
imports = [
|
||||
../.
|
||||
../../rockchip/rk3399
|
||||
];
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user