制作arm-linux交叉编译工具ForXscaleBig-Endian.

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

制作arm-linux交叉编译工具

ForXscaleBig-Endian

制作arm-linux交叉编译工具ForXscaleBig-Endian

类别:消费电子

HOWTO build arm-linux toolchain for ARM/XSCALE---------------------------------------------- These instructions document how to build an arm-linux tool chainthat contains big-endian target libraries. 1. Packages used: binutils-2.14.tar.gzgcc-

3.3.2.tar.gzglibc-2.2.5.tar.gzglibc-linuxthreads-2.2.5.tar.gz 2. binutils-2.14 tar xvzf binutils-2.1

4.tar.gzcd binutils-2.14mkdir xscale_linux_becd xscale_linux_be../configure --target=armbe-linux --prefix=/opt/xscale_linux_be --with-lib-

path=/opt/xscale_linux_be/armbe-linux/lib --program-

prefix=xscale_linux_be- makemake installchmod 777

/opt/xscale_linux_be 3. gcc-3.3.2 -- bootstrap gcc tar xvzf gcc-

3.3.2.tar.gzcd gcc-3.3.2cp $(ATTACHED t-linux file)

gcc/config/arm/perl -pi -e 's/GCC_FOR_TARGET = \$\$r\/gcc\/xgcc

/GCC_FOR_TARGET = \$\$r\/gcc\/xgcc -mbig-endian /g' Makefile.incd gccperl -pi -e 's/GCC_FOR_TARGET = \.\/xgcc /GCC_FOR_TARGET =

\.\/xgcc -mbig-endian /g' Makefile.incd config/armperl -pi -e 's/^# MULTILIB_OPTIONS = mlittle-endian\/mbig-endian/MULTILIB_OPTIONS += mlittle-endian\/mbig-endian/' t-arm-elfperl -pi -e 's/^#

MULTILIB_DIRNAMES = le be/MULTILIB_DIRNAMES += le be/' t-arm-elfperl -pi -e 's/^# MULTILIB_MATCHES = mbig-endian=mbe mlittle-

endian=ml/MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=ml/' t-arm-elf export

PATH=/opt/xscale_linux_be/bin:/opt/xscale_linux_be/armbe-

linux/include:$PATH mkdir xscale_linux_becd

xscale_linux_be../configure --program-prefix=xscale_linux_be- --prefix=/opt/xscale_linux_be --target=armbe-linux --disable-shared --disable-threads --with-

headers=/home/john_ho/ixp422/src/snapgear/linux-2.4.x/include --with-gnu-as --with-gnu-ld --enable-multilib --enable-languages=cperl -pi -e 's/^program_transform_cross_name = s \^ \$\(target-alias\)-

/program_transform_cross_name = s \^ xscale_linux_be- /g'

gcc/Makefilemakemake install 4. glibc-2.2.5 (big-endian) tar xvzf glibc-2.2.5.tar.gzcd glibc-2.2.5tar xvzf glibc-linuxthreads-

2.2.5.tar.gz perl -pi -e

's/i386/arm*)\n\tlibc_cv_gcc_unwind_find_fde=yes\n\tarch_minimum_kern el=2.0.10\n\t;;\n i386/' sysdeps/unix/sysv/linux/configureperl -pi -e 's/weak_alias \(__old_sys_nerr/\/\/ $&/'

sysdeps/unix/sysv/linux/arm/errlist.cperl -pi -e 's/weak_alias

\(__old_sys_nerr/\/\/ $&/' sysdeps/unix/sysv/linux/d sysdeps/armpatch -p0 < ../../Patch.armbe-strlen-fix vi

linuxthreads/sysdeps/pthread/pthread.h- change line 163 __thread -> "__thr"- change line 591 __thread -> "__thr"vi

linuxthreads/internals.h- change line 555 __thread -> "__thr"vi linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h- change line 36 __thread -> "__thr"vi stdio-common/sprintf.c- line 30 change to "sprintf(char *s const char *format ...)"vi stdio-common/sscanf.c- line 30 change to "sscanf(const char *s const char *format ...)"vi sysdeps/unix/sysv/linux/arm/sysdep.h- line 134 remove "a1" from clobber listvi sysdeps/arm/dl-machine.h- add '\n\' to end of all macro asm lines (there is a _lot_ of them) vi config.make.in- change "slibdir=@...@" to "slibdir=@libdir@"vi

sysdeps/unix/sysv/linux/arm/ioperm.c- add include file to avoid compile error of BUS_ISA not defined. mkdir xscale_linux_becd

xscale_linux_beexport CC="xscale_linux_be-gcc -mbig-endian -finline-limit=10000"export AR="xscale_linux_be-ar"export

RANLIB="xscale_linux_be-ranlib"export LD="xscale-linux_be-ld -mbig-endian"../configure armbe-linux --target=armbe-linux --

prefix=/opt/xscale_linux_be/armbe-linux --build=i686-pc-linux-gnu --with-headers=/opt/xscale_linux_be/armbe-linux/sys-include --enable-add-ons=linuxthreads --enable-sharedmakemake install 6. gcc-3.3.2

(c++ etc) full version tar xvzf gcc-3.3.2.tar.gzcd gcc-3.3.2 cp $(ATTACHED t-linux file) gcc/config/arm/vi gcc/config/arm/t-linux - remove all "-Dinhibit_libc" occruancesperl -pi -e 's/GCC_FOR_TARGET = \$\$r\/gcc\/xgcc /GCC_FOR_TARGET = \$\$r\/gcc\/xgcc -mbig-endian /g' Makefile.incd gccperl -pi -e 's/GCC_FOR_TARGET = \.\/xgcc

/GCC_FOR_TARGET = \.\/xgcc -mbig-endian /g' Makefile.incd

config/armperl -pi -e 's/^# MULTILIB_OPTIONS = mlittle-endian\/mbig-endian/MULTILIB_OPTIONS += mlittle-endian\/mbig-endian/' t-arm-

elfperl -pi -e 's/^# MULTILIB_DIRNAMES = le be/MULTILIB_DIRNAMES +=

le be/' t-arm-elfperl -pi -e 's/^# MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=ml/MULTILIB_MATCHES += mbig-endian=mbe mlittle-

endian=ml/' t-arm-elf export

PATH=/opt/xscale_linux_be/bin:/opt/xscale_linux_be/armbe-

linux/include:$PATH mkdir xscale_linux_becd

xscale_linux_be../configure --program-prefix=xscale_linux_be- --

prefix=/opt/xscale_linux_be --target=armbe-linux --enable-multilib --with-headers=/opt/xscale_linux_be/armbe-linux/include --enable-languages=c c++perl -pi -e 's/int namelen/unsigned int

相关文档
最新文档