View source for SHR Development

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Return to SHR Development.

Personal tools

Template:SHR

Using FSO/SHR Makefile

Before beginning

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

$ wget http://shr.bearstech.com/Makefile

  • Run:

$ make setup

make setup will download FSO, bitbake and SHR in the shr directory (SHR root directory from now on).

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

require conf/distro/include/sane-srcrevs.inc require conf/distro/include/shr-autorev.inc

Speed up the building process

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

PARALLEL_MAKE = "-j 4" BB_NUMBER_THREADS = "4"

Disable/Minimize locales generation

To avoid multiple locales generation, add:

GLIBC_GENERATE_LOCALES = "en_US.UTF-8"

or to disable locale generation at all:

ENABLE_BINARY_LOCALE_GENERATION = "0"

this will also speed up the whole build.

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

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

$ make image

Updating from other people's changes

Under the top directory:

$ make update-shr

Or under the SHR root directory:

$ svn update

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

$ make update

Troubleshooting

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