From: Grazvydas Ignotas Date: Tue, 27 Mar 2012 22:37:24 +0000 (+0300) Subject: Revert "op_cpusettings.sh: Shows warning message if user tries to change OPP with... X-Git-Tag: sz_beta3~6 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=2d49c347042387de3097ba74ecd5bd2fc9088c3f Revert "op_cpusettings.sh: Shows warning message if user tries to change OPP with experimental kernel" This reverts commit 6b644025757beecd970a383872c90f451be28ef2, as OPP is implemented in kernel. --- diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index b120e0b..bf97b54 100644 --- a/recipes/pandora-system/pandora-scripts.bb +++ b/recipes/pandora-system/pandora-scripts.bb @@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" DEPENDS = "zenity dbus" RDEPENDS = "zenity dbus" -PR = "r87" +PR = "r88" SRC_URI = " \ file://op_paths.sh \ diff --git a/recipes/pandora-system/pandora-scripts/op_cpusettings.sh b/recipes/pandora-system/pandora-scripts/op_cpusettings.sh index 3d2a0ec..aa627a8 100755 --- a/recipes/pandora-system/pandora-scripts/op_cpusettings.sh +++ b/recipes/pandora-system/pandora-scripts/op_cpusettings.sh @@ -13,19 +13,14 @@ while mainsel=$(zenity --title="CPU-Settings" --width="400" --height="350" --lis case $mainsel in "opp") - kernel_major=`uname -r | cut -c 1` - if [ "$kernel_major" = "3" ]; then - zenity --info --title="OPP not supported" --text "Sorry, the experimental kernel does not support overvolting.\n\nTherefore, you cannot configure these CPU-Settings." - else - opp="$(cat /etc/pandora/conf/cpu.conf | grep opp | awk -F\: '{print $2}')" - if zenity --question --title="OPP Setting Info" --text="WARNING!\n\nIncreasing the maximum allowed OPP will allow you to overclock to higher values.\n\nHowever, besides using more power, it ALSO DECREASES THE LIFETIME OF YOUR CPU!\n\nBe absolutely sure you know what you are doing here. \n\nThe standard OPP setting is 3, everything above is out of the specification!" --ok-label="Yes, I know what I'm doing!" --cancel-label="I'm scared!"; then - if newopp=$(zenity --scale --text "Set the maximum allowed OPP" --min-value=3 --max-value=5 --value=$opp --step 1); then - echo $newopp > /proc/pandora/cpu_opp_max - sed -i "s/.*maxopp.*/maxopp:$newopp/g" /etc/pandora/conf/cpu.conf - zenity --info --title="OPP Set" --text "The maximum allowed OPP value has been set to $newopp." --timeout 6 - else - zenity --info --title="No change" --text "The maximum OPP value has not been changed." --timeout 6 - fi + opp="$(cat /etc/pandora/conf/cpu.conf | grep opp | awk -F\: '{print $2}')" + if zenity --question --title="OPP Setting Info" --text="WARNING!\n\nIncreasing the maximum allowed OPP will allow you to overclock to higher values.\n\nHowever, besides using more power, it ALSO DECREASES THE LIFETIME OF YOUR CPU!\n\nBe absolutely sure you know what you are doing here. \n\nThe standard OPP setting is 3, everything above is out of the specification!" --ok-label="Yes, I know what I'm doing!" --cancel-label="I'm scared!"; then + if newopp=$(zenity --scale --text "Set the maximum allowed OPP" --min-value=3 --max-value=5 --value=$opp --step 1); then + echo $newopp > /proc/pandora/cpu_opp_max + sed -i "s/.*maxopp.*/maxopp:$newopp/g" /etc/pandora/conf/cpu.conf + zenity --info --title="OPP Set" --text "The maximum allowed OPP value has been set to $newopp." --timeout 6 + else + zenity --info --title="No change" --text "The maximum OPP value has not been changed." --timeout 6 fi fi;;