The OpenEmbedded (OE) system consists of a collection of BitBake "recipes". These recipes contain the source URL of the package, dependencies and compile and install options. OE uses the information in these receipes to track dependencies, cross-compile the package, and create binary packages.It will also create complete images including boot loaders, kernel, and root file system. As a first step the framework will build a cross-compiler toolchain for the target platform.
For more detailed information, read the OpenEmbedded and BitBake user guides.
Your build machine should be running a fairly recent Linux distribution. The following distributions are known to work:
Depending on your distribution, it is likely you will need to install additional software. If you would like to install these packages up front, the following list includes most of the necessary packages:
Only the first two packages (git and svn) are required to be installed up front. Otherwise you can proceed and you will be prompted to install needed packages later in the process.
Note 1: If you are using an Ubuntu distribution, it is likely that /bin/sh is linked to /bin/dash. If this is the case, then you will need to change /bin/sh to link to /bin/bash. Neglecting to do this will cause target system init file corruption and your build image will not boot! Run "sudo dpkg-reconfigure dash" and answer no when asked whether you want to install dash as /bin/sh.
Note 2: If you are using Ubuntu 8.04 or later you will also need to edit /etc/sysctl.conf and set 'vm.vdso_enabled = 0' and 'vm.mmap_min_addr = 0'. Afterwards run 'sudo sysctl -p'
First you'll want to check out the source files for OE build system (roughly 250 MB). With a typical DSL connection this step should take less than 20 minutes. You should have at least 10GB of free space on your hard drive in order to do a complete build of the kernel and root file system images.
These instructions will assume that you are installing the build system in your home directory under "overo-oe". If you decide to put it elsewhere you will need to make appropriate alterations to the steps below.
First we will create the "overo-oe" directory and cd into it:
$ mkdir -p ~/overo-oe $ cd ~/overo-oe
Then we will install the OE metatdata, and check out the overo branch (you can safely ignore the warnings you will get from the git commands):
$ git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev $ cd org.openembedded.dev $ git checkout --track -b overo origin/overo
The next step installs BitBake:
$ cd ~/overo-oe $ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake
We now will create a profile script and the configuration files required to tailor OE to our needs.
To make this a somewhat easier task, there is a template for the required files in the openembedded installation we just did.
Copy these files to your overo-oe directory:
$ cp -r org.openembedded.dev/contrib/gumstix/build .
If you have followed the example installation and placed the build system in overo-oe in your home directory, you are now ready to proceed to the next step. If you have installed the build system in a different location you will need to edit overo-oe/build/profile and change the definition of OVEROTOP as appropriate.
As part of the build process OpenEmbedded downloads source code tarballs for the linux kernel, compiler, and other software packages. By default this source code cache will be placed in overo-oe/sources. If you would like this cache to be located elsewhere, now is the time to edit build/conf/site.conf and set DL_DIR as appropriate.
OpenEmbedded requires some environment setup in order to function properly. There are a couple of ways to handle this requirement.
You can set this up via your bash profile:
$ cp ~/.bashrc ~/bashrc.bak $ cat ~/overo-oe/build/profile >> ~/.bashrc
With most distributions, adding this environment setup to ~/.bashrc will work for both GUI shells and login shells. If your distribution does not source .bashrc for login shells, you may need to use ~/.bash_profile instead of ~/.bashrc (or modify ~/.bash_profile so that it does source ~/.bashrc).
f you chose Option A for environment setup (bash profile method), log out/log back in or close your terminal window and open a new one so that the environment changes you enabled above will take effect.
If you don't want to modify your standard terminal profile for some reason, you can do this environment setup on a per session basis by sourcing overo-oe/build/profile prior to issuing any build commands:
$ . ~/overo-oe/build/profile
or alternatively:
$ source ~/overo-oe/build/profile
If you chose Option B (command line sourcing), issue the command to source the environment setup.
You can build a basic kernel and non-gui root file system image in one step with:
$ bitbake omap3-console-image
If your build machine is missing any essential packages, bitbake will notify you about them at this point. Install the recommended packages and try the bitbake command again.
You will also get a message from bitbake suggesting that you install the psyco JIT compiler for better performance. It isn't necessary to install psyco right now, though it is a good idea to install it at some point.
You may also notice another message complaining about not finding user.collection/packages/*/*.bb. Don't concern yourself with this -- you will create this directory later when you create your first package for your own code.
This initial build will take a bit of time since it will need to download all the source code and build the cross compilation tools. Subsequent builds will be much faster. When the build completes, you will find the root file system image and the kernel image in $HOME/overo-oe/tmp/deploy/glibc/images/overo