Documentation
Setup and Programming
Setting up a build environment These instructions are for creating an OpenEmbedded (OE) build system for the Overo series. Much like Gentoo Ebuilds on x86, OE is a software framework to create Linux distributions. OE downloads the source code and cross compiles it for you as needed. OE builds everything from scratch including the cross compilation toolchain. This section will show you how to set up an OE environment on your Linux development system.
Note: Instructions to create a build environment for the Verdex Pro series are posted via here.
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 recipes 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.
Merges and Modifications
The Gumstix Overo OpenEmbedded (OE) repository is merged with OE upstream approximately weekly (sometimes much more frequently, less often during times of instability). There are only a handful of recipes that are unique to Overo, 99.9% of the repository is unchanged from OE mainline. Gumstix merges code at stable points to minimize breakage for Overo repository users. Gumstix engineers make sure that all of the common Overo images build successfully before pushing them to the Overo branch.
Use the standard open source mechanisms, i.e. for changes to generic OE recipes, submit your patch to the OE mailing list for consideration, and copy the Gumstix mailing list to inform the list of your patch, too.
A patch for Linux can be submitted to the Linux-OMAP mailing list if it is OMAP specific, or to one of the topic branch mailing lists as appropriate. Again, copying the Gumstix mailing list would be helpful.
Ditto for u-boot, etc.
All of the information and suggestions above apply for the Overo code. For Verdex Pro related patches, hold off until Gumstix completes the transition to unifying Verdex Pro support into the Overo repository.
Your build machine should be running a recent Linux distribution. Gumstix uses Ubuntu for development, and this is what we strongly recommend.
For those who need to use a different distribution, we recommend that you consult the OpenEmbedded documentation at:
http://wiki.openembedded.net/index.php/OEandYourDistro
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
$ git clone git://git.openembedded.net/bitbake bitbake
$ cd bitbake
$ git checkout 1.8.18
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:
$ cd ~/overo-oe
$ 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
Top Go back to "Installing additional sw packages" section Continue to "Source code" section