Navit

Here is some N900-specific Navit information.

Contents

[edit] Install Pre-Compiled Packages

Navit can be installed as described this post

[edit] Compile

Here are instructions how to compile Navit on N900.

[edit] Create a SDK Image on the Phone

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

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

[edit] 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

Note: The bug is fixed in CSSU.

[edit] 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

[edit] Navit

Now, you can compile Navit yourself:

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

[edit] 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

[edit] 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.

[edit] Install

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

[edit] Links