From 7a1617e9f13b0cece7389853fa63a32534054c3a Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Mon, 21 Jun 2010 01:25:36 +0200 Subject: [PATCH] pandora-lcd-state: Now renamed to pandora-state and including dirty_expire_centisecs-Settings --- .../{pandora-lcd-state.bb => pandora-state.bb} | 10 ++++++---- .../brightness.state | 0 .../pandora-state/dirty_expire_centisecs | 1 + .../{pandora-lcd-state => pandora-state}/gamma.state | 0 .../{pandora-lcd-state => pandora-state}/nubs.state | 0 .../rc.pandora-state} | 7 ++++--- recipes/tasks/task-pandora-core.bb | 4 ++-- 7 files changed, 13 insertions(+), 9 deletions(-) rename recipes/pandora-system/{pandora-lcd-state.bb => pandora-state.bb} (68%) rename recipes/pandora-system/{pandora-lcd-state => pandora-state}/brightness.state (100%) create mode 100644 recipes/pandora-system/pandora-state/dirty_expire_centisecs rename recipes/pandora-system/{pandora-lcd-state => pandora-state}/gamma.state (100%) rename recipes/pandora-system/{pandora-lcd-state => pandora-state}/nubs.state (100%) rename recipes/pandora-system/{pandora-lcd-state/rc.pandora-lcd-state => pandora-state/rc.pandora-state} (94%) diff --git a/recipes/pandora-system/pandora-lcd-state.bb b/recipes/pandora-system/pandora-state.bb similarity index 68% rename from recipes/pandora-system/pandora-lcd-state.bb rename to recipes/pandora-system/pandora-state.bb index 7e09c6f..cedf4a4 100755 --- a/recipes/pandora-system/pandora-lcd-state.bb +++ b/recipes/pandora-system/pandora-state.bb @@ -1,12 +1,12 @@ -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 = " \ @@ -14,15 +14,17 @@ 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}" diff --git a/recipes/pandora-system/pandora-lcd-state/brightness.state b/recipes/pandora-system/pandora-state/brightness.state similarity index 100% rename from recipes/pandora-system/pandora-lcd-state/brightness.state rename to recipes/pandora-system/pandora-state/brightness.state diff --git a/recipes/pandora-system/pandora-state/dirty_expire_centisecs b/recipes/pandora-system/pandora-state/dirty_expire_centisecs new file mode 100644 index 0000000..5113faf --- /dev/null +++ b/recipes/pandora-system/pandora-state/dirty_expire_centisecs @@ -0,0 +1 @@ +20 diff --git a/recipes/pandora-system/pandora-lcd-state/gamma.state b/recipes/pandora-system/pandora-state/gamma.state similarity index 100% rename from recipes/pandora-system/pandora-lcd-state/gamma.state rename to recipes/pandora-system/pandora-state/gamma.state diff --git a/recipes/pandora-system/pandora-lcd-state/nubs.state b/recipes/pandora-system/pandora-state/nubs.state similarity index 100% rename from recipes/pandora-system/pandora-lcd-state/nubs.state rename to recipes/pandora-system/pandora-state/nubs.state diff --git a/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state b/recipes/pandora-system/pandora-state/rc.pandora-state similarity index 94% rename from recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state rename to recipes/pandora-system/pandora-state/rc.pandora-state index e8b9ceb..252819c 100644 --- a/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state +++ b/recipes/pandora-system/pandora-state/rc.pandora-state @@ -9,10 +9,10 @@ ### 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 @@ -33,7 +33,8 @@ d_stop() { } 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 diff --git a/recipes/tasks/task-pandora-core.bb b/recipes/tasks/task-pandora-core.bb index 5927f8b..7196034 100755 --- a/recipes/tasks/task-pandora-core.bb +++ b/recipes/tasks/task-pandora-core.bb @@ -5,7 +5,7 @@ DESCRIPTION = "Task file for default core/console apps and libs in the Pandora i # Don't forget to bump the PR if you change it. -PR = "r26" +PR = "r27" inherit task @@ -65,7 +65,7 @@ PANDORA_LIBS = " \ pandora-libpnd lsof \ omap3-deviceid \ pandora-skel \ - pandora-lcd-state \ + pandora-state \ " SUDO = " \ -- 2.39.2