From 342f5bfd74afd978b27a01c0a11706ef0ef47b9e Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Tue, 16 Jul 2013 04:42:16 +0200 Subject: [PATCH] rc.pandora-state: If unit crashed, the safe CPU speed will now be set according to the Pandora type (600MHz or 1GHz) --- .../pandora-system/pandora-state/rc.pandora-state | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/pandora-system/pandora-state/rc.pandora-state b/recipes/pandora-system/pandora-state/rc.pandora-state index b1b5429..4178d88 100644 --- a/recipes/pandora-system/pandora-state/rc.pandora-state +++ b/recipes/pandora-system/pandora-state/rc.pandora-state @@ -8,7 +8,7 @@ # 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 @@ -61,13 +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 -- 2.39.2