slitaz-forge rev 535

arm: Add PiBook :-)
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 01 03:40:15 2014 +0200 (2014-05-01)
parents 7312478b14ae
children 9a381080da2b
files arm/codex/pibook.html
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/arm/codex/pibook.html	Thu May 01 03:40:15 2014 +0200
     1.3 @@ -0,0 +1,476 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html lang="en">
     1.6 +<head>
     1.7 +	<title>SliTaz PiBook</title>
     1.8 +	<meta charset="utf-8" />
     1.9 +	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    1.10 +	<link rel="stylesheet" type="text/css" href="../style.css" />
    1.11 +	<link rel="stylesheet" type="text/css" href="../style-tiny.css" />
    1.12 +	<link rel="shortcut icon" href="../favicon.ico" />
    1.13 +	<!-- Raspberry color -->
    1.14 +	<style type="text/css">
    1.15 +		h2 { color: #bc1142; }
    1.16 +	</style>
    1.17 +</head>
    1.18 +<body>
    1.19 +
    1.20 +<!-- 
    1.21 +	TODO: Overscan settings, GPU memory split, VideoCore Tools, Edu/Scratch
    1.22 +-->
    1.23 +
    1.24 +<div id="header">
    1.25 +	<div id="network"><a href="http://arm.slitaz.org/">SliTaz ARM</a></div>
    1.26 +	<h1><a href=".">SliTaz ARM Codex</a></h1>
    1.27 +</div>
    1.28 +
    1.29 +<nav id="nav" role="navigation" tabindex="0">
    1.30 +	<ul>
    1.31 +		<li><a class="nav1" href="faq.html">FAQ</a></li>
    1.32 +		<li><a class="nav2" href="system.html">System</a></li>
    1.33 +		<li><a class="nav1" href="apps.html">Apps</a></li>
    1.34 +		<li><a class="nav2" href="setup.html">Setup</a></li>
    1.35 +	</ul>
    1.36 +</nav>
    1.37 +
    1.38 +<!-- Content -->
    1.39 +<div id="content">
    1.40 +	
    1.41 +<h2>SliTaz Raspberry Pi book</h2>
    1.42 +
    1.43 +<p>
    1.44 +	With the PiBook you will learn how to get started with SliTaz ARM and 
    1.45 +	the Raspberry Pi, configure the system, install additionnal software
    1.46 +	packages, setup a custom desktop and use pre-installed applications.
    1.47 +	The book also cover GPIO usage, boards setup such has the official
    1.48 +	Raspberry Pi Camera or PiGlow, and basic electronic usage.
    1.49 +</p>
    1.50 +
    1.51 +<ul>
    1.52 +	<li><a href="#install">Installation instructions</a></li>
    1.53 +	<li><a href="#firstboot">First boot setup</a></li>
    1.54 +	<li><a href="#config">System configuration</a></li>
    1.55 +	<li><a href="#audio">Audio settings</a></li>
    1.56 +	<li><a href="#update">System &amp; kernel update</a></li>
    1.57 +	<li><a href="#add-apps">Installing new packages</a></li>
    1.58 +	<li><a href="#def-apps">Installed applications</a></li>
    1.59 +	<li><a href="#pi-pkgs">Rasperry Pi packages</a></li>
    1.60 +	<li><a href="#remote">GUI &amp; secure remote control</a></li>
    1.61 +	<li><a href="#setup">Pi setup suggestions</a></li>
    1.62 +	<li><a href="#desktop">Desktop customization</a></li>
    1.63 +	<li><a href="#gpio">GPIO Pins &amp; I2C Bus</a></li>
    1.64 +	<li><a href="#picam">Pi Camera - Pi NoIR</a></li>
    1.65 +	<li><a href="#piglow">PiGlow from Pimorini</a></li>
    1.66 +</ul>
    1.67 +
    1.68 +<p>
    1.69 +	The Pibook is completed by the general documentation found in the
    1.70 +	<a href="./.">SliTaz ARM Codex</a>.
    1.71 +</p>
    1.72 +
    1.73 +<h2 id="install">Installation instructions</h2>
    1.74 +
    1.75 +<pre class="box-up">
    1.76 +boot/    : Must be copied to a FAT32 partition
    1.77 +rootfs/  : Must be copied to an ext4 or btrfs partition
    1.78 +</pre>
    1.79 +
    1.80 +<p>
    1.81 +	Be sure the SD card has got 3 partitions (boot, swap, root). The 
    1.82 +	recommended partition sizes are 40Mb for /boot, 420Mb for swap and
    1.83 +	using all available free space for root. Then you simply have to 
    1.84 +	run the install.sh script from the SliTaz Raspberry Pi release 
    1.85 +	directory:
    1.86 +</p>
    1.87 +<pre>
    1.88 +# ./install.sh
    1.89 +</pre>
    1.90 +
    1.91 +<h2 id="firstboot">First boot setup</h2>
    1.92 +
    1.93 +<p>
    1.94 +	On the first SliTaz Raspberry Pi boot you will be prompted to configure
    1.95 +	basic system settings such as the system keymap and the root password.
    1.96 +	Then you will prompt to create the default user with it password.
    1.97 +</p>
    1.98 +<p>
    1.99 +	On any secure GNU/Linux system the will have a leat the administrator
   1.100 +	(root) and the default human user. In this way, users can fully use
   1.101 +	the system but can't break it.
   1.102 +</p>
   1.103 +<p>
   1.104 +	You can preconfigure the system before the first boot by editing the
   1.105 +	configurations on the SD card and you can skip the post installation
   1.106 +	steps. More info on the SliTaz ARM Codex: 
   1.107 +	<a href="system.html#firstboot">System configs</a>
   1.108 +</p>
   1.109 +
   1.110 +<h2 id="config">System configuration</h2>
   1.111 +
   1.112 +<p>
   1.113 +	All SliTaz Raspberry Pi basic configuration can be done via a nice
   1.114 +	Ncurses driven GUI with mouse support under an X session and via
   1.115 +	a CGI/web administration interface. Please check the detailed 
   1.116 +	<a href="#remote">remote control section</a> on the book for more 
   1.117 +	information about the CGI/Web control panel.
   1.118 +</p>
   1.119 +
   1.120 +<pre class="box-up">
   1.121 +tazberry      : Dedicated tool for all Raspberry Pi specific configs
   1.122 +slitaz-config : Slitaz system configs such as keymaps, lang, users.
   1.123 +</pre>
   1.124 +
   1.125 +<p>
   1.126 +	Tazberry and slitaz-config tool are accessible from the 'System Tools'
   1.127 +	menu or can be run from a cmdline:
   1.128 +</p>
   1.129 +
   1.130 +<pre>
   1.131 +# tazberry
   1.132 +# slitaz-config
   1.133 +</pre>
   1.134 +
   1.135 +<h2 id="audio">Audio settings</h2>
   1.136 +
   1.137 +<p>
   1.138 +	The Raspberry Pi has two audio output modes: HDMI and headphone jack.
   1.139 +	You can switch between these modes at any time. SliTaz Raspberry Pi
   1.140 +	provide a custom web admin plugin to graphicaly configure and check
   1.141 +	audio setting locally or remotly. The web audion control let you 
   1.142 +	switch audion output and paly a sound to test settings. You can directly
   1.143 +	access to the audio control panel with an URL in form of:
   1.144 +</p>
   1.145 +<pre>
   1.146 +http://192.168.x.xxx/adm/tools.cgi?audio
   1.147 +</pre>
   1.148 +<p>
   1.149 +	You can also configure the Raspberry Pi audio outout from the command 
   1.150 +	line wher the last number is the output mode (0=auto 1=jack 2=hdmi):
   1.151 +</p>
   1.152 +<pre>
   1.153 +# amxier cset numid=3 1
   1.154 +</pre>
   1.155 +<p>
   1.156 +	The desktop flavor include Alsa audio mixer and mpg123 cmdline
   1.157 +	audio player. Please check the Codex apps page for a common list of 
   1.158 +	<a href="apps.html#multimedia">multimedia applications</a>.
   1.159 +</p>
   1.160 +
   1.161 +<h2 id="update">System &amp; kernel update</h2>
   1.162 +<p>
   1.163 +	It is always a good idea to check for update! It will bring you fixes
   1.164 +	and new features. With SliTaz Raspberry Pi you have to upgrade all
   1.165 +	the installed packages and the custom Linux Kernel. Udate can be done
   1.166 +	via spk-dialog and tazberry found in the "System Tools menu" or directly
   1.167 +	from the command line:
   1.168 +</p>
   1.169 +<pre>
   1.170 +# spk-dialog
   1.171 +# tazberry
   1.172 +</pre>
   1.173 +
   1.174 +<h2 id="add-apps">Installing new packages</h2>
   1.175 +
   1.176 +<p>
   1.177 +	After your system is configured and connected to the web, you may want
   1.178 +	to install new packages to add functionnylities to your SliTaz system.
   1.179 +	You can install new applications via spk-dialog GUI or from the command
   1.180 +	line with spk-add:
   1.181 +</p>
   1.182 +<pre>
   1.183 +# spk-add package package1 packageN
   1.184 +</pre>
   1.185 +<p>
   1.186 +	You can find a list of packages on the SliTaz Raspberry Pi website
   1.187 +	or using spk-find utility. You can search by package name, keywork
   1.188 +	or description:
   1.189 +</p>
   1.190 +<pre>
   1.191 +# spk-find i2c
   1.192 +</pre>
   1.193 +
   1.194 +<h2 id="def-apps">Installed applications</h2>
   1.195 +
   1.196 +<p>
   1.197 +	SliTaz Raspberry Pi can come in many flavor with a custom pre-installed
   1.198 +	packages set. This section will cover the base and desktop flavor, more
   1.199 +	information about a spécific flavor max be found on the SliTaz Raspberry
   1.200 +	Pi website.
   1.201 +</p>
   1.202 +
   1.203 +<h3>Base system</h3>
   1.204 +<p>
   1.205 +	The base flavor provide a text mode system with cmdline only tools, all
   1.206 +	Busybox applets are present. It support for wireless network but no sound.
   1.207 +	The default and most usefull applications are:
   1.208 +</p>
   1.209 +
   1.210 +<ul>
   1.211 +	<li>Dropber SSH client &amp; server</li>
   1.212 +	<li>Busybox HTTPd, NTPd, FTPd servers</li>
   1.213 +	<li>The CGI/Web admin interface and TazBerry</li>
   1.214 +	<li>Clex file manager and Lynx web browser</li>
   1.215 +	<li>TazIRC IRC client and Spk packages manager</li>
   1.216 +	<li>Joe text editor and wget :-)</li>
   1.217 +</ul>
   1.218 +
   1.219 +<h3>Desktop environment</h3>
   1.220 +<p>
   1.221 +	The SliTaz Raspberry Pi desktop flavor focus on providing a fast, 
   1.222 +	elegent, and easy to use desktop enviromnent. The desktop is powerd
   1.223 +	by JWM window manger, you will all the base applications plus GUI
   1.224 +	programs:
   1.225 +</p>
   1.226 +
   1.227 +<ul>
   1.228 +	<li>Text editors: Adie + FLTK Editor</li>
   1.229 +	<li>File manager: PathFinder</li>
   1.230 +	<li>Web browsesr: Dillo</li>
   1.231 +	<li>X terminal: Xterm</li>
   1.232 +	<li>Audio mixer: Alsamixer</li>
   1.233 +	<li>Audio player: mpg123</li>
   1.234 +	<li>2 nice games: Blocks Attack + Sudoku</li>
   1.235 +	<li>Fluid FLTK GUI desinger</li>
   1.236 +	<li>Lua programming language</li>
   1.237 +	<li>SQLite database support</li>
   1.238 +	<li>Htop processes monitor</li>
   1.239 +</ul>
   1.240 +
   1.241 +<h2 id="pi-pkgs">Rasperry Pi Packages</h2>
   1.242 +
   1.243 +<p>
   1.244 +	Some custom tools and libraries have been package specially for the
   1.245 +	SliTaz Raspberry Pi distribution. Here is a list of packages and
   1.246 +	a short description:
   1.247 +</p>
   1.248 +
   1.249 +<ul>
   1.250 +	<li>slitaz-arm-rpi - Provide the CGI/adm plugins, tazberry and custom
   1.251 +	config files.</li>
   1.252 +	
   1.253 +	<li>raspberrypi-boot - Provide the R-Pi bootloader firmware.</li>
   1.254 +	
   1.255 +	<li>raspberrypi-boot-x - Provide the R-Pi bootloader firmware with 
   1.256 +	Pi Camera support.</li>
   1.257 +	
   1.258 +	<li>raspberrypi-vc -Raspberry Pi VideoCore Tools, includind 
   1.259 +	raspistill and raspivid.</li>
   1.260 +	
   1.261 +	<li>gst-omx - A gstreamer-1.0 plugin which can do hardware-accelerated 
   1.262 +	video decoding on the Raspberry Pi. </li>
   1.263 +	
   1.264 +	<li>wiringpi - A GPIO access library written in C for the BCM2835 
   1.265 +	used in the Raspberry Pi.</li>
   1.266 +	
   1.267 +	<li>wiringpi-piglow - The WiringPi tool for PiGlow, usefull to handle
   1.268 +	leds from SHell scripts.</li>
   1.269 +	
   1.270 +	<li>picamera - Provides a pure Python interface to the Raspberry 
   1.271 +	Pi camera module</li>
   1.272 +	
   1.273 +	<li>libbcm2835 - Provides access to GPIO and other IO functions on 
   1.274 +	the Broadcom BCM 2835 chip.</li>
   1.275 +	
   1.276 +	<li>rcswitch-pi - RCSwitch implementation for the Raspberry Pi</li>
   1.277 +	
   1.278 +	<li>python-rpi-gpio - Python class to control the GPIO on a Raspberry Pi</li>
   1.279 +	
   1.280 +	<li>python-rpi-pyglow - Control Piglow from Python. Include a custom 
   1.281 +	SliTaz utility to easily play with PiGlow.</li>
   1.282 +	
   1.283 +	<li>(xorg-xf86-video-fbturbo) - Buggy Xorg server module for the R-Pi</li>
   1.284 +</ul>
   1.285 +
   1.286 +<h2 id="remote">GUI &amp; secure remote control</h2>
   1.287 +
   1.288 +<p>
   1.289 +	This section will cover remote control using SliTaz CGI/Web admin
   1.290 +	interface, SSH secure SHell connection and graphical desktop control
   1.291 +	with VNC.
   1.292 +</p>
   1.293 +
   1.294 +<h3>CGI/Web interface</h3>
   1.295 +
   1.296 +<p>
   1.297 +	The CGI/Web interface is a nice way to control your Raspberry Pi machine
   1.298 +	usind Dillo from the desktop or any web browser from an other computer,
   1.299 +	mobile or tablet device. Remote control via the CGI interface is enabled
   1.300 +	by default. To stop/start the service or use an other port, please refer
   1.301 +	to the SliTaz ARM Codex: <a href="system.html#cgi-adm">System page</a>
   1.302 +</p>
   1.303 +
   1.304 +<p>
   1.305 +	SliTaz Raspberry Pi provide plugins to easily handle your Pi, in a nifty
   1.306 +	and clean interface you can: poweroff/reboot the system, configure boot
   1.307 +	settings including blacklisted modules, set audio output and test sound,
   1.308 +	play with GPIO pins and get I2C information, turn on/off the green led :-)
   1.309 +	The tool let you do quiet a few more handy actions that you will discover
   1.310 +	browsinf the interface.
   1.311 +</p>
   1.312 +
   1.313 +<p>
   1.314 +	You must first found out the local IP address of you Raspberry Pi machine.
   1.315 +	On your SliTaz Pi you can use 'ipinfo' to get the IP, then connect using
   1.316 +	this IP. To connect you must use 'root' as user name with the correct
   1.317 +	system administrator password.
   1.318 +</p>
   1.319 +<pre>
   1.320 +$ ipinfo
   1.321 +</pre>
   1.322 +
   1.323 +<h3>Secure SSH connection</h3>
   1.324 +<p>
   1.325 +	By default all flavors provide Dropbear Secure SHell, a lighteight but
   1.326 +	powerfull and standard compliant SSH client and server. The server is
   1.327 +	not started by default, you van start it manually from the cmdline and
   1.328 +	edit /etc/init.d/rcS.conf to start it automaticaly on each boot:
   1.329 +</p>
   1.330 +<pre>
   1.331 +# startd dropbear
   1.332 +# editor /etc/rcS.conf
   1.333 +</pre>
   1.334 +
   1.335 +<h3>VNC Desktop control</h3>
   1.336 +<p>
   1.337 +	VNC is geate tool letting you remotly control a desktop. The steps are:
   1.338 +	install and start the VNV server on your Pi, install a VNC client on
   1.339 +	your desktop machine, mobile phone or tablet. To install the server
   1.340 +	and start it on your Raspberry Pi (via an SSH connection or with an
   1.341 +	attached keyboard and screen):
   1.342 +</p>
   1.343 +<pre>
   1.344 +# spk-add x11vnc
   1.345 +# startd x11vnc
   1.346 +</pre>
   1.347 +
   1.348 +<h2 id="setup">Pi setup suggestions</h2>
   1.349 +
   1.350 +<p>
   1.351 +	What can you do with you SliTaz Raspberry Pi distro ? Use it as a tiny
   1.352 +	desktop! Learn Linux, Lua, Python, SHell scripting. Play with some
   1.353 +	electronics circuits, sensors, leds and Raspberry Pi plugable boards.
   1.354 +	Setup servers, use the cam for fun or security purpose, create a secure
   1.355 +	wifi network, ...- So much can be done with a Pi! 
   1.356 +</p>
   1.357 +
   1.358 +<ul>
   1.359 +	<li>Kids learning computer with Scratch and games</li>
   1.360 +	<li>Web server with SHell and Python CGI support</li>
   1.361 +	<li>Secure and anonymous wifi network with Tor</li>
   1.362 +	<li>Development system including a wide range of tools</li>
   1.363 +	<li>Electronic circuits playground with breadboard</li>
   1.364 +	<li>Security camera with infra red support</li>
   1.365 +	<li>Audio player and streamer with MPD</li>
   1.366 +	<li>Video player with MPlayer or gst-omx (provide hardware 
   1.367 +	accelerated decoding on the Raspberry Pi)</li>
   1.368 +	<li>Video streamer with gst-omx or ffserver</li>
   1.369 +	<li><a href="setup.html">Codex setup guides</a></li>
   1.370 +</ul>
   1.371 +
   1.372 +<h2 id="desktop">Desktop customization</h2>
   1.373 +
   1.374 +<p>
   1.375 +	Your SliTaz Raspberry Pi Desktop can be customized to infinity! With
   1.376 +	a little edit of configuration files and autostart script you can
   1.377 +	configure the entire environment. The default window manager is
   1.378 +	JWM, but it can be replaced by OpenBox, Enlightenment (e17) or the
   1.379 +	DWM dynamic window manager.
   1.380 +</p>
   1.381 +
   1.382 +<p>
   1.383 +	JWM autostarted applications and theme is set in a xml.jwmrc file.
   1.384 +	By default the system wide config is used, let copy it to your home
   1.385 +	folder as .jwmrc hidden file and then edit it:
   1.386 +</p>
   1.387 +<pre>
   1.388 +$ cp /etc/xdg/jwm/system.jwmrc ~/.jwmrc
   1.389 +$ editor .jwmrc
   1.390 +</pre>
   1.391 +<p>
   1.392 +	The system wide menu path is: <b>/etc/xdg/jwm/menus.jwmrc</b> and
   1.393 +	is updated by SliTaz packages manager. You can also copy it in
   1.394 +	your home folder if you want to customize it. See the official 
   1.395 +	<a href="http://joewing.net/projects/jwm/config.shtml">configuration documentation</a>
   1.396 +	for comprehensive documentation on configuring JWM.
   1.397 +</p>
   1.398 +
   1.399 +<h3>Icon bar &amp; panel</h3>
   1.400 +<p>
   1.401 +	To have a transparent icon bar with the applications of your choice,
   1.402 +	you can use Wbar2. Install it and test it:
   1.403 +</p>
   1.404 +<pre>
   1.405 +$ sudo spk-add wbar2
   1.406 +$ wbar
   1.407 +</pre>
   1.408 +<p>
   1.409 +	To have a desktop panel with Openbox you can use Tint2. Install it 
   1.410 +	and test it:
   1.411 +</p>
   1.412 +<pre>
   1.413 +$ sudo spk-add tint2
   1.414 +$ tint2
   1.415 +</pre>
   1.416 +
   1.417 +<h2 id="gpio">GPIO Pins &amp; I2C Bus</h2>
   1.418 +
   1.419 +<p>
   1.420 +	SliTaz provide all the necessary tools to work with the Raspberry Pi
   1.421 +	GPIO pins and I2C bus. The CGI/Web admin interface let you control
   1.422 +	the GPIO pins and get I2C informations. Pi I2C kernel module is
   1.423 +	blacklisted by default and can be load manually, on-demand by scripts
   1.424 +	or at boot by commenting the blacklist line in:
   1.425 +</p>
   1.426 +<pre class="box-up">
   1.427 +/etc/modprobe.d/rpi-blacklist.conf
   1.428 +</pre>
   1.429 +
   1.430 +<h2 id="picam">Pi Camera - Pi NoIR</h2>
   1.431 +
   1.432 +<p>
   1.433 +	Rspberry Pi onboard camera work flowlessly with SliTaz. You can
   1.434 +	setup then shot, record and stream video with our easy to use and
   1.435 +	home made tools and he official VideoCore Tools from The Raspberry Pi
   1.436 +	foundation. Official documentation can be found on elinux.org wiki:
   1.437 +	<a href="http://elinux.org/Rpi_Camera_Module">Rpi Camera Module</a>
   1.438 +</p>
   1.439 +
   1.440 +<p>
   1.441 +	To setup your camera from your Pi device, you can run TazBerry from
   1.442 +	the desktop menu or directly start the the cam setup from cmdline:
   1.443 +</p>
   1.444 +<pre>
   1.445 +# tazberry cam-setup
   1.446 +</pre>
   1.447 +
   1.448 +<p>
   1.449 +	After reboot you can test the camera with 'raspivid' and take a picture
   1.450 +	via the CGI/Web Camera plugin. To test the camera:
   1.451 +</p>
   1.452 +<pre>
   1.453 +# raspivid -d
   1.454 +</pre>
   1.455 +
   1.456 +<h2 id="piglow">PiGlow from Pimorini</h2>
   1.457 +
   1.458 +<p>
   1.459 +	PiGlow is a fun and cheap little board to learn and play with leds. It
   1.460 +	can do very nice effect, support easy on/off switch and brightness
   1.461 +	setting. Plug in you PiGlow board, boot you Raspberry Pi, intall Python
   1.462 +	PyGlow examples and utility and testsuite:
   1.463 +</p>
   1.464 +
   1.465 +<pre>
   1.466 +# spk-add python-rpi-pyglow
   1.467 +# pyglow test
   1.468 +# pyglow help
   1.469 +</pre>
   1.470 +
   1.471 +<!-- Close content -->
   1.472 +</div>
   1.473 +
   1.474 +<div id="footer">
   1.475 +	&copy; 2014 - <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
   1.476 +</div>
   1.477 +
   1.478 +</body>
   1.479 +</html>