1
0

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)
This commit is contained in:
Daniel Barlow 2024-12-22 17:27:59 +00:00
parent ebb4d4a831
commit ac189f2977
4 changed files with 8 additions and 22 deletions

View File

@ -68,20 +68,16 @@ in {
}; };
}; };
config = { config = {
system.outputs = system.outputs.kernel =
let let
mergedConfig = mergeConditionals mergedConfig = mergeConditionals
config.kernel.config config.kernel.config
config.kernel.conditionalConfig; config.kernel.conditionalConfig;
k = liminix.builders.kernel.override { in liminix.builders.kernel.override {
config = mergedConfig; config = mergedConfig;
inherit (config.kernel) version src extraPatchPhase; inherit (config.kernel) version src extraPatchPhase;
targets = config.kernel.makeTargets; targets = config.kernel.makeTargets;
}; };
in {
kernel = k.vmlinux;
zimage = k.zImage;
};
kernel = rec { kernel = rec {
modular = true; # disabling this is not yet supported modular = true; # disabling this is not yet supported

View File

@ -28,17 +28,7 @@ in
kernel kernel
****** ******
Kernel vmlinux file (usually ELF) Kernel package (multi-output derivation)
'';
};
zimage = mkOption {
type = types.package;
internal = true;
description = ''
zimage
******
Kernel in compressed self-extracting package
''; '';
}; };
dtb = mkOption { dtb = mkOption {

View File

@ -24,7 +24,7 @@ in {
cd $out cd $out
${if wantsDtb then "cp ${o.dtb} dtb" else "true"} ${if wantsDtb then "cp ${o.dtb} dtb" else "true"}
cp ${o.initramfs} initramfs cp ${o.initramfs} initramfs
cp ${o.zimage} kernel cp ${o.kernel.zImage} kernel
mkdir extlinux mkdir extlinux
cat > extlinux/extlinux.conf << _EOF cat > extlinux/extlinux.conf << _EOF
menu title Liminix menu title Liminix

View File

@ -61,7 +61,7 @@ in {
o = config.system.outputs; o = config.system.outputs;
image = let choices = { image = let choices = {
uimage = o.uimage; uimage = o.uimage;
zimage = o.zimage; zimage = o.kernel.zImage;
}; in choices.${cfg.kernelFormat}; }; in choices.${cfg.kernelFormat};
bootCommand = let choices = { bootCommand = let choices = {
uimage = "bootm"; uimage = "bootm";