3
0
Fork 0
forked from mirrors/nixpkgs

Added kernel selection parameter, boot.useKernel

svn path=/nixos/trunk/; revision=8914
This commit is contained in:
Michael Raskin 2007-06-23 15:48:09 +00:00
parent 0e92d41124
commit f0d1570377
2 changed files with 19 additions and 5 deletions

View file

@ -55,6 +55,16 @@
";
}
{
name = ["boot" "useKernel"];
default = pkgs :(pkgs.kernel);
description = "
Function that takes package collection and returns kernel
package. Do not collect old generations after changing it
until you get to boot successfully. In principle, you can
specify a kernel that will build, but not boot.
";
}
{
name = ["boot" "kernelParams"];

View file

@ -29,6 +29,7 @@ rec {
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
useKernel = (config.get ["boot" "useKernel"]) pkgs;
rootModules =
(config.get ["boot" "initrd" "extraKernelModules"]) ++
@ -37,7 +38,8 @@ rec {
# Determine the set of modules that we need to mount the root FS.
modulesClosure = import ../helpers/modules-closure.nix {
inherit (pkgs) stdenv kernel module_init_tools;
inherit (pkgs) stdenv module_init_tools;
kernel = useKernel;
inherit rootModules;
};
@ -136,7 +138,8 @@ rec {
dir = "sbin";
src = ./modprobe;
isExecutable = true;
inherit (pkgs) kernel module_init_tools;
inherit (pkgs) module_init_tools;
kernel = useKernel;
};
@ -242,7 +245,7 @@ rec {
isExecutable = true;
inherit etc wrapperDir systemPath modprobe defaultShell;
inherit (pkgs) kernel;
kernel = useKernel;
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
hostName = config.get ["networking" "hostName"];
setuidPrograms =
@ -267,7 +270,8 @@ rec {
# everything else to bring up the system.
bootStage2 = import ../boot/boot-stage-2.nix {
inherit (pkgs) substituteAll writeText coreutils
utillinux kernel udev upstart;
utillinux udev upstart;
kernel = useKernel;
inherit activateConfiguration;
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
upstartPath = [
@ -312,7 +316,7 @@ rec {
inherit grubMenuBuilder;
inherit etc;
inherit systemPath;
kernel = pkgs.kernel + "/vmlinuz";
kernel = useKernel + "/vmlinuz";
initrd = initialRamdisk + "/initrd";
# Most of these are needed by grub-install.
path = [