MokoMakefile is a fully automated way of setting up an OpenMoko development environment. It is an invaluable tool for getting new developers up and running with a build environment which is configured the same as all the other existing developers. It brings the same repeatability to build environment creation and maintenance as that which OpenEmbedded brings to the main task of actually building embedded software distributions.
Note that MokoMakefile does *not* replace bitbake, or svn, or monotone, or openembedded, or qmake, or anything else. It is a wrapper around all that to make it easy to set up and maintain a development environment that fully complies with the setup instructions published by OpenMoko. Note that you need about 7 GB of available disk space for MokoMakefile to succeed.
MokoMakefile is developed by Rod Whitby - it is not an official product of OpenMoko (although I would be happy for them to pick it up and use it internally). If there is any discrepancy between the official OpenMoko build instructions, and the operation of the MokoMakefile, then you should consider the official instructions to be correct.
Here are the steps to use it:
1 - Make sure your build host is set up according to:
2 - Create your $OMDIR directory:
mkdir /home/moko ; cd /home/moko
3 - Grab MokoMakefile:
4 - Set up the environment:
5 - Start building:
This will set up the recommended directory structure as described in Building OpenMoko from scratch, will download all the required software (from the right places with the right versions), and will immediately start building an image.
Once you have done this, you can choose to continue using the MokoMakefile to initiate your subsequent builds, or you can go into the build directory and run bitbake commands manually. The choice is yours.
Updating the environment
For easy maintenance of your build environment the following commands are available.
1 - To update the MokoMakefile to the latest version:
2 - To update the OpenMoko repository checkout and the MokoMakefile patches to the latest version:
3 - To make sure that any recent changes to the build directory structure have been applied:
A quick way to rebuild a new image with the latest updates:
make update-makefile; make update; make setup; make openmoko-devel-image
First, make sure that the problem is reproducable after running
make update-makefile ; make update ; make setup
(where you replace <foo> with the name of the package which is failing)
If you can get the error to occur three times in a row after running that sequence of commands three times, then feel free to report it to rwhitby in #openmoko on IRC.
Work-arounds for temporary or isolated problems should be added to the Discussion page which is associated with this page. As they are fixed, they will be removed from that page.
- You can reduce the amount of consumed disk space significantly by adding
INHERIT += "rm_work"
in your local.conf (e.g. /home/moko/build/conf/local.conf). This will remove the contents of each build/tmp/work/*/<package> directory after the corresponding package builds correctly.
- If you an encounter an error with monotone similar to the following:
mtn: misuse: database /home/moko/OE.mtn is laid out according to an old schema
Then you need to upgrade OE.mtn Use the following command while in /home/moko:
# mtn --db OE.mtn db migrate
- If a certain package does not build due to corrupted download or some such try to remove the sources and rebuild it.
rm sources/<package>* cd build . ../setup-env bitbake -crebuild <package>
after that your build might just work again.
- For people with multiple CPU's (or dual-core ones) this small patch might be useful to build things faster.
Edit the local.conf and add the following lines:
PARALLEL_MAKE = "-j 4" BB_NUMBER_THREADS = "4"
Change the PARALLEL_MAKE and BB_NUMBER_THREADS values to something that suits better if it chokes your machine.
- For amd64 host users you need the patch from http://bugs.openembedded.org/show_bug.cgi?id=1765 to build db3-native
The MokoMakefile now has support for automatically building, flashing, and running the new OpenMoko emulator (which is based on QEMU).
“make qemu” will build qemu-neo1973, download the latest official openmoko images, flash the images into the virtual NAND flash, and run the emulator.
Other targets are “make download-images” (to download the latest official images), “make flash-qemu-official” (to flash those images) and “make flash-qemu-local” (which will flash your latest locally built images), which can then be followed by “make run-qemu” or “make run-qemu-snapshot” to run the emulator with the most recently flashed images.
Make sure you have the “lynx” and “netpbm” packages installed on your build host first.
MokoMakefile is recommended by 4 out of 4 new developers on #openmoko, with testimonials such as "For some reason last night I couldn't get my manual install of everything to work (bb complained about my bbpath I think) ... but with your makefile, it works great!", and "MokoMakefile rocks!".
Project page: http://mokomakefile.projects.openmoko.org/
English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català