准备工作:
1. ubuntu 系统
2. 下载 arm-linux-gcc-4.3.2.tgz 放到 /opt
cd /opt
wget http://www.arm123.com.cn/linux/arm-linux-gcc-4.3.2.tgz <- 这个是arm linux gcc 4.3.2 的下载地址
tar zxvf arm-linux-gcc-4.3.2.tgz -C /
每重新进入一次shell都要执行一下这几句
export LD_LIBARY_PATH=/usr/local/arm/4.3.2/lib/
export CPPFLAGS=-I/usr/local/arm/4.3.2/include/
export LDFLAGS=-L/usr/local/arm/4.3.2/lib/
export CC=/usr/local/arm/4.3.2/bin/arm-linux-gcc
安装openssl
cd /opt
wget http://www.openssl.org/source/openssl-0.9.8q.tar.gz
tar zxvf openssl-0.9.8q.tar.gz
cd openssl-0.9.8q
./config no-asm --prefix=/opt/openssl os/compiler:/usr/local/arm/4.3.2/bin/arm-linux-gcc
make
make install
安装zlib
cd /opt
wget http://zlib.net/zlib-1.2.5.tar.bz2
tar xf zlib-1.2.5.tar.bz2
cd zlib-1.2.5
./configure --prefix=/opt/zlib
//这里要检查Makefile的CC是不是设的 /usr/local/arm/4.3.2/bin/arm-linux-gcc
make
make install
安装curl(依赖openssl)
cd /opt
wget http://curl.haxx.se/download/curl-7.21.3.tar.gz
tar zxvf curl-7.21.3.tar.gz
cd curl-7.21.3
./configure --host=i686 --target=arm-linux --prefix=/opt/curl/ --with-ssl=/opt/openssl --with-random=/dev/urandom
make
make install
所有评论(0)