How to cross-compile OpenSSL for ARM

王朝other·作者佚名  2006-03-22
窄屏简体版  字體: |||超大  

In a nutshell:

/opt/arm% wget http://www.openssl.org/source/openssl-0.9.7d.tar.gz && tar xvzf openssl-0.9.7d.tar.gz && cd openssl-0.9.7d

/opt/arm/openssl-0.9.7d% ./Configure linux-elf-arm --prefix=/usr

Then set your environment so a gcc 3.3-based ARM crosscompiler (OpenZaurus 3.3.1 in /usr/local/arm/3.3 will be fine) is in your $PATH, and patch your Makefile to use this cross-compiler (the patch also contains a linking instruction to libdl, needed to get the openssl binary):

/opt/arm/openssl-0.9.7d% export PATH=/usr/local/arm/3.3/bin:$PATH

/opt/arm/openssl-0.9.7d% wget -N http://people.via.ecp.fr/~clem/nist/opensslForARM.Makefile.patch && patch -p1 < opensslForARM.Makefile.patch

You can compile it now! (after setting DISTCC to /usr/bin/distcc, DISTCC_HOSTS to your distcc hosts, and using make -j DISTCC_HOSTS*2, for example, instead of make to distribute compiling if you want and can):

/opt/arm/openssl-0.9.7d% make && make build-shared

You can do the following if you want (that way /opt/arm/openssl will be your local OpenSSL dir, its includes will be in include and its libs in lib):

/opt/arm/openssl-0.9.7d% mkdir lib && cd lib && ln -s ../libcrypto* ../libssl* . && cd ../.. && ln -s openssl-0.9.7d openssl

How to cross-compile Sqlite for ARM

Get and unpack recent sources, e.g.:

/opt/arm% wget "http://www.sqlite.org/sqlite-2.8.15.tar.gz && tar xvzf sqlite-2.8.15.tar.gz

--

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航