| Version 3 (modified by jawil06, 3 years ago) |
|---|
This page is not yet completed
BitBaking OSSIE For The Beagleboard
Getting Started With OpenEmbedded
Note: This section is adopted from the OpenEmbedded Wiki: http://wiki.openembedded.org/index.php/Getting_started.
Prerequisites
Before starting, make sure you have the following before preceding (see your distributions documentation on how to install software):
- Git
Getting The Toolchain
First, create your directory structure. I recommend creating an OE directory in your home folder:
$ mkdir -p $HOME/OE/build/conf $ cd $HOME/OE
Now, get BitBake, and unpack it:
$ wget http://download.berlios.de/bitbake/bitbake-1.8.18.tar.gz # Download the BitBake package
$ tar zxvf bitbake-1.8.18.tar.gz # Extract it
$ mv bitbake{-1.8.18,} # Rename the directory to bitbake
Now that we have BitBake, we need to get OpenEmbedded. Before simply checking out OpenEmbedded trunk, let's look for a recently tested tag here: http://git.openembedded.org/cgit.cgi/openembedded/refs/tags. As of this writing, the newest tested tag is "tested_2010-10-29". Be sure to check the commit log to ensure that a "beagleboard angstrom-2008.1" build was at least tested with a simple console-image. To get OpenEmdedd run (this may take a while depending on your connection speed):
$ git clone git://git.openembedded.org/openembedded $ cd openembedded # Replace "tested_2010-10-29" with the tag/branch you want $ git checkout tested_2010-10-29
Getting The OSSIE Recipes
The OSSIE recipes are located in the OSSIE SVN repository.
$ cd $HOME/OE/ $ svn --username anon --password ossiesdr co \ https://ossie.wireless.vt.edu/repos/ossie/ossiedev/branches/jawil06/recipes ossie-recipes
Setup The Environment
Before configuring BitBake, we should set some environment variables. There are many places to do this, including at build time, but we recommend placing the following lines at the end of your .bashrc file:
$ cat >> $HOME/.bashrc << EOF # OpenEmbedded Environment Setup export OEBASE=$HOME/OE export PATH=$OEBASE/bitbake/bin:$PATH export BBPATH=$OEBASE/build:$OEBASE/openembedded export BB_ENV_EXTRAWHITE="OEBASE" EOF $ . $HOME/.bashrc # Update environment
Configuring BitBake
Now that we have the toolchain and OSSIE recipes, we need to set up our configuration. Copy a sample configuration and edit it to fit our needs:
$ cd $HOME/OE/ $ cp openembedded/conf/local.conf.sample build/conf/local.conf $ vim build/conf/local.conf # Use your favorite text-editor
There are many possible settings in this file, the ones that are important to us are:
...
# Use this to specify where BitBake should place the downloaded sources into
DL_DIR = "${OEBASE}/sources" # This is just preference, the default is fine
# Delete the line below. Then specify which .bb files to consider for
# your build. Typically this will be something like BBFILES = "/path/to/openembedded/recipes/*/*.bb"
BBFILES := "${OEBASE}/openembedded/recipes/*/*.bb"
BBFILES += " ${OEBASE}/ossie-recipes/*/*.bb"
...
TMPDIR = ${OEBASE}/build/tmp
...
MACHINE = "beagleboard"
...
DISTRO = "angstrom-2008.1"
...
IMAGE_FSTYPES = " tar.bz2 "
...
# REMOVE_THIS_LINE:="${@bb.fatal('Read the comments in your conf/local.conf')}"
Other options that may be of interest are PARALLEL_MAKE and BB_NUMBER_THREADS especially for multi-core or multi-processor build systems.
Building a Console Image
This step is not required but recommended to ensure that your setup is working properly before you try to build the OSSIE recipes. We will build task-base and console-image. For more information on what exactly is happening here, see the OpenEmbedded documentation. Together, these can take hours on a standard machine. We recommend you let it run over night.
$ cd $HOME/OE/build $ bitbake task-base && bitbake console-image
If both builds succeed (run the bitbake command again to ensure success) then you will have a kernel image located at:
$OEBASE/build/tmp/deploy/glibc/images/beagleboard/uImage-beagleboard.bin
And a console image filesystem located at:
$OEBASE/build/tmp/deploy/glibc/images/beagleboard/console-image-beagleboard.tar.bz2
Building OSSIE
$ cd $HOME/OE/build $ bitbake ossie-dev-console-image