diff options
author | Raymond Danks <raymond@edanks.com> | 2006-04-18 01:33:59 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-04-18 01:33:59 +0000 |
commit | 4d7df24aeacecc435b4311f7771c4c2c7e8c57f4 (patch) | |
tree | eb6726e80dcca5d93683c8ee487bae5a03a57a54 | |
parent | cbbcbb9eab5ba1f1caaf31f5a838b45c52b17685 (diff) |
hibernate-script: initial add
-rw-r--r-- | packages/hibernate-script/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/hibernate-script/hibernate-script/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/hibernate-script/hibernate-script/hibernate.conf | 169 | ||||
-rw-r--r-- | packages/hibernate-script/hibernate-script/ram.conf | 120 | ||||
-rw-r--r-- | packages/hibernate-script/hibernate-script/standby.conf | 120 | ||||
-rw-r--r-- | packages/hibernate-script/hibernate-script_1.12.bb | 39 |
6 files changed, 448 insertions, 0 deletions
diff --git a/packages/hibernate-script/.mtn2git_empty b/packages/hibernate-script/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/hibernate-script/.mtn2git_empty diff --git a/packages/hibernate-script/hibernate-script/.mtn2git_empty b/packages/hibernate-script/hibernate-script/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/hibernate-script/hibernate-script/.mtn2git_empty diff --git a/packages/hibernate-script/hibernate-script/hibernate.conf b/packages/hibernate-script/hibernate-script/hibernate.conf new file mode 100644 index 0000000000..c7dd2f3f6b --- /dev/null +++ b/packages/hibernate-script/hibernate-script/hibernate.conf @@ -0,0 +1,169 @@ +# Example hibernate.conf file. Adapt to your own tastes. +# Options are not case sensitive. +# +# Run "hibernate -h" for help on the configuration items. + +############################################################################## +### Choose your Suspend method. You currently have 3 choices: +### +### suspend2 Software Suspend 2 (requires kernel patches from +### http://www.suspend2.net/) +### +### sysfs_power_state Uses /sys/power/state to suspend (activates pmdisk +### on kernels < 2.6.8, or vanilla swsusp otherwise). +### +### acpi_sleep Uses /proc/acpi/sleep to activate swsusp, or other +### ACPI sleep state supported by your machine. +### +############################################################################## + +### suspend2 (for Software Suspend 2) +UseSuspend2 yes +Reboot no +EnableEscape yes +DefaultConsoleLevel 1 +Compressor lzf +Encryptor none +# ImageSizeLimit 200 +## useful for initrd usage: +# SuspendDevice swap:/dev/hda2 +## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff +# PowerdownMethod 5 +## Any other /proc/software_suspend setting can be set like so: +# ProcSetting expected_compression 50 +## Or traditionally like this: +# Suspend2AllSettings 0 0 2056 65535 5 +## Or even from the results of hibernate --save-settings with this: +# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf +## For filewriter: +# FilewriterLocation /suspend_file 1000 +# VerifyFilewriterResume2 yes +# ProcSetting userui_program /sbin/suspend2ui_text + +### sysfs_power_state +## To use /sys/power/state to suspend your machine (which may offer +## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options +## above for Software Suspend 2, below for acpi_sleep, and uncomment this line. +## You may replace mem with any one of the states from "cat /sys/power/state" +# UseSysfsPowerState mem +# PowerdownMethod shutdown + +### acpi_sleep +## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out +## all the options above for Software Suspend 2 and sysfs, and uncomment this +## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and +## 4 is suspend-to-disk. +# UseACPISleep 4 + +############################################################################## +### Some global settings +############################################################################## + +Verbosity 0 +LogFile /var/log/hibernate.log +LogVerbosity 1 +# AlwaysForce yes +# AlwaysKill yes +# HibernateVT 15 +Distribution OE +# XDisplay :0 + +############################################################################## +### Scriptlets +### Scriptlets provide support for doing all sorts of things before and after +### suspending. The defaults settings here should work for most people, but +### you may wish to edit these to taste. Consult "hibernate -h" for help on +### the configuration settings. +############################################################################## + +### bootsplash +## If you use bootsplash, also enabling SwitchToTextMode is recommended if +## you use X, otherwise you may end up with a garbled X display. +# Bootsplash on +# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg + +### clock +SaveClock restore-only + +### devices +# IncompatibleDevices /dev/dsp /dev/video* + +### diskcache +# DisableWriteCacheOn /dev/hda + +### fbsplash (enable SwitchToTextMode if you use this) +# FBSplash on +# FBSplashTheme suspend2 + +### filesystems +# Unmount /nfsshare /windows /mnt/sambaserver +# UnmountFSTypes smbfs nfs +# UnmountGraceTime 1 +# Mount /windows + +### grub +# ChangeGrubMenu yes +# GrubMenuFile /boot/grub/menu.lst +# AlternateGrubMenuFile /boot/grub/menu-suspended.lst +# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak + +### hardware_tweaks +# IbmAcpi yes +# RadeonTool yes + +### lilo +# EnsureLILOResumes yes + +### lock (generally you only want one of the following options) +# LockConsoleAs root +# LockXScreenSaver yes +# LockKDE yes +# LockXLock yes +# LockXAutoLock yes + +### misclaunch +# OnSuspend 20 echo "Good night!" +# OnResume 20 echo "Good morning!" + +### modules +# UnloadModules snd_via82cxxx usb-ohci +# UnloadAllModules yes +UnloadBlacklistedModules yes +LoadModules auto +# LoadModulesFromFile /etc/modules + +### modules-gentoo +# GentooModulesAutoload yes + +### network +# DownInterfaces eth0 +# UpInterfaces auto + +### pcmcia +# EjectCards yes + +### programs +# IncompatiblePrograms xmms + +### services +# RestartServices postfix +# StopServices alsasound +# StartServices aumix + +### vbetool +# EnableVbetool yes +# RestoreVbeStateFrom /var/lib/vbetool/vbestate +# VbetoolPost yes +# RestoreVCSAData yes + +### xhacks +SwitchToTextMode yes +# UseDummyXServer yes + +### xstatus +## This can be set to gnome, kde or x: +# XStatus gnome +# XSuspendText Preparing to suspend... +# XResumeText Resuming from suspend... +## When using XStatus x, and you have xosd installed: +# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50 diff --git a/packages/hibernate-script/hibernate-script/ram.conf b/packages/hibernate-script/hibernate-script/ram.conf new file mode 100644 index 0000000000..d452bd2957 --- /dev/null +++ b/packages/hibernate-script/hibernate-script/ram.conf @@ -0,0 +1,120 @@ +# Example ram.conf file for suspending to RAM. Adapt to your own tastes. +# Options are not case sensitive. +# +# Run "hibernate -h" for help on the configuration items. + +### sysfs_power_state +UseSysfsPowerState mem + +############################################################################## +### Some global settings +############################################################################## + +Verbosity 0 +LogFile /var/log/hibernate.log +LogVerbosity 1 +# AlwaysForce yes +# AlwaysKill yes +# HibernateVT 15 +Distribution OE +# XDisplay :0 + +############################################################################## +### Scriptlets +### Scriptlets provide support for doing all sorts of things before and after +### suspending. The defaults settings here should work for most people, but +### you may wish to edit these to taste. Consult "hibernate -h" for help on +### the configuration settings. +############################################################################## + +### bootsplash +## If you use bootsplash, also enabling SwitchToTextMode is recommended if +## you use X, otherwise you may end up with a garbled X display. +# Bootsplash on +# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg + +### clock +SaveClock restore-only + +### devices +# IncompatibleDevices /dev/dsp /dev/video* + +### diskcache +# DisableWriteCacheOn /dev/hda + +### fbsplash (enable SwitchToTextMode if you use this) +# FBSplash on +# FBSplashTheme suspend2 + +### filesystems +# Unmount /nfsshare /windows /mnt/sambaserver +# UnmountFSTypes smbfs nfs +# UnmountGraceTime 1 +# Mount /windows + +### grub +# ChangeGrubMenu yes +# GrubMenuFile /boot/grub/menu.lst +# AlternateGrubMenuFile /boot/grub/menu-suspended.lst +# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak + +### hardware_tweaks +# IbmAcpi yes +# RadeonTool yes + +### lilo +# EnsureLILOResumes yes + +### lock (generally you only want one of the following options) +# LockConsoleAs root +# LockXScreenSaver yes +# LockKDE yes +# LockXLock yes +# LockXAutoLock yes + +### misclaunch +# OnSuspend 20 echo "Good night!" +# OnResume 20 echo "Good morning!" + +### modules +UnloadModules usb-storage uhci-hcd ohci-hcd ehci-hcd +# UnloadAllModules yes +# UnloadBlacklistedModules yes +LoadModules auto +# LoadModulesFromFile /etc/modules + +### modules-gentoo +# GentooModulesAutoload yes + +### network +# DownInterfaces eth0 +# UpInterfaces auto + +### pcmcia +# EjectCards yes + +### programs +# IncompatiblePrograms xmms + +### services +# RestartServices postfix +# StopServices alsasound +# StartServices aumix + +### vbetool +EnableVbetool yes +# RestoreVbeStateFrom /var/lib/vbetool/vbestate +VbetoolPost yes +# RestoreVCSAData yes + +### xhacks +SwitchToTextMode yes +# UseDummyXServer yes + +### xstatus +## This can be set to gnome, kde or x: +# XStatus gnome +# XSuspendText Preparing to suspend... +# XResumeText Resuming from suspend... +## When using XStatus x, and you have xosd installed: +# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50 diff --git a/packages/hibernate-script/hibernate-script/standby.conf b/packages/hibernate-script/hibernate-script/standby.conf new file mode 100644 index 0000000000..d39f4fef92 --- /dev/null +++ b/packages/hibernate-script/hibernate-script/standby.conf @@ -0,0 +1,120 @@ +# Example ram.conf file for suspending to RAM. Adapt to your own tastes. +# Options are not case sensitive. +# +# Run "hibernate -h" for help on the configuration items. + +### sysfs_power_state +UseSysfsPowerState standby + +############################################################################## +### Some global settings +############################################################################## + +Verbosity 0 +LogFile /var/log/hibernate.log +LogVerbosity 1 +# AlwaysForce yes +# AlwaysKill yes +# HibernateVT 15 +Distribution OE +# XDisplay :0 + +############################################################################## +### Scriptlets +### Scriptlets provide support for doing all sorts of things before and after +### suspending. The defaults settings here should work for most people, but +### you may wish to edit these to taste. Consult "hibernate -h" for help on +### the configuration settings. +############################################################################## + +### bootsplash +## If you use bootsplash, also enabling SwitchToTextMode is recommended if +## you use X, otherwise you may end up with a garbled X display. +# Bootsplash on +# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg + +### clock +SaveClock restore-only + +### devices +# IncompatibleDevices /dev/dsp /dev/video* + +### diskcache +# DisableWriteCacheOn /dev/hda + +### fbsplash (enable SwitchToTextMode if you use this) +# FBSplash on +# FBSplashTheme suspend2 + +### filesystems +# Unmount /nfsshare /windows /mnt/sambaserver +# UnmountFSTypes smbfs nfs +# UnmountGraceTime 1 +# Mount /windows + +### grub +# ChangeGrubMenu yes +# GrubMenuFile /boot/grub/menu.lst +# AlternateGrubMenuFile /boot/grub/menu-suspended.lst +# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak + +### hardware_tweaks +# IbmAcpi yes +# RadeonTool yes + +### lilo +# EnsureLILOResumes yes + +### lock (generally you only want one of the following options) +# LockConsoleAs root +# LockXScreenSaver yes +# LockKDE yes +# LockXLock yes +# LockXAutoLock yes + +### misclaunch +# OnSuspend 20 echo "Good night!" +# OnResume 20 echo "Good morning!" + +### modules +UnloadModules usb-storage uhci-hcd ohci-hcd ehci-hcd +# UnloadAllModules yes +# UnloadBlacklistedModules yes +LoadModules auto +# LoadModulesFromFile /etc/modules + +### modules-gentoo +# GentooModulesAutoload yes + +### network +# DownInterfaces eth0 +# UpInterfaces auto + +### pcmcia +# EjectCards yes + +### programs +# IncompatiblePrograms xmms + +### services +# RestartServices postfix +# StopServices alsasound +# StartServices aumix + +### vbetool +EnableVbetool yes +# RestoreVbeStateFrom /var/lib/vbetool/vbestate +VbetoolPost yes +# RestoreVCSAData yes + +### xhacks +SwitchToTextMode yes +# UseDummyXServer yes + +### xstatus +## This can be set to gnome, kde or x: +# XStatus gnome +# XSuspendText Preparing to suspend... +# XResumeText Resuming from suspend... +## When using XStatus x, and you have xosd installed: +# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50 diff --git a/packages/hibernate-script/hibernate-script_1.12.bb b/packages/hibernate-script/hibernate-script_1.12.bb new file mode 100644 index 0000000000..fc53e49a75 --- /dev/null +++ b/packages/hibernate-script/hibernate-script_1.12.bb @@ -0,0 +1,39 @@ +# hibernate-script OE build file +# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved +# Released under the MIT license (see packages/COPYING) + +DESCRIPTION="Hibernate script supporting multiple suspend methods" +LICENSE="GPL" +MAINTAINER = "Raymond Danks <raymondd@ia.amd.com>" +HOMEPAGE="http://www.suspend2.net" + +SRC_URI="http://www.suspend2.net/downloads/all/${PN}-${PV}.tar.gz \ + file://hibernate.conf \ + file://standby.conf \ + file://ram.conf" + +inherit update-rc.d + +INITSCRIPT_NAME = "hibernate-cleanup" +INITSCRIPT_PARAMS = "start 31 S ." + +FILES_${PN}_append = " /usr/share/hibernate" + +do_install () { + BASE_DIR=${D} PREFIX=/usr MAN_DIR=${D}/usr/share/man \ + ${S}/install.sh + + ln -s ./hibernate ${D}/usr/sbin/hibernate-standby + ln -s ./hibernate ${D}/usr/sbin/hibernate-ram + + #Override conf files from ${WORKDIR} + install -m 0644 ${WORKDIR}/hibernate.conf ${D}/etc/hibernate/ + install -m 0644 ${WORKDIR}/ram.conf ${D}/etc/hibernate/ + install -m 0644 ${WORKDIR}/standby.conf ${D}/etc/hibernate/ + + install -d ${D}/etc/init.d + install -m 0755 ${S}/init.d/hibernate-cleanup.sh ${D}/etc/init.d/hibernate-cleanup + +} + + |