This project uses OpenEmbedded (OE) as its build platform. This tutorial is based on the OpenEmbedded.net Getting Started page, refer to it if anything on this page is not clear.
1. First, read the section relative to the linux distribution you will be compiling OpenEmbedded on at " OE and your distro", install the recommended packages and resolve any possible issue listed on that page.
For Ubuntu Users the following page will provide a full tutorial on setting up an OpenEmbedded Environment. NOTE that it is NOT compatible with the openAOS overlay though! Just use them for reference which packages to install'''
2. Create an empty folder, in this tutorial we use /usr/src/openaos. This folder will contain your entire OE environment, the openAOS overlay, and everything else you might ever need for this project.
mkdir -p /usr/src/openaos
It is likely that you re-aquire root permissions to create the directory. If this is so then the above step will result in a permission denied. If this occurs perform the following:
sudo -s mkdir -p /usr/src/openaos chown -R username /usr/src/openaos/
The root password will be required for after the sudo command. Replace username with whatever user name you use. The chown comand will change the ownership from root to your username. To check all is well do a ls -lat command and the following line should be shown: drwxr-sr-x 3 robert src 4096 2010-02-10 20:31 openaos
3. The openAOS projet maintains its own overlay on top of the OpenEmbedded environment. It is available from our Subversion repository:
cd /usr/src/openaos svn co http://svn.openpma.org/svn/openpma-ng/trunk/openembedded/build/
Be sure to run an update occasionally:
cd /usr/src/openaos/build svn update
4. The next step is to download the build tool, BitBake:
cd /usr/src/openaos/build wget http://download.berlios.de/bitbake/bitbake-1.8.18.tar.gz tar -xzf bitbake-1.8.18.tar.gz mv bitbake-1.8.18 bitbake rm bitbake-1.8.18.tar.gz
5. The next thing you need to do is to checkout the official OpenEmbedded source tree. The openAOS project is based around the stable/2009 branch:
cd /usr/src/openaos/build git clone git://git.openembedded.org/openembedded cd openembedded/ git checkout origin/stable/2009 -b stable/2009
The stable/2009 branch should not change much, but once in a while, run an update on your git repository:
cd /usr/src/openaos/build/openembedded git pull
6. Rename the two following files, removing the "-base" suffix from their names. Edit them, and make sure the path to your openAOS build tree (/usr/src/openaos/build in this exmaple) is accurate.
7. Each time you want to work with your OE environment to build packages, you will need to configure your shell environment by:
cd /usr/src/openaos/build/profiles/openaos source profile.sh
The profile.sh script adds OE specific environment variables to specify where OE's tools live and how your build environment is setup.
You are now ready to start working with openAOS and OE!
To build anything in OpenEmbedded, the command to use is bitbake followed by a recipe name. The available recipes for the openAOS project are located under /usr/src/openaos/build/openaos/recipes. In general, if you are modifying anything outside of this folder, you are doing it wrong. The overlay recipes have priority over the openembedded recipes, so for instance, if you want to modify an OE recipe, first copy it from openembedded/recipes to openaos/recipes and then proceed with your changes.
To test if OpenEmbedded is configured and running correctly, build the initramfs image for the Archos 5/7:
The first time this is run, all the necessary tools for cross compiling the kernel and several other support packages for your host platform will be built. If successful, the newly compiled kernel, root file-system image, and initramfs image will be located in /usr/src/openaos/build/angstrom-dev/deploy/glibc/images/archos5/.
Experimentally (or if you need to build for the Archos 5 IT), you can build an initramfs that will allow multiple images to be installed, with the user selecting at boot time. To get this version, do
You will need a boot menu file installed to use this. Please see experimental multi-root support for the SDE for details.
To build the base openAOS image use:
This will include the Angstrom distribution with Xorg windowing server, selected desktop and mobile packages installed, and openAOS specific utilities.
[Please note -- at the present `openaos-base-image' does not exist. For now, you can build a GPE-based image with many Archos-specific fixes and some additional apps that have been modified to work better with the Archos unit, by doing:
This will generate an ext3 image extended-gpe-image-archos5.ext3 which you can copy to the Archos unit over the rootfs.img supplied with the SDE. The SDE's original kernel and initramfs should work with this image -- there is no compelling reason to install the ones that bitbake will generate (unless you've modified them for other reasons, of course) -- KB]
Note that building the full Angstrom image for the first time may take several days and will require many gigabytes of disk space.