Building Ångström for the BeagleBoard using OpenEmbedded

Array

Here is a photo of the kernel being built with Open Embedded, whilst cooking my poor laptop.

Open embedded is an amazing package which greatly streamlines the process of building a kernel and a root filesystem for the BeagleBoard using the Angstrom distribution. So the basic process is:

1. Install required packages (http://openembedded.org/index.php/OEandYourDistro).
2. Follow building Ångström steps (http://www.angstrom-distribution.org/building-angstrom).
2. ???
3. Profit.

Here are some great links which will definitely help answer some questions. So before you start you need to have the required packages installed on your system Then you should follow the instructions from the distro website.

What that page doesn’t explain is that:
- virtual/kernel is just the kernel
- console-image and base-image are “package sets” for the root filesystem.
This OE wiki page has info about the output from the build:
http://elinux.org/BeagleBoardAndOpenEmbeddedGit
These have some other helpful info:
http://groups.google.com/group/beagleboard/browse_thread/thread/e83117c1160c5578?pli=1
http://beaglelinux.blogspot.com/2011/03/configuringrebuilding-kernel.html

Some other stuff which I found helpful.
If you mess up your git tree and get “Error: refusing to pull with rebase: your working tree is not up-to-date” when you do “git pull –rebase”. You can try what it says here. But I found that doesn’t help, I did this instead. But warning: this will overwrite any custom changes you’ve made to the tree.


You will need a lot of space, I’d recommend having at least 20gb free. Don’t do what I do and move the directories half way through the build, you’ll need to start the build all over again.


Doing a complete system build (kernel+rootfs) takes a long time and a lot of bandwidth. I’ve been doing it from an Ubuntu virtual machine and it takes about 12 hours to complete (virtual/kernel + console-image). So consider using demo images and pulling binaries via opkg. Or a dedicated machine for doing this rather than a virtual machine.


While I didn’t try it myself, I hear mixing your own kernel from oe via virtual/kernel with a prebuilt demo root filesystem can break things. Especially if the kernel versions are different. But don’t quote me on this. I tried it to test if the kernel would boot and it did boot happily but I don’t know about stability.


Coping MLO and uboot from here is fine. I think there are some exceptions to this- the newer kernels require this uboot, but don’t quote me on this. You will need to setup your own bootscript (boot.src) for the kernel you’re compiling. When you build your OS using OE, for example “bitbake console-image” it will build MLO and uboot for you. Don’t use old ones, especially since uboot using uEnv.txt now.


If you are new to the BeagleBoard I would recommend trying to get the demo images from here working first. It will help you understand the boot system and what is required for a complete operational system.


Related to the last item, setting up the SD partitions is trival using the mkcard.txt script from here. That page also has some instructions of how to do it.


Don’t do an “apt-get install bitbake” (or equivalent), this is outdated and you should be following the instructions on the Angstrom distro website. Use the script! It grabs OE (ie: bitbake) for you!! The script hides a lot of the complex setting up things at first, so you can get down to building that first system.


Here is a good link with a description of the OpenEmbedded directory structure: http://gumstix.org/software-development/open-embedded/161-openembedded-directory-layout.html. It is a must read to understand where everything ends up.


Bitbake cheat sheet


avatar

About Dave

"if it's not on fire, it's usually a software problem"