|Version 19 (modified by grond, 3 years ago)|
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.
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
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, 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.