免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1211 | 回复: 0
打印 上一主题 下一主题

crosstool制作arm-linux交叉编译工具链 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-10 15:24 |只看该作者 |倒序浏览
今天使用crosstool制作了arm-linux交叉编译工具链,并且成功编译和运行u-boot-1.3.0。
通过http://www.kegel.com/crosstool/了解crosstool。
要制作的交叉编译工具链版本为3.3.2。
具体步骤如下:
下载crosstool-0.43.tar.gz
mkdir      /home/wxm/crosstool
cp     crosstool-0.43.tar.gz     /home/wxm/crosstool
cd     /home/wxm/crosstool
tar     -jxvf crosstool-0.43.tar.gz
mkdir downloads
下载源码包:
binutils-2.15.tar.bz2
gcc-3.3.2.tar.gz
glibc-2.3.2.tar.gz
glibc-linuxthreads-2.3.2.tar.gz
linux-2.6.9.tar.bz2
复制到  /home/wxm/crosstool/downloads
修改arm.dat
KERNELCONFIG=`pwd`/arm.config
TARGET=arm-linux
TARGET_CFLAGS="-O"
修改demo-arm.sh:            
#!/bin/sh
# This script has one line for each known working toolchain
# for this architecture.  Uncomment the one you want.
# Generated by generate-demo.pl from buildlogs/all.dats.txt
set -ex
TARBALLS_DIR=/home/wxm/crosstool/downloads     #下载的源码包存放的路径
RESULT_TOP=/home/wxm/crosstool/install                #交叉编译工具来链安装的路径
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP
#eval `cat arm.dat gcc-2.95.3-glibc-2.1.3.dat` sh all.sh --notest
#eval `cat arm.dat gcc-2.95.3-glibc-2.2.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-2.95.3-glibc-2.2.5.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.2.3-glibc-2.2.5.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.2.3-glibc-2.3.2-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.3.6-glibc-2.2.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.3.6-glibc-2.2.5.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.3.6-glibc-2.3.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.3.6-glibc-2.3.2-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.2.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.2.5.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.3.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.3.2-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.3.5.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.3.5-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest
#eval `cat arm.dat gcc-3.4.5-glibc-2.3.6-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.2.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.3.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.3.5.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.3.5-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.3.6.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.0.2-glibc-2.3.6-tls.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.1.0-glibc-2.2.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest
#eval `cat arm.dat gcc-4.1.0-glibc-2.3.2-tls.dat` sh all.sh --notest  #注释
eval `cat arm.dat gcc-3.3.2-glibc-2.3.2.dat` sh all.sh --notest     #添加此行
echo Done.
修改gcc-3.3.2-glibc-2.3.2.dat
BINUTILS_DIR=binutils-2.15
GCC_DIR=gcc-3.3.2
GLIBC_DIR=glibc-2.3.2
LINUX_DIR=linux-2.6.9
GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.2
执行./demo-arm.sh
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/72751/showart_1077797.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP