Version 9 (modified by jawil06, 3 years ago)

--

This guide is not yet complete.


BitBaking OSSIE For The Beagleboard

Getting Started With OpenEmbedded

Note: If you have already set up OpenEmbedded and would just like to BitBake OSSIE you may skip to the Building OSSIE section.

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):

  1. Git
  2. SVN

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 the lastest BitBake (1.10.1 as of this writing, to find the latest version visit  http://download.berlios.de/bitbake/), and unpack it:

$ wget http://download.berlios.de/bitbake/bitbake-1.10.1.tar.gz # Download the BitBake package
$ tar zxvf bitbake-1.10.1.tar.gz                                # Extract it
$ mv bitbake{-1.10.1,}                                          # 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

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"
...
INHERIT += "rm_work" # This is not necessary, but can reduce disk usage by ~4GB
...
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

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

Note: if you skipped the instructions on setting up OpenEmbedded, you must add ossie-recipes to BBFILES in your local.conf.

omniORBpy Workarounds

Currently there is no official omniORBpy recipe for OpenEmbedded. We've created our own, but there are issues with its building process that require some tweaking of omniORB-native. In the future we hope to eliminate the necessity of these workarounds.

First, modify the omniORB-native recipe to stage all of the necessary header files:

$ vim $OEHOME/openembedded/recipes/omniorb/omniorb_4.1.4.bb # Use your favorite text-editor
# Add the following to the bottom of the file
TODO: what needs to be added?

Finally, BitBake the modified recipe.

$ cd $OEHOME/build
$ bitbake omniorb-native # This could take some time

BitBake an OSSIE Development Image

This will create a console image with all the necessary development files to build other OSSIE components and tools for which there is not already a recipe natively on the BeagleBoard

$ cd $HOME/OE/build
$ bitbake ossie-dev-console-image