lots of fixes, fix permissions
authortanner <tanner@mach.kyb.local>
Sun, 2 May 2010 15:40:34 +0000 (17:40 +0200)
committertanner <tanner@mach.kyb.local>
Sun, 2 May 2010 15:40:34 +0000 (17:40 +0200)
12 files changed:
kernel-power-settings/config/default
kernel-power-settings/config/ideal
kernel-power-settings/config/lv
kernel-power-settings/config/ulv
kernel-power-settings/config/xlv
kernel-power-settings/debian/changelog
kernel-power-settings/debian/control
kernel-power-settings/debian/kernel-power-settings.postinst
kernel-power-settings/debian/kernel-power-settings.postrm
kernel-power-settings/kernel-config
kernel-power-settings/kernel-power
kernel-power-settings/pre-mount

index c121b94..9788e66 100644 (file)
@@ -1,9 +1,12 @@
 # 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
index 0cad94e..8be56af 100644 (file)
@@ -1,8 +1,17 @@
+# 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
index 1027382..0ec40d9 100644 (file)
@@ -1,8 +1,17 @@
-#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
index b2e56b0..30a2a03 100644 (file)
@@ -1,8 +1,17 @@
-#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
index a19c166..c0c50fc 100644 (file)
@@ -1,8 +1,17 @@
-#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
index 590266e..507cf7a 100644 (file)
@@ -1,6 +1,6 @@
 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
index 3640071..0e62053 100644 (file)
@@ -12,7 +12,7 @@ Architecture: armel
 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
index 9700228..7ffd03d 100644 (file)
@@ -8,7 +8,7 @@ cd /etc
 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
 
index e3792be..3f12692 100644 (file)
@@ -1,7 +1,7 @@
 #!/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
 
index b2d0887..31b0853 100755 (executable)
@@ -84,13 +84,22 @@ show|save)
     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
@@ -116,7 +125,16 @@ load|loaddef)
     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
@@ -168,8 +186,8 @@ load|loaddef)
     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
@@ -184,7 +202,7 @@ load|loaddef)
         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
@@ -209,6 +227,7 @@ setdefault)
         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 ;;
index 1bed8d4..35dad78 100644 (file)
@@ -11,6 +11,7 @@ script
         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
@@ -21,8 +22,7 @@ script
         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
 
index fb4c146..f932132 100755 (executable)
@@ -13,29 +13,29 @@ if test -f /etc/kernel-power/pre-mount.once; then
 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/