Using crosstool-0.43 to generate cross-compiler for ARM
来源:互联网 发布:dnf账号数据异常 编辑:程序博客网 时间:2024/05/21 17:20
Using crosstool-0.43 to generate cross-compiler for ARM
[Environment setting]
Ubuntu-10.04
apt-get install patch
apt-get install bison
apt-get install flex
apt-get install uboot-mkimage
apt-get install libncurses5-dev
[Initial prepare]
1: download crosstool-0.43.tar.gz from
http://kegel.com/crosstool
2: unzip tar
[Configuration]
1: demo-arm.sh
this script is the overall control, uncomment the line that you want to build for specific gcc and glibc version
e.g.: uncomment the line
eval `cat arm.dat gcc-3.4.5-glibc-2.3.2.dat` sh all.sh --notest
2: set dirs:
TARBALLS_DIR: set download tarballs
RESULT_TOP: set the final build dir
[Running]
$sh dem0-arm.sh will start the build
[Notes for some internal procedure]
1: the tool will check and download necessary packages in folder TARBALLS_DIR
2: the internal files are in folder crosstool-0.43/builds
3: one drawback is that the scripts will process a tarball one at a time, e.g.: it will do download-unzip-patch-compile procedure for each tarball. If anyone is missing or compile error, run the script again will redo the whole thing
4: Some error needs to be resolved. see page Resolving some errors
Resolving some errors
1: Need to lower down gcc version
[Error log]
+ libc_cv_ppc_machine=yes CC=gcc /home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/glibc-2.3.2/configure --prefix=/usr --build=i686-pc-linux-gnu --host=arm-unknown-linux-gnu --without-cvs --disable-sanity-checks --with-headers=/home/eric/work/result/gcc-3.4.5-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include --enable-hacker-mode
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking sysdep dirs... sysdeps/arm/elf sysdeps/unix/sysv/linux/arm sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/arm sysdeps/unix sysdeps/posix sysdeps/arm/fpu sysdeps/arm sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking for arm-unknown-linux-gnu-gcc... gcc
checking version of gcc... 4.4.3, bad
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.81, ok
configure: error:
*** These critical programs are missing or too old: gcc
*** Check the INSTALL file for required versions.
[Resolve]
#apt-get install gcc-4.1
#/usr/bin:ln -s gcc-4.1 gcc
2: Resolve bug
[Log]
c/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/build-glibc/csu/version.o
In file included from version.c:33:
/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/build-glibc/csu/version-info.h:1:1: missing terminating " character
/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/build-glibc/csu/version-info.h:2:1: missing terminating " character
/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/build-glibc/csu/version-info.h:3:1: missing terminating " character
/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/build-glibc/csu/version-info.h:4:1: missing terminating " character
make[2]: *** [/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/build-glibc/csu/version.o] Error 1
make[2]: Leaving directory `/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/home/eric/work/crosstool-0.43/build/arm-unknown-linux-gnu/gcc-3.4.5-glibc-2.3.2/glibc-2.3.2'
make: *** [all] Error 2
[Resolve]
Modify the following:
eric@eric-crosstool:~/work/downloads/tmp$ diff glibc-2.3.2/csu/Makefile ../glibc-2.3.2/csu/Makefile
226c226
< "on `date +%Y-%m-%d`.\\n\"" ;; \
---
> "on `date +%Y-%m-%d`.\\\\n\"" ;; \
231c231
< echo "\"Available extensions:\\n\""; \
---
> echo "\"Available extensions:\\\\n\"";
- Using crosstool-0.43 to generate cross-compiler for ARM
- Using crosstool-ng to generate cross-compiler for ARM
- Make ARM cross compiler tool chain using crosstool-ng
- cygwin arm cross compiler
- How To Build GCC 4.8.2 ARM Cross-Compiler
- How To Build GCC 4.8.2 ARM Cross-Compiler
- How to cross-compile OpenSSL for ARM
- How to cross-compile Chromium for ARM
- How to build a cross compiler for your Raspberry Pi
- Cross-compiling for ARM
- ARM Cross Compiler Toolchain 4.6.0
- W5300E01-ARM 交叉编译器(Cross Compiler)用户手册
- using tetgen to generate tetrahedra
- Cross compiling Libx264 for ARM
- Cross compiler
- cross compiler
- How to generate Oracle Net tracing for a DBMS_JOB using a database link
- Make a "building all for DSP, ARM, x86" system using C6Run compiler in SDK for TI 8168 EVM
- CSS选择器
- Silverlight入门:第一部分——开发工具与程序入门
- 数独解法
- shell 判断语句
- 最近整理的学习资料(Hadoop/MongoDB/ActiveMQ)汇总
- Using crosstool-0.43 to generate cross-compiler for ARM
- java串口通信
- Objective-C 在xp下环境搭建以及使用utraedit高亮显示编辑代码
- java--什么时候需要方法的重写
- Android获取系统相应信息代码
- POJ 1036
- Silverlight入门:第二部分——定义界面布局和导航
- 面试题目写一个int Fun(byte); (0x99即10011001返回其中1的个数4)
- poj 1700 贪心