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