Difference between revisions of "Openmoko"

From Navit's Wiki
Jump to: navigation, search
(Added to ports category)
m (Added picture)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[image:Navit_neo.jpg|320px|thumb|Navit on the Neo1973]]
 +
 
An article about navit can be found in the [http://wiki.openmoko.org/wiki/Navit OpenMoko-Wiki].  
 
An article about navit can be found in the [http://wiki.openmoko.org/wiki/Navit OpenMoko-Wiki].  
 
Further detail on the OpenMoko Freerunner can be found on the following website of [http://www.openmoko.com openmoko] and [http://www.openmoko.com/product.html# freerunner].
 
Further detail on the OpenMoko Freerunner can be found on the following website of [http://www.openmoko.com openmoko] and [http://www.openmoko.com/product.html# freerunner].
Line 10: Line 12:
 
* For further details follow the instructions in the [http://wiki.openmoko.org/wiki/SHR_User_Manual SHR User Manual]
 
* For further details follow the instructions in the [http://wiki.openmoko.org/wiki/SHR_User_Manual SHR User Manual]
  
==Compiling Navit from Source==
+
==QTMoko==
I find it useful to use agps, as it will shorten the time to first fix considerably. you can find the software [http://wiki.openmoko.org/wiki/Neo_FreeRunner_GPS here] .
+
http://qtmoko.sourceforge.net/apps/qtmoko-navit.html
 
 
===Compiling on the FreeRunner itself===
 
 
 
If you decide to to compile the software on the freerunner itself, don't forget to set the CC flags! :
 
 
 
<pre>
 
export CCFLAGS="-march=armv4t -mtune=arm920t"
 
export CC=`which armv4tl-softfloat-linux-gnueabi-gcc`
 
./configure
 
make
 
</pre>
 
 
 
===Cross-compile on Debian Lenny GNU/Linux===
 
 
 
How to cross-compile Navit for the OpenMoko FreeRunner, using a Debian box with the OpenMoko Toolchain. Tested on OpenMoko 2008.12.
 
 
 
On the Debian box install some required development packages:
 
 
 
<pre>
 
apt-get install alien autoconf automake autotools-dev build-essential ccache check curl \
 
fakeroot gettext intltool libgconf2-dev libglib2.0-dev libtool libxrender-dev mtools uboot-mkimage
 
</pre>
 
 
 
Install the [http://wiki.openmoko.org/wiki/Toolchain OpenMoko Toolchain], we decided to make a Debian package from the tarball, so (dis)installation is easy:
 
 
 
<pre>
 
wget http://downloads.openmoko.org/developer/toolchains/openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.bz2
 
bunzip2 openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.bz2
 
gzip openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar
 
fakeroot alien -d openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.gz
 
sudo dpkg -i openmoko-i686_20090323-2_all.deb
 
</pre>
 
 
 
Edit '''<code>/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/etc/opkg.conf</code>''' and set your preferred OpenMoko repositories. Default is '''unstable''', I used '''Om2008.8''' instead.
 
 
 
Add the following line to '''<code>/usr/local/openmoko/arm/environment-setup</code>''':
 
 
 
<pre>
 
export OMTOOL_DIR=/usr/local/openmoko
 
</pre>
 
 
 
Install with '''opkg-target''' some OpenMoko '''-dev''' packages required to compile Navit:
 
 
 
<pre>
 
. /usr/local/openmoko/arm/environment-setup
 
opkg-target update
 
opkg-target install gpsd-dev
 
opkg-target install gtk+-dev
 
opkg-target install libspeechd-dev
 
</pre>
 
 
 
Now we check-out Navit sources from the SVN repository:
 
 
 
<pre>
 
svn co https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit
 
</pre>
 
 
 
Instead of running the traditional '''./autogen.sh; ./configure''' in the navit source tree, we must run the '''om-conf''' script, which will modify the automake, autoconf and make files to run into the OpenMoko toolchain.
 
 
 
Because Navit on the OpenMoko FreeRunner requires some configure options, we will pass them to the script. Run om-conf from the directory containing the source tree (not inside it):
 
 
 
<pre>
 
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,32,48,96 --enable-svg2png-scaling-flag=32,48 \
 
    navit
 
</pre>
 
 
 
In the example above we used some ./configure options, among them:
 
 
 
'''–with-saxon=saxon-xslt'''<br>
 
This is because we have the Debian libsaxon-java package, where the executable is called saxon-xslt instead of saxon.
 
 
 
'''–enable-svg2png-scaling=16,32,48,96'''<br>
 
For each .svg icon, render a png image of the specified size. Images will be named icon_XX_YY.png.
 
 
 
'''–enable-svg2png-scaling-flag=32,48'''<br>
 
Same as above, but only for country flag icons.
 
 
 
It's time to cross-compile:
 
 
 
<pre>
 
cd navit
 
make
 
</pre>
 
 
 
'''TODO:''' Check for the '''saxon''' program, required by the Makefile. Debian has the saxon-xslt program instead, provided by the '''libsaxon-java''' package. So you have to modify navit/navit/Makefile.am and change the '''saxon -snone''' invocation with '''saxon-xslt'''.
 
 
 
'''TODO:''' Check compile flags and optimization.
 
 
 
====Make an .opk package====
 
 
 
The OpenMoko toolchain provides the '''om-make-ipkg''' utility. It requires the '''directory name''' where to execute the make install and the name of the '''control file''':
 
 
 
<pre>
 
. /usr/local/openmoko/arm/environment-setup
 
om-make-ipkg navit navit-control
 
</pre>
 
 
 
The control file is described [http://wiki.openmoko.org/wiki/Toolchain#Packaging_your_application here].
 
 
 
If you need more control files (e.g. a postinst or alike) you have to tweak with the om-make-ipkg script. Here it is the script I use, it looks for the control files into an opkg directory, so you have to pass just the directory name containing the source tree.
 
 
 
<pre>
 
#!/bin/sh -e
 
 
error_exit () {
 
        echo usage: $(basename ${0}) [app_dir_name] [ipkg_control_file]
 
        exit 1
 
}
 
 
test x${OMTOOL_DIR} = x && . /usr/local/openmoko/arm/setup-env
 
. ${OMTOOL_DIR}/arm/scripts/functions
 
S=${1}
 
(test x${S} = x || test ! -d ${S}) && error_exit
 
appname=$(basename ${S})
 
tmpdir=/tmp/${appname}-ipkg-tmp
 
test -e "${tmpdir}" && echo Cannot use ${tmpdir} because it already exists. && exit 1
 
make -C ${S} install DESTDIR="${tmpdir}"
 
# Copy control files to destination directory.
 
cp -pr opkg/* ${tmpdir}
 
ipkg-build -o 0 -g 0 ${tmpdir}
 
rm -rf ${tmpdir}
 
</pre>
 
  
Control files and other files are arranged into the opkg directory as needed, here it is an example:
+
==Android on Freerunner==
 +
See [[Android]]; instructions are the same as for other Android phones.
  
<pre>
+
==See also==
opkg/CONTROL/postinst
+
* [[Openmoko development]]
opkg/CONTROL/control
 
opkg/etc/rcS.d/S96overcommit_memory.sh
 
</pre>
 
  
[[Category:Ports]
+
[[Category:Ports]]

Latest revision as of 00:13, 17 February 2019

Navit on the Neo1973

An article about navit can be found in the OpenMoko-Wiki. Further detail on the OpenMoko Freerunner can be found on the following website of openmoko and freerunner.

In general you can download the software according to the instructions found in SVN as opkg packages. You have to add the navit repository (feed), update and install navit with opkg.

SHR[edit]

An other option without compiling navit is to follow the instructions in the SHR User Manual of the SHR distribution for your freerunner. SHR is one of the available distributions on your freerunner.

  • You can flash the memory of your freerunner with the SHR distribution and install Navit with the installer opkg
 opkg install navit 

QTMoko[edit]

http://qtmoko.sourceforge.net/apps/qtmoko-navit.html

Android on Freerunner[edit]

See Android; instructions are the same as for other Android phones.

See also[edit]