Netzoffice R. Wölfel
TomTom Tipps PDF Drucken E-Mail
Geschrieben von Ronald Woelfel   
Mittwoch, 28 November 2007

Automatically reconnect with rfcomm-Shellscript (for Bluetooth-Shell)

#!/bin/sh -x
hcitool scan
while true
do
rfcomm connect /dev/rfcomm0 00:13:6C:DE:E4:EE 1
rfcomm release /dev/rfcomm0
sleep 7
done

Automatic upload and remote start (leave Minicom for this)

#!/bin/sh -x
make
arm-linux-gcc -o HelloGhoti barc_hw.o

DEV="/dev/rfcomm0"
datei="/home/tomtom/work/HelloGhoti/src/HelloGhoti"
echo 'cd /tmp' >$DEV
echo 'killall -9 HelloGhoti' >$DEV

sleep 1

echo 'lrz' >$DEV
sleep 1
# -y means overwrite file
sz -y -vv <$DEV  >$DEV  $datei
sleep 1
echo '/tmp/HelloGhoti &' >$DEV
read dummy
echo 'killall -9 HelloGhoti' >$DEV

 

Ghotis Hello-World with old TomToms:

 

Annoying "error while loading shared libraries: lib..."

  • copy all self compiled libraries to /mnt/sdcard/lib/
  • bear in mind that the vfat-filesystem on /mnt/sdcard/ dont support symbolic links
  • so you have to copy the files instead of it or use "tar zhcvf file.tgz dir-with-symlinks/"
  • use the following script to generate the links in /lib
