libCurlopensslZlibµÄARMÒÆÖ² ÏÂÔØ±¾ÎÄ

ÄÚÈÝ·¢²¼¸üÐÂʱ¼ä : 2026/5/26 23:58:41ÐÇÆÚÒ» ÏÂÃæÊÇÎÄÕµÄÈ«²¿ÄÚÈÝÇëÈÏÕæÔĶÁ¡£

libCurlopensslZlibµÄARMÒÆÖ²

libCurl/openssl/ZlibµÄARMÒÆÖ² ÊÕ²Ø

±¾ÈËʹÓû·¾³

Host linux(from ubuntu)£º jeos[just enougth OS] ½»²æ±àÒëÆ÷:

/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc target Processor: ARM926EJ-S rev 5 (v5l) Hardware:

Atmel AT91SAM9260-EK ÏÈ¿ªÊ¼libCurl µÄÒÆÖ²¹ý³Ì£º

ÏÂÔØcurl-7.20.0.tar.bz2½âѹÖÁ±¾Ä¿Â¼£¬¿ªÊ¼configure£¬ÓÉÓÚ֮ǰһֱ·¢ÏÖÅäÖò»¹ý£¬³öÏÖ¶à´Î´íÎó£¬ÕâÀïÖ±½Ó¸ø³öÕýÈ·µÄÅäÖãº

cd curl-7.20.0 && ./configure --prefix=/win/530/curl/build --build=i686-linux --host=arm-linux

CC=/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc CFLAGS='-Os' --enable-debug --enable-optimize --enable-static

--disable-ftp --without-zlib --disable-rtsp --disable-dict

--disable-proxy --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-ipv6 --enable-http -enable-crypto-auth --without-gnutls --without-nss --without-ca-bundle --with-random=/dev/urandom export LDFLAGS=\

-L/opt/timesys/toolchains/armv5l-linux/lib\configureÅöµ½µÄ´íÎó£º

1.checking for \for file existence when cross compiling googleºó·¢Ïִ𰸣º

http://www.hiawatha-webserver.org/forum/topic/137

°´Õջشð£¬ÓÉÓÚÊÇÔÚÖ÷»úÉÏÅäÖᢱàÒ룬ËùÒÔÅäÖÃÆÚ¼äûÕÒµ½ ÊʺÏÓÚÄ¿±êϵͳµÄËæ»úÊýÉú³ÉÆ÷£¬¾ßÌåÔÚ/dev/urandomÏÂÃæ£¬µ«ÊÇÎÒÕÒÁËÏ£¬È·ÊµÊÇÓеģº [root@openssl]# ls -al /dev/urandom

crw-rw-rw- 1 root root 1, 9 Jan 12 17:12 /dev/urandom [root@openssl]# file /dev/urandom /dev/urandom: character special ÒýÓûشðµÄÔ­ÎÄ£º

#You may need to provide a parameter like

'--with-random=/dev/urandom' to configure as it cannot detect

the presence of a random number generating device for a target system.

2.checking for curl_socklen_t data type... unknown configure: error: cannot find data type for curl_socklen_t. ÔÚÍøÉÏÕÒÁ˶à´Î£¬Ã»ÕÒµ½½â¾ö·½·¨¡£ÒòΪ֮ǰ±àÒëµÄʱºòʹÓõ½¿âһֱûָ¶¨Á¬½Ó¿â£¬ÒòΪÕâ¸öÊÇÓбàÒëÆ÷×Ô¼º×Ô¶¯Á¬½ÓµÄ£¬×îºóÁé»úÒ»¶¯£¬ÏëÏë¸ø¼ÓÉÏÁ´½Ó¿âÊÔÊÔ:

LDFLAGS=\ûÏëµ½ÎÞÄεÄÎÊÌâ½â¾öÁË¡£ configure±àÒëºóµÄÐÅÏ¢ÈçÏÂ

#configure: Configured to build curl/libcurl: # curl version: 7.20.0

# Host setup: arm-unknown-linux-gnu # Install prefix: /win/530/curl # Compiler:

/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc # SSL support: enabled (OpenSSL) # SSH support: no (--with-libssh2) # zlib support: enabled

# krb4 support: no (--with-krb4*) # GSSAPI support: no (--with-gssapi)

# SPNEGO support: no (--with-spnego) # c-ares support: no (--enable-ares) # ipv6 support: no (--enable-ipv6) # IDN support: no (--with-libidn) # Build libcurl: Shared=yes, Static=yes # Built-in manual: enabled

# Verbose errors: enabled (--disable-verbose) # SSPI support: no (--enable-sspi) # ca cert bundle: no # ca cert path: no

# LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)

# LDAPS support: no (--enable-ldaps) # RTSP support: enabled

# Protocols: DICT FILE HTTP HTTPS RTSP ±àÒë°²×°

make clean &&make && make install openssl

ÏÂÔØopenssl-0.9.8m.tar.gz½âѹÖÁ±¾Ä¿Â¼£¬¿ªÊ¼configure: ./config --prefix=/win/530/curl/openssl/build

os/compiler:/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc

×ʼʹÓÃ:

CC=/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc CFLAGS='-Os' export LDFLAGS=\-L/opt/timesys/toolchains/armv5l-linux/lib\

´òËÀÒ²±àÒë²»¹ýÈ¥£¬±¾Ïë¸Ä¸Äconfig/ConfigureµÄ£¬µ«ÊÇÕæµÄû·¨ÏÂÊÖ£ºÐ´µÄÌ«»ìÂÒÁË¡£±ÈÃ÷³¯ÍíÆÚµÄ³¯Í¢»¹ÒªO__O\ºóÀ´ÕÒµ½Ò»ÆªÎÄÕÂ

http://wifihack.net/blog/tag/arm/

Ô­À´CCÐèÒªÓÃos/compilerÈ¥Ö¸¶¨µÄ£¡Ôε¹£¬×ʼÔÚINSTALLÀïÃæ¿´µ½Õâ¸öÑ¡Ï²»ÒÔΪȻ…… µ«Êǰ´ÕÕÕâ¸ö·½·¨Ò²²»ÐУº

/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc -I. -I.. -I../include -DOPENSSL_THREADS -march=pentium -c -o cryptlib.o cryptlib.c

cryptlib.c:1: error: bad value (pentium) for -march= switch ·½·¨Ò²Í¦¼òµ¥µÄ£¬ÆðÒòÊÇ-march=pentiumÕâ¸ö±àÒ뿪¹Ø£º ËÑË÷Makefile£¬É¾µôÕâ¸öÐÅÏ¢¼´¿É¡£µ±È»Ö÷ÒªÊÇÕâÐУº CFLAG= -DOPENSSL_THREADS -march=pentium Ç°ÃæµÄ¶¼ºÃÏñûÓô¦£¬È¥µô²»È¥µô¶¼¿ÉÒÔ¡£ °´ÕÕ²©Ö÷µÄ˵Ã÷£¬µ±È»×îºóÐèÒªÐÞ¸Ä AR= ar $(ARFLAGS) r