* Instead of adding all of util-linux to the initd, add just mount
(and nuke its references so that we don't get glibc etc.). The initrd is now 3.2 MB (and that includes the entire staticTools from the stdenv bootstrap, most of which we don't actually need). svn path=/nixu/trunk/; revision=6942
This commit is contained in:
parent
a94dd5c8b1
commit
1aa35c8267
@ -5,7 +5,7 @@
|
||||
# is supposed to be put into an initial RAM disk (initrd).
|
||||
|
||||
{ genericSubstituter, shell, staticTools
|
||||
, module_init_tools, utillinux, modules
|
||||
, module_init_tools, extraUtils, modules
|
||||
}:
|
||||
|
||||
genericSubstituter {
|
||||
@ -15,7 +15,7 @@ genericSubstituter {
|
||||
path = [
|
||||
staticTools
|
||||
module_init_tools
|
||||
# utillinux
|
||||
extraUtils
|
||||
];
|
||||
makeDevices = ./make-devices.sh;
|
||||
}
|
||||
|
@ -6,6 +6,10 @@ rec {
|
||||
bootStdenv = pkgs.useDietLibC pkgs.stdenv;
|
||||
};
|
||||
|
||||
pkgsStatic = import ./pkgs/top-level/all-packages.nix {
|
||||
bootStdenv = pkgs.makeStaticBinaries pkgs.stdenv;
|
||||
};
|
||||
|
||||
stdenvLinuxStuff = import ./pkgs/stdenv/linux {
|
||||
system = pkgs.stdenv.system;
|
||||
allPackages = import ./pkgs/top-level/all-packages.nix;
|
||||
@ -19,11 +23,24 @@ rec {
|
||||
};
|
||||
|
||||
|
||||
# Some additional utilities needed in stage 1, notably mount. We
|
||||
# don't want to bring in all of util-linux, so we just copy what we
|
||||
# need.
|
||||
extraUtils = pkgs.stdenv.mkDerivation {
|
||||
name = "extra-utils";
|
||||
builder = builtins.toFile "builder.sh"
|
||||
"source $stdenv/setup; ensureDir $out/bin; cp $utillinux/bin/mount $out/bin; nuke-refs $out/bin/mount";
|
||||
buildInputs = [pkgs.nukeReferences];
|
||||
inherit (pkgsStatic) utillinux;
|
||||
};
|
||||
|
||||
|
||||
# The init script of boot stage 1 (loading kernel modules for
|
||||
# mounting the root FS).
|
||||
bootStage1 = import ./boot-stage-1.nix {
|
||||
inherit (pkgs) genericSubstituter utillinux;
|
||||
inherit (pkgs) genericSubstituter;
|
||||
inherit (pkgsDiet) module_init_tools;
|
||||
inherit extraUtils;
|
||||
modules = modulesClosure;
|
||||
shell = stdenvLinuxStuff.bootstrapTools.bash;
|
||||
staticTools = stdenvLinuxStuff.staticTools;
|
||||
|
Loading…
x
Reference in New Issue
Block a user