SHR Development
From Openmoko
m (→First build) |
|||
Line 1: | Line 1: | ||
{{SHR}} | {{SHR}} | ||
− | = | + | = Using FSO/SHR Makefile = |
− | + | ||
− | + | ||
=== Before beginning === | === Before beginning === | ||
Line 18: | Line 16: | ||
=== Set up your local.conf === | === Set up your local.conf === | ||
− | Before building the image, you might want to update ''shr-unstable/conf/local.conf'' to tweak your build. | + | Before building the image, you might want to update ''shr-unstable/conf/local.conf'' (buildhost uses shr-testing!) to tweak your build. |
==== Speed up the building process ==== | ==== Speed up the building process ==== | ||
Line 63: | Line 61: | ||
$ bitbake -c build openmoko-dialer3 | $ bitbake -c build openmoko-dialer3 | ||
− | There is no need to check-in the changes to the repo | + | 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...). | 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...). | ||
Line 84: | Line 82: | ||
$ make update | $ make update | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Troubleshooting === | === Troubleshooting === | ||
− | |||
One thing to try is to unset all environment variables not listed in this page. LIBPATH and INCLUDE can be particularly troublesome. | One thing to try is to unset all environment variables not listed in this page. LIBPATH and INCLUDE can be particularly troublesome. | ||
[[Category:SHR]] | [[Category:SHR]] | ||
[[Category:System Developers]] | [[Category:System Developers]] |
Revision as of 14:37, 9 October 2008
Contents |
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-unstable/conf/local.conf (buildhost uses shr-testing!) to tweak your build.
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-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.
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...).
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.