SHR Development
From Openmoko
(→Troubleshooting) |
|||
Line 6: | Line 6: | ||
* Download the FSO/SHR ''Makefile'' from [http://shr.bearstech.com/ Bearstech] (see README for details): | * Download the FSO/SHR ''Makefile'' from [http://shr.bearstech.com/ Bearstech] (see README for details): | ||
− | + | $ wget | |
+ | <nowiki>http://shr.bearstech.com/Makefile</nowiki> | ||
* Run: | * Run: | ||
− | + | $ make setup | |
make setup will download FSO, bitbake and SHR in the shr directory (SHR root directory from now on). | make setup will download FSO, bitbake and SHR in the shr directory (SHR root directory from now on). | ||
Line 16: | Line 17: | ||
=== Set up your local.conf === | === Set up your local.conf === | ||
− | Before building the image, you might want to update ''shr- | + | 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 ==== | ==== Speed up the building process ==== | ||
Line 22: | Line 27: | ||
If your machine has multiple CPU's (or dual-core) this will help: | 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 ==== | ==== Disable/Minimize locales generation ==== | ||
Line 29: | Line 34: | ||
To avoid multiple locales generation, add: | To avoid multiple locales generation, add: | ||
− | + | GLIBC_GENERATE_LOCALES = "en_US.UTF-8" | |
or to disable locale generation at all: | or to disable locale generation at all: | ||
− | + | ENABLE_BINARY_LOCALE_GENERATION = "0" | |
this will also speed up the whole build. | this will also speed up the whole build. | ||
Line 41: | Line 46: | ||
You are now ready to build the SHR image: | 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: | 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''. | you can change it back to OM-GTA02 with ''make setup-machine-om-gta02''. | ||
Line 56: | Line 61: | ||
Make changes to an SHR project (e.g. openmoko-dialer3, under the SHR root directory), then under the top directory: | 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. | 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. | ||
Line 67: | Line 72: | ||
When you are satisfied with your changes and want to create a new SHR image: | When you are satisfied with your changes and want to create a new SHR image: | ||
− | + | $ make image | |
=== Updating from other people's changes === | === Updating from other people's changes === | ||
Line 73: | Line 78: | ||
Under the top directory: | Under the top directory: | ||
− | + | $ make update-shr | |
Or under the SHR root directory: | Or under the SHR root directory: | ||
− | + | $ svn update | |
If you want to update everything (FSO, bitbake and SHR), from the top directory: | If you want to update everything (FSO, bitbake and SHR), from the top directory: | ||
− | + | $ make update | |
=== Troubleshooting === | === Troubleshooting === |
Revision as of 17:18, 27 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-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