pandora-scripts: add a script for ram/system overclocking
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 3 Apr 2012 21:58:51 +0000 (00:58 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 3 Apr 2012 21:58:51 +0000 (00:58 +0300)
recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_sysspeed.sh [new file with mode: 0755]

index bf97b54..b9e9303 100644 (file)
@@ -6,13 +6,14 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r88"
+PR = "r89"
 
 SRC_URI = " \
           file://op_paths.sh \
           file://op_bright.sh \
           file://op_cpuspeed.sh \
           file://op_cpuspeed.pnd \          
+          file://op_sysspeed.sh \
           file://op_wifi.sh \
           file://op_wifi.pnd \  
           file://op_bluetooth.sh \
@@ -85,7 +86,8 @@ do_install() {
           install -m 0755 ${WORKDIR}/op_paths.sh ${D}${prefix}/pandora/scripts/
           install -m 0755 ${WORKDIR}/op_bright.sh ${D}${prefix}/pandora/scripts/
           install -m 0755 ${WORKDIR}/op_cpuspeed.sh ${D}${prefix}/pandora/scripts/
-         install -m 0755 ${WORKDIR}/op_cpusettings.sh ${D}${prefix}/pandora/scripts/
+          install -m 0755 ${WORKDIR}/op_sysspeed.sh ${D}${prefix}/pandora/scripts/
+          install -m 0755 ${WORKDIR}/op_cpusettings.sh ${D}${prefix}/pandora/scripts/
           install -m 0755 ${WORKDIR}/op_wifi.sh ${D}${prefix}/pandora/scripts/
           install -m 0755 ${WORKDIR}/op_bluetooth.sh ${D}${prefix}/pandora/scripts/
           install -m 0755 ${WORKDIR}/op_startupmanager.sh ${D}${prefix}/pandora/scripts/
diff --git a/recipes/pandora-system/pandora-scripts/op_sysspeed.sh b/recipes/pandora-system/pandora-scripts/op_sysspeed.sh
new file mode 100755 (executable)
index 0000000..91fcf73
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ ! -e /proc/pandora/sys_mhz_max ]; then
+  echo "error: no support in kernel"
+  exit 1
+fi
+if [ $# -ne 1 ]; then
+  echo "usage:"
+  echo "$0 <sys_clock>"
+  exit 1
+fi
+
+sync
+
+# TODO: we need to stop all RAM users here, that includes DMAs and DSP
+# only handling the display for now..
+echo 1 > /sys/class/graphics/fb0/blank
+echo $1 > /proc/pandora/sys_mhz_max
+echo 0 > /sys/class/graphics/fb0/blank