commit ac189f29772da8f3d38288ddea13dc77af5a10a1
parent ebb4d4a8316c055120e58432703ecdbdf30890ee
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 22 Dec 2024 17:27:59 +0000
outputs.zimage -> outputs.kernel.zImage
remove config option/derivation in favour of accessing
as output of the kernel derivation (matches what we do
with e.g. modulesupport)
Diffstat:
4 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/modules/kernel/default.nix b/modules/kernel/default.nix
@@ -68,19 +68,15 @@ in {
};
};
config = {
- system.outputs =
+ system.outputs.kernel =
let
mergedConfig = mergeConditionals
config.kernel.config
config.kernel.conditionalConfig;
- k = liminix.builders.kernel.override {
- config = mergedConfig;
- inherit (config.kernel) version src extraPatchPhase;
- targets = config.kernel.makeTargets;
- };
- in {
- kernel = k.vmlinux;
- zimage = k.zImage;
+ in liminix.builders.kernel.override {
+ config = mergedConfig;
+ inherit (config.kernel) version src extraPatchPhase;
+ targets = config.kernel.makeTargets;
};
kernel = rec {
diff --git a/modules/outputs.nix b/modules/outputs.nix
@@ -28,17 +28,7 @@ in
kernel
******
- Kernel vmlinux file (usually ELF)
- '';
- };
- zimage = mkOption {
- type = types.package;
- internal = true;
- description = ''
- zimage
- ******
-
- Kernel in compressed self-extracting package
+ Kernel package (multi-output derivation)
'';
};
dtb = mkOption {
diff --git a/modules/outputs/extlinux.nix b/modules/outputs/extlinux.nix
@@ -24,7 +24,7 @@ in {
cd $out
${if wantsDtb then "cp ${o.dtb} dtb" else "true"}
cp ${o.initramfs} initramfs
- cp ${o.zimage} kernel
+ cp ${o.kernel.zImage} kernel
mkdir extlinux
cat > extlinux/extlinux.conf << _EOF
menu title Liminix
diff --git a/modules/outputs/tftpboot.nix b/modules/outputs/tftpboot.nix
@@ -61,7 +61,7 @@ in {
o = config.system.outputs;
image = let choices = {
uimage = o.uimage;
- zimage = o.zimage;
+ zimage = o.kernel.zImage;
}; in choices.${cfg.kernelFormat};
bootCommand = let choices = {
uimage = "bootm";