commit 4638092d3d46df05dd00f7ff75ae6a453528827e
parent 633a4f8003400ac4dab90c918a71e37c6fd0959f
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 10 Apr 2023 20:35:06 +0100
build initramfs into kernel
this doesn't matter for qemu, but there's no other way of
getting a hardware device to find it if the bootloader
won't co-operate
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/initramfs.nix b/modules/initramfs.nix
@@ -17,6 +17,7 @@ in
};
config = mkIf config.boot.initramfs.enable {
kernel.config.BLK_DEV_INITRD = "y";
+ kernel.config.INITRAMFS_SOURCE = builtins.toJSON "${config.outputs.initramfs}";
outputs = {
initramfs =
@@ -57,7 +58,7 @@ in
'';
refs = pkgs.writeReferencesToFile bb;
gen_init_cpio = pkgs.pkgsBuildBuild.gen_init_cpio;
- in runCommand "initramfs" {} ''
+ in runCommand "initramfs.cpio" {} ''
cat << SPECIALS | ${gen_init_cpio}/bin/gen_init_cpio /dev/stdin > $out
dir /proc 0755 0 0
dir /dev 0755 0 0