commit f07a38b0fd822d401ac6b170ce9b7c57c78f009d
parent ac189f29772da8f3d38288ddea13dc77af5a10a1
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 22 Dec 2024 21:10:07 +0000
extract uimage output module into own file
Diffstat:
2 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/modules/outputs.nix b/modules/outputs.nix
@@ -14,6 +14,7 @@ in
./outputs/squashfs.nix
./outputs/vmroot.nix
./outputs/extlinux.nix
+ ./outputs/uimage.nix
./outputs/updater
];
options = {
@@ -41,16 +42,6 @@ in
Compiled device tree (FDT) for the target device
'';
};
- uimage = mkOption {
- type = types.package;
- internal = true;
- description = ''
- uimage
- ******
-
- Combined kernel and FDT in uImage (U-Boot compatible) format
- '';
- };
tplink-safeloader = mkOption {
type = types.package;
};
@@ -100,13 +91,6 @@ in
"${o.kernel.headers}/include"
];
};
- uimage = liminix.builders.uimage {
- commandLine = concatStringsSep " " config.boot.commandLine;
- inherit (config.boot) commandLineDtbNode;
- inherit (config.hardware) loadAddress entryPoint alignment;
- inherit (config.boot) imageFormat;
- inherit (o) kernel dtb;
- };
rootdir =
let
inherit (pkgs.pkgsBuildBuild) runCommand;
diff --git a/modules/outputs/uimage.nix b/modules/outputs/uimage.nix
@@ -0,0 +1,30 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+let
+ inherit (lib) mkOption types concatStringsSep;
+ inherit (pkgs) liminix writeText;
+ o = config.system.outputs;
+in
+{
+ options.system.outputs.uimage = mkOption {
+ type = types.package;
+ internal = true;
+ description = ''
+ uimage
+ ******
+
+ Combined kernel and FDT in uImage (U-Boot compatible) format
+ '';
+ };
+ config.system.outputs.uimage = liminix.builders.uimage {
+ commandLine = concatStringsSep " " config.boot.commandLine;
+ inherit (config.boot) commandLineDtbNode;
+ inherit (config.hardware) loadAddress entryPoint alignment;
+ inherit (config.boot) imageFormat;
+ inherit (o) kernel dtb;
+ };
+}