doc:appunti:prog:openmoko_compile
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:prog:openmoko_compile [2009/10/18 07:53] – niccolo | doc:appunti:prog:openmoko_compile [2009/12/16 15:39] – niccolo | ||
---|---|---|---|
Line 83: | Line 83: | ||
I pacchetti vengono installati sotto **''/ | I pacchetti vengono installati sotto **''/ | ||
- | ==== Compiling a large project: Navit ==== | + | ===== Compiling a large project: Navit ===== |
- | Please, | + | Remember to improve the page [[http:// |
+ | |||
+ | How to cross-compile a large project like Navit for the OpenMoko/ | ||
First of all, edit the ''/ | First of all, edit the ''/ | ||
Line 93: | Line 95: | ||
</ | </ | ||
- | After toolchain installation, | + | After toolchain installation, |
< | < | ||
. / | . / | ||
+ | opkg-target list | ||
opkg-target install gpsd-dev | opkg-target install gpsd-dev | ||
opkg-target install gtk+-dev | opkg-target install gtk+-dev | ||
Line 102: | Line 105: | ||
</ | </ | ||
- | Now we check-out Navit sources from the SVN repository and run **'' | + | Now we check-out Navit sources from the SVN repository and we make an archive just in case we need the pristine sources in the future: |
< | < | ||
svn co https:// | svn co https:// | ||
tar zcvf navit-svn-2670.tar.gz navit | tar zcvf navit-svn-2670.tar.gz navit | ||
- | om-conf navit | ||
</ | </ | ||
+ | |||
+ | Instead of running the traditional **'' | ||
+ | |||
+ | Because Navit on the OpenMoko FreeRunner requires some configure options, we will pass them to the script. Run '' | ||
+ | |||
+ | < | ||
+ | om-conf --host=arm-angstrom-linux-gnueabi --enable-avoid-unaligned --enable-avoid-float \ | ||
+ | --enable-cache-size=20971520 --with-saxon=saxon-xslt --with-xslts=openmoko \ | ||
+ | --enable-svg2png-scaling=16, | ||
+ | navit | ||
+ | </ | ||
+ | |||
+ | In the example above we used some **'' | ||
+ | |||
+ | **'' | ||
+ | |||
+ | **'' | ||
+ | |||
+ | **'' | ||
+ | |||
It's time to cross-compile: | It's time to cross-compile: | ||
Line 120: | Line 142: | ||
=== Using the toolchains === | === Using the toolchains === | ||
+ | |||
+ | The OpenMoko toolchain provides the **'' | ||
+ | |||
+ | < | ||
+ | . / | ||
+ | om-make-ipkg navit navit-control | ||
+ | </ | ||
+ | |||
+ | The control file is described [[http:// | ||
+ | |||
+ | If you need more control files (e.g. a '' | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/sh -e | ||
+ | |||
+ | error_exit () { | ||
+ | echo usage: $(basename ${0}) [app_dir_name] [ipkg_control_file] | ||
+ | exit 1 | ||
+ | } | ||
+ | |||
+ | test x${OMTOOL_DIR} = x && . / | ||
+ | . ${OMTOOL_DIR}/ | ||
+ | S=${1} | ||
+ | (test x${S} = x || test ! -d ${S}) && error_exit | ||
+ | appname=$(basename ${S}) | ||
+ | tmpdir=/ | ||
+ | test -e " | ||
+ | make -C ${S} install DESTDIR=" | ||
+ | # Copy control files to destination directory. | ||
+ | cp -pr opkg/* ${tmpdir} | ||
+ | ipkg-build -o 0 -g 0 ${tmpdir} | ||
+ | rm -rf ${tmpdir} | ||
+ | </ | ||
+ | |||
+ | Control files and other files are arranged into the '' | ||
+ | |||
+ | < | ||
+ | opkg/ | ||
+ | opkg/ | ||
+ | opkg/ | ||
+ | </ | ||
=== Using opkg-utils === | === Using opkg-utils === | ||
- | This is an OpenMoko porting of the ipkg tools. Ipkg is obsolete, | + | The **[[http:// |
+ | |||
+ | The current opkg code is in [[http:// | ||
- | Simply do an: | ||
< | < | ||
svn co http:// | svn co http:// | ||
</ | </ | ||
- | and use the instructions of ipkg's website but the software from this checkout, the opkg-build. | + | |
+ | and use the instructions of ipkg's website but the software from this checkout. The main script is **'' | ||
===== Qemu and the GTA02 FreeRunner ===== | ===== Qemu and the GTA02 FreeRunner ===== |
doc/appunti/prog/openmoko_compile.txt · Last modified: 2009/12/17 11:20 by niccolo