slitaz-arm rev 143
Add basic I2C support in CGI/adm interface
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 28 22:02:06 2014 +0200 (2014-04-28) |
parents | 9d4ba98c2bc7 |
children | 464a84405363 |
files | rootfs/etc/xdg/openbox/autostart rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi sat-rpi |
line diff
1.1 --- a/rootfs/etc/xdg/openbox/autostart Sat Apr 26 22:33:15 2014 +0200 1.2 +++ b/rootfs/etc/xdg/openbox/autostart Mon Apr 28 22:02:06 2014 +0200 1.3 @@ -13,4 +13,4 @@ 1.4 #xsetroot -solid "#222222" & 1.5 1.6 # Wbar2 icon bar. 1.7 -#$(sleep 3 && wbar) & 1.8 +#$(sleep 2; wbar &) &
2.1 --- a/rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi Sat Apr 26 22:33:15 2014 +0200 2.2 +++ b/rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi Mon Apr 28 22:02:06 2014 +0200 2.3 @@ -85,6 +85,27 @@ 2.4 EOT 2.5 html_footer && exit 0 ;; 2.6 2.7 + *\ i2c\ *) 2.8 + html_header "I2C Bus" 2.9 + modprobe -q i2c-bcm2708 2.10 + modprobe -q i2c-dev 2.11 + echo '<h1>Raspberry Pi I2C Bus</h1>' 2.12 + if [ ! -x "/usr/sbin/i2cdetect" ]; then 2.13 + echo "<div id='error'>Missing package: i2c-tools</div>" 2.14 + html_footer && exit 0 2.15 + fi 2.16 + cat << EOT 2.17 +<p> 2.18 + I2C kernel modules: i2c-bcm2708 + i2c-dev 2.19 +</p> 2.20 + 2.21 +<h2>I2C Detect</h2> 2.22 +<pre> 2.23 +$(i2cdetect -y 1) 2.24 +</pre> 2.25 +EOT 2.26 + html_footer && exit 0 ;; 2.27 + 2.28 *\ oclock\ *) 2.29 html_header "Overclocking" 2.30 cat << EOT 2.31 @@ -120,6 +141,7 @@ 2.32 <input type="submit" name="audio" value="Audio control" /> 2.33 <input type="submit" name="oclock" value="Overclocking" /> 2.34 <input type="submit" name="leds" value="Leds" /> 2.35 + <input type="submit" name="i2c" value="I2C Bus" /> 2.36 </form> 2.37 </div> 2.38
3.1 --- a/sat-rpi Sat Apr 26 22:33:15 2014 +0200 3.2 +++ b/sat-rpi Mon Apr 28 22:02:06 2014 +0200 3.3 @@ -216,7 +216,7 @@ 3.4 fi 3.5 3.6 # Kernel source 3.7 - cd ${rpi_git} 3.8 + mkdir -p ${rpi_git} && cd ${rpi_git} 3.9 [ -d "$kernel" ] || git clone --depth 1 ${rpi_git_url}linux.git 3.10 3.11 # Compile