Since I started to work with the beagle-board, one of my main concerns has been generate a custom image with the minimal setup required for the task: In my opinion it is important to have installed only the necessary and do not bloat the SD with a full featured distribution. In this way, we will control the dependencies, and we will remove possible points of failure which only will drowse our cycle of development/testing.
In the case of a OMAP3 base board or any other board with inferior capabilities, the solutions were in builder systems with cross-compilation support, such as OpenEmbedded, Buildroot, etc.. Those builders use the cross-compilation technique to generate custom images for the target hardware.
But in OMAP4 we are in the border line between an embedded system and a PC, and because of this, I needed a kind of a mixed approach: a native compiling environment within a custom image, in order to set it up as a builbot slave.
As I attained certain experience with OpenEmbedded I started to craft a custom native-sdk image, with rather thwarted results: after several days of patches and bug fixes, I was not able to compile, in the panda-board, the software I was willing to test.
Dodging the OE’s approach, I decided to uproot it and I started to explore new paths. Soon I stumbled with rootstock: a shell script which generates custom images of the Ubuntu distribution for the ARM architecture.
Nonetheless I tried it under Debian, since I don’t have any machine with Ubuntu. The script is difficult to trace and its logs are not useful on many occasions, mainly when the processing occurs in the qemu virtual machine. Anyway, I found that the qemu distributed by Squeeze was not functional in this particular case, so I grabbed the latest code from its repository, I compiled it and it worked like a charm.
NOTE: use the latest code of the RootStock hosted in the Launchpad bazaar repository.
At the end I came with a script where I set the parameters for my particular use case:
#!/bin/sh export TMPDIR=$(pwd)/tmp export PATH=$PATH:/usr/sbin/:/sbin:/opt/qemu/bin [ -d $TMPDIR ] || mkdir -p $TMPDIR BASE="ubuntu-minimal,build-essential,openssh-server,python-twisted-core,nfs-common,portmap" V8_DEPS="scons,libreadline-dev" JSC_DEPS="autoconf,libtool,bison,flex,gperf,libicu-dev,libxml2-dev,libglib2.0-dev,libsoup2.4-dev" ./rootstock --fqdn panda1.local.igalia.com --login user --password 000 --imagesize 512M --dist maverick --serial ttyO2 --seed $BASE,$V8_DEPS,$JSC_DEPS
In this way I can generate a minimal image, in a tarball, for my panda build-slave.