# cat lib-link.sh
#!/bin/sh
for i in /mnt/sdcard/lib/*
do
filename=${i#/mnt/sdcard/lib/}
ln -s $i /lib/$filename
done

 

 

ARM-Binaries for TomTom


General Hints for compiling:


Hints for compiling netpbm (Debian):

  • Use debian. With Ubuntu, you probably will get the following warning and error in pstopnm
  • /usr/include/asm/errno.h:9:4: warning: #warning This machine appears to be neither x86_64 nor i386.
  • pnm/pstopnm.c:521: error: `ENOENT' undeclared....
     
  • You need libpng12-dev, zlib1g-dev, libmng-dev and libtiff4-dev
  • and of course such things like dpatch, debhelper, autotools-dev and fakeroot
  • use the debian-pakets netpbm-free_10.0-8sarge3.diff.gz and netpbm-free_10.0.orig.tar.gz
  • tar zxvf netpbm-free_10.0.orig.tar.gz
  • cd netpbm-free-10.0-1/
  • zcat ../netpbm-free_10.0-8sarge3.diff.gz |patch -p1
  • now there is a ./debian/rules Makefile
  • vi Makefile.config.in
  • search for "CC = gcc", replace it with "CC = arm-linux-gcc"
  • make -f debian/rules
  • maybe make needs to ignore errors (-i):  make -i debian/rules
  • you can find the binaries in pgm/ pnm/ ppm/ pbm/
  • mkdir /tmp/netpbm
  • find pgm/ pnm/ ppm/ pbm/  -type f -perm +0111 -exec cp {} /tmp/netpbm \;
  • the library is in ./netpbm-free-10.0-1/lib/shared/libnetpbm.so.10.0
  • the symbolic links libnetpbm.so and libnetpbm.so.10 in the same directory are also important
  • there is no ldconfig binary for tomtoms busybox
  • so you could use /etc/ld.so.preload
  • just copy libnetpbm.so.10.0 to /mnt/sdcard/bin do a 
  • echo "/mnt/sdcard/bin/libnetpbm.so.10.0" >/etc/ld.so.preload


Hints for compiling libgd without jpeg and font-stuff 

export CC=arm-linux-gcc
export CXX=arm-linux-g++
export LD=arm-linux-ld
export NM="arm-linux-nm -B"
export AR="arm-linux-ar -r"
export RANLIB=arm-linux-ranlib
export STRIP=arm-linux-strip
export OBJCOPY=arm-linux-objcopy
export LN_S="ln -s"
export CFLAGS="-g -O2 -I/home/tomtom/cross/base/include"
export CPPFLAGS="     -I/home/tomtom/cross/base/include"
export LDFLAGS="      -L/home/tomtom/cross/base/lib/"
export CXXFLAGS=""
cd /home/tomtom/cross
rm -rf base libs include gd-inst zlib-inst libpng-inst gd-2.0.35 libpng-1.2.24 zlib-1.2.3
mkdir base include libs zlib-inst libpng-inst gd-inst
tar zxvf zlib-1.2.3.tar.gz
tar zxvf libpng-1.2.24.tar.gz
tar jxvf gd-2.0.35.tar.bz2
cd zlib-1.2.3/
CC=arm-linux-gcc ./configure --prefix=/home/tomtom/cross/base
make
make install

cd ../libpng-1.2.24/
export AR="arm-linux-ar"
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/
make
make install
cd ../gd-2.0.35/
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ --with-jpeg=no --with-freetype=no --with-fontconfig=no --with-xpm=no
make
make install


Hints for compiling libgd with jpeg but without font-stuff

  • dont use the original jpeg-6b ( http://freshmeat.net/redir/libjpeg/5665/url_tgz/jpegsrc.v6b.tar.gz )
  • instead use the jpeg-6b with modern configure-script (see http://www.mail-archive.com/ Diese E-Mail Adresse ist gegen Spam Bots geschützt, Sie müssen Javascript aktivieren, damit Sie sie sehen können /msg01064.html ): ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/delegates/libjpeg-6b.tar.bz2
  • see also: http://www.mail-archive.com/ Diese E-Mail Adresse ist gegen Spam Bots geschützt, Sie müssen Javascript aktivieren, damit Sie sie sehen können /msg01064.html

 

export CC=arm-linux-gcc
export CXX=arm-linux-g++
export LD=arm-linux-ld
export NM="arm-linux-nm -B"
export AR="arm-linux-ar -r"
export RANLIB=arm-linux-ranlib
export STRIP=arm-linux-strip
export OBJCOPY=arm-linux-objcopy
export LN_S="ln -s"
export CFLAGS="-g -O2 -I/home/tomtom/cross/base/include"
export CPPFLAGS="     -I/home/tomtom/cross/base/include"
export LDFLAGS="      -L/home/tomtom/cross/base/lib/"
export CXXFLAGS=""
cd /home/tomtom/cross
rm -rf base libs include libjpeg-6b gd-2.0.35 libpng-1.2.24 zlib-1.2.3
mkdir base base/man base/man/man1 include libs
tar zxvf zlib-1.2.3.tar.gz
tar zxvf libpng-1.2.24.tar.gz
tar jxvf libjpeg-6b.tar.bz2
tar jxvf gd-2.0.35.tar.bz2
cd zlib-1.2.3/
CC=arm-linux-gcc ./configure --prefix=/home/tomtom/cross/base
make
make install

cd ../libpng-1.2.24/
export AR="arm-linux-ar"
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/
make
make install

cd ../libjpeg-6b/
./configure  --host=arm-linux --enable-shared --prefix=/home/tomtom/cross/base/
make
make install

cd ../gd-2.0.35/
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ --with-freetype=no --with-fontconfig=no --with-xpm=no
make
make install



Hints for compiling libgd with libjpeg, libpng and freetype2

  • the following works for me (tested with debian sarge)


export CC=arm-linux-gcc
export CXX=arm-linux-g++
export LD=arm-linux-ld
export NM="arm-linux-nm -B"
export AR="arm-linux-ar -r"
export RANLIB=arm-linux-ranlib
export STRIP=arm-linux-strip
export OBJCOPY=arm-linux-objcopy
export LN_S="ln -s"
export CFLAGS="-g -O2 -I/home/tomtom/cross/base/include"
export CPPFLAGS="     -I/home/tomtom/cross/base/include"
export LDFLAGS="      -L/home/tomtom/cross/base/lib/"
export CXXFLAGS=""
cd /home/tomtom/cross
rm -rf base libs include freetype-2.3.5 libjpeg-6b gd-2.0.35 libpng-1.2.24 zlib-1.2.3
mkdir base base/man base/man/man1 include libs
tar zxvf zlib-1.2.3.tar.gz
tar zxvf libpng-1.2.24.tar.gz
tar jxvf libjpeg-6b.tar.bz2
tar jxvf gd-2.0.35.tar.bz2
tar zxvf freetype-2.3.5.tar.gz
cd zlib-1.2.3/
CC=arm-linux-gcc ./configure --prefix=/home/tomtom/cross/base
make
make install
export AR="arm-linux-ar"

cd ../freetype-2.3.5/
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/
# vi include/freetype/config/ftoption.h #decoment 439 for hinting
make
make install

cd ../libpng-1.2.24/
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/
make
make install

cd ../libjpeg-6b/
./configure  --host=arm-linux --enable-shared --prefix=/home/tomtom/cross/base/
make
make install

cd ../gd-2.0.35/
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ --with-fontconfig=no --with-xpm=no
make
make install

Hints for compiling netcat

  • download it from http://freshmeat.net/projects/netcat/
  • edit Makefile
  • line 17: CC=arm-linux-gcc
  • and propably if you want all features: search for "linux:" and write behind "-DLINUX" -DTELNET -DGAPING_SECURITY_HOLE
  • compile with "make linux" 

 

Letzte Aktualisierung ( Samstag, 23 Februar 2008 )
 
< zurück   weiter >