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
|
||||||
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
|
echo shutdown > /sys/power/disk
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,6 +30,9 @@
|
|||||||
, # The path of the stage 2 init to call once we've mounted the root
|
, # The path of the stage 2 init to call once we've mounted the root
|
||||||
# device.
|
# device.
|
||||||
stage2Init ? "/init"
|
stage2Init ? "/init"
|
||||||
|
|
||||||
|
, # Resume device. [major]:[minor]
|
||||||
|
resumeDevice ? "ignore-this"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -48,7 +51,7 @@ substituteAll {
|
|||||||
src = ./boot-stage-1-init.sh;
|
src = ./boot-stage-1-init.sh;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit staticShell modules modulesDir;
|
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 "";
|
rootLabel = if autoDetectRootDevice then rootLabel else "";
|
||||||
path = [
|
path = [
|
||||||
staticTools
|
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 {
|
kernel = mkOption {
|
||||||
default = pkgs: pkgs.kernel;
|
default = pkgs: pkgs.kernel;
|
||||||
description = "
|
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 {
|
lvm = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "
|
description = "
|
||||||
|
@ -44,6 +44,7 @@ rec {
|
|||||||
modulesClosure = pkgs.makeModulesClosure {
|
modulesClosure = pkgs.makeModulesClosure {
|
||||||
inherit rootModules;
|
inherit rootModules;
|
||||||
kernel = modulesTree;
|
kernel = modulesTree;
|
||||||
|
allowMissing = config.boot.initrd.allowMissing;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -89,6 +90,7 @@ rec {
|
|||||||
modules = rootModules;
|
modules = rootModules;
|
||||||
staticShell = stdenvLinuxStuff.bootstrapTools.bash;
|
staticShell = stdenvLinuxStuff.bootstrapTools.bash;
|
||||||
staticTools = stdenvLinuxStuff.staticTools;
|
staticTools = stdenvLinuxStuff.staticTools;
|
||||||
|
resumeDevice = config.boot.resumeDevice;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user