slitaz-forge view arm/codex/pibook.html @ rev 540

arm: edit pibook
author Paul Issott <paul@slitaz.org>
date Thu May 01 20:51:50 2014 +0100 (2014-05-01)
parents cc696b0add40
children d168005f2fcb
line source
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <title>SliTaz PiBook</title>
5 <meta charset="utf-8" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <link rel="stylesheet" type="text/css" href="../style.css" />
8 <link rel="stylesheet" type="text/css" href="../style-tiny.css" />
9 <link rel="shortcut icon" href="../favicon.ico" />
10 <!-- Raspberry color -->
11 <style type="text/css">
12 h2 { color: #bc1142; }
13 </style>
14 </head>
15 <body>
17 <!--
18 TODO: Overscan settings, GPU memory split, VideoCore Tools, Edu/Scratch
19 -->
21 <div id="header">
22 <div id="network"><a href="http://arm.slitaz.org/">SliTaz ARM</a></div>
23 <h1><a href=".">SliTaz ARM Codex</a></h1>
24 </div>
26 <nav id="nav" role="navigation" tabindex="0">
27 <ul>
28 <li><a class="nav1" href="faq.html">FAQ</a></li>
29 <li><a class="nav2" href="system.html">System</a></li>
30 <li><a class="nav1" href="apps.html">Apps</a></li>
31 <li><a class="nav2" href="setup.html">Setup</a></li>
32 </ul>
33 </nav>
35 <!-- Content -->
36 <div id="content">
38 <h2>SliTaz Raspberry Pi book</h2>
40 <p>
41 With the PiBook you will learn how to get started with SliTaz ARM and
42 the Raspberry Pi, configure the system, install additional software
43 packages, setup a custom desktop and use pre-installed applications.
44 The book also covers GPIO usage and boards setup such as the official
45 Raspberry Pi Camera or PiGlow, and basic electronic usage.
46 </p>
48 <ul>
49 <li><a href="#install">Installation instructions</a></li>
50 <li><a href="#firstboot">First boot setup</a></li>
51 <li><a href="#config">System configuration</a></li>
52 <li><a href="#audio">Audio settings</a></li>
53 <li><a href="#update">System &amp; kernel update</a></li>
54 <li><a href="#add-apps">Installing new packages</a></li>
55 <li><a href="#def-apps">Installed applications</a></li>
56 <li><a href="#pi-pkgs">Raspberry Pi packages</a></li>
57 <li><a href="#remote">GUI &amp; secure remote control</a></li>
58 <li><a href="#setup">Pi setup suggestions</a></li>
59 <li><a href="#desktop">Desktop customization</a></li>
60 <li><a href="#gpio">GPIO Pins &amp; I2C Bus</a></li>
61 <li><a href="#picam">Pi Camera - Pi NoIR</a></li>
62 <li><a href="#piglow">PiGlow from Pimorini</a></li>
63 </ul>
65 <p>
66 The Pibook is complemented by the general documentation found in the
67 <a href="./.">SliTaz ARM Codex</a>.
68 </p>
70 <h2 id="install">Installation instructions</h2>
72 <pre class="box-up">
73 boot/ : Must be copied to a FAT32 partition
74 rootfs/ : Must be copied to an ext4 or btrfs partition
75 </pre>
77 <p>
78 Be sure the SD card has got 3 partitions (boot, swap, root). The
79 recommended partition sizes are 40Mb for /boot, 420Mb for swap and
80 using all available free space for root. Then you simply have to
81 run the install.sh script from the SliTaz Raspberry Pi release
82 directory:
83 </p>
84 <pre>
85 # ./install.sh
86 </pre>
88 <h2 id="firstboot">First boot setup</h2>
90 <p>
91 On the first SliTaz Raspberry Pi boot you will be prompted to configure
92 basic system settings such as the system keymap and the root password.
93 Then you will be prompted to create the default user with its password.
94 </p>
95 <p>
96 On any secure GNU/Linux system you will have to have at least the administrator
97 (root) and the default human user. In this way, users can fully use
98 the system but can't break it.
99 </p>
100 <p>
101 You can preconfigure the system before the first boot by editing the
102 configurations on the SD card and you can skip the post installation
103 steps. More info on the SliTaz ARM Codex:
104 <a href="system.html#firstboot">System configs</a>
105 </p>
107 <h2 id="config">System configuration</h2>
109 <p>
110 All SliTaz Raspberry Pi basic configurations can be done via a nice
111 Ncurses driven GUI with mouse support under an X session and via
112 a CGI/web administration interface. Please check the detailed
113 <a href="#remote">remote control section</a> in the book for more
114 information about the CGI/Web control panel.
115 </p>
117 <pre class="box-up">
118 tazberry : Dedicated tool for all Raspberry Pi specific configs
119 slitaz-config : Slitaz system configs such as keymaps, lang, users
120 </pre>
122 <p>
123 Tazberry and slitaz-config tool are accessible from the 'System Tools'
124 menu or can be run from a cmdline:
125 </p>
127 <pre>
128 # tazberry
129 # slitaz-config
130 </pre>
132 <h2 id="audio">Audio settings</h2>
134 <p>
135 The Raspberry Pi has two audio output modes: HDMI and headphone jack.
136 You can switch between these two modes at any time. SliTaz Raspberry Pi
137 provides a custom web admin plugin to graphically configure and check
138 audio settings locally or remotely. The web audio control lets you
139 switch audio output and play a sound to test settings. You can directly
140 access the audio control panel with a URL in the form of:
141 </p>
142 <pre>
143 http://192.168.x.xxx/adm/tools.cgi?audio
144 </pre>
145 <p>
146 You can also configure the Raspberry Pi audio output from the command
147 line where the last number is the output mode (0=auto 1=jack 2=hdmi):
148 </p>
149 <pre>
150 # amxier cset numid=3 1
151 </pre>
152 <p>
153 The desktop flavor includes Alsa audio mixer and mpg123 cmdline
154 audio player. Please check the Codex apps page for a common list of
155 <a href="apps.html#multimedia">multimedia applications</a>.
156 </p>
158 <h2 id="update">System &amp; kernel update</h2>
159 <p>
160 It is always a good idea to check for updates! It will bring you fixes
161 and new features. With SliTaz Raspberry Pi you have to upgrade all
162 the installed packages and the custom Linux Kernel. Updates can be done
163 via spk-dialog and tazberry found in the "System Tools menu" or directly
164 from a command line:
165 </p>
166 <pre>
167 # spk-dialog
168 # tazberry
169 </pre>
171 <h2 id="add-apps">Installing new packages</h2>
173 <p>
174 After your system is configured and connected to the web, you may want
175 to install new packages to add functionality to your SliTaz system.
176 You can install new applications via spk-dialog GUI or from the command
177 line with spk-add:
178 </p>
179 <pre>
180 # spk-add package package1 packageN
181 </pre>
182 <p>
183 You can find a list of packages on the SliTaz Raspberry Pi website
184 or by using the spk-find utility. You can search by package name, keyword
185 or description:
186 </p>
187 <pre>
188 # spk-find i2c
189 </pre>
191 <h2 id="def-apps">Installed applications</h2>
193 <p>
194 SliTaz Raspberry Pi can come in many flavors with a custom pre-installed
195 packages set. This section will cover the base and desktop flavors, more
196 information about a spécific flavor may be found on the SliTaz Raspberry
197 Pi website.
198 </p>
200 <h3>Base system</h3>
201 <p>
202 The base flavor provides a text mode system with cmdline only tools, all
203 Busybox applets are present. It supports wireless networks but no sound.
204 The default and most useful applications are:
205 </p>
207 <ul>
208 <li>Dropbear SSH client &amp; server</li>
209 <li>Busybox HTTPd, NTPd, FTPd servers</li>
210 <li>The CGI/Web admin interface and TazBerry</li>
211 <li>Clex file manager and Lynx web browser</li>
212 <li>TazIRC IRC client and Spk packages manager</li>
213 <li>Joe text editor and wget :-)</li>
214 </ul>
216 <h3>Desktop environment</h3>
217 <p>
218 The SliTaz Raspberry Pi desktop flavor focuses on providing a fast,
219 elegant, and easy to use desktop environment. The desktop is powered
220 by JWM window manger and you will find all the base applications plus GUI
221 programs:
222 </p>
224 <ul>
225 <li>Text editors: Adie + FLTK Editor</li>
226 <li>File manager: PathFinder</li>
227 <li>Web browser: Dillo</li>
228 <li>X terminal: Xterm</li>
229 <li>Audio mixer: Alsamixer</li>
230 <li>Audio player: mpg123</li>
231 <li>2 nice games: Blocks Attack + Sudoku</li>
232 <li>Fluid FLTK GUI designer</li>
233 <li>Lua programming language</li>
234 <li>SQLite database support</li>
235 <li>Htop processes monitor</li>
236 </ul>
238 <h2 id="pi-pkgs">Raspberry Pi Packages</h2>
240 <p>
241 Some custom tools and libraries have been packaged specially for the
242 SliTaz Raspberry Pi distribution. Here is a list of packages and
243 a short description:
244 </p>
246 <ul>
247 <li>slitaz-arm-rpi - Provides the CGI/adm plugins, tazberry and custom
248 config files.</li>
250 <li>raspberrypi-boot - Provides the R-Pi bootloader firmware.</li>
252 <li>raspberrypi-boot-x - Provides the R-Pi bootloader firmware with
253 Pi Camera support.</li>
255 <li>raspberrypi-vc -Raspberry Pi VideoCore Tools, including
256 raspistill and raspivid.</li>
258 <li>gst-omx - A gstreamer-1.0 plugin which can do hardware-accelerated
259 video decoding on the Raspberry Pi. </li>
261 <li>wiringpi - A GPIO access library written in C for the BCM2835
262 used in the Raspberry Pi.</li>
264 <li>wiringpi-piglow - The WiringPi tool for PiGlow, useful to handle
265 leds from SHell scripts.</li>
267 <li>picamera - Provides a pure Python interface to the Raspberry
268 Pi camera module.</li>
270 <li>libbcm2835 - Provides access to GPIO and other IO functions on
271 the Broadcom BCM 2835 chip.</li>
273 <li>rcswitch-pi - RCSwitch implementation for the Raspberry Pi.</li>
275 <li>python-rpi-gpio - Python class to control the GPIO on a Raspberry Pi.</li>
277 <li>python-rpi-pyglow - Control Piglow from Python. Includes a custom
278 SliTaz utility to easily play with PiGlow.</li>
280 <li>(xorg-xf86-video-fbturbo) - Buggy Xorg server module for the R-Pi.</li>
281 </ul>
283 <h2 id="remote">GUI &amp; secure remote control</h2>
285 <p>
286 This section will cover remote control using the SliTaz CGI/Web admin
287 interface, SSH secure SHell connections and graphical desktop control
288 with VNC.
289 </p>
291 <h3>CGI/Web interface</h3>
293 <p>
294 The CGI/Web interface is a nice way to control your Raspberry Pi machine
295 using Dillo from the desktop or any web browser from another computer,
296 mobile or tablet device. Remote control via the CGI interface is enabled
297 by default. To stop/start the service or to use another port, please refer
298 to the SliTaz ARM Codex: <a href="system.html#cgi-adm">System page</a>
299 </p>
301 <p>
302 SliTaz Raspberry Pi provides plugins to easily handle your Pi. In a nifty
303 and clean interface you can: poweroff/reboot the system, configure boot
304 settings including blacklisted modules, set audio output and test sound,
305 play with GPIO pins and get I2C information, and turn on/off the green led :-)
306 The tool lets you do quite a few more handy actions that you will discover
307 browsing the interface.
308 </p>
310 <p>
311 First you must found out the local IP address of you Raspberry Pi machine.
312 On your SliTaz Pi you can use 'ipinfo' to get the IP, then connect using
313 this IP. To connect you must use 'root' as user name with the correct
314 system administrator password.
315 </p>
316 <pre>
317 $ ipinfo
318 </pre>
320 <h3>Secure SSH connection</h3>
321 <p>
322 By default all flavors provide Dropbear Secure SHell, a lightweight but
323 powerful and standard compliant SSH client and server. The server is
324 not started by default, you can start it manually from the cmdline and
325 edit /etc/init.d/rcS.conf to start it automatically on each boot:
326 </p>
327 <pre>
328 # startd dropbear
329 # editor /etc/rcS.conf
330 </pre>
332 <h3>VNC Desktop control</h3>
333 <p>
334 VNC is great tool for letting you remotely control a desktop. The steps are:
335 install and start the VNC server on your Pi, install a VNC client on
336 your desktop machine, mobile phone or tablet. To install the server
337 and start it on your Raspberry Pi (via an SSH connection or with an
338 attached keyboard and screen):
339 </p>
340 <pre>
341 # spk-add x11vnc
342 # startd x11vnc
343 </pre>
345 <h2 id="setup">Pi setup suggestions</h2>
347 <p>
348 What can you do with your SliTaz Raspberry Pi distro? Use it as a tiny
349 desktop! Learn Linux, Lua, Python, SHell scripting. Play with some
350 electronics circuits, sensors, leds and Raspberry Pi pluggable boards.
351 Setup servers, use the cam for fun or security purposes, create a secure
352 wifi network, ...- So much can be done with a Pi!
353 </p>
355 <ul>
356 <li>Kids learn about computers with Scratch and games</li>
357 <li>Web server with SHell and Python CGI support</li>
358 <li>Secure and anonymous wifi network with Tor</li>
359 <li>Development system including a wide range of tools</li>
360 <li>Electronic circuits playground with breadboards</li>
361 <li>Security camera with infra red support</li>
362 <li>Audio player and streamer with MPD</li>
363 <li>Video player with MPlayer or gst-omx (provides hardware
364 accelerated decoding on the Raspberry Pi)</li>
365 <li>Video streamer with gst-omx or ffserver</li>
366 <li><a href="setup.html">Codex setup guides</a></li>
367 </ul>
369 <h2 id="desktop">Desktop customization</h2>
371 <p>
372 Your SliTaz Raspberry Pi Desktop can be customized to infinity! With
373 a little editing of configuration files and autostart scripts you can
374 configure the entire environment. The default window manager is
375 JWM, but it can be replaced by OpenBox, Enlightenment (e17) or the
376 DWM dynamic window manager.
377 </p>
379 <p>
380 JWM autostarted applications and themes are set in a xml.jwmrc file.
381 By default the system wide config is used, lets copy it to your home
382 folder as a .jwmrc hidden file and then edit it:
383 </p>
384 <pre>
385 $ cp /etc/xdg/jwm/system.jwmrc ~/.jwmrc
386 $ editor .jwmrc
387 </pre>
388 <p>
389 The system wide menu path is: <b>/etc/xdg/jwm/menus.jwmrc</b> and
390 is updated by SliTaz packages manager. You can also copy it to
391 your home folder if you want to customize it. See the official
392 <a href="http://joewing.net/projects/jwm/config.shtml">configuration documentation</a>
393 for comprehensive documentation on configuring JWM.
394 </p>
396 <h3>Icon bar &amp; panel</h3>
397 <p>
398 To have a transparent icon bar with the applications of your choice,
399 you can use Wbar2. Install it and test it:
400 </p>
401 <pre>
402 $ sudo spk-add wbar2
403 $ wbar
404 </pre>
405 <p>
406 To have a desktop panel with Openbox you can use Tint2. Install it
407 and test it:
408 </p>
409 <pre>
410 $ sudo spk-add tint2
411 $ tint2
412 </pre>
414 <h2 id="gpio">GPIO Pins &amp; I2C Bus</h2>
416 <p>
417 SliTaz provides all the necessary tools to work with the Raspberry Pi
418 GPIO pins and I2C bus. The CGI/Web admin interface lets you control
419 the GPIO pins and get I2C information. Pi I2C kernel module is
420 blacklisted by default and can be loaded manually, by on-demand scripts
421 or at boot by commenting the blacklist line in:
422 </p>
423 <pre class="box-up">
424 /etc/modprobe.d/rpi-blacklist.conf
425 </pre>
427 <h2 id="picam">Pi Camera - Pi NoIR</h2>
429 <p>
430 Raspberry Pi onboard camera works flawlessly with SliTaz. You can
431 setup then shot, record and stream video with our easy to use and
432 home made tools and the official VideoCore Tools from The Raspberry Pi
433 foundation. Official documentation can be found on elinux.org wiki:
434 <a href="http://elinux.org/Rpi_Camera_Module">Rpi Camera Module</a>
435 </p>
437 <p>
438 To setup your camera from your Pi device, you can run TazBerry from
439 the desktop menu or directly start the cam setup from a cmdline:
440 </p>
441 <pre>
442 # tazberry cam-setup
443 </pre>
445 <p>
446 After reboot you can test the camera with 'raspivid' and take a picture
447 via the CGI/Web Camera plugin. To test the camera:
448 </p>
449 <pre>
450 # raspivid -d
451 </pre>
453 <h2 id="piglow">PiGlow from Pimorini</h2>
455 <p>
456 PiGlow is a fun and cheap little board to learn and play with leds. It
457 can do very nice effects, support easy on/off switches and brightness
458 settings. Plug in your PiGlow board, boot your Raspberry Pi, install the Python
459 PyGlow examples and utilities and testsuite:
460 </p>
462 <pre>
463 # spk-add python-rpi-pyglow
464 # pyglow test
465 # pyglow help
466 </pre>
468 <!-- Close content -->
469 </div>
471 <div id="footer">
472 &copy; 2014 - <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
473 </div>
475 </body>
476 </html>