Hi,

I've succeeded in compiling openssh for tomtom one. Thought I'd share this
probably useless feat with you. And for those who'd like to know how it
was done, here's a little how-to. Note: I haven't got around configuring
ssh yet.

Downloading:
get a working cross compiler from http://tomtom.com/gpl. I've used the
cygwin version.
get zlib source (http://www.zlib.net/)
get openssl source http://www.openssl.org/source/openssl-0.9.8d.tar.gz get
openssh source
http://ftp.belnet.be/packages/openbsd/OpenSSH/portable/openssh-4.5p1.tar.gz

Compiling. I've set --prefix=/usr/local/cross/arm for all configure
scripts. You can use anything, but bear in mind that this directory will
be hardcoded in the binaries of ssh, and ssh will look for it's
configuration in the etc subdir.
Make sure you use the cross compiler.

zlib:
$ ./configure --prefix=/usr/local/cross/arm
$ make
$ make install

openssl:
Edit the Configure script. I've copied the line for linux-aout, labeled it
arm-linux and removed the -march=i486 option:
"arm-linux",    "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer
-Wall::(unknown):::BN_LLONG ${x86_gcc_des}
${x86_gcc_opts}:${x86_out_asm}",

$ ./Configure no-asm arm-linux --prefix=/usr/local/cross/arm
$ make
$ make install

openssh:
$ LDFLAGS=-L/usr/local/cross/arm/lib configure --host=arm-linux
--with-zlib=/usr/local/cross/arm/ --prefix=/usr/local/cross/arm
$ make
$ make install

You will also need libutil, which is part of the compiler:
$ cp
/usr/local/cross/gcc-3.3.4_glibc-2.3.2/arm-linux/sys-root/lib/libutil-2.3.2.so
/usr/local/cross/arm/lib/libutil.so.1

Note the renaming. If you keep the same name then make a symbolic link to
libutil.so.1

Copy /usr/local/cross/arm/* to a directory on the sdcard, except the
ssl/man and share/man directories which are voluminous and of no use.

Start the gps, login with btconosle, and create a directory:
# mkdir -p /usr/local/cross

Make a symlink to the directory on the sd card where you stored the ssh
binaries:
# ln -s /mnt/sdcard/test-ssh /usr/local/cross/arm

Do something
# cd /usr/local/cross/arm/bin
# ssh-keygen

Voila, that's as far as I got. The ssh binary starts but then complains
about some user that needs to be set up.

Kind regards,

Koen Dejonghe





Reply via email to