Version 37 (modified by Thor, 9 years ago) (diff)

updated some more references from testing to unstable

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.

Note: you can track SHR activity on

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

DISTRO = "shr"

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-unstable
$ make image

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

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

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

Note: Unless you have valac on your build box, you're bound to run into trouble with vala-native. To work around this, do: bitbake -c clean vala-bootstrap-native; bitbake vala-bootstrap-native. Then vala-native should bitbake ok, allowing image to be built.

(btw. if you bitbake vala-native and you want to bitbake it again, you have to explicitly clean and rebake vala-bootstrap-native)

Making changes

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

$ cd shr-unstable
$ . ./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-unstable
$ make shr-image or make shr-lite-image

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

$ bitbake -c shr-lite-image

When make process is successfully done, you can found your fresh image under tmp/deploy/glibc/image.

You may also been interesting in produced packages under tmp/deploy/glibc/packages.

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 build fails on git-native with "Can't locate ExtUtils/MakeMaker?.pm ..." in the Log, you need to install the package "perl-ExtUtils?-MakeMaker?" on your buildhost.

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.

  • gst-plugins-good fails:

Open openembedded/recipes/gstreamer/ add to EXTRA_OECONF --disable-esd Terminal: . ./setup-env bitbake -c configure gst-plugins-good bitbake -c rebuild gst-plugins-good make image

If build fails with "..../ do_compile failed" check whether xsltproc is installed. In ubuntu it can be installed via:

$ sudo apt-get install xsltproc