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://git.angstrom-distribution.org/setup-scripts 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.)
-
./oebb.sh config beaglebone
- Running oebb.sh 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:
./oebb.sh 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!
Appendix
Some abbreviations you surly will stumble upon:
- oe: OpenEmbedded
- bb: BitBake, a tool used by OpenEmbedded to build packages
- The default built instruction of Ångström
http://www.angstrom-distribution.org/building-angstrom
- OpenEmbedded documentation (note: Ångström does it a bit differently, manly because they use their setup-scripts)
http://docs.openembedded.org/usermanual/html/ - Debugging OpenEmbedded
http://www.uv-ac.de/openembedded/openembedded-4.html
- Official BeagleBone images: http://www.angstrom-distribution.org/demo/beaglebone/
- OpenEmbedded Meta package of TI (contains amongst other things BitBake recipes for the Kernel of BeagleBone) http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-texasinstruments/
- Kernel source tree of the kernel in the standard image: https://github.com/beagleboard/linux/tree/v3.1-meta-ti-r1r+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d
Note: BitBake add’s some patches, see above
- ./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/
Where do you plan to buy the Beaglebone? (I’m in Switzerland too).
Thanks for sharing these tips !
For those looking for http access in git repositories, please, do the following:
git clone http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/setup-scripts
And, if you are behing a proxy, set your ~/.gitconfig to:
[http]
proxy = http://user:pass@proxy_ip:proxy_port
An additional comment related to http/git:
sources/layers.txt needs to be changed if you can not access those repositories using git://, only http://
It becomes:
MBA@NOTE:~/oe/angstrom/setup-scripts/sources$ cat layers.txt
# Name,repo-uri,branch,rev
bitbake,http://github.com/openembedded/bitbake.git,master,HEAD
meta-angstrom,http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-angstrom,master,HEAD
meta-openembedded,http://github.com/openembedded/meta-oe.git,master,HEAD
meta-ti,http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-texasinstruments,master,HEAD
meta-ettus,http://github.com/balister/meta-ettus.git,master,HEAD
meta-efikamx,http://github.com/kraj/meta-efikamx.git,master,HEAD
meta-nslu2,http://github.com/kraj/meta-nslu2.git,master,HEAD
meta-smartphone,http://git.shr-project.org/repo/meta-smartphone.git,master,HEAD
meta-intel,http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel,master,HEAD
meta-xilinx,http://git.yoctoproject.org/cgit/cgit.cgi/meta-xilinx,master,HEAD
meta-openpandora,http://github.com/openpandora/meta-openpandora.git,master,HEAD
meta-handheld,http://git.openembedded.org/meta-handheld,master,HEAD
openembedded-core,http://github.com/openembedded/oe-core.git,master,HEAD
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