Building an image for BeagleBone



A few day’s ago TI anaounced a new BeagleBoard: BeagleBone. It’s a stripped down BeagleBoard which basically only has a USB slave-client (providing a serial console, a JTAG debugger and an USB connection to the processor) an USB host controller, an ethernet port and a lot of I/O’s on the PIN-Headers for $89. It’s a bit inspired by the popular Arduino boards. I always thought about buying a BeagleBoard, but it was a too expensive and too functional to use it for my electronic projects…

So in my case, TI’s strategy worked: I want some more power, I want Linux, but it souldn’t be too expensive. I’m going to buy the BeagleBone, i’m just not yet sure about the quantity ūüėČ But it’s not here yet, in the meanwhile I looked at the software a bit: How can I create root images for the BeagleBone?

BeagleBone will be shipped with the √Öngstr√∂m Distribution preinstalled. The √Öngstr√∂m Distribution is an embedded Linux distribuation which will be built¬†using OpenEmbedded. As I mentioned, I’ve never owned a BeagleBoard. I played around with embedded Linux some months ago, but it wasn’t OpenEmbedded based. So I had to learn these things first. I recommend to read this article first and make your Distribution ready for¬†OpenEmbedded e.g. installing the needed packages :-). Additionally I needed to install these packages in Ubuntu to build the BeagleBone images (lzop for the kernel and autoreconf for makedepend, needed in the Cloud9 image):

sudo apt-get install lzop autoconf

Then these commands (at the end of the page) can be used to build the Ångström image for BeagleBone. At first these commands are black boxes. Here are some explanations what these commands exactly do (slightly dismantled):

    • Copy the¬†√Öngstr√∂m specific scripts to¬†initialize¬†an OpenEmbedded environment
    • git clone git://
      cd setup-scripts
      git checkout origin/oe-core -b oe-core
    • Run this initialization script.
      • Download all layers according to sources/layers.txt (which comes from the setup-scripts repository above).¬†This layers are git repositories as well.¬†Downloading them will generate meta-* folders in the source directory.
      • Generates OpenEmbedded configuration in¬†conf/site.conf and conf/auto.conf (e.g. MACHINE…)
      • Generates environment configuration in ~/.oe/environment-oecore (contains paths etc.)
    • ./ config beaglebone
    • Running¬†script all the time is not needed. Its easier to just set the environment right in your current shell
    • . ~/.oe/environment-oecore
    • Now we can bitbake the systemd-image, which contains the kernel and a basic root.
    • bitbake systemd-image
    • To build the Cloud9-IDE image we can simply trigger another recipe
    • bitbake cloud9-image

To update the layers we can use the initialization script again:

./ update

Before you start compiling you might want to alter the number of threads in conf/local.conf. Nevertheless, compiling takes quite a long time, since it has to download and build a tool chain first and build a whole linux system using this tool chain. I used the time to read some docs :-).

The build of cloud9-image will fail because it needs specific entries in fstab to create loop devices. You will be instructed which line to add at the very end of the cloud9-image build. It’s something like this:

/etc/fstab entries need to be created with the user flag for the loop devices like:
/dev/loop2 (YOUR-OE-FOLDER)/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-image-1.0-r0/tmp-mnt-boot vfat user 0 0

The output directory of the systemd-image and cloud9-image target will be build/tmp-angstrom_2010_x-eglibc/deploy/images/beaglebone/. Logfiles can be found in the build/tmp-angstrom_2010_x-eglibc/work/ folders (look up the failing package, there you should find a temp folder which contains the logs).

These images can now be copied to the SD-Card (as described here) and should run on your BeagleBone!


Some abbreviations you surly will stumble upon:

  • oe: OpenEmbedded
  • bb: BitBake, a tool used by OpenEmbedded to build packages
Some documentation:
Relevant resources:
Root-FS for systemd-image and cloud9-image target will be populated in these folders (and deleted after creation of the images!)
  • ./build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-image-1.0-r0/rootfs/
  • ./build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/systemd-image-1.0-r0/rootfs/
  1. Where do you plan to buy the Beaglebone? (I’m in Switzerland too).

  2. marcelo barros

    Thanks for sharing these tips !

    For those looking for http access in git repositories, please, do the following:

    git clone

    And, if you are behing a proxy, set your ~/.gitconfig to:

    proxy = http://user:pass@proxy_ip:proxy_port

  3. Siddhartha Kumar

    Hey ,
    Thanks for the tutorial it really helped but when i do bitbake cloud9-image i seem to be getting an error at
    >>package nodejs-native-0.6.18-r0: task do_populate_sysroot:

    This is my first time building the clou9-image for the beaglebone.
    If you have any suggestions please help me out
    Thank you

Leave a Comment