+++ /dev/null
-# boot options for kernel-power-settings
-
-# fsck of /home partition before mounting?
-# 0=never, 1=if necessary, force=always check
-FSCK_HOME=0
-
-# start USB networking and sshd early during boot
-# 0=off, 1=on
-EARLY_SSH=0
+++ /dev/null
-# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
-# minimum frequency to use
-MINFREQ=250
-# maximum frequency to use
-MAXFREQ=600
-# list of frequency configurations: each "frequency:volt,dsprate"
-FREQS="0:30,90 125:30,90 250:38,180 500:48,360 550:54,400 600:60,430 700:60,430 750:60,430 805:60,430 850:60,500 900:60,500 950:60,500 1000:60,500 1100:72,520 1150:72,520"
-SMARTREFLEX_VDD1=0
-SMARTREFLEX_VDD2=0
-GOVERNOR=ondemand
-UP_THRESHOLD=95
-SAMPLING_RATE=300000
-IGNORE_NICE_LOAD=0
-POWERSAVE_BIAS=0
+++ /dev/null
-# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
-# minimum frequency to use
-MINFREQ=500
-# maximum frequency to use
-MAXFREQ=850
-# list of frequency configurations: each "frequency:volt,dsprate"
-FREQS="500:30,360 550:33,400 600:38,430 700:45,430 750:45,430 805:48,430 850:48,500 900:54,500 950:54,500 1000:60,500 1100:72,520 1150:72,520"
-SMARTREFLEX_VDD1=0
-SMARTREFLEX_VDD2=0
-GOVERNOR=ondemand
-UP_THRESHOLD=75
-SAMPLING_RATE=150000
-IGNORE_NICE_LOAD=1
-POWERSAVE_BIAS=0
+++ /dev/null
-# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
-# minimum frequency to use
-MINFREQ=250
-# maximum frequency to use
-MAXFREQ=600
-# list of frequency configurations: each "frequency:volt,dsprate"
-FREQS="0:30,90 125:30,90 250:38,180 500:48,360 550:48,400 600:54,430 700:54,430 750:54,430 805:54,430 850:54,500 900:54,500 950:54,500 1000:60,500 1100:72,520 1150:72,520"
-SMARTREFLEX_VDD1=0
-SMARTREFLEX_VDD2=0
-GOVERNOR=ondemand
-UP_THRESHOLD=75
-SAMPLING_RATE=150000
-IGNORE_NICE_LOAD=0
-POWERSAVE_BIAS=0
+++ /dev/null
-# tonism starving undervolt configuration
-# minimum frequency to use
-MINFREQ=250
-# maximum frequency to use
-MAXFREQ=600
-# list of frequency configurations: each "frequency:volt,dsprate"
-FREQS="0:22,90 125:22,90 250:28,180 500:29,360 550:32,400 600:34,430 700:41,430 750:42,430 805:45,430 850:46,500 900:49,500 950:52,500 1000:55,500 1100:63,520 1150:69,520"
-SMARTREFLEX_VDD1=0
-SMARTREFLEX_VDD2=0
-GOVERNOR=ondemand
-UP_THRESHOLD=75
-SAMPLING_RATE=150000
-IGNORE_NICE_LOAD=1
-POWERSAVE_BIAS=0
+++ /dev/null
-# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
-# minimum frequency to use
-MINFREQ=250
-# maximum frequency to use
-MAXFREQ=600
-# list of frequency configurations: each "frequency:volt,dsprate"
-FREQS="0:25,90 125:25,90 250:25,180 500:33,360 550:38,400 600:38,430 700:45,430 750:45,430 805:48,430 850:48,500 900:54,500 950:54,500 1000:60,500 1100:72,520 1150:72,520"
-SMARTREFLEX_VDD1=0
-SMARTREFLEX_VDD2=0
-GOVERNOR=ondemand
-UP_THRESHOLD=75
-SAMPLING_RATE=150000
-IGNORE_NICE_LOAD=1
-POWERSAVE_BIAS=0
+++ /dev/null
-# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
-# minimum frequency to use
-MINFREQ=250
-# maximum frequency to use
-MAXFREQ=600
-# list of frequency configurations: each "frequency:volt,dsprate"
-FREQS="0:20,90 125:20,90 250:30,180 500:33,360 550:38,400 600:38,430 700:45,430 750:45,430 805:48,430 850:48,500 900:54,500 950:54,500 1000:60,500 1100:72,520 1150:72,520"
-SMARTREFLEX_VDD1=0
-SMARTREFLEX_VDD2=0
-GOVERNOR=ondemand
-UP_THRESHOLD=75
-SAMPLING_RATE=150000
-IGNORE_NICE_LOAD=1
-POWERSAVE_BIAS=0
+++ /dev/null
-kernel-power-settings (0.12) fremantle; urgency=low
-
- * updated debian files
-
- -- Pali Rohár <pali.rohar@gmail.com> Sat, 09 Jul 2011 17:15:56 +0200
-
-kernel-power-settings (0.11) fremantle; urgency=low
-
- * reupload (broken autobuilder)
-
- -- Thomas Tanner <maemo@tannerlab.com> Sun, 16 May 2010 20:18:13 +0200
-
-kernel-power-settings (0.10) fremantle; urgency=low
-
- * add governor and powersave_bias to profiles
-
- -- Thomas Tanner <maemo@tannerlab.com> Sun, 16 May 2010 18:54:47 +0200
-
-kernel-power-settings (0.9) fremantle; urgency=low
-
- * initial support for other governors, use avoid_frequencies only for ondemand
- * powersave_bias for ondemand
- * control: typo
- * kernel-modules: warning becomes a dialog
-
- -- Thomas Tanner <maemo@tannerlab.com> Sun, 16 May 2010 18:38:19 +0200
-
-kernel-power-settings (0.8) fremantle; urgency=low
-
- * kernel-config: dont allow locking to 0 freq, remove debug msgs,
- proper handling of 600Mhz, set max twice, use ondemand for locking
- * kernel-modules: notify user after crash
- * config/starving: increased 600Mhz voltage
-
- -- Thomas Tanner <maemo@tannerlab.com> Tue, 11 May 2010 08:39:09 +0200
-
-kernel-power-settings (0.7) fremantle; urgency=low
-
- * postinst: run update-sudoers
- * added tonism's starving config with default limits
- * pre-mount: more messages, fix warning
-
- -- Thomas Tanner <maemo@tannerlab.com> Sun, 9 May 2010 10:06:22 +0200
-
-kernel-power-settings (0.6) fremantle; urgency=low
-
- * bugfix (typos): dsprate was not set, shifted frequencies in show and save
- * new commands limits and unlock, rename setdefault to default and require filename for save
- * cleaned up script, check for valid commands
- * move and rename EARLY_SSH and FSCK_HOME to independent /etc/default/kernel-boot file, add to backup
- * fix upstart scripts and safety mechanism
- * config/ideal: enable ignore_nice_load
- * postinst: install default boot config
- * postrm: purge configuration files
-
- -- Thomas Tanner <maemo@tannerlab.com> Fri, 7 May 2010 18:58:57 +0200
-
-kernel-power-settings (0.5) fremantle; urgency=low
-
- * fix important typos in default configs
-
- -- Thomas Tanner <maemo@tannerlab.com> Sun, 2 May 2010 00:00:00 +0100
-
-kernel-power-settings (0.4) fremantle; urgency=low
-
- * new general script kernel-config: new FREQS, IGNORE_NICE_LOAD, EARLYSSH, FSCK_HOME options
- * load /etc/modules on boot
- * add pre-mount hook to /etc/default/mount-opts to optionally
- perform fsck /home and to run /etc/kernel-power/pre-mount.once
-
- -- Thomas Tanner <maemo@tannerlab.com> Sun, 2 May 2010 00:00:00 +0100
-
-kernel-power-settings (0.3) fremantle; urgency=low
-
- * postinst: exit 0
-
- -- Thomas Tanner <maemo@tannerlab.com> Wed, 14 Apr 2010 00:00:00 +0100
-
-kernel-power-settings (0.2) fremantle; urgency=low
-
- * postinst: fix typo, remove old last[re]boot
-
- -- Thomas Tanner <maemo@tannerlab.com> Wed, 14 Apr 2010 00:00:00 +0100
-
-kernel-power-settings (0.1) fremantle; urgency=low
-
- * first upload
-
- -- Thomas Tanner <maemo@tannerlab.com> Wed, 14 Apr 2010 00:00:00 +0100
-
+++ /dev/null
-Source: kernel-power-settings
-Section: utils
-Priority: optional
-Maintainer: Pali Rohár <pali.rohar@gmail.com>
-XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=1528
-Build-Depends: debhelper (>= 4.0.0)
-Standards-Version: 3.8.0
-
-Package: kernel-power-settings
-Section: user/system
-Architecture: armel
-Depends: kernel-feature-overclock, sudo
-XB-Maemo-Display-Name: Linux kernel for power user (settings and overclock)
-Description: Tools for the customization and overclock Linux kernel
- Installing this package will automatically also install Linux kernel
- with overclock support (e.g Linux kernel for power user).
- .
- The command /usr/sbin/kernel-config can be used to load, save and
- show CPU frequency, voltage and DSP settings.
- It can also set defaults which are loaded during boot.
- Different profiles can be stored in the user's home directory.
- .
- This package contains boot options to enable file system checks
- of /home before mounting or to start a SSH server with USB networking.
- .
- Kernel modules specified in /etc/modules are loaded during boot.
- .
- The boot scripts contain safety mechanisms to temporarily disable them
- after a crash for recovery.
- .
- For more details please visit http://wiki.maemo.org/Kernel_Power
-XB-Maemo-Icon-26:
- iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
- d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACYtJREFUeNrUWkurZUcVXvXY
- 59zbtyXpICEiaFrJQFDo6CDOHAi2UQdOFBw4CAqCDhU0DuIPEBtCRupIBxk4
- MBMHgpIMnChE1OAD2uADEkFpUM9z710vv7Wq6ty6u09f0+nb3Tcb6u7Hqb33
- 96361qq1al/1vscfp+Ac3fjH6+S9v3owP/iYMfqyMaabz2ax62wwtnPDOPgY
- ok8pxpQoKKW9UhRC8IFI+UQ4ds7HFKLW1mujffDexRi9MXiGMQG34uborbEO
- 515pckopZ7RxuN8RyflgtBrxfKeNGlNMY0ppxItGUnowSm3Rr7ezubfdnCwe
- SuMw2EsPPvi9x957+SlrNAXvCCTIWkMKvQP6JEYdorQoG6gkUIpo+SgkStyV
- SQb0RwOolACOQdBIlAaQ7XGtT4q2lGhDDCjRGsZYg8Qa71sR75WSPe5Z411o
- doPfN1rrDs/q8MaVVt5Z5T1dnM++8sEPXHnqXzduxOuv/iVutlsGKeCxJbyE
- jxN2uJc3FfkcJzHviBlG5sq/kUq8D4qvyzWKpQ/fzn94H/Mzub88L0hfJc/w
- OPc8Ijh3is8xUhqIMZr+woULscMwRmjCwoDdY+959xcXiwX9/KVfRAyV0gYD
- xTBVeY2mjJuvAR3+aMrgjPRQKtVzrRSDwE1Kl1uEuBADKCX34g5VzKLk/ihk
- lQBl8CKt3IQA5MMEICttPIY5XDw6glSVspv15tGLRxcu/+rl3/D4q9lsJtjl
- 1WyTA7TxBKRYfjZEO2IMTufRosxdVcoCPvEIQTaBrYlLjuWFH0Z0Y433LC3Y
- occ5a3ybz7EvmjdaD9IfvudG57d6G4E12fmse+d6tT76z38XcC6TwcOdEtvj
- EGL7jif/fU3x1yaDmWejNuCpEI4ilZT3AFPAwifgA9gPuGMI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VbpGoKEUmHzxv4UlIalEZhjVosmKT5i2OtA1rLn2kVdbYE+IOS
- 0uyknEp7HfUYVeQlQ65fRTZ3oxA5w2xUeaNpw18tEf99UFHWf/iLSLH8uQVf
- RyBARltrDaaEEPhbbI408jURmh/TeQWf10ZtF9iRu86mAAImSi4WeLklr5ad
- X/BCoOsMf/cdZ11HKJ/4HwdiMHyg0/2cYW8nG+X1IDefzxUI8P9ySP2KITj3
- 4PMnpqT4ozZrP3bWxq7rUlmle0tsVv6xgWkg/Bg7IxPr/2K8Nbb/CTAAF12f
- 5l7y6xMAAAAASUVORK5CYII=
+++ /dev/null
-kernel-load /usr/sbin
-kernel-config /usr/sbin
-pre-mount /etc/kernel-power
-kernel-modules /etc/event.d
-kernel-power /etc/event.d
-kernel-power-shutdown /etc/event.d
-kernel-power.sudoers /etc/sudoers.d
-kernel-power.conf /etc/osso-backup/applications
-config/* /usr/share/kernel-power-settings
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-# move old upstart scripts out of the way
-cd /etc/event.d
-test -f kernel && mv kernel /root/kernel.upstart.old
-test -f kernel-maemo && mv kernel-maemo /root/kernel-maemo.upstart.old
-cd /etc
-test -f lastboot && rm lastboot
-test -f lastreboot && rm lastreboot
-
-# install premount hook
-if ! grep -q "# KERNEL-POWER-HOOK" /etc/default/mount-opts; then
- echo "sh /etc/kernel-power/pre-mount || true # KERNEL-POWER-HOOK" >> /etc/default/mount-opts
-fi
-
-bootcfg=/etc/default/kernel-boot
-test -f $bootcfg || cp /usr/share/kernel-power-settings/boot $bootcfg
-
-update-sudoers
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-if grep -q "# KERNEL-POWER-HOOK" /etc/default/mount-opts; then
- grep -v "# KERNEL-POWER-HOOK" /etc/default/mount-opts > /etc/default/mount-opts.tmp
- mv /etc/default/mount-opts.tmp /etc/default/mount-opts
-fi
-
-case "$1" in
-purge)
- rm -f /etc/default/kernel-power /etc/default/kernel-boot
- rm -rf /etc/kernel-power
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
+++ /dev/null
-#!/usr/bin/make -f
-
-clean:
- dh_testdir
- dh_testroot
- dh_clean
-
-binary:
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_install
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-.PHONY: build clean binary
+++ /dev/null
-#!/bin/sh
-# kernel configuration script for power user kernel
-# (c) Copyright 2010 by Thomas Tanner <maemo@tannerlab.com>
-# licensed under GPLv3
-# version 0.3 (16. May 2010)
-
-if test $# -eq 0; then
- echo "$0 command [options]"
- echo "commands:"
- echo " show - show current settings"
- echo " load <file> - load settings from file"
- echo " save <file> - save settings to file (abs. path or filename in /home/user/.kernel)"
- echo " default [<file>] - set file or the current settings as default settings"
- echo " limits min max - set the frequency limits ('-' keeps the current setting)"
- echo " lock freq [volt] [dsp] - lock CPU at frequency with specific settings"
- echo " unlock - unlock CPU frequency"
- echo "filenames: absolute path or filename in search path or none=defaults"
- echo "search path: .,/home/user/.kernel,/usr/share/kernel-power-settings/"
- exit 1
-fi
-if test "`id -u`" -ne 0; then
- sudo $0 $* # run as root
- exit $?
-fi
-
-cfr=/sys/devices/system/cpu/cpu0/cpufreq
-cfd=$cfr/ondemand
-cfc=$cfr/conservative
-pwr=/sys/power
-
-if test -f $pwr/vdd1_opps_vsel -a -f $pwr/dsp_opps_rate; then :
-else
- echo This kernel version `uname -r` is not supported
- echo Please make sure that kernel-power is installed and running.
- echo If you have just installed the kernel, you need to shutdown and boot to activate it.
- echo To reinstall the power user kernel run:
- echo \'apt-get install --reinstall kernel-power kernel-power-flasher\'
- exit 1
-fi
-
-allfreq=
-for f in `cat $cfr/scaling_available_frequencies`; do
- allfreq="$f $allfreq"
-done
-vsel=`cat $pwr/vdd1_opps_vsel`
-rate=`cat $pwr/dsp_opps_rate`
-
-cmd=$1
-test "$cmd" = setdefault && cmd=default # old name
-case " show load save default limits lock unlock " in
-*" $cmd "*) ;;
-*) echo "invalid command $cmd"; exit 1 ;;
-esac
-arg=
-shift
-if test "$cmd" = unlock; then
- echo 'unlocking frequency. reset to defaults'
- cmd=loaddef
-fi
-if test "$cmd" = default && test $# -eq 0; then
- echo 'saving current settings as defaults'
- arg=/etc/default/kernel-power
- cmd=savedef
-fi
-
-popvsel() { curvsel=$1; shift; vsel="$*"; }
-poprate() { currate=$1; shift; rate="$*"; }
-
-case $cmd in
-show|save|savedef)
- minfreq=$((`cat $cfr/scaling_min_freq`/1000))
- maxfreq=$((`cat $cfr/scaling_max_freq`/1000))
- test $maxfreq = 599 && maxfreq=600
- gov=`cat $cfr/scaling_governor`
- avoid=
- test $gov = ondemand && avoid=`cat $cfd/avoid_frequencies`
- freqs=
- for f in 0 $allfreq; do
- popvsel $vsel
- poprate $rate
- case " $avoid " in *" $f "*) ;;
- *) freqs="$freqs$((f/1000)):$curvsel,$currate " ;;
- esac
- done
- if test $cmd = show; then
- echo "current kernel configuration:"
- echo "current frequency:" $((`cat $cfr/scaling_cur_freq`/1000))
- echo -n "supported frequencies: "
- for f in $allfreq; do echo -n "$((f/1000)) "; done
- echo
- echo "min. frequency:" $minfreq
- echo "max. frequency:" $maxfreq
- echo -n "avoid frequencies: "
- for f in $avoid; do echo -n "$((f/1000)) "; done
- echo
- echo "active frequencies: $freqs"
- echo "SmartReflex" "VDD1=`cat $pwr/sr_vdd1_autocomp`, VDD2=`cat $pwr/sr_vdd2_autocomp`"
- echo -n "governor $gov:"
- if test $gov = ondemand; then
- echo -n " ignore nice load=" `cat $cfd/ignore_nice_load`
- echo -n ", up threshold=" `cat $cfd/up_threshold`
- echo -n ", sampling rate=" `cat $cfd/sampling_rate`
- echo ", powersave bias=" `cat $cfd/powersave_bias`
- else
- echo
- fi
- else
- test $cmd = save && arg=$1
- if test -z "$arg"; then
- echo "filename argument is mssing"
- exit 1
- fi
- if test `basename $arg` = $arg; then
- u=/home/user/.kernel
- arg=$u/$arg
- if test ! -d $u; then
- mkdir -p $u
- chown user.users $u
- fi
- touch $arg
- chown user.users $arg
- fi
- rm -f $arg
- echo "saving to $arg"
- echo "# kernel configuration file generated by $0" > $arg
- echo "MINFREQ=$minfreq" >> $arg
- echo "MAXFREQ=$maxfreq" >> $arg
- echo "FREQS=\"$freqs\"" >> $arg
- echo "SMARTREFLEX_VDD1=`cat $pwr/sr_vdd1_autocomp`" >> $arg
- echo "SMARTREFLEX_VDD2=`cat $pwr/sr_vdd2_autocomp`" >> $arg
- echo "GOVERNOR=$gov" >> $arg
- if test $gov = ondemand; then
- echo "IGNORE_NICE_LOAD=`cat $cfd/ignore_nice_load`" >> $arg
- echo "UP_THRESHOLD=`cat $cfd/up_threshold`" >> $arg
- echo "SAMPLING_RATE=`cat $cfd/sampling_rate`" >> $arg
- echo "POWERSAVE_BIAS=`cat $cfd/powersave_bias`" >> $arg
- fi
- fi
- ;;
-load|loaddef)
- test $cmd = loaddef || arg=$1
- if test -z "$arg"; then
- arg=/etc/default/kernel-power
- test -f $arg || arg=/usr/share/kernel-power-settings/default
- fi
- if test `basename $arg` = $arg; then # not absolute
- for p in . /home/user/.kernel /usr/share/kernel-power-settings; do
- test -f $p/$arg && arg=$p/$arg && break
- done
- fi
- if test ! -f "$arg"; then
- echo "file not found $arg"
- exit 1
- fi
- echo "loading $arg"
- source $arg
- if test -n "$VDD1_OPPS_VSEL" -o -n "$DSP_OPPS_RATE"; then
- echo "warning: old configuration format detected. please save in the new format."
- if test -n "$MAX_FREQ"; then
- test $MAX_FREQ = 600000 && MAX_FREQ=599000
- echo $MAX_FREQ > $cfr/scaling_max_freq
- fi
- test -n "$MIN_FREQ" && echo $MIN_FREQ > $cfr/scaling_min_freq
- test -n "$MAX_FREQ" && echo $MAX_FREQ > $cfr/scaling_max_freq
- test -n "$VDD1_OPPS_VSEL" && echo $VDD1_OPPS_VSEL > $pwr/vdd1_opps_vsel
- test -n "$DSP_OPPS_RATE" && echo $DSP_OPPS_RATE > $pwr/dsp_opps_rate
- test -n "$SMARTREFLEX_VDD1" && echo $SMARTREFLEX_VDD1 > $pwr/sr_vdd1_autocomp
- test -n "$SMARTREFLEX_VDD2" && echo $SMARTREFLEX_VDD2 > $pwr/sr_vdd2_autocomp
- test -n "$IGNORE_NICE_LOAD" && echo $IGNORE_NICE_LOAD > $cfd/ignore_nice_load
- test -n "$UP_THRESHOLD" && echo $UP_THRESHOLD > $cfd/up_threshold
- test -n "$SAMPLING_RATE" && echo $SAMPLING_RATE > $cfd/sampling_rate
- exit 1
- fi
- active=
- minfreq=
- maxfreq=
- for f in $FREQS; do
- freq=`echo $f | cut -d: -f1`
- f=`echo $f | cut -d: -f2`
- volt=`echo $f | cut -d, -f1`
- dsp=`echo $f | cut -d, -f2`
- if test ! $freq = 0; then
- test -z "$minfreq" -o "$freq" -lt "$minfreq" && minfreq=$freq
- test -z "$maxfreq" -o "$freq" -gt "$maxfreq" && maxfreq=$freq
- freq=$((freq*1000))
- case " $allfreq " in *" $freq "*) ;;
- *) echo warning: $freq not supported; continue ;;
- esac
- active="$active $freq"
- fi
- test -z "$volt" && test -z "$dsp" && continue
- tvsel=
- trate=
- for fr in 0 $allfreq; do
- if test $fr = $freq; then
- popvsel $vsel
- poprate $rate
- test -z "$volt" && volt=$curvsel
- test -z "$dsp" && dsp=$currate
- tvsel="$tvsel $volt $vsel"
- trate="$trate $dsp $rate"
- break
- fi
- popvsel $vsel
- tvsel="$tvsel $curvsel"
- poprate $rate
- trate="$trate $currate"
- done
- vsel=$tvsel
- rate=$trate
- done
- test -z "$GOVERNOR" && GOVERNOR=ondemand
- test -n "$MINFREQ" && minfreq=$MINFREQ
- test -n "$MAXFREQ" && maxfreq=$MAXFREQ
- test "$minfreq" -gt 100000 && minfreq=$((minfreq/1000))
- test "$maxfreq" -gt 100000 && maxfreq=$((maxfreq/1000))
- avoid=
- for f in $allfreq; do
- if test "$f" -lt $((minfreq*1000)); then
- avoid="$avoid $f"
- continue
- fi
- case " $active " in *" $f "*) ;;
- *) avoid="$avoid $f" ;;
- esac
- done
- echo $GOVERNOR > $cfr/scaling_governor
- if test $GOVERNOR = ondemand; then
- echo $avoid > $cfd/avoid_frequencies
- test -n "$IGNORE_NICE_LOAD" && echo $IGNORE_NICE_LOAD > $cfd/ignore_nice_load
- test -n "$UP_THRESHOLD" && echo $UP_THRESHOLD > $cfd/up_threshold
- test -n "$SAMPLING_RATE" && echo $SAMPLING_RATE > $cfd/sampling_rate
- test -n "$POWERSAVE_BIAS" && echo $POWERSAVE_BIAS > $cfd/powersave_bias
- fi
- echo $vsel > $pwr/vdd1_opps_vsel
- echo $rate > $pwr/dsp_opps_rate
- test $maxfreq = 600 && maxfreq=599
- echo $((maxfreq*1000)) > $cfr/scaling_max_freq
- echo $((minfreq*1000)) > $cfr/scaling_min_freq
- echo $((maxfreq*1000)) > $cfr/scaling_max_freq
- test -n "$SMARTREFLEX_VDD1" && echo $SMARTREFLEX_VDD1 > $pwr/sr_vdd1_autocomp
- test -n "$SMARTREFLEX_VDD2" && echo $SMARTREFLEX_VDD2 > $pwr/sr_vdd2_autocomp
- echo "successfully loaded."
- ;;
-default)
- arg=$1
- if test -z "$arg"; then
- echo "filename missing"
- exit 1
- fi
- if test `basename $arg` = $arg; then # not absolute
- for p in . /home/user/.kernel /usr/share/kernel-power-settings; do
- test -f $p/$arg && arg=$p/$arg && break
- done
- fi
- def=/etc/default/kernel-power
- rm -f $def
- case $arg in
- /usr/share/kernel-power-settings/*) ln -s $arg $def ;;
- *) cp $arg $def ;;
- esac
- echo "defaults set to $arg"
- ;;
-limits)
- minfreq=$1
- maxfreq=$2
- if test "x$minfreq" = x -o "x$maxfreq" = x; then
- echo "frequency limit arguments missing"
- exit 1
- fi
- test "x$minfreq" = "x-" && minfreq=$((`cat $cfr/scaling_min_freq`/1000))
- test "x$maxfreq" = "x-" && maxfreq=$((`cat $cfr/scaling_max_freq`/1000))
- limits="$minfreq,$maxfreq"
- minfreq=$((minfreq*1000))
- maxfreq=$((maxfreq*1000))
- case " $allfreq " in *" $minfreq "*) ;;
- *) echo "invalid lower limit $1"; exit 1; ;;
- esac
- case " $allfreq " in *" $maxfreq "*) ;;
- *) echo "invalid upper limit $2"; exit 1; ;;
- esac
- if test $minfreq -gt $maxfreq; then
- echo "minimum must not be greater than maximum: $limits"
- exit 1
- fi
- test $maxfreq = 600000 && maxfreq=599000
- echo $maxfreq > $cfr/scaling_max_freq
- echo $minfreq > $cfr/scaling_min_freq
- echo $maxfreq > $cfr/scaling_max_freq
- echo "the limits were set to [$limits]"
- ;;
-lock)
- arg=$1
- altfreq=
- for f in $allfreq; do
- test "$f" = "$arg" && continue
- altfreq=$f
- break
- done
- vsel=
- dsp=
- freq=$((arg*1000))
- ifreq=
- i=1
- avoid=
- for f in $allfreq; do
- i=$((i+1))
- if test $f = $freq; then
- ifreq=$i
- break
- fi
- avoid="$avoid $f"
- done
- if test -z "ifreq"; then
- echo invalid frequency $freq
- exit 1
- fi
- echo userspace > $cfr/scaling_governor
- echo $altfreq > $cfr/scaling_setspeed # temporarily set alternative frequencies
- volt=$2
- if test -n "$volt"; then
- i=0
- vsel=
- for v in `cat $pwr/vdd1_opps_vsel`; do
- i=$((i+1))
- test $i = $ifreq && v=$volt
- vsel="$vsel $v"
- done
- echo $vsel > $pwr/vdd1_opps_vsel
- fi
- dsp=$3
- if test -n "$dsp"; then
- i=0
- dsp=
- for r in `cat $pwr/dsp_opps_rate`; do
- i=$((i+1))
- test $i = $ifreq && r=$dsp
- dsp="$dsp $r"
- done
- echo $dsp > $pwr/dsp_opps_rate
- fi
- echo locking frequency $freq
- echo ondemand > $cfr/scaling_governor
- echo $avoid > $cfd/avoid_frequencies # avoid all other freqs
- maxfreq=$freq
- test $maxfreq = 600000 && maxfreq=599000
- # min after max? kernel docs are wrong?
- echo $maxfreq > $cfr/scaling_max_freq
- echo $freq > $cfr/scaling_min_freq
- echo $maxfreq > $cfr/scaling_max_freq
- ;;
-esac
-exit 0
+++ /dev/null
-#!/bin/sh
-echo "warning: this command is deprecated. executing: kernel-config load $1"
-/usr/sbin/kernel-config load $1
-exit $?
+++ /dev/null
-description "load modules from /etc/modules"
-start on started hildon-desktop
-console none
-script
- grep '^[^#]' /etc/modules |
- while read module args
- do
- [ "$module" ] || continue
- modprobe $module $args || :
- done
- if test -f /etc/kernel-power/.notloaded; then
- run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog \
- string:"Warning: A unexpected reboot occured. Your custom kernel settings were NOT loaded." uint32:0 string:OK
- fi
-end script
+++ /dev/null
-start on started dsme
-stop on starting shutdown
-service
-console none
-script
- mkdir -p /etc/kernel-power
- if test -f /etc/kernel-power/.loaded; then
- # rebooted w/o clean shutdown, continue
- rm -f /etc/kernel-power/.loaded
- touch /etc/kernel-power/.notloaded
- exit 1
- fi
- touch /etc/kernel-power/.loaded
- if test -f /etc/default/kernel-boot && test `/sbin/getbootstate` = USER; then
- source /etc/default/kernel-boot
- if test "$EARLY_SSH" = 1 && test -x /etc/init.d/ssh; then
- /sbin/modprobe g_nokia
- sleep 1
- /sbin/ifup usb0
- /etc/init.d/ssh start
- fi
- fi
- test -f /etc/default/kernel-power || exit 1
- test -x /usr/sbin/kernel-config || exit 1
- /usr/sbin/kernel-config load
- exit 0
-end script
+++ /dev/null
-start on starting shutdown
-service
-console none
-script
- rm -f /etc/kernel-power/.loaded
- rm -f /etc/kernel-power/.notloaded
-end script
+++ /dev/null
-<backup-configuration>
- <locations>
- <location type="dir" category="settings">
- /home/user/.kernel
- </location>
- <location type="file" category="settings">
- /etc/default/kernel-power
- </location>
- <location type="file" category="settings">
- /etc/default/kernel-boot
- </location>
- </locations>
-</backup-configuration>
+++ /dev/null
-user ALL = NOPASSWD: /usr/sbin/kernel-config *
+++ /dev/null
-#!/bin/sh
-# pre-mounting script
-# called by /etc/default/mount-opts sourced by /etc/event.d/rcS-late
-# (c) Copyright 2010 by Thomas Tanner <maemo@tannerlab.com>
-# licensed under GPLv3
-# version 0.2 (9. May 2010)
-log=/etc/kernel-power/pre-mount.log
-
-if test -f /etc/kernel-power/pre-mount.once; then
- # execute pre-mount script once
- mv /etc/kernel-power/pre-mount.once /etc/kernel-power/pre-mount.done
- date >> $log
- echo executing pre-mount.once >> $log
- sh /etc/kernel-power/pre-mount.done >> $log
- echo pre-mount.once was successfully executed >> $log
-fi
-
-fforce=/etc/kernel-power/force_fsck
-#temporarly overwrite 0=off, 1=on
-force=
-if test -f $fforce; then
- force=`cat $fforce`
- date >> $log
- if test ! "$force" = 1; then
- rm $fforce # disabled
- echo fsck is temporarily disabled >> $log
- exit 0
- fi
- echo fsck is temporarily enabled >> $log
-else
- cfg=/etc/default/kernel-boot
- test -f $cfg || exit 0
- FSCK_HOME=0
- source $cfg
- if test "$FSCK_HOME" = 1; then
- force=
- elif test "$FSCK_HOME" = force; then
- force=1
- else
- exit 0 # disabled
- fi
-fi
-
-part=`sfdisk -l /dev/mmcblk0 | awk '$6 == 83 { print $1; exit }'`
-test -z "$part" && exit 0
-
-mkdir -p /etc/kernel-power/
-date >> $log
-
-# dont continue if reboot during fsck
-echo 0 > $fforce
-test "$force" = 1 && force="-f"
-fsck -y $force -t ext3 $part >> $log
-echo fsck successfully finished >> $log
-
-rm $fforce # use defaults
-
-exit 0