Name:
Location: United States

Friday, February 15, 2008

How to cross compile ZLIB, OPENSSL, OPENSSH

ZLIB:
1. download zlib-1.2.3.tar.gz. Unzip it to /localhome/wli
2. cd zlib-1.2.3, run ./configure
3. Edit Makefile, change the following lines
CC=powerpc-405-linux-gnu-gcc
CPP=powerpc-405-linux-gnu-gcc -E
AR=powerpc-405-linux-gnu-ar rc
LDSHARED=powerpc-405-linux-gnu-gcc
prefix=/localhome/wli/rootfs/usr/local #this will install zlib into rootfs/usr/local
Note: rootfs--is the target machine root file system, in this case the target machine is powerpc-405

4. run make, make install, the zlib library will be installed to $prefix/lib

OpenSSL
1. download openssl-0.9.8g, unzip it to localhome/wli
2. run ./configure --openssldir=/localhome/wli/rootfs
3. Edit Make
AR=powerpc-405-linux-gnu-ar $(ARFLAGS) r
4. run make, make install

OpenSSH
1. download openssh-4.7p1, unzip it to localhome/wli
2. run run_configure script
./configure CC=powerpc-405-linux-gnu-gcc --host=ppc --build=powerpc-405-linux-gnu --with-ssl-dir=/localhome/wli/rootfs --w ith-zlib=/localhome/wli/rootfs --prefix=/localhome/wli/rootfs --disable-etc-default-login

3. Edit Makefile
AR=powerpc-405-linux-gnu-ar
LIBS=-lresolv -lcrypto -lutil -lz -lnsl -lcrypt # add -lcrypt
4. run make, make install

1 Comments:

Blogger ttouch said...

Thank you!

1:53 AM  

Post a Comment

<< Home