Building OpenNao
Table of Contents
OpenNao is the name of the Linux distribution that comes with the Nao. It is based on OpenEmbedded. With the basic configuration files, a few patches and some OpenEmbedded magic you can start building your own packages for the Nao. Currently, the kernel cannot easily be built as some crucial configuration files are missing from the file that Aldebaran provided. OpenEmbedded is a cross compilation environment specifically designed to allow for easy building of Linux distributions on top.
Setting up OpenEmbedded
We assume that you have root access on the machine where you work, or that your administrator created two directories, /opt/oe and /opt/naoqi that you have write permission for.
On most systems I found that a few required packages are missing. These are monotone, help2man, and texi2html. On Fedora you can type yum install monotone help2man texi2html to install these packages. Then you need the files oe-opennao-20080624.tar.bz2 and oe-opennao-mod-20080805.tar.bz2. The script below will download them for you. Then do:
cd /opt wget http://robocup.rwth-aachen.de/files/media_nao/oe-opennao-20080624.tar.bz2 wget http://robocup.rwth-aachen.de/files/media_nao/oe-opennao-mod-20080805.tar.bz2 tar xfj oe-opennao-20080624.tar.bz2 cd oe sed -i -e 's|python|/usr/bin/python|' bitbake/bin/bitbake wget http://oe.linuxtogo.org/snapshots/OE.mtn.bz2 bunzip2 OE.mtn.bz2 mv org.openembedded.dev/ bak.org.openembedded.dev/ # Possibly required for monotone >= 0.40, try pull first, if that fails, do the migrate mtn --db=OE.mtn db migrate mtn --db=OE.mtn pull monotone.openembedded.org org.openembedded.dev mtn --db=OE.mtn checkout --branch=org.openembedded.dev tar xfj ../oe-opennao-mod-20080805.tar.bz2 source setenv.sh bitbake sqlite3 bitbake avahi bitbake file bitbake gcc bitbake readline bitbake openssl bitbake libxml++ bitbake file bitbake lua bitbake tolua++ bitbake libpng
If bitbake fails, you may have to add the following line to your build/conf/local.conf:
PREFERRED_PROVIDERS = "virtual/i486-linux-libc-for-gcc:glibc virtual/i486-linux-gcc-intermediate:gcc-cross-intermediate"
Using your local build
After building files you can find ipkgs appropriate for installing on the robot in /opt/oe/tmp/deploy/ipk/geode/. The locally installed environment is in /opt/oe/tmp/staging/i486-linux/. It is used during linking of Fawkes when cross-compiling.

