# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
+# minimum frequency to use
MIN_FREQ=250
+# maximum frequency to use
MAX_FREQ=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"
-#UP_THRESHOLD=75
-#SAMPLING_RATE=150000
+UP_THRESHOLD=95
+SAMPLING_RATE=300000
SMARTREFLEX_VDD1=0
SMARTREFLEX_VDD2=0
IGNORE_NICE_LOAD=0
+# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
+# minimum frequency to use
+MIN_FREQ=500
+# maximum frequency to use
+MAX_FREQ=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"
UP_THRESHOLD=75
SAMPLING_RATE=150000
-VDD1_OPPS_VSEL="30 30 30 30 33 38 45 45 48 48 54 54 60 72 72"
-DSP_OPPS_RATE="90 90 180 360 400 430 430 430 430 500 500 500 500 520 520"
-MIN_FREQ=500000
-MAX_FREQ=850000
SMARTREFLEX_VDD1=0
SMARTREFLEX_VDD2=0
+IGNORE_NICE_LOAD=0
+# start USB networking and sshd early during boot
+EARLYSSH=0
+# fsck of /home partition before mounting?
+# 1=if necessary, force=always check
+FSCK_HOME=0
\ No newline at end of file
-#UP_THRESHOLD=75
-#SAMPLING_RATE=150000
-VDD1_OPPS_VSEL="30 30 38 48 48 54 54 54 54 54 54 54 60 72 72"
-DSP_OPPS_RATE="90 90 180 360 400 430 430 430 430 500 500 500 500 520 520"
-MIN_FREQ=250000
-MAX_FREQ=599000
+# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
+# minimum frequency to use
+MIN_FREQ=250
+# maximum frequency to use
+MAX_FREQ=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"
+UP_THRESHOLD=75
+SAMPLING_RATE=150000
SMARTREFLEX_VDD1=0
SMARTREFLEX_VDD2=0
+IGNORE_NICE_LOAD=0
+# start USB networking and sshd early during boot
+EARLYSSH=0
+# fsck of /home partition before mounting?
+# 1=if necessary, force=always check
+FSCK_HOME=0
\ No newline at end of file
-#UP_THRESHOLD=75
-#SAMPLING_RATE=150000
-VDD1_OPPS_VSEL="25 25 25 33 38 38 45 45 48 48 54 54 60 72 72"
-DSP_OPPS_RATE="90 90 180 360 400 430 430 430 430 500 500 500 500 520 520"
-MIN_FREQ=250000
-MAX_FREQ=599000
+# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
+# minimum frequency to use
+MIN_FREQ=250
+# maximum frequency to use
+MAX_FREQ=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"
+UP_THRESHOLD=75
+SAMPLING_RATE=150000
SMARTREFLEX_VDD1=0
SMARTREFLEX_VDD2=0
+IGNORE_NICE_LOAD=0
+# start USB networking and sshd early during boot
+EARLYSSH=0
+# fsck of /home partition before mounting?
+# 1=if necessary, force=always check
+FSCK_HOME=0
\ No newline at end of file
-#UP_THRESHOLD=75
-#SAMPLING_RATE=150000
-VDD1_OPPS_VSEL="20 20 30 33 38 38 45 45 48 48 54 54 60 72 72"
-DSP_OPPS_RATE="90 90 180 360 400 430 430 430 430 500 500 500 500 520 520"
-MIN_FREQ=250000
-MAX_FREQ=599000
+# DO NOT EDIT THIS FILE - CREATE A COPY OF IT FOR CUSTOMIZATION
+# minimum frequency to use
+MIN_FREQ=250
+# maximum frequency to use
+MAX_FREQ=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"
+UP_THRESHOLD=75
+SAMPLING_RATE=150000
SMARTREFLEX_VDD1=0
SMARTREFLEX_VDD2=0
+IGNORE_NICE_LOAD=0
+# start USB networking and sshd early during boot
+EARLYSSH=0
+# fsck of /home partition before mounting?
+# 1=if necessary, force=always check
+FSCK_HOME=0
\ No newline at end of file
kernel-power-settings (0.4) fremantle; urgency=low
- * new general script kernel-config: new FREQS. IGNORE_NICE_LOAD fields
+ * 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
Depends: kernel-power-flasher, sudo
Description: Tools for the customization of kernel settings
of the enhanced Maemo 5 kernel 2.6.28.10.
-
+ .
XB-Maemo-Icon-26:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACYtJREFUeNrUWkurZUcVXvXY
test -f lastboot && rm lastboot
test -f lastreboot && rm lastreboot
-if ! grep "# KERNEL-POWER-HOOK" /etc/default/mount-opts; then
+if ! grep -q "# KERNEL-POWER-HOOK" /etc/default/mount-opts; then
echo "test -x /etc/kernel-power/pre-mount && /etc/kernel-power/pre-mount # KERNEL-POWER-HOOK" >> /etc/default/mount-opts
fi
#!/bin/sh
-if grep "# KERNEL-POWER-HOOK" /etc/default/mount-opts; then
- grep -v "# KERNEL-POWER-HOOK" /etc/default/mount-opts > /etc/default/mount-opts.tmp
+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
else
arg=$1
test -z "$arg" && arg=/etc/default/kernel-power
- test `basename $arg` = $arg && arg=/home/user/.kernel/$arg
+ 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
test $arg = /etc/default/kernel-power && test -L $arg && 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 "FREQS=\"$freqs\"" >> $arg
echo "SMARTREFLEX_VDD1=`cat $pwr/sr_vdd1_autocomp`" >> $arg
echo "SMARTREFLEX_VDD2=`cat $pwr/sr_vdd2_autocomp`" >> $arg
echo "IGNORE_NICE_LOAD=`cat $cfd/ignore_nice_load`" >> $arg
echo "loading $arg"
source $arg
if test -n "$VDD1_OPPS_VSEL" -o -n "$DSP_OPPS_RATE"; then
- echo "warning: old configuration format detected. ignoring"
+ echo "warning: old configuration format detected. please save in the new format."
+ 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
#echo $allfreq
done
#echo vsel $vsel
#echo rate $rate
- test -n "$MIN_FREQ" && minfreq=$MIN_FREQ
- test -n "$MAX_FREQ" && maxfreq=$MAX_FREQ
+ test -n "$MINFREQ" && minfreq=$MINFREQ
+ test -n "$MAXFREQ" && maxfreq=$MAXFREQ
test "$minfreq" -gt 100000 && minfreq=$((minfreq/1000))
test "$maxfreq" -gt 100000 && maxfreq=$((maxfreq/1000))
#echo $minfreq $maxfreq
esac
done
#echo $avoid
- echo $avoid > $cdf/avoid_frequencies
+ echo $avoid > $cfd/avoid_frequencies
echo $vsel > $pwr/vdd1_opps_vsel
echo $rates > $pwr/dsp_opps_rate
test $maxfreq = 600 && maxfreq=599
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 ;;
exit 1
fi
test -f /etc/default/kernel-power || exit 1
+ touch /etc/kernel-power/.loaded
STATE=`/sbin/getbootstate`
if test $STATE = USER; then
source /etc/default/kernel-power
fi
fi
test -x /usr/sbin/kernel-config || exit 1
- touch /etc/kernel-power/.loaded
- /usr/sbin/kernel-config defaults
+ /usr/sbin/kernel-config load
exit 0
end script
fi
fforce=/etc/kernel-power/force_fsck
-#temporary overwrite0=off, 1=on
+#temporarly overwrite 0=off, 1=on
force=
if test -f $fforce; then
- force=`cat $fforce`
- if test ! "$force" = 1;
+ force=`cat $fforce`
+ if test ! "$force" = 1; then
rm $fforce # disabled
exit 0
- fi
+ fi
else
- cfg=/etc/default/kernel-power
- test -f $cfg || exit 0
- FSCK_HOME=0
- source $cfg
- if test "$FSCK_HOME" = 1; then
- force=
- elif test "$FSCK_HOME" = force; then
+ cfg=/etc/default/kernel-power
+ 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 }'
+part=`sfdisk -l /dev/mmcblk0 | awk '$6 == 83 { print $1; exit }'`
test -z "$part" && exit 0
mkdir -p /etc/kernel-power/