[Reference]
[Environment setting]
Ubuntu-10.04
apt-get install gperf
apt-get install texinfo
apt-get install libtool
apt-get install automake
apt-get install gcj
apt-get install g++
apt-get install libexpat-dev
apt-get install gawk
apt-get install cvs
[compile and install crosstool-ng]
./configure --prefix=<install dir>
make
make install
[menu config change]
$ct-ng menuconfig
Paths and misc options --->
(${HOME}/development/crosstool-ng/src) Local tarballs directory 保存源码包路径
(${HOME}/development/x-tools/${CT_TARGET}) Prefix directory 交叉编译器的安装路径
Target options ---> 从datasheet中的 BLOCK DIAGRAM 中可以看到
*** Targ:et optimisations ***
(armv4t) Architecture level
(arm9tdmi) Emit assembly for CPU
(arm920t) Tune for CPU
[Start building]
$ct-ng build
Error resolving:
[1] Resolve: Need to update gcc from 4.1 to 4.4
[DEBUG] ==> Executing: 'CC_FOR_BUILD=i686-build_pc-linux-gnu-gcc' 'CFLAGS= -pipe ' 'LDFLAGS=-lstdc++ -lm' '/home/eric/work/crosstool-ng/test/.build/src/gcc-4.3.2/configure' '--build=i686-build_pc-linux-gnu' '--host=i686-build_pc-linux-gnu' '--target=arm-unknown-linux-gnueabi' '--prefix=/home/eric/work/crosstool-ng/test/.build/arm-unknown-linux-gnueabi/buildtools' '--with-local-prefix=/home/eric/work/crosstool-ng/out/arm-unknown-linux-gnueabi/sysroot' '--disable-libmudflap' '--with-sysroot=/home/eric/work/crosstool-ng/out/arm-unknown-linux-gnueabi/sysroot' '--with-newlib' '--enable-threads=no' '--disable-shared' '--with-pkgversion=crosstool-NG 1.15.2' '--with-arch=armv4t' '--with-cpu=arm9tdmi' '--with-tune=arm920t' '--with-float=soft' '--enable-__cxa_atexit' '--with-gmp=/home/eric/work/crosstool-ng/test/.build/arm-unknown-linux-gnueabi/buildtools' '--with-mpfr=/home/eric/work/crosstool-ng/test/.build/arm-unknown-linux-gnueabi/buildtools' '--enable-target-optspace' '--disable-libgomp' '--disable-libmudflap' '--disable-nls' '--disable-multilib' '--enable-languages=c'
[CFG ] checking build system type... i686-build_pc-linux-gnu
[CFG ] checking host system type... i686-build_pc-linux-gnu
[CFG ] checking target system type... arm-unknown-linux-gnueabi
[CFG ] checking for a BSD-compatible install... /home/eric/work/crosstool-ng/test/.build/tools/bin/install -c
[CFG ] checking whether ln works... yes
[CFG ] checking whether ln -s works... yes
[CFG ] checking for i686-build_pc-linux-gnu-gcc... i686-build_pc-linux-gnu-gcc
[ERROR] checking for C compiler default output file name... configure: error: C compiler cannot create executables
[CFG ] See `config.log' for more details.
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing pass-1 core C compiler'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@172]
[ERROR] >> called from: do_cc_core_backend[scripts/build/cc/gcc.sh@359]
[ERROR] >> called from: do_cc_core_pass_1[scripts/build/cc/gcc.sh@97]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@598]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> '/home/eric/work/crosstool-ng/crosstool-ng-1.15.2-bin/share/doc/crosstool-ng/ct-ng.1.15.2/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 5:44.22)
[Test]
<2012-08-04 success!>
Kernel: linux2.6.32.2
Busybox: 1.1.3
Config file for crosstool-ng-1.15.3