The Linux on the pc104

From Wiki for iCub and Friends
Revision as of 17:23, 12 November 2014 by Matteo.brunettini@iit.it (talk | contribs) (Burn the Debian image)
Jump to: navigation, search

These instructions only apply to YARP > 2.3.23 and iCub > 1.1.13 software versions

See The Linux on the pc104 oldrepo for older instructions

The pc104 located inside the iCub head runs a full Debian distribution. This version of Linux has been customized for the specific application and to boot from an USB key. As the iCub (project) grows up, many updates have been performed to this Linux usb-key image to follow the hardware as well as the Debian distribution changes. Stable versions are frozen into image files and uploaded to the iCub webserver, for detailed instruction on where to get the image and how to flash it, see following section.
At any time to determine the version of the image is running on your iCub, the following files in the root of the filesystem can be inspected:

  • VERSION_PC04: contains the version of the image
  • README

Important: the images come with a dummy password for icub and root users, we recommend you keep the pc104 disconnected form the external network or modify the password.

Versioning

1.x This is an Etch'n'half based distribution, built on a Debian LIVE system.
2.x This is a Lenny based distribution, built on a Debian LIVE system.
3.x This is a Squeeze based distribution, contains a kernel with Real-Time patch (rt.wiki.kernel.org).
4.x This is a Wheezy based distribution, this version contains an updated version of libportaudio.
5.x This is a Wheezy based distribution, built on a Debian LIVE system with persistency, with kernel rt-amd64 (x86 64 bit with real time PREEMPT_RT patches)

Starting from version 5.0, the image file name is composed by four parts: a a major release, a a minor release, a build release which is a string that contains the build date and a kernel flavor string, which describes the kernel architecture the image is built for. For example

icub-live_4.0-14.11.12-rt-amd64.iso 

is

*4 is the major release
*0 is the minor release
*14.11.12 is the build release (Year.Month.Day)
*rt-amd64 is the kernel flavour

Up to version 4.0, the image file name is composed by three parts: a major number related to the Debian distribution, a minor number which tells the internal update version and the build release is a short string related to the network configuration, for example the file image1.6-oc.img, the major number is 1, minor is 6 and build is oc. Here, the build release refers to the network configuration the final distribution will boot-up with. We release the following three types of configuration:

* oc: "open call" standard installation (static ip 10.0.0.2, it mounts software from 10.0.0.1).
* iit: custom IIT standard installation (static ip 10.0.0.20, it mounts software from 10.0.0.11), to be used inside IIT labs.
* dhcp: dhcp-enabled network configuration. If you want to connect the robot on your own network you should be able to use this image. The pc104 will use dhcp. (click here to see how configure a dhcp server: live-with-dhcp).

NEW We wish to make the user experience with the iCub easier so with this release of the pc104 image two main changes has been done in this direction:

  • In version 4.0 The image comes in only 2 versions, static and dhcp, while from version 5.0 ht image is only with static IP address.
  • Starting from the 4.0 version, the pc104 will mount the very same folder as the server/laptop does, but use a different build folder to have separeted binary code.
    The folder is the one called /exports/code in the server, so you'll see
/exports/code/iCub/main/build
/exports/code/iCub/main/build-pc104

This way by updating the repository, both the server and the pc104 will benefit of the new code. (They still need to be compiled one by one)
The /exports/code-pc104 is no longer used.

Which version do I need?

This question is quite common whenever the number of versions and revisions start to become... more than one.
The Debian image to use depends on the iCub version:

  • iCub up to version 1.1 must use a Etch and a Half distribution (image version 1.x). Persistent filesystem allows deep system configuration; if you are happy with current configuration you can skip this update, while if you really need to change system configuration now you can by appling this update.
  • iCub from version 1.2 on can use the latest version: we kindly recommend you to keep Debian system updated to the last version (at the time of writing it means the 5.0 @ November 2014)

For persistent filesystem this configuration can be changed without re-burning a new image, you can just edit the configuration files of the network as you would normally do with Linux system.

Burn the Debian image

Instructions for burning images version < 5.0 are now grouped here.
From version 5.0 on, the image is based on a Debian LIVE system, which comes into a standard ISO image file.
In order to enable file persistency, you must use a [| script] to write it onto an USB device. (see insctruction below)

What is file perisytency and how to use it

How to use the 'icub_iso2usb.sh script

And if i don't want file persistency?

You can simply write the live iso image, like a normal Hybrid ISO image, i.e.

 dd if=<file> of=<device> bs=4M; sync

where:

  • <file> is the iso file image name;
  • <device> is the linux device that corresponds to the USB memory, like /dev/sdb, /dev/sdc ;
  • bs=4M tells dd to manage block with size of 4 Megabytes to speed up the process;

sync force all the write operations to be completed before the USB merory is unplugged

Startup scripts

Important: these instructions apply to the recent persistent images of the Linux (starting from 1.7 and 3.0); instructions for previous images are reported elsewhere.

There are some scripts that customize the Linux when the pc104 boots up; those scripts are inside /etc/rciCub.d folder.

  • Set RobotName variable

edit the file:

/home/icub/.bash_iCubrc

replace the line:

 export YARP_ROBOT_NAME=myiCubRobotName00

with the name of your robot e.g. iCubGenova01

  • Setup password-less login (PC104 & laptop):

See page ICub laptop installation for details.

Important: When upgrading the usb key to a different version, remember to clean the CMakeCache before compiling!! This is because some path are likely to be changed in the meanwhile.

Further Customization

The persistent version of the Debian distribution is now writable so any customization can be done. Please be aware of what you do, because any changes in configuration file can lead to malfunction.