first-run-wizard: don't enable zram
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 7 Jul 2015 22:23:58 +0000 (01:23 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 7 Jul 2015 22:35:53 +0000 (01:35 +0300)
- I haven't seen any improvement with it, only slowing things down.
  Things that need lots of RAM will need real swap anyway.
- it was added improperly and gets removed the first time 'update-modules'
  is ran anyway (any package update can do it)

recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh
recipes/pandora-system/pandora-state.bb
recipes/pandora-system/pandora-state/rc.pandora-state

index 8670882..d1fbd46 100755 (executable)
@@ -338,9 +338,12 @@ if ! grep -q 'blacklist rtl8192cu' /etc/modprobe.conf 2> /dev/null; then
   echo 'blacklist rtl8192cu' >> /etc/modprobe.conf
 fi
 
-# add Midi Module and zram
-echo snd-seq>>/etc/modules
-echo zram>>/etc/modules
+# add Midi module
+echo snd-seq > /etc/modutils/snd-seq
+# zram doesn't seem to help, disabled
+# echo zram > /etc/modutils/zram
+
+/usr/sbin/update-modules
 
 # get rid of some dirs in /media that OE creates but are unlikely to be used
 rmdir /media/card /media/cf /media/mmc1 /media/net /media/realroot /media/union 2> /dev/null
index d989ad5..2efb435 100755 (executable)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 
 RDEPENDS = "pandora-scripts"
 
-PR = "r24"
+PR = "r25"
 inherit update-rc.d
 
 INITSCRIPT_NAME = "pandora-state"
index 3e785e7..cbdfb36 100644 (file)
@@ -121,10 +121,12 @@ d_start() {
        sed -n '13p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mbutton_delay
        sed -n '14p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mbutton_delay
        
-       # Enable ZRAM Swap
-       echo "Enabling ZRAM Swap"
-       mkswap /dev/zram0
-       swapon -p 5 /dev/zram0
+       # Enable ZRAM Swap if user has enabled the module in /etc/modules
+       if [ -e /dev/zram0 ]; then
+               echo "Enabling ZRAM Swap"
+               mkswap /dev/zram0
+               swapon -p 5 /dev/zram0
+       fi
 
        # set audio powerdown delay (ms)
        if [ -e /sys/devices/platform/soc-audio/PCM1773/pmdown_time ]; then