slitaz-arm rev 107

rpi: some nice optimization via sysctl.conf, fstab (nodiratime), /etc/modprobe.d/rpi-blacklist.conf and up cgi-adm plugin
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 18 06:19:41 2014 +0200 (2014-04-18)
parents 59d16a648604
children fd283c8054a5
files cgi-adm/data/style.css rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi rpi/cgi-adm/plugins/rpi_gpio/rpi_gpio.cgi rpi/rootfs/etc/fstab rpi/rootfs/etc/modprobe.d/rpi-blacklist.conf rpi/rootfs/etc/sysctl.conf
line diff
     1.1 --- a/cgi-adm/data/style.css	Fri Apr 18 04:30:52 2014 +0200
     1.2 +++ b/cgi-adm/data/style.css	Fri Apr 18 06:19:41 2014 +0200
     1.3 @@ -3,7 +3,7 @@
     1.4  html { height: 102%; }
     1.5  body { margin: 0; font-size: 90%; }
     1.6  h1 { color: #4d4d4d; }
     1.7 -h2 { color: #666; font-size: 120%; }
     1.8 +h2 { color: #666; font-size: 140%; }
     1.9  h1, h2 { border-bottom: 1px dashed #afafaf; padding: 0 0 5px 0; }
    1.10  a:hover { text-decoration: none; }
    1.11  li { list-style-type: square; color: #4d4d4d; }
     2.1 --- a/rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi	Fri Apr 18 04:30:52 2014 +0200
     2.2 +++ b/rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi	Fri Apr 18 06:19:41 2014 +0200
     2.3 @@ -63,6 +63,7 @@
     2.4  		html_footer && exit 0 ;;
     2.5  	
     2.6  	*\ rpi_config\ *)
     2.7 +		blacklist="/etc/modprebe.d/rpi-blacklist.conf"
     2.8  		html_header "Raspberry Pi"
     2.9  		cat << EOT
    2.10  <h1>SliTaz Raspberry Pi</h1>
    2.11 @@ -101,6 +102,18 @@
    2.12  <div class="button">
    2.13  	<a href="$script?editor&amp;file=/boot/config.txt">Edit config.txt</a>
    2.14  </div>
    2.15 +
    2.16 +<h2>Blacklisted Kernel modules</h2>
    2.17 +<p>
    2.18 +	List of the Linux Kernel modules that should not be loaded on boot
    2.19 +	time to save resource and speed up you Raspberry Pi.
    2.20 +</p>
    2.21 +<pre>
    2.22 +$(cat $blacklist 2>/dev/null)
    2.23 +</pre>
    2.24 +<div class="button">
    2.25 +	<a href="$script?editor&amp;file=$blacklist">Edit $(basename $blacklist)</a>
    2.26 +</div>
    2.27  EOT
    2.28  	
    2.29  		html_footer && exit 0 ;;
     3.1 --- a/rpi/cgi-adm/plugins/rpi_gpio/rpi_gpio.cgi	Fri Apr 18 04:30:52 2014 +0200
     3.2 +++ b/rpi/cgi-adm/plugins/rpi_gpio/rpi_gpio.cgi	Fri Apr 18 06:19:41 2014 +0200
     3.3 @@ -11,6 +11,13 @@
     3.4  		cat << EOT
     3.5  <h1>Raspberry Pi GPIO pins</h1>
     3.6  
     3.7 +<p>
     3.8 +	The R-Pi offers GPIO lower-level interfaces intended to connect 
     3.9 +	more directly with chips and subsystem modules. Documentation on the:
    3.10 +	<a href="http://elinux.org/RPi_Low-level_peripherals">Official Wiki</a>
    3.11 +</p>
    3.12 +
    3.13 +<h2>$sysfs</h2>
    3.14  <pre>
    3.15  $(ls $sysfs)
    3.16  </pre>
     4.1 --- a/rpi/rootfs/etc/fstab	Fri Apr 18 04:30:52 2014 +0200
     4.2 +++ b/rpi/rootfs/etc/fstab	Fri Apr 18 06:19:41 2014 +0200
     4.3 @@ -1,10 +1,10 @@
     4.4  # /etc/fstab: Slitaz ARM static filesystems.
     4.5  #
     4.6 -proc              /proc       proc     defaults             0    0
     4.7 -sysfs             /sys        sysfs    defaults             0    0
     4.8 -devpts            /dev/pts    devpts   rw,gid=5,mode=0620   0    0
     4.9 -tmpfs             /dev/shm    tmpfs    defaults             0    0
    4.10 -tmpfs             /var/lock   tmpfs    defaults             0    0
    4.11 -/dev/mmcblk0p1    /boot       vfat     noatime              1    2
    4.12 -/dev/mmcblk0p2    swap        swap     defaults             0    0
    4.13 -/dev/mmcblk0p3    /           auto     noatime              0    1
    4.14 +proc              /proc       proc     defaults                0    0
    4.15 +sysfs             /sys        sysfs    defaults                0    0
    4.16 +devpts            /dev/pts    devpts   rw,gid=5,mode=0620      0    0
    4.17 +tmpfs             /dev/shm    tmpfs    defaults                0    0
    4.18 +tmpfs             /var/lock   tmpfs    defaults                0    0
    4.19 +/dev/mmcblk0p1    /boot       vfat     noatime,nodiratime      1    2
    4.20 +/dev/mmcblk0p2    swap        swap     defaults                0    0
    4.21 +/dev/mmcblk0p3    /           auto     noatime,nodiratime      0    1
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/rpi/rootfs/etc/modprobe.d/rpi-blacklist.conf	Fri Apr 18 06:19:41 2014 +0200
     5.3 @@ -0,0 +1,8 @@
     5.4 +# Kernel modules blacklist to save SliTaz R-Pi resources and memory
     5.5 +
     5.6 +# Blacklist spi and i2c modules
     5.7 +blacklist spi-bcm2708
     5.8 +blacklist i2c-bcm2708
     5.9 +
    5.10 +# Blacklist ipv6 to speed up networking
    5.11 +blacklist ipv6
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/rpi/rootfs/etc/sysctl.conf	Fri Apr 18 06:19:41 2014 +0200
     6.3 @@ -0,0 +1,12 @@
     6.4 +# /etc/sysctl.conf: Kernel sysctl configuration file for Linux
     6.5 +#
     6.6 +# Optimized to save Raspberry Pi resource
     6.7 +
     6.8 +# Better usage of the swap memory
     6.9 +vm.swappiness=100
    6.10 +
    6.11 +# Purge cached block devices before cached filesystem entries
    6.12 +vm.vfs_cache_pressure=50
    6.13 +
    6.14 +# Most users will not need ipv6: disable to speed up networking
    6.15 +net.ipv6.conf.all.disable_ipv6=1