r3133 - in trunk/utils/initrd-tools: . debian
maximilian attems
maks-guest@costa.debian.org
Tue, 17 May 2005 15:08:38 +0000
Author: maks-guest
Date: 2005-05-17 15:08:38 +0000 (Tue, 17 May 2005)
New Revision: 3133
Modified:
trunk/utils/initrd-tools/debian/changelog
trunk/utils/initrd-tools/init
trunk/utils/initrd-tools/mkinitrd
trunk/utils/initrd-tools/mkinitrd.conf
trunk/utils/initrd-tools/mkinitrd.conf.5
Log:
add RESUME support from ubuntu patch.
(added note to enable PM config's as not enabled on standard kernel).
Modified: trunk/utils/initrd-tools/debian/changelog
===================================================================
--- trunk/utils/initrd-tools/debian/changelog 2005-05-17 04:27:41 UTC (rev 3132)
+++ trunk/utils/initrd-tools/debian/changelog 2005-05-17 15:08:38 UTC (rev 3133)
@@ -12,8 +12,11 @@
Closes: #283919
- Don't try mount a block device for nfs root. thanks Alex Owen
<rao3@leicester.ac.uk> for the patch. Closes: #307471
+ - Resynchronise with Ubuntu:
+ Integrate bits needed for RESUME support. thanks to jbailey@debian.org.
+
- -- maximilian attems <debian@sternwelten.at> Mon, 16 May 2005 13:09:27 +0200
+ -- maximilian attems <max@sputnik.stro.at> Tue, 17 May 2005 16:53:18 +0200
initrd-tools (0.1.79) unstable; urgency=high
Modified: trunk/utils/initrd-tools/init
===================================================================
--- trunk/utils/initrd-tools/init 2005-05-17 04:27:41 UTC (rev 3132)
+++ trunk/utils/initrd-tools/init 2005-05-17 15:08:38 UTC (rev 3133)
@@ -153,7 +153,7 @@
ide_options=
ro=r
noresume=
- resume=
+ resume=${RESUME}
for i in $(cat proc/cmdline); do
case $i in
init=*)
@@ -309,14 +309,10 @@
fi
}
-load_swsusp() {
+do_swsusp() {
local device major minor sysfs=
local resume="$resume"
- if ! modprobe -n swsusp > /dev/null 2>&1; then
- return
- fi
-
if mount -nt sysfs sysfs sys > /dev/null 2>&1; then
sysfs=yes
fi
@@ -324,12 +320,13 @@
if [ -n "$resume" ]; then
device=${resume#*=}
if get_sysfs_device "$device"; then
- resume=resume=$(printf '%02x%02x\n' $major $minor)
+ if [ -f /sys/power/resume ]; then
+ echo -n "$major:$minor" >/sys/power/resume
+ fi
else
echo Failed to decode swap device "$device" >&2
fi
fi
- modprobe -k swsusp ${resume:+"$resume"} ${noresume:+"$noresume"}
if [ $sysfs ]; then
umount -n sys
@@ -398,7 +395,7 @@
ROOT=${CMDROOT:-$ROOT}
if [ -n "$resume$noresume" ]; then
- load_swsusp
+ do_swsusp
fi
umount -n devfs
Modified: trunk/utils/initrd-tools/mkinitrd
===================================================================
--- trunk/utils/initrd-tools/mkinitrd 2005-05-17 04:27:41 UTC (rev 3132)
+++ trunk/utils/initrd-tools/mkinitrd 2005-05-17 15:08:38 UTC (rev 3133)
@@ -1245,6 +1245,7 @@
install $SHARE/init initrd/sbin
install $SHARE/linuxrc initrd
cat - $SHARE/version <<- EOF > initrd/linuxrc.conf
+ RESUME=$RESUME
DELAY=$DELAY
BUSYBOX=$BUSYBOX
FSTYPES=$FSTYPES
Modified: trunk/utils/initrd-tools/mkinitrd.conf
===================================================================
--- trunk/utils/initrd-tools/mkinitrd.conf 2005-05-17 04:27:41 UTC (rev 3132)
+++ trunk/utils/initrd-tools/mkinitrd.conf 2005-05-17 15:08:38 UTC (rev 3133)
@@ -29,3 +29,7 @@
# This is the value for LD_LIBRARY_PATH when deciding what goes onto the
# image.
INITRD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+
+# Hardcode partition to resume from so it doesn't have to be specified
+# on the command line. The command line will override this setting.
+# RESUME=
Modified: trunk/utils/initrd-tools/mkinitrd.conf.5
===================================================================
--- trunk/utils/initrd-tools/mkinitrd.conf.5 2005-05-17 04:27:41 UTC (rev 3132)
+++ trunk/utils/initrd-tools/mkinitrd.conf.5 2005-05-17 15:08:38 UTC (rev 3133)
@@ -155,6 +155,12 @@
determines the library dependencies of binaries that will be copied onto
the image.
+.TP
+.B RESUME
+If this is set, default to this partition to use for resuming. The resume=
+passed on the command line will override this setting.
+The kernel needs to have the power managment (PM) config's enabled.
+
.SH SEE ALSO
.BR mkinitrd (8)