用arm-linux-gcc交叉编译 openssl zlib curl
来源:互联网 发布:qq2012国际版 linux 编辑:程序博客网 时间:2024/06/02 19:29
参考了大牛文章:
http://hi.baidu.com/consolexp/item/bb98aadbc6417f17e1f46f03
准备工作:
1. ubuntu 系统
2. 下载 arm-linux-gcc-4.3.2.tgz 放到 /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
其中,加粗部分/opt/curl/表示curl安装的路径,我使用的是NFS文件系统来进行OK6410开发,所以替换为了:--prefix=/monitor/FileSystem-Yaffs2/opt,即对应于开发板的/opt目录。
make
make install
然后我们会发现在/monitor/FileSystem-Yaffs2/opt目录下会有以下内容:
drwxrwxrwx 4 root root 4096 5月 2 2012 3G/
drwxr-xr-x 2 root root 4096 2月 25 18:24 bin/
drwxr-xr-x 3 root root 4096 2月 25 18:24 include/
drwxrwxrwx 3 root root 4096 2月 13 2011 konqueror/
drwxr-xr-x 3 root root 4096 2月 25 18:24 lib/
drwxrwxrwx 9 root root 4096 5月 11 2012 qt-4.7.1/
drwxrwxrwx 12 root root 4096 11月 15 2011 Qtopia/
drwxr-xr-x 3 root root 4096 2月 25 18:24 share/
drwxrwxrwx 2 root root 4096 3月 8 2011 WiFi/
然后进入bin目录,将curl文件拷贝至/monitor/FileSystem-Yaffs2/bin
- 用arm-linux-gcc交叉编译 openssl zlib curl
- 用arm-linux-gcc交叉编译 openssl zlib
- 交叉编译zlib和openssl for arm
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 配置 arm-linux-gcc 交叉编译环境
- 搭建arm-linux-gcc交叉编译环境
- 如果有什么事情让你感到恐惧或者兴奋,那就去做吧
- 4.7 电源管理 第一部分 ---- Windows CE设备驱动开发之电源管理
- 获取当前用户的所有上级【SQL-所有上级】
- 如何在 Win7 下一键清空剪贴板
- 年终总结——变化中的2013
- 用arm-linux-gcc交叉编译 openssl zlib curl
- 4.7 电源管理 第二部分 ---- Windows CE设备驱动开发之电源管理
- 你读得太多了
- 测试case
- 4.7 电源管理 第三部分 ---- Windows CE设备驱动开发之电源管理
- Java Web的笔记
- 软件是这样做出来的
- 4.7 电源管理 第四部分 ---- Windows CE设备驱动开发之电源管理
- 4.7 电源管理 第五部分 ---- Windows CE设备驱动开发之电源管理