mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 11:36:10 +01:00
rockchip: support generic firmware installation
This commit is contained in:
parent
ab84bd93a3
commit
0b2e2fe9b3
5 changed files with 24 additions and 43 deletions
|
|
@ -17,12 +17,26 @@ in {
|
|||
type = lib.types.str;
|
||||
default = "main.raw";
|
||||
description = ''
|
||||
The output image name for Disko.
|
||||
Can be used by diskoExtraPostVM.
|
||||
The output image name of Disko.
|
||||
You need to match this value with the real image name. Setting it alone
|
||||
won't change the output image name, as it is controlled by Disko module.
|
||||
|
||||
Can be used in diskoExtraPostVM.
|
||||
'';
|
||||
};
|
||||
platformFirmware = lib.mkPackageOption pkgs "platform firmware" {
|
||||
default = null;
|
||||
};
|
||||
diskoExtraPostVM = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = ''
|
||||
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/idbloader.img of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=64
|
||||
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/u-boot.itb of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=16384
|
||||
'';
|
||||
defaultText = lib.literalExpression ''
|
||||
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/idbloader.img of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=64
|
||||
${lib.getExe' pkgs.coreutils "dd"} conv=notrunc,fsync if=${config.hardware.rockchip.platformFirmware}/u-boot.itb of=$out/${config.hardware.rockchip.diskoImageName} bs=512 seek=16384
|
||||
'';
|
||||
description = ''
|
||||
The post VM hook for Disko's Image Builder.
|
||||
Can be used to install platform firmware like U-Boot.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue