mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
radxa/rock-pi-4: init
This commit is contained in:
parent
80340dcf86
commit
79bc209be8
3 changed files with 33 additions and 0 deletions
31
radxa/rock-pi-4/default.nix
Normal file
31
radxa/rock-pi-4/default.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue