免费注册 查看新帖 |

Chinaunix

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

交叉编译工具 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-23 23:10 |只看该作者 |倒序浏览

                                arm-linux-toolchain & u-boot 下载安装
u-boot-1.1.4.tar.bz2
http://nchc.dl.sourceforge.net/sourceforge/u-boot/u-boot-1.1.4.tar.bz2
u-boot-1.1.6.tar.bz2
http://nchc.dl.sourceforge.net/sourceforge/u-boot/u-boot-1.1.6.tar.bz2
cross-2.95.3.tar.bz2
ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-2.95.3.tar.bz2
cross-3.0.tar.bz2
ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-3.0.tar.bz2
cross-3.2.tar.bz2
ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2
arm-linux-gcc-3.3.2.tar.bz2
http://www.handhelds.org/download/projects/toolchain/arm-linux-gcc-3.3.2.tar.bz2
arm-linux-gcc-3.4.1.tar.bz2
http://www.handhelds.org/download/projects/toolchain/arm-linux-gcc-3.4.1.tar.bz2


环境:WindowsXP + VMware Workstation 5.5.3 + Red Hat Linux 9.0

   

安装toolchain: @ tar jxvf cross-2.95.3.tar.bz2解压,建立/usr/local/arm目录,
将2.95.3拷贝至arm目录下,在/etc/profile中加入#PATH=$PATH:/usr/local/arm/2.95.3/bin环境变量,
重新登陆后可用
arm-linux-gcc -v测试正确性.
    安装u-boot: @ tar jxvf u-boot-1.1.6.tar.bz2解压.
    进入u-boot目录:make distclean,
接着用B2板子测一下u-boot是否可成功编译:make B2_config,make CROSS_COMPILE=/usr/local/arm/2.95.3/bin/arm-linux-.
    用2.95.3编译1.16时始终编译不通,具体提示好像是一些.o文件不能链接.不太明白. 经反复测试:2.95.3可以成功编译1.14版,3.32可以成功编译1.16版.
Building and Testing gcc/glibc cross toolchains
http://kegel.com/crosstool/

GCC and GDB binary toolchain for embedded development
http://zylin.com/gccbinary.html
来源:http://blog.csdn.net/vrix/archive/2009/02/17/3902334.aspx

为ARM(AT91RM9200)编译Linux Kernel
http://blog.verycd.com/light/showentry=50108
[color="#02368d"]AT91RM9200引导程序的建立--------建立交叉编译工具链http://blog.chinaunix.net/u1/34474/showart_361451.html
本文是在H9200E开发板上实验,linux为fedora 3.首先将cross-2.95.3.tar.bz2(交叉编译器),linux-2.4.19-rmk7.tar.gz,kernel-h9200-050718.tgz还有u-boot-1.0.0.tar.gz复制到/root下.
一.安装交叉编译器
  以超级用户身份登录
  [root@hostname]# bunzip2 cross-2.95.3.tar.bz2     ;解压
  [root@hostname]# tar xvf cross-2.95.3.tar
  然后将得到的2.95.3文件夹放到/usr/local/arm下,注意记住这个路径后面要用到.
二.配置内核
  以H9200E的最小配置为例
三.编译内核
  解压内核源码包,编辑Makefile
 设置 cross_compile:=[编译器的绝对路径]  ;这个绝对路径既上面2.95.3放到的路径
 进入内核文件夹,执行下面命令
 [root@hostname]# make clean
[root@hostname]# make dep
 [root@hostname]# make
 [root@hostname]# [编译器的绝对路径]/bin/arm-linux-objcopy -O binary -S vmlinux linux.bin  ;编译器的绝对路径也是上面说到的路径
  [root@hostname]# gzip linux.bin
下面的比较重要了,主要是u-boot的安装,这个在H9200的手册上说的很不清楚
  [root@hostname]# tar xzvf u-boot-1.0.0.tar.gz   ;解压u-boot
  [root@hostname]# cd u-boot-1.0.0
  [root@hostname]# make distclean
  [root@hostname]# make at91rm9200dk_config
  [root@hostname]# make all
  然后在/usr/local下建立uboot文件夹将u-boot-1.0.0下的所有文件都复制到uboot下
  [root@hostname]# [uboot的绝对路径]/tools/mkimage -A arm -O linux -C gzip -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage     ;这里的绝对路径是/usr/local/uboot
 好了,内核编译好了,可以下到板子里看看了!!!
来源:http://203.208.37.104/search?q=cache:Pnjsfrd2nuIJ:www.gd-emb.com/bbs/%3Fdisplay%3Dtopic%26id%3D12454+cross-2.95.3&cd=11&hl=zh-CN&ct=clnk&gl=cn&st_usg=ALhdy2-JfJ9mAKUz6jnH-UmYX9MS0G0BMw
               
               
               
               

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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP