Navit

Contents

Navit on N900

Here is some N900 specific Navit information.

Compile

Here are instructions how to compile Navit on N900.

Create a SDK Image on the Phone

Sorry i can't remember exactly reproduceable steps. Most information about this come from this thread.

  • Install "easy chroot".
  • Download maemo-sdk-v1_2.img.ext2 from qole.
  • Increase temp size "mount -o remount,size=10M /tmp"
  • Chroot into the image.
  • Install language package to fix the perl errors.
  • Install Nokia binaries.
  • Update distribution.
  • Download, compile and install GNU autotools.
  • Install "librsvg2-bin" to be able to convert svg files into png files.
  • Install SVN client to be able to get the libgarmin source.

Freetype2

Maemo has a version with a bug. So use a newer one for Navit.

Download source [1] and unpack it.


./configure --prefix=/opt/navit/lib/3rdparty --libdir=/opt/navit/lib/3rdparty
make
make install

Libgarmin

To support garmin maps you need this driver.

Download source: svn co http://libgarmin.svn.sourceforge.net/svnroot/libgarmin/libgarmin/dev libgarmin


./autosh.sh
./configure --prefix=/opt/navit/lib/3rdparty --libdir=/opt/navit/lib/3rdparty
make
make install

# create so file:
cd src
gcc -shared -o libgarmin.so *.o
cp libgarmin.so /opt/navit/lib/3rdparty

Navit

Now you can compile Navit.

Download source [2] and unpack it.


export PKG_CONFIG_PATH=/opt/navit/lib/3rdparty/pkgconfig/

./autogen.sh

./configure --prefix=/opt/navit --disable-binding-python --enable-avoid-float --enable-avoid-unaligned --enable-svg2png-scaling="32,48,64" --enable-svg2png-scaling-flag="32,48,64" --enable-svg2png-scaling-nav="8,16,32,48,64" --disable-samplemap --disable-graphics-sdl --enable-vehicle-maemo --with-svg2png-use-rsvg-convert --disable-svg

make
make install

Configure

You have to configure the XMLs in "/home/user/.navit".

Now you can start Navit in SDK image:


export LD_LIBRARY_PATH=/opt/navit/lib/3rdparty:$LD_LIBRARY_PATH
/opt/navit/bin/navit

Package

Now create a deb package to install it on N900 outside of the SDK image.

Script:


echo "create root dir"
cd "/home/user/reini/package/navit"
version="0.2.0~svn3708-1_armel"
navit="navit_${version}"

echo "init"
rm -R -f "$navit"
# my template dir has the following files
# /DEBIAN/prerm
# ./DEBIAN/postinst
# ./DEBIAN/control
# ./opt/navit/bin/navit.sh
cp -R ./template "$navit"

echo "copy navit configuration"
mkdir -p "$navit/home/user/.navit"
cp /home/user/.navit/*.xml "$navit/home/user/.navit"
mkdir -p "$navit/home/user/.navit/sample"
cp /home/user/.navit/sample/*.sh "$navit/home/user/.navit/sample"
cp /home/user/.navit/sample/*.bin "$navit/home/user/.navit/sample"

echo "copy navit binaries"
cp -R /opt/navit/ "$navit/opt"
(
  # keep only so files from additional libs
  cd "$navit/opt/navit/lib/3rdparty"
  rm -R bin include pkgconfig share libfreetype.a libgarmin.a
)

echo "create deb"
dpkg-deb -b "$navit"

Now you have a "navit_0.2.0~svn3708-1_armel.deb" ready for installation on N900.

Install


dpkg -i navit_0.2.0~svn3708-1_armel.deb

Links

Retrieved from "http://wiki.maemo.org/Navit"