QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8829|回复: 23

关于arm交叉编译器

[复制链接]
发表于 2003-8-28 14:35:12 | 显示全部楼层 |阅读模式
请问 Dragonfly 老大这个http://ftp.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2 是不是已经做好的编译器?不过我还是想学学怎样建立。

----------------------------------
学习中
发表于 2003-8-28 22:18:41 | 显示全部楼层
yes, that is a ready to use one. but i suggets u to use that cross 2.95.3 if possible.

if u want to learn how to build one, search post here, and try by uself. recently i am buried by lots of papers and programs. i can not find time to try it.
回复

使用道具 举报

 楼主| 发表于 2003-8-29 13:37:12 | 显示全部楼层
Thank you!
昨天我在用cross-3.2编译内核时出现了下面的错误,不知是何故。我的内核版本为 linux-2.4.19-rmk6-pxa1,系统为 Mandrake Linux 9.1.
.
.
.
.
.
.
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/char'
make[3]: Nothing to be done for `all_targets'.
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/char'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/char'
make -C hotplug
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make[3]: Nothing to be done for `all_targets'.
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make -C ide
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
arm-linux-ld -r -o ide-mod.o ide.o ide-features.o ide-taskfile.o  ide-proc.o
arm-linux-ld -r -o ide-probe-mod.o ide-probe.o ide-geometry.o
rm -f idedriver.o
arm-linux-ld  -r -o idedriver.o ide-mod.o ide-probe-mod.o ide-cs.o ide-disk.o
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
make -C input
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make[3]: Nothing to be done for `all_targets'.
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make -C media
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
make -C radio
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make all_targets
make[4]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make[4]: Nothing to be done for `all_targets'.
make[4]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make -C video
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make all_targets
make[4]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make[4]: Nothing to be done for `all_targets'.
make[4]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
rm -f media.o
arm-linux-ld  -r -o media.o video/video.o radio/radio.o
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
make[1]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers'
arm-linux-ld: internal error earmelf_linux.c 160
make[3]: *** [media.o] 错误 1
make[2]: *** [first_rule] 错误 2
make[1]: *** [_subdir_media] 错误 2
make: *** [_dir_drivers] 错误 2
回复

使用道具 举报

 楼主| 发表于 2003-8-29 13:47:09 | 显示全部楼层
Thank you!
昨天我在用cross-3.2编译内核时出现了下面的错误,不知是何故。我的内核版本为 linux-2.4.19-rmk6-pxa1,系统为 Mandrake Linux 9.1.
.
.
.
.
.
.
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/char'
make[3]: Nothing to be done for `all_targets'.
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/char'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/char'
make -C hotplug
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make[3]: Nothing to be done for `all_targets'.
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/hotplug'
make -C ide
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
arm-linux-ld -r -o ide-mod.o ide.o ide-features.o ide-taskfile.o  ide-proc.o
arm-linux-ld -r -o ide-probe-mod.o ide-probe.o ide-geometry.o
rm -f idedriver.o
arm-linux-ld  -r -o idedriver.o ide-mod.o ide-probe-mod.o ide-cs.o ide-disk.o
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/ide'
make -C input
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make[3]: Nothing to be done for `all_targets'.
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/input'
make -C media
make[2]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
make -C radio
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make all_targets
make[4]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make[4]: Nothing to be done for `all_targets'.
make[4]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/radio'
make -C video
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make all_targets
make[4]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make[4]: Nothing to be done for `all_targets'.
make[4]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media/video'
make all_targets
make[3]: Entering directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
rm -f media.o
arm-linux-ld  -r -o media.o video/video.o radio/radio.o
make[3]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
make[2]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers/media'
make[1]: Leaving directory `/home/zjj/Delvelop/linux-2.4.19-rmk6-pxa1/drivers'
arm-linux-ld: internal error earmelf_linux.c 160
make[3]: *** [media.o] 错误 1
make[2]: *** [first_rule] 错误 2
make[1]: *** [_subdir_media] 错误 2
make: *** [_dir_drivers] 错误 2
回复

使用道具 举报

发表于 2003-8-30 01:11:52 | 显示全部楼层
that tool chain is broken in binutils.
can u try 2.95.3 toolchain?


and u search the error from google to get a solution. too many posts about them and i have no time to read all of them for u.

or u can go armlinux mailing list to ask which toolchain is useable.

i am using xscale -ds patch, which works fine with that toolchain.
回复

使用道具 举报

发表于 2003-8-30 14:37:27 | 显示全部楼层
http://ftp.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2
?
这个好像无法正常使用,编译出的东西至少跑不在偶用的那个板子上,偶的toolchain是自己建立的,还挺好用的。
回复

使用道具 举报

发表于 2003-8-30 20:40:40 | 显示全部楼层
[quote:2c5370c8cc="keny"]http://ftp.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2
?
这个好像无法正常使用,编译出的东西至少跑不在偶用的那个板子上,偶的toolchain是自己建立的,还挺好用的。[/quote]
能不能把你建立的toolchain的相关步骤和相关版本文件列出来呢?
回复

使用道具 举报

发表于 2003-8-30 22:05:43 | 显示全部楼层
Prepare:
gcc-2.95.3.tar.gz
Binuils-2.10.1.tar.gz
Linux-Kernel-2.4.18.tar.bz2 & ARM Patchglibc-2.2.3.tar.gz & glibc-linuxthreads-2.2.3(C Runtime Library)

Step:
1.Configure and Build Binutils
        tar -xvzf Binutils.tar.gz -C /usr/src
        cd /usr/src
        ./configure --prefix=/usr/local --target=arm-elf-linux
        make
        make install

here we install the cross-assembler, linker, archiver, etc.

2.Configure the Linux Kernel
        tar xvjf linux-2.4.18.tar.bz2 -C /usr/src
        patch -p1 < patch-2.4.18-rmk4
        make menuconfig
change the following line in Makefile
        ARCH:=arm
save & exit
        make dep

do not make kernel at this point

3.Configure and Build Gcc
        tar xvzf gcc-2.95.3.tar.gz -C /usr/local/src
Modify 3rd line of "/usr/local/src/gcc-2.95.3/gcc/config/arm/t-linux" to
        TARGET_LIBGCC2_CFLAGS=-formit-frame-pointer -fPIC -Dinhibit_libc -D__gthr_posix_h
save & exit
        ./configure --prefix=/usr/local/ --target=arm-elf-linux --with-headers=<linux-dir>/include --enable-languages=c,c++ --disable-threads

4.Make the arm-elf-linux-gcc &arm-elf-linux-g++
        PATH=$PATH:/usr/local/bin
        make
        make install

the arm-elf-linux -gcc & g++ will be installed at /usr/local/bin
and the cross complier can build the Linux-Kernel and other Platform independent codes

5.Build the glibc
        CC=arm-elf-linux-gcc
        <srcdir>/configure --target=arm-elf-linux --prefix=/usr/local/arm-elf-linux --enable-add-ons --with-headers=<linux-dir>/include --build=i686-linux --host=arm-elf-linux
        make
        make install

Application can be complied.

Comment:
You could also use the "armLinuxXToolChain01-CppPatch.tar.gz" and the shell-script "inst_patch" to add the arm-elf-linux-g++ to
your X-Tool-Chain if you do not have a arm-elf-linux-g++ complier after installed the armXToolChain.tar.gz and glibc-2.3.2.tar.gz
回复

使用道具 举报

发表于 2003-8-30 22:13:57 | 显示全部楼层
issues:
a.some of the tar.gz file and install script we use above was build by myself, you can not find on internet, neither the Google.

b.Some directory we use above may not be pointed out clearly, just like <linux-srcdir> and <srcdir>, you could "free your mind" to guess it.

c.I forget to write out some steps, if any problem appears, you could solve it by yourself, and add this steps to the above one and re-distribute it.
回复

使用道具 举报

发表于 2003-8-30 22:19:54 | 显示全部楼层
I hope this will give you some help, even a little,  
回复

使用道具 举报

发表于 2003-8-30 22:30:13 | 显示全部楼层
I use DragonBall MX patch for the Linux-kernel patch, you could add the patch of your ARM, at the setp 2.
回复

使用道具 举报

发表于 2003-8-31 10:27:12 | 显示全部楼层
谢谢楼上无私的帮助
回复

使用道具 举报

 楼主| 发表于 2003-9-1 10:55:50 | 显示全部楼层
我用的是arm是Inter Xscale系列的,是不是在建交叉编译器时使用相应内核就可以了??
回复

使用道具 举报

发表于 2003-9-1 11:30:50 | 显示全部楼层
I will write some thing of Build Arm X Toolchain about Intel Xscale. Maybe later.  
回复

使用道具 举报

发表于 2003-9-1 23:16:35 | 显示全部楼层
hehe, so many people use xscale.    
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 12:22 , Processed in 0.124727 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表