Difference between revisions of "Openmoko"

From Navit's Wiki
Jump to: navigation, search
(Cross-compile on Debian Lenny GNU/Linux)
(Cross-compile on Debian Lenny GNU/Linux)
Line 61: Line 61:
 
</pre>
 
</pre>
  
Now we check-out Navit sources from the SVN repository and run '''om-conf''' to prepare the automake, autoconf and make files to run into the OpenMoko toolchain:
+
Now we check-out Navit sources from the SVN repository:
  
 
<pre>
 
<pre>
 
svn co https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit
 
svn co https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit
om-conf 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-svg2png-scaling-flag=32 --enable-cache-size=20971520 --with-xslts=openmoko \
 +
    navit
 
</pre>
 
</pre>
  
Line 74: Line 83:
 
make
 
make
 
</pre>
 
</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.
 
'''TODO:''' Check compile flags and optimization. Make an .opk package.

Revision as of 09:20, 27 October 2009

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

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 

Compiling Navit from Source

I find it useful to use agps, as it will shorten the time to first fix considerably. you can find the software here .

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! :

export CCFLAGS="-march=armv4t -mtune=arm920t"
export CC=`which armv4tl-softfloat-linux-gnueabi-gcc`
./configure
make

Cross-compile on Debian Lenny GNU/Linux

Install some required development packages:

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

Install the OpenMoko Toolchain, we decided to make a Debian package from the tarball, so (dis)installation is easy:

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

Edit /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/etc/opkg.conf and set your preferred OpenMoko repositories. Default is unstable, I used Om2008.8 instead.

Add the following line to /usr/local/openmoko/arm/environment-setup:

export OMTOOL_DIR=/usr/local/openmoko

Install with opkg-target some OpenMoko -dev packages required to compile Navit:

. /usr/local/openmoko/arm/environment-setup
opkg-target update
opkg-target install gpsd-dev
opkg-target install gtk+-dev
opkg-target install libspeechd-dev

Now we check-out Navit sources from the SVN repository:

svn co https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit

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):

om-conf --host=arm-angstrom-linux-gnueabi --enable-avoid-unaligned --enable-avoid-float \
    --enable-svg2png-scaling-flag=32 --enable-cache-size=20971520 --with-xslts=openmoko \
    navit

It's time to cross-compile:

cd navit
make

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.