Merge pull request #59423 from lheckemann/initramfs-improvements
Initramfs improvements
This commit is contained in:
commit
0fc80a576a
@ -11,7 +11,9 @@ let
|
||||
|
||||
udev = config.systemd.package;
|
||||
|
||||
modulesTree = config.system.modulesTree;
|
||||
kernel-name = config.boot.kernelPackages.kernel.name or "kernel";
|
||||
|
||||
modulesTree = config.system.modulesTree.override { name = kernel-name + "-modules"; };
|
||||
firmware = config.hardware.firmware;
|
||||
|
||||
|
||||
@ -290,6 +292,7 @@ let
|
||||
# The closure of the init script of boot stage 1 is what we put in
|
||||
# the initial RAM disk.
|
||||
initialRamdisk = pkgs.makeInitrd {
|
||||
name = "initrd-${kernel-name}";
|
||||
inherit (config.boot.initrd) compressor prepend;
|
||||
|
||||
contents =
|
||||
|
@ -12,11 +12,14 @@
|
||||
# `contents = {object = ...; symlink = /init;}' is a typical
|
||||
# argument.
|
||||
|
||||
{ stdenv, perl, cpio, contents, compressor, prepend, ubootTools
|
||||
{ stdenv, perl, cpio, contents, ubootTools
|
||||
, name ? "initrd"
|
||||
, compressor ? "gzip -9n"
|
||||
, prepend ? []
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "initrd";
|
||||
inherit name;
|
||||
builder = ./make-initrd.sh;
|
||||
|
||||
makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage";
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, kmod, modules, buildEnv }:
|
||||
{ stdenv, kmod, modules, buildEnv, name ? "kernel-modules" }:
|
||||
|
||||
buildEnv {
|
||||
name = "kernel-modules";
|
||||
inherit name;
|
||||
|
||||
paths = modules;
|
||||
|
||||
|
@ -330,10 +330,7 @@ in
|
||||
|
||||
makeAutostartItem = callPackage ../build-support/make-startupitem { };
|
||||
|
||||
makeInitrd = { contents, compressor ? "gzip -9n", prepend ? [ ] }:
|
||||
callPackage ../build-support/kernel/make-initrd.nix {
|
||||
inherit contents compressor prepend;
|
||||
};
|
||||
makeInitrd = callPackage ../build-support/kernel/make-initrd.nix; # Args intentionally left out
|
||||
|
||||
makeWrapper = makeSetupHook { deps = [ dieHook ]; substitutions = { shell = pkgs.runtimeShell; }; }
|
||||
../build-support/setup-hooks/make-wrapper.sh;
|
||||
|
Loading…
Reference in New Issue
Block a user