-DESCRIPTION = "Save and restore the brightness and gamma state on shutdown / startup"
+DESCRIPTION = "Save and restore some specific Pandora settings on shutdown / startup"
LICENSE = "GPLv2"
COMPATIBLE_MACHINE = "omap3-pandora"
-PR = "r4"
+PR = "r5"
inherit update-rc.d
-INITSCRIPT_NAME = "pandora-lcd-state"
+INITSCRIPT_NAME = "pandora-state"
INITSCRIPT_PARAMS = "start 39 S . stop 31 0 1 6 ."
SRC_URI = " \
file://gamma.state \
file://brightness.state \
file://nubs.state \
+ file://dirty_expire_centisecs \
"
do_install() {
install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/rc.pandora-lcd-state ${D}${sysconfdir}/init.d/pandora-lcd-state
+ install -m 0755 ${WORKDIR}/rc.pandora-state ${D}${sysconfdir}/init.d/pandora-state
install -d ${D}${sysconfdir}/pandora/conf/
install -m 0644 ${WORKDIR}/gamma.state ${D}${sysconfdir}/pandora/conf/gamma.state
install -m 0644 ${WORKDIR}/brightness.state ${D}${sysconfdir}/pandora/conf/brightness.state
install -m 0644 ${WORKDIR}/nubs.state ${D}${sysconfdir}/pandora/conf/nubs.state
+ install -m 0644 ${WORKDIR}/dirty_expire_centisecs ${D}${sysconfdir}/pandora/conf/dirty_expire_centisecs
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
### END INIT INFO
DESC="OpenPandora Save and Restore LCD Settings"
-NAME="pandora-lcd-state"
+NAME="pandora-state"
d_stop() {
- echo "Saving LCD and Nub-Settings"
+ echo "Saving Pandora specific settings"
bright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness)
if [ $bright != "0" ]; then
cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness > /etc/pandora/conf/brightness.state
}
d_start() {
- echo "Restoring LCD and Nub-Settings"
+ echo "Restoring Pandora specific settings"
+ cat /etc/pandora/conf/dirty_expire_centisecs > /proc/sys/vm/dirty_expire_centisecs
cat /etc/pandora/conf/brightness.state > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
cat /etc/pandora/conf/gamma.state > /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma
sed -n '1p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mode