From IcedTea

Jump to: navigation, search


1 What are OE Classic?

OpenEmbedded, OE for short are a cross compile infrastructure that can be used to build a complete root filesystem with openjdk included from scratch. OE are good to use if you want to cross-compile openjdk and make sure that you can cross-compile all the build and runtime dependencies that openjdk need as well. Many embedded Linux distributions use the openembedded recipes for all their software cross-compile needs.

"OE Classic" refers to the use of the build recipes inside the git tree for cross compilation.

OE Classic are still actively maintained but are today mostly reciving maintance updates. New features gets first tested in the new layered OE-core/meta-oe git trees.

2 History

The openjdk build recipes inside OE Classic was originally developed by the Jalimo project and most of the recipes have got merged into OE Classic. For more background information on Jalimo see: [1] Some addon recipes are still left in the Jalimo svn tree like maemo specific cross-compile recipes for libSWT: [2]

3 Preparation

The instructions on this page have been tested and found to be working, 2011-05-19.

First make sure you have the following requirements: Harddrive space: about 50gig A fast internet connection: you will download about 2gig of sourcecode.

Install all dependencies of openembedded, if you are running Debian or Ubuntu then you can install them easily by executing the following command:

sudo apt-get install git python-ply python-progressbar texi2html cvs subversion gawk chrpath texinfo

On Ubuntu you will need to change /bin/sh to point to bash instead of dash, you can do this by running the following command and answer "No" if you want to use dash in the question box that gets displayed.

sudo dpkg-reconfigure dash

Now decide a place to use for openembedded with sufficient disk space

mkdir /usr/src/openembedded
cd /usr/src/openembedded

Now you will have to create your own copy of bitbake, openembedded from its various sources. The openembedded git tree are quite heavy about 500Mb in size, so be patient.

tar zxvf bitbake-1.12.0.tar.gz
git clone git://

Create your build directory

mkdir build
mkdir build/conf

Create your own local.conf A tested minimal build/conf/local.conf configuration can look like this:

vi build/conf/local.conf

# look in
# for various preconfigured distro targets.
DISTRO = "angstrom-2010.x"

# look in 
# for various preconfigured machine targets.
# If you want to build packages for the same architecture
# as bitbake are running on then change this to MACHINE = "native"
MACHINE = "beagleboard"

# Comment out *one* of the two lines below
#DISTRO_TYPE = "debug"
DISTRO_TYPE = "release"

#This row instructs bitbake to both create jffs2 compressed filesystems for embedded flash disks
#and tar.gz tarballs to be unpacked on removable compact flash sd cards.
IMAGE_FSTYPES = "jffs2 tar.gz "

# The default build uses glibc
# Uncomment the line below if you want uclibc instead of glibc
# be prepared for a lot of package breakage!
# 'uclibc' or 'glibc' or 'eglibc'

# If you enable glibc and encounter qemu-native build issues
# uncomment the line below.

# specifies where BitBake should place the downloaded sources
DL_DIR = "${OETOP}/sources"

# specifies where BitBake should create its temporary files

# specifies that BitBake should emit the log if a build fails

# collection setup
BBFILES="${OEBRANCH}/recipes/*/*.bb ${USERBRANCH}/packages/*/*.bb"




# Uncomment these lines to enable parallel make.
# This allows make to spawn mutliple processes to take advantage of multiple
# processors. Useful on SMP machines

# some of the OE provided native tools are a bit buggy
# uncomment the line below if you run into build failures due to the packages listed below
# you will also need to install your distro's version of these packages on your build machine
#ASSUME_PROVIDED += "gdk-pixbuf-csource-native imagemagick-native librsvg-native

Then you have to configure your environment variables to place bitbake in your path Do this by creating a simple bash script like this:


# Environment setup for oe

export MYBUILDDIR="build"


export OETOP="/usr/src/openembedded"
export OEBRANCH="${OETOP}/"
export USERBRANCH="${OETOP}/user.collection"

export PATH="${OETOP}/bitbake-1.12.0/bin/:$PATH"

umask 0002
# end oe setup

now run this script before you want to build something using oe.

chmod +x


If you have installed and configured bitbake, created your OE configuration and ran your setup-script then CONGRATULATIONS! Now cross-compiling various configuration of IcedTea are now very easy, simply run:

bitbake openjdk-6

You can look inside the tree to see all the bitbake targets that you can use to bitbake openjdk.

3.1 Help! the compilation using bitbake failed for some reason. Now what?

If it complains that the checksum for a downloaded file are missing then add then add the checksum to or add this line to your build/conf/local.conf


update the fast changing tree by running

git pull

Try restart the failing build by first cleaning it up

bitbake -c clean openjdk-6
bitbake openjdk-6

Try fix bugs by entering the interactive devshell, it will openup a terminal window with initialized build environment, from here you can run make etc and poke around like you are used to when doing manual Icedtea build.

bitbake -c devshell openjdk-6

Openembedded-uses the quilt tool to manage patches on top of the source-tree, to list all applied extra patches inside the dev-shell run:

quilt series
quilt help

Keep your sources directory! it contains all compressed source-code files and you do not want to download this again (about 2gig).

If you need more information try make your best to follow these two guides:

3.2 Help! my compilation succeeded, What now?

If your builds ends with:

... NOTE: Running task 2661 of 2661 (ID: 9, /usr/src/openembedded/, do_build) NOTE: package openjdk-6-jre-6b18-1.8.5-r11.1: task do_build: Started NOTE: package openjdk-6-jre-6b18-1.8.5-r11.1: task do_build: Succeeded NOTE: Tasks Summary: Attempted 2661 tasks of which 0 didn't need to be rerun and 0 failed.

Then Yay, wohoo!!! jump around happy and blog about it!

You can find your created packages and image files in /usr/src/openembedded/build/tmp/deploy

You can find the compiled binarys used to make the packages in the /usr/src/openembedded/build/tmp/work/arch/openjdk-6-* directory.

3.3 How do I update the Packages.gz files so that the deploy directory can be used as a opkg .ipk feed?

bitbake -f -b

Personal tools