Version 27 (modified by zub, 9 years ago) (diff)


Building SHR

This page describes how to build you own SHR repository and disk images. We have a Tinderbox that shows if the packages have been building correctly on our build host. It might be worth checking if you have problems building a package.

Before beginning

Download the FSO/SHR Makefile from Bearstech (see README for details):

$ wget


$ make setup

make setup will download FSO, bitbake and SHR in the shr directory (SHR root directory from now on) and prepare everything for building an image.

Hint: check out the Troubleshooting section at the end of this page if you have issues building an image.

Set up your local.conf

Before building the image, you might want to update shr-testing/conf/local.conf to tweak your build. In order to get the right package version, you want to include the following tweaks (which are there by default, please check if you need to modify anything):


require conf/distro/include/
require conf/distro/include/
require conf/distro/include/

Speed up the building process

If your machine has multiple CPU's (or dual-core) this will help:


Disable/Minimize? locales generation

To avoid multiple locales generation, add:


or to disable locale generation at all:


this will also speed up the whole build.

Starting developing

If you are interested in developing SHR application, you should now switch over to Getting started developing SHR

First build

You are now ready to build the SHR image:

$ cd shr-testing
$ make image

By default, this will build the image for OM-GTA02. If you want to build the image for OM-GTA01:

$ cd shr-testing
$ make setup-machine-om-gta01
$ make image

you can change it back to OM-GTA02 with make setup-machine-om-gta02.

Making changes

Make changes to an SHR project (e.g. openmoko-dialer3, under the SHR root directory), then under the top directory:

$ cd shr-testing
$ . ./setup-env  (only once per session)
$ bitbake -c clean openmoko-dialer3
$ bitbake -c build openmoko-dialer3

There is no need to check-in the changes to the SHR repo, because the system now looks for SHR packages in the local filesystem. The problem is that it is necessary to always clean the packages so bitbake gets the new changes next time you compile.

Also, note that we are using bitbake -c build, this is because bitbake needs to do all the necessary steps before compiling (i.e. fetch, unpack, configure...).

Building an image

When you are satisfied with your changes and want to create a new SHR image:

$ cd shr-testing
$ make shr-image or make shr-lite-image

if make shr-lite-image doesn't work, try:

$ bitbake -c shr-lite-image

Updating from other people's changes

Under the top directory:

$ make update-shr

Or under the SHR root directory:

$ git pull

If you want to update everything (FSO, bitbake and SHR), from the top directory:

$ make update

Patch OpenEmbedded?

$ make patch-openembedded


One thing to try is to unset all environment variables not listed in this page. LIBPATH and INCLUDE can be particularly troublesome.

If you get the error '/proc/sys/vm/mmap_min_addr is not 0', try

$ echo 0 | sudo tee /proc/sys/vm/mmap_min_addr

On Ubuntu you need to install cvs gawk help2man texi2html texinfo diffstat

$ sudo apt-get install cvs gawk help2man texi2html texinfo diffstat

As of 16th january 2008, if python-etk fails, re-open OE #4992. workaround try this:

$ bitbake -c clean python-etk; bitbake eina; bitbake python-etk

If usb-gadget-mode fails building, try this:

$ echo 'MACHINE_CLASS = "armv4t"' >> common/conf/site.conf

If you get the error 'Please set the 'CACHE' variable', try to edit /usr/share/bitbake/conf/bitbake.conf and add:

CACHE = "~/your/path/somedir"

If build fails on "openembedded/packages/shasum/, do_compile" with empty log and you aren't using debian it's probably 'ccache' fault. Try one of these:

$ echo 'export HOME = "'$HOME'"' >> openembedded/conf/bitbake.conf 
$ echo 'CCACHE = ""' >> conf/local.conf

If build fails on "glibc, do_configure" with "configure: error: C preprocessor arm-angstrom-linux-gnueabi-gcc -E fails sanity check", run:

$ bitbake -f -c fetch gcc-cross-initial && bitbake gcc-cross-initial

If build fails on sato-icon-theme with "ERROR: Could not include required file /mnt/loop/shr-testing/openembedded/packages/sato-icon-theme/", edit the the file, and comment out the first line, which includes itself. (??!)

If build fails on qemu-native (in do_compile of glibc) with "error: unable to find a register to spill in c lass `GENERAL_REGS'", cd to shr-testing/tmp/work/i686-linux/qemu-native-0.9.1+svnr4242-r14/trunk, edit 'configure', find 'gcc3_list' variable and put gcc-3.3 before all others, then e.g. ./configure and make by hand.

If libtool-native fails in do_compile with: "source directory already configured": The cause can be a symlink in your TOPDIR variable (this then propagates to OE) - check conf/topdir.conf.

Current issues:

  • vala-native do_compile breaks with:
    make[2]: valac: Command not found


  1. bitbake -c clean vala vala-native vala-bootstrap-native
  2. make sure there are no libvala*0.7* in tmp/deploy/glibc/ipk/*/
  3. bitbake vala-bootstrap-native