rockchip: support generic firmware installation

This commit is contained in:
ZHANG Yuntian authored and mergify[bot] committed 2025-02-24 08:22:39 +00:00
1 parent ab84bd93a3
commit 0b2e2fe9b3
5 files changed
+24 -43

No files matched your search

+16 -2
View File
@@ -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.