首先下载zlib,我这里采用zlib1.2.8tar xvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
CC=armv-linux-gcc./configure –prefix=/usr/local
make
make install
这样就可以将zlib交叉编译到/usr/local目录下。
接下来是openssl
wget ftp://ftp.openssl.org/source/openssl-1.0.1e.tar.gz
tar -pxzf openssl-1.0.1e.tar.gz
wget http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-1.0.1e-fix_parallel_build-1.patch
wget http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-1.0.1e-fix_pod_syntax-1.patch
cd openssl-1.0.1e/
patch -Np1-i../openssl-1.0.1e-fix_parallel_build-1.patch
patch -Np1-i../openssl-1.0.1e-fix_pod_syntax-1.patch
./Configure -DOPENSSL_NO_HEARTBEATS--openssldir=/usr/local/ssl shared os/compiler:arm-linux-
make
make install
cd /usr/local/ssl/lib
arm-linux-ar-x libcrypto.a
arm-linux-cc-shared*.o -o libcrypto.so
rm *.o
arm-linux-ar-x libssl.a
arm-linux-cc-shared*.o -o libssl.so
rm *.o