doc:appunti:prog:openmoko_compile
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:prog:openmoko_compile [2009/10/27 09:48] – niccolo | doc:appunti:prog:openmoko_compile [2009/12/17 12:20] (current) – niccolo | ||
|---|---|---|---|
| Line 95: | 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 104: | 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 123: | Line 143: | ||
| === Using the toolchains === | === Using the toolchains === | ||
| - | The OpenMoko toolchain provides the **'' | + | The OpenMoko toolchain provides the **'' |
| < | < | ||
| Line 132: | Line 152: | ||
| The control file is described [[http:// | The control file is described [[http:// | ||
| - | If you need more control files (e.g. a '' | + | 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 === | ||
doc/appunti/prog/openmoko_compile.1256633307.txt.gz · Last modified: by niccolo
