X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=blobdiff_plain;f=recipes%2Fpandora-system%2Fpandora-state%2Frc.pandora-state;h=4178d886bd9aa13733f7e156780afe6fe5b6cafe;hp=7fd1de4e7f3d539cc266e9da77163a8960b16898;hb=342f5bfd74afd978b27a01c0a11706ef0ef47b9e;hpb=b2c81f2e516887139aab262dd9c0379795804399 diff --git a/recipes/pandora-system/pandora-state/rc.pandora-state b/recipes/pandora-system/pandora-state/rc.pandora-state index 7fd1de4..4178d88 100644 --- a/recipes/pandora-system/pandora-state/rc.pandora-state +++ b/recipes/pandora-system/pandora-state/rc.pandora-state @@ -4,11 +4,11 @@ # Provides: pandora-lcd-state # Required-Start: #adjust # Required-Stop: #adjust -# Default-Start: S +# Default-Start: 5 3 # Default-Stop: 0 1 6 ### END INIT INFO -DESC="OpenPandora Save and Restore LCD Settings" +DESC="OpenPandora Save and Restore various settings" NAME="pandora-state" . /usr/pandora/scripts/op_paths.sh @@ -33,16 +33,25 @@ d_stop() { cat -v /proc/pandora/nub1/scrolly_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state cat -v /proc/pandora/nub1/scroll_rate | sed -n '1p' >> /etc/pandora/conf/nubs.state cat -v /proc/pandora/nub1/mbutton_threshold | sed -n '1p' >> /etc/pandora/conf/nubs.state + cat -v /proc/pandora/nub0/mbutton_delay | sed -n '1p' >> /etc/pandora/conf/nubs.state + cat -v /proc/pandora/nub1/mbutton_delay | sed -n '1p' >> /etc/pandora/conf/nubs.state } d_start() { echo "Restoring Pandora specific settings" + highpow="$(cat /etc/pandora/conf/led.conf | grep HighPowerLED: | awk -F\: '{print $2}')" + echo $highpow > /sys/class/leds/pandora\:\:power/brightness #power LED bright bright=$(cat /etc/pandora/conf/brightness.state) if [ "$bright" -gt "0" ]; then echo $bright > $SYSFS_BACKLIGHT_BRIGHTNESS fi cat /etc/pandora/conf/dirty_expire_centisecs > /proc/sys/vm/dirty_expire_centisecs cat /etc/pandora/conf/gamma.state > $SYSFS_GAMMA + if [ -f /etc/pandora/conf/dssgamma.state ]; then + dssgamma=$(cat /etc/pandora/conf/dssgamma.state) + dssgamma2=$(echo "scale=2;$dssgamma / 100" | bc) + /usr/pandora/scripts/op_gamma.sh $dssgamma2 + fi if [ -f /etc/pandora/conf/filter.state ]; then filter=$(cat /etc/pandora/conf/filter.state) /usr/pandora/scripts/op_videofir.sh $filter @@ -52,12 +61,19 @@ d_start() { echo $oppmax > /proc/pandora/cpu_opp_max if [ -f /etc/pandora/shutdown ]; then rm /etc/pandora/shutdown - sync - /usr/pandora/scripts/op_cpuspeed.sh -n $cpuspeed + sync else - echo "No clean shutdown - will not set CPU speed" + echo "No clean shutdown - will CPU Speed will be set to safe value." echo "Yes" > /tmp/nocleanwarn + chmod 777 /tmp/nocleanwarn + pnd_version=$(dmesg | grep OMAP3 | grep ES | awk '{print $3}') + if [ "$pnd_version" == "OMAP3630" ]; then + cpuspeed="1000" + else + cpuspeed="600" + fi fi + /usr/pandora/scripts/op_cpuspeed.sh -n $cpuspeed sed -n '1p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mode sed -n '2p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mouse_sensitivity sed -n '3p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/scrollx_sensitivity @@ -70,6 +86,8 @@ d_start() { sed -n '10p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/scrolly_sensitivity sed -n '11p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/scroll_rate sed -n '12p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mbutton_threshold + sed -n '13p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mbutton_delay + sed -n '14p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mbutton_delay echo "Enabling ZRAM Swap" mkswap /dev/zram0 swapon -p 5 /dev/zram0