Changes to support swsusp and custom kernels.

svn path=/nixos/trunk/; revision=11272
This commit is contained in:
Michael Raskin 2008-03-24 19:37:32 +00:00
parent 9ab654a6c4
commit dc27e80fad
4 changed files with 25 additions and 2 deletions

View File

@ -74,7 +74,7 @@ if test -e /sys/power/tuxonice/resume; then
fi
fi
echo 1 > /sys/power/resume || echo "Failed to resume..."
echo "@resumeDevice@" > /sys/power/resume || echo "Failed to resume..."
echo shutdown > /sys/power/disk

View File

@ -30,6 +30,9 @@
, # The path of the stage 2 init to call once we've mounted the root
# device.
stage2Init ? "/init"
, # Resume device. [major]:[minor]
resumeDevice ? "ignore-this"
}:
let
@ -48,7 +51,7 @@ substituteAll {
src = ./boot-stage-1-init.sh;
isExecutable = true;
inherit staticShell modules modulesDir;
inherit autoDetectRootDevice isLiveCD mountPoints devices fsTypes optionss;
inherit autoDetectRootDevice isLiveCD mountPoints devices fsTypes optionss resumeDevice;
rootLabel = if autoDetectRootDevice then rootLabel else "";
path = [
staticTools

View File

@ -66,6 +66,15 @@
";
};
resumeDevice = mkOption {
default = "";
example = "0:0";
description = "
Device for manual resume attempt during boot. Looks like
major:minor .
";
};
kernel = mkOption {
default = pkgs: pkgs.kernel;
description = "
@ -198,6 +207,15 @@
";
};
allowMissing = mkOption {
default = false;
description = ''
Allow some initrd components to be missing. Useful for
custom kernel that are changed too often to track needed
kernelModules.
'';
};
lvm = mkOption {
default = false;
description = "

View File

@ -44,6 +44,7 @@ rec {
modulesClosure = pkgs.makeModulesClosure {
inherit rootModules;
kernel = modulesTree;
allowMissing = config.boot.initrd.allowMissing;
};
@ -89,6 +90,7 @@ rec {
modules = rootModules;
staticShell = stdenvLinuxStuff.bootstrapTools.bash;
staticTools = stdenvLinuxStuff.staticTools;
resumeDevice = config.boot.resumeDevice;
};