| Version 18 (modified by jawil06, 2 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: OE Getting Started. Please read OE and Your Distro for advice on how to configure your operating system.
Prerequisites
Before starting, make sure you have the following software before preceding (see your distributions documentation on how to install software):
- Git
- SVN
- CVS
- C++ Compiler (e.g. g++)
- diffstat
- texi2html
- GNU Autotools (specifically autoconf, automake and libtool)
- makeinfo
- chrpath
- qemu (may not be necessary on some systems)
Other software may be required depending on which version of BitBake you use and your Linux distribution. BitBake will normally inform you of missing packages that should be installed.
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.12.0 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.12.0.tar.gz # Download the BitBake package
tar zxvf bitbake-1.12.0.tar.gz # Extract it
mv bitbake{-1.12.0,} # 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 or stable ref here: http://git.openembedded.org/cgit.cgi/openembedded/refs/. As of this writing, the newest stable ref is "2011.03-maintenance". If using a testing tag, 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 OpenEmdedded run (this may take a while depending on your connection speed):
git clone git://git.openembedded.org/openembedded cd openembedded # Replace "2011.03-maintenance" with the tag/branch you want git checkout 2011.03-maintenance
Setup The Environment
Before configuring BitBake, we should set some environment variables. There are many places to do this, including on the command line at build time, but we recommend placing the necessary export commands to the end of your .bashrc file. This can be accomplished by executing the following command (paste this entire section into a terminal at once):
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, we need to set up our BitBake 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-2010.x" # Or newest available Angstrom distro in "${OEBASE}/openembedded/conf/distro/"
...
# These lines may be necessary depending on your build system
ENABLE_BINARY_LOCALE_GENERATION = "0"
ASSUME_PROVIDED += "qemu-native"
GLIBC_GENERATE_LOCALES = "en_US.UTF-8" # Add any locales you may need
...
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-threaded, multi-core and/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. If you encounter any errors up to this point, then there is a problem with your BitBake or OpenEmbedded installation, dependencies, or configuration, and not with any OSSIE software, please refer to the OpenEmbedded help resources such as their manual, wiki, or IRC channels.
cd $OEBASE/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
Now that you have the OpenEmbedded toolchain installed and working properly, let's build OSSIE.
Getting the OSSIE Recipes
The OSSIE recipes are located in the OSSIE SVN repository.
cd $OEBASE 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 the BBFILES variable in your local.conf as described above.
BitBake OSSIE Images
There are several standard OSSIE images that can be built, as of this writing, the following are available:
- ossie-console-image
- ossie-x11-image
- ossie-dev-console-image
- ossie-dev-x11-image
These images can be easily built with BitBake:
cd $OEBASE/build bitbake ossie-x11-image # or whichever image you would like to build
Installing Images to SD Card
Once you BitBake one of the provided images you should be able to find it in:
$OEBASE/build/tmp/deploy/glibc/images/beagleboard/
To install your image to an SD card and run the software on your BeagleBoard refer to Getting Started with OSSIE-BeagleBoard using the SD Card Image, but use the uImage and root filesystem you generated instead of the supplied pre-built images.