Sunday, August 28, 2011

Custom OpenEmbedded distribution based on Angstrom

Angstrom distribution is similar to Ubuntu or Fedora but it is specifically meant for embedded devices. Angstrom uses the OpenEmbedded system to build their distributions.

If you want a ready made image for your embedded device you can use their online builder available here.

I recently faced a situation where I had to enable SPI driver in Angstrom distribution for beagleboard. For that I had to custom compile the Linux kernel with the McSPI module enabled since it was not enabled in the default builds.

Step 1:

Create a folder in your home directory called "openembedded"
$mkdir ~/openembedded
$cd ~/openembedded

Step 2:

Download the setup scripts for Angstrom using git
$git clone git://
$cd setup-scripts

Step 3:

Start the build process for beagleboard. This will download the "bitbake" which is only a tool used to build packages and "openembedded" system which provides the "recipes" of the packages for the "bitbake" tool.
./ config beagleboard
Note: Replace beagleboard with your embedded machine name. Also note that "openembedded" git download is more than 700 MB.

Step 4:

Load the script file created in the previous step. You need to do this everytime you want to build packages from a new terminal, or you can add this line to the ~/.bashrc file
$source ~/.oe/environment-2008

Step 5:

Build your first package the famous "nano" command line editor
$bitbake nano

Now, the real thing is to build the kernel image from source
$bitbake virtual/kernel

Links :

No comments:

Post a Comment