mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-10-19 04:03:21 +02:00
Changes to support swsusp and custom kernels.
svn path=/nixos/trunk/; revision=11272
This commit is contained in:
parent
9ab654a6c4
commit
dc27e80fad
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = "
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue