Added kernel selection parameter, boot.useKernel
svn path=/nixos/trunk/; revision=8914
This commit is contained in:
parent
0e92d41124
commit
f0d1570377
@ -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"];
|
name = ["boot" "kernelParams"];
|
||||||
|
@ -29,6 +29,7 @@ rec {
|
|||||||
|
|
||||||
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
|
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
|
||||||
|
|
||||||
|
useKernel = (config.get ["boot" "useKernel"]) pkgs;
|
||||||
|
|
||||||
rootModules =
|
rootModules =
|
||||||
(config.get ["boot" "initrd" "extraKernelModules"]) ++
|
(config.get ["boot" "initrd" "extraKernelModules"]) ++
|
||||||
@ -37,7 +38,8 @@ rec {
|
|||||||
|
|
||||||
# Determine the set of modules that we need to mount the root FS.
|
# Determine the set of modules that we need to mount the root FS.
|
||||||
modulesClosure = import ../helpers/modules-closure.nix {
|
modulesClosure = import ../helpers/modules-closure.nix {
|
||||||
inherit (pkgs) stdenv kernel module_init_tools;
|
inherit (pkgs) stdenv module_init_tools;
|
||||||
|
kernel = useKernel;
|
||||||
inherit rootModules;
|
inherit rootModules;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -136,7 +138,8 @@ rec {
|
|||||||
dir = "sbin";
|
dir = "sbin";
|
||||||
src = ./modprobe;
|
src = ./modprobe;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit (pkgs) kernel module_init_tools;
|
inherit (pkgs) module_init_tools;
|
||||||
|
kernel = useKernel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -242,7 +245,7 @@ rec {
|
|||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
|
|
||||||
inherit etc wrapperDir systemPath modprobe defaultShell;
|
inherit etc wrapperDir systemPath modprobe defaultShell;
|
||||||
inherit (pkgs) kernel;
|
kernel = useKernel;
|
||||||
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
||||||
hostName = config.get ["networking" "hostName"];
|
hostName = config.get ["networking" "hostName"];
|
||||||
setuidPrograms =
|
setuidPrograms =
|
||||||
@ -267,7 +270,8 @@ rec {
|
|||||||
# everything else to bring up the system.
|
# everything else to bring up the system.
|
||||||
bootStage2 = import ../boot/boot-stage-2.nix {
|
bootStage2 = import ../boot/boot-stage-2.nix {
|
||||||
inherit (pkgs) substituteAll writeText coreutils
|
inherit (pkgs) substituteAll writeText coreutils
|
||||||
utillinux kernel udev upstart;
|
utillinux udev upstart;
|
||||||
|
kernel = useKernel;
|
||||||
inherit activateConfiguration;
|
inherit activateConfiguration;
|
||||||
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
readOnlyRoot = config.get ["boot" "readOnlyRoot"];
|
||||||
upstartPath = [
|
upstartPath = [
|
||||||
@ -312,7 +316,7 @@ rec {
|
|||||||
inherit grubMenuBuilder;
|
inherit grubMenuBuilder;
|
||||||
inherit etc;
|
inherit etc;
|
||||||
inherit systemPath;
|
inherit systemPath;
|
||||||
kernel = pkgs.kernel + "/vmlinuz";
|
kernel = useKernel + "/vmlinuz";
|
||||||
initrd = initialRamdisk + "/initrd";
|
initrd = initialRamdisk + "/initrd";
|
||||||
# Most of these are needed by grub-install.
|
# Most of these are needed by grub-install.
|
||||||
path = [
|
path = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user