crosstool-ng自制交叉工具链

35 篇文章 0 订阅

手动安装termcap

#cd /tmp
#wget ftp://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz

到这里termcap-1.3.1.tar.gz 已经下载完成。

 

#tar zxvf termcap-1.3.1.tar.gz
#cd termcap-1.3.1
#sudo  ./configure  prefix=/usr
#sudo make
#sudo make install

 

二,解压、打补丁(如果有)并建立工作目录

 

      crosstool-ng和crosstool不同的地方之一就是:她并不是一下载下来就可以使用了,必须先配置安装。
将下载下来的crosstool-ng-X.Y.Z.tar.bz2解压到你为她准备的工作目录,并建立安装和编译目录。

#tar xjvf crosstool-ng-1.9.2.tar.bz2 -C /work/tools/crosstool-ng-1.9.3//进入工作目录

#mkdir crosstool-ng-1.9.2_build   //这是编译新交叉编译器的工作目录

#mkdir crosstool-ng-1.9.2_install //这是crosstool-ng的安装目录


#cd  crosstool-ng-1.9.2   //进入解压后的 crosstool-ng-1.9.2目录

#patch -p1 < 补丁文件      //如果有补丁,打补丁

#./configure --prefix=/work/tools/crosstool-ng-1.9.2_install   //配置crosstool-ng

#sudo make                    //编译crosstool-ng

#sudo make install            //安装crosstool-ng

# echo "PATH=$PATH:/work/tools/crosstool/crosstool-ng-1.9.2_install/bin" >> ~/.bashrc //为后面调用ct-ng命令增加环境变量
# source ~/.bashrc

# ct-ng help

hens@hens-desktop:/work/tools/crosstool-ng-1.9.3$ ct-ng help

This is crosstool-NG version 1.9.2

Copyright (C) 2008  Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

See below for a list of available actions, listed by category:

Configuration actions:
  menuconfig         - Update current config using a menu based program
  oldconfig          - Update current config using a provided .config as base
  extractconfig      - Extract to stdout the configuration items from a
                       build.log file piped to stdin
  saveconfig         - Save current config as a preconfigured target
  show-tuple         - Print the tuple of the currently configured toolchain

Preconfigured toolchains (#: force number of // jobs):
  list-samples       - prints the list of all samples (for scripting)
  show-<sample>      - show a brief overview of <sample> (list with list-samples)
  <sample>           - preconfigure crosstool-NG with <sample> (list with list-samples)
  build-all[.#]      - Build *all* samples (list with list-samples) and install in
                       ${CT_PREFIX} (which you must set)

Build actions (#: force number of // jobs):
  build[.#]          - Build the currently configured toolchain
  list-steps         - List all build steps

Clean actions:
  clean              - Remove generated files
  distclean          - Remove generated files, configuration and build directories

Distribution actions:
  wiki-samples       - Print a DokuWiki table of samples
  updatetools        - Update the config tools
  tarball            - Build a tarball of the configured toolchain

Environement variables (see /work/tools/crosstool-ng-1.9.3_install/share/doc/ct-ng-1.9.3/0 - Table of content.txt):
  STOP=step          - Stop the build just after this step (list with list-steps)
  RESTART=step       - Restart the build just before this step (list with list-steps)
  CT_PREFIX=dir      - install samples in dir (see action "build-all", above).
  V=0|1|2            - 0 => show only human-readable messages (default)
                       1 => show only the commands being executed
                       2 => show both

Use action "menuconfig" to configure your toolchain
Use action "build" to build your toolchain
Use action "version" to see the version
See "man 1 ct-ng" for some help as well

crosstool-ng安装成功.

 

三,配置本次编译的交叉编译工具链

接下来就是配置你要编译的交叉编译工具链了,在crosstool-ng已很多已经做好的默认配置(位于crosstool-ng- X.Y.Z/samples目录下),你只要针对其进行修改就好了。对于编译器组件部分的版本最好不要修改,因为那个配搭应该是经过测试后的最高本版了,但内核版本可以修改。

#sudo mkdir /work/tools/TQ2440/x-tools //建立交叉编译器的安装路径

#sudo mkdir /work/tools//TQ2440/crosstool-ng/src //建立保存源码包目录

 

#cd /work/tools/crosstool-ng-1.9.2_build 

//进入编译新交叉编译器的工作目录
#sudo cp ../crosstool-ng-1.9.2/samples/arm-unknown-linux-gnueabi /* ./

//拷贝默认配置文件到工作目录

#mv crosstool.config .config

//修改文件名

#../crosstool-ng-1.9.2_install/bin/ct-ng menuconfig

进入menuconfig,开始修改配置。

 

 

 

此时会出现crosstool-ng的配置窗口:

针对armv4t体系架构,因为TQ2440用的是armv4t架构,开始对其进行修改配置:

0、已下载好的源码包路径和交叉编译器的安装路径。
Paths and misc options  --->Local tarballs directory  
  (/work/tools/TQ2440/crosstool-ng/src) Local tarballs directory   保存源码包路径

Paths and misc options  --->Prefix directory   
  (/work/tools/TQ2440/x-tools/${CT_TARGET}) Prefix directory  交叉编译器的安装路径
这两个请依据你的实际情况来修改。

1、Target options --->
 *** Target optimisations ***

Target options --->Architecture level
写上:armv4t

Target options --->Emit assembly for CPU
写上:arm9tdmi


Target options --->Tune for CPU
写上:arm920t
通过查找资料,这个应该是指令集的架构,对于S3C2410/S3C2440,都是ARM920T的核心,架构指令是armv4t,所以,如果要编译2410/2440的,就选armv4t。以此类推S3C6410 ARM1176JZF-S核心 使用的是armv6架构,就选armv6,那么具体都支持哪些架构呢?可以用man gcc来查询,搜索arm,再搜索-march=就可以找到本gcc支持的处理器核心列表了。

 

2、根据参考资料,禁止内核头文件检测(只起到节约时间的作用(不到1S的时间),不推荐禁用)
Operating System  --->

 [N]     Check installed headers

 

 

3、增加编译时的并行进程数,以增加运行效率,加快编译。
Paths and misc options  --->
   *** Build behavior ***
   (4) Number of parallel jobs
   这个数值不宜过大,应该为CPU数量的两倍。由于我的CPU是双核的,所以我填了4.

 

 

4、一些个性化的修改(可以不修改)
Toolchain options  --->
       *** Tuple completion and aliasing *** 
       (hens) Tuple's vendor string
这样产生的编译器前缀就是:arm-hens-linux-gnueabi-

 

5、C compiler  --->
       (crosstool-NG-${CT_VERSION}-hens) gcc ID string
    以上红色字体部分即为修改之处。

  

Ubuntu10.10下利用crosstool-ng构建交叉编译链

      之所以用crosstool-ng是因为crosstool-ng是最新的用来建立交叉工具链的工具,正如其官网所说,crosstool-ng is a rewrite of the original crosstool by Dan Kegel.它是crosstool的替代者,crosstool的gcc版本只能到4.1.1,无法编译版本高于2.6.29 的linux内核,而crosstool-ng一直保存着更新,而且crosstool-ng is really targetted at building toolchains, and only toolchains.

 

      系统环境:pursuitxh@ubuntu:~$ uname -a

 

Linux ubuntu 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux

 

 

      一、下载crosstool-ng,并为使用安装必要的软件。
   crosstool-ng的下载地址是:http://ymorin.is-a-geek.org/download/crosstool-ng/
   值得注意的是,下载里最新的crosstool-ng以后,记得在到http://ymorin.is-a-geek.org/download/crosstool-ng/01-fixes/看看有没有相应的补丁,有得话一起下载下来。

 

      我这次使用的是1.9.2

      使用crosstool-ng必须先安装一些开发用的软件,在ubuntu下必须安装(使用apt):

 
 

#apt-get install libncurses5-dev

#apt-get install bison

#apt-get install flex

#apt-get install texinfo

#apt-get install automake

#apt-get install libtool

#apt-get install patch

#apt-get install gcj

#apt-get install cvs

#apt-get install cvsd

#apt-get install gawk

 

然后手动安装termcap

#cd /tmp
#wget ftp://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
#tar zxvf termcap-1.3.1.tar.gz
#cd termcap-1.3.1
#./configure --prefix=/usr
#make
#make install

 

二,解压、打补丁(如果有)并建立工作目录

 

      crosstool-ng和crosstool不同的地方之一就是:她并不是一下载下来就可以使用了,必须先配置安装。
将下载下来的crosstool-ng-X.Y.Z.tar.bz2解压到你为她准备的工作目录(这里假设为/home/lwm/software/crosstool),并建立安装和编译目录。

#tar xjvf crosstool-ng-1.9.2.tar.bz2 -C /home/lwm/software/crosstool

#cd /home/lwm/software/crosstool  //进入工作目录

#mkdir crosstool-ng-1.9.2_build   //这是编译新交叉编译器的工作目录

#mkdir crosstool-ng-1.9.2_install //这是crosstool-ng的安装目录


#cd  crosstool-ng-1.9.2   //进入解压后的 crosstool-ng-1.9.2目录

#patch -p1 < 补丁文件      //如果有补丁,打补丁

#./configure –prefix=/home/lwm/software/crosstool/crosstool-ng-1.9.2_install            //配置crosstool-ng

#make                    //编译crosstool-ng

#make install            //安装crosstool-ng

# echo "PATH=$PATH:/home/lwm/software/crosstool/crosstool-ng-1.9.2_install/bin" >> ~/.bashrc //为后面调用ct-ng命令增加环境变量
# source ~/.bashrc
# ct-ng help

This is crosstool-NG version 1.9.2

 

 

 

Copyright (C) 2008  Yann E. MORIN <yann.morin.1998@anciens.enib.fr>

 

This is free software; see the source for copying conditions.

 

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

 

PARTICULAR PURPOSE.

 

 

 

See below for a list of available actions, listed by category:

 

 

 

Configuration actions:

 

  menuconfig         - Update current config using a menu based program

 

  oldconfig          - Update current config using a provided .config as base

 

  extractconfig      - Extract to stdout the configuration items from a

 

                       build.log file piped to stdin

 

  saveconfig         - Save current config as a preconfigured target

 

  show-tuple         - Print the tuple of the currently configured toolchain

 

 

 

Preconfigured toolchains (#: force number of // jobs):

 

  list-samples       - prints the list of all samples (for scripting)

 

  show-<sample>      - show a brief overview of <sample> (list with list-samples)

 

  <sample>           - preconfigure crosstool-NG with <sample> (list with list-samples)

 

  build-all[.#]      - Build *all* samples (list with list-samples) and install in

 

                       ${CT_PREFIX} (which you must set)

 

 

 

Build actions (#: force number of // jobs):

 

  build[.#]          - Build the currently configured toolchain

 

  list-steps         - List all build steps

 

 

 

Clean actions:

 

  clean              - Remove generated files

 

  distclean          - Remove generated files, configuration and build directories

 

 

 

Distribution actions:

 

  wiki-samples       - Print a DokuWiki table of samples

 

  updatetools        - Update the config tools

 

  tarball            - Build a tarball of the configured toolchain

 

 

 

Environement variables (see /home/lwm/software/crosstool/crosstool-ng-1.9.2_install/share/doc/ct-ng-1.9.2/0 - Table of content.txt):

 

  STOP=step          - Stop the build just after this step (list with list-steps)

 

  RESTART=step       - Restart the build just before this step (list with list-steps)

 

  CT_PREFIX=dir      - install samples in dir (see action "build-all", above).

 

  V=0|1|2            - 0 => show only human-readable messages (default)

 

                       1 => show only the commands being executed

 

                       2 => show both

 

 

 

Use action "menuconfig" to configure your toolchain

 

Use action "build" to build your toolchain

 

Use action "version" to see the version

 

See "man 1 ct-ng" for some help as well

 

pursuitxh@ubuntu:/home/lwm/software/crosstool$

 

好了,crosstool-ng安装成功。

 

三,配置本次编译的交叉编译工具链

接下来就是配置你要编译的交叉编译工具链了,在crosstool-ng已很多已经做好的默认配置(位于crosstool-ng- X.Y.Z/samples目录下),你只要针对其进行修改就好了。对于编译器组件部分的版本最好不要修改,因为那个配搭应该是经过测试后的最高本版了,但内核版本可以修改。

#mkdir /home/lwm/software/mini2440/x-tools //建立交叉编译器的安装路径

#mkdir /home/lwm/software/mini2440/crosstool-ng/src //建立保存源码包目录

 

#cd /home/lwm/software/crosstool/crosstool-ng-1.9.2_build/ 

//进入编译新交叉编译器的工作目录
#cp ../crosstool-ng-1.9.2/samples/arm-unknown-linux-gnueabi /* ./

//拷贝默认配置文件到工作目录

#mv crosstool.config .config

//修改文件名

#../crosstool-ng-1.9.2_install/bin/ct-ng menuconfig

进入menuconfig,开始修改配置。

 

此时会出现crosstool-ng的配置窗口,针对armv4t体系架构,因为mini2440用的是armv4t架构,开始对其进行修改配置:

0、已下载好的源码包路径和交叉编译器的安装路径。
Paths and misc options  --->
  (/home/lwm/software/mini2440/crosstool-ng/src) Local tarballs directory   保存源码包路径
  (/home/lwm/software/mini2440/x-tools/${CT_TARGET}) Prefix directory  交叉编译器的安装路径
这两个请依据你的实际情况来修改。

1、Target options --->
 *** Target optimisations ***
(armv4t) Architecture level
(arm9tdmi) Emit assembly for CPU
(arm920t) Tune for CPU
通过查找资料,这个应该是指令集的架构,对于S3C2410/S3C2440,都是ARM920T的核心,架构指令是armv4t,所以,如果要编译2410/2440的,就选armv4t。以此类推S3C6410 ARM1176JZF-S核心 使用的是armv6架构,就选armv6,那么具体都支持哪些架构呢?可以用man gcc来查询,搜索arm,再搜索-march=就可以找到本gcc支持的处理器核心列表了。

 

以上这几个参数是如何得出的可以参考gcc的man手册,你可以在你下载的gcc-4.3.2.tar.bz2解压后找到,她的位置是gcc-4.3.2/gcc/doc/gcc.1。打开方式:

man ./gcc.1
 


你可以在其中找到:

......
 ARM Options
......
-mcpu=name   (Emit assembly for CPU)
           This specifies the name of the target ARM processor. GCC uses this
           name to determine what kind of instructions it can emit when gener‐
           ating assembly code. Permissible names are: arm2, arm250, arm3,
           arm6, arm60, arm600, arm610, arm620, arm7, arm7m, arm7d, arm7dm,
           arm7di, arm7dmi, arm70, arm700, arm700i, arm710, arm710c, arm7100,
           arm7500, arm7500fe, arm7tdmi, arm7tdmi-s, arm8, strongarm, stron‐
           garm110, strongarm1100, arm8, arm810, arm9, arm9e, arm920, arm920t,
           arm922t, arm946e-s, arm966e-s, arm968e-s, arm926ej-s, arm940t,
           arm9tdmi, arm10tdmi, arm1020t, arm1026ej-s, arm10e, arm1020e,
           arm1022e, arm1136j-s, arm1136jf-s, mpcore, mpcorenovfp,
           arm1156t2-s, arm1176jz-s, arm1176jzf-s, cortex-a8, cortex-r4, cor‐
           tex-m3, xscale, iwmmxt, ep9312.

       -mtune=name   (Tune for CPU)
           This option is very similar to the -mcpu= option, except that
           instead of specifying the actual target processor type, and hence
           restricting which instructions can be used, it specifies that GCC
           should tune the performance of the code as if the target were of
           the type specified in this option, but still choosing the instruc‐
           tions that it will generate based on the cpu specified by a -mcpu=
           option. For some ARM implementations better performance can be
           obtained by using this option.

       -march=name  (Architecture level)
           This specifies the name of the target ARM architecture. GCC uses
           this name to determine what kind of instructions it can emit when
           generating assembly code. This option can be used in conjunction
           with or instead of the -mcpu= option. Permissible names are:
           armv2, armv2a, armv3, armv3m, armv4, armv4t, armv5, armv5t,
           armv5te, armv6, armv6j, armv6t2, armv6z, armv6zk, armv7, armv7-a,
           armv7-r, armv7-m, iwmmxt, ep9312.

......
 

2、根据参考资料,禁止内核头文件检测(只起到节约时间的作用(不到1S的时间),不推荐禁用)
Operating System  --->

 [N]     Check installed headers

 

3、增加编译时的并行进程数,以增加运行效率,加快编译。
Paths and misc options  --->
   *** Build behavior ***
   (4) Number of parallel jobs
   这个数值不宜过大,应该为CPU数量的两倍。由于我的CPU是双核的,所以我填了4.

4、一些个性化的修改(可以不修改)
Toolchain options  --->
       *** Tuple completion and aliasing *** 
       (lwm) Tuple's vendor string
这样产生的编译器前缀就是:arm-lwm-linux-gnueabi-

5、C compiler  --->
       (crosstool-NG-${CT_VERSION}-lwm) gcc ID string
    以上红色字体部分即为修改之处。

 

配置好以后保存。

最后,内核源码的版本号修改,请直接修改crosstool-ng-1.9.2_build目录下的.config文件,不止一处,有关的都要修改。
有:

CT_KERNEL_VERSION=           //开始我在这里写上Linux-2.6.33.7时不能编译通过
CT_KERNEL_V_2_6_??_?=y
CT_LIBC_GLIBC_MIN_KERNEL=
 

如果再次../crosstool-ng-1.9.2_install/bin/ct-ng menuconfig,这个修改又会复原,必须再次手工修改。
你也可以选择修改crosstool-ng-X.Y.Z_build/config/kernel/linux.in等文件,只是比较麻烦,但这可以彻底解决,实现在界面中增加内核版本。

 

 配置完后,在crosstool-ng-1.9.2_build目录下执行命令:$ ct-ng build.4。

当我输入执行这个命令时提示:

ct-ng: command not found

找不到命令,试试从普通用户转换到超级用户执行还是不行。可能是是环境变量没有设置正确,导致不能正确的识别命令的路径。于是我重新执行:

# echo "PATH=$PATH:/home/lwm/software/crosstool/crosstool-ng-1.9.2_install/bin" >> ~/.bashrc //为后面调用ct-ng命令增加环境变量
# source ~/.bashrc

OK,可以了。

表示它正在编译之中,这个可能时间比较长,因为有些包预先不存在的话,还要自行下载,当然会比较慢,不过都走到这里了,等应该不成问题。

 

但是往下就有问题了:

[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'duma_2_5_15'
[ERROR]    Could not retrieve 'duma_2_5_15'.
[09:16] / make[1]: *** [build] Error 1
make: *** [build.4] Error 2
重新进入配置界面Debug facilities  --->

                                 [ ] duma  --->,把'duma这项去掉。也还是不行。

刚开始怀疑我用的版本是目前最新的1.93,会不会是跟这之前的版本有太大的区别。于是我换用1.90版的。但是还是会出现:

这个看看来是不能检索到“expat-2.0.1”,可能是源发生了变化,我偿试自己下载,再把它放到存放源码的目录中,以后只要是有这样提示的都自己下载然后手动放进。继续操作。

                                                                                              .

                                          .

                                          .

 

 到这里它已经全部可以下载了,当然前面还有已经下载完的,这里只不过是拿出一部分图示意。下面系统会自动转入安装阶段:

 

 

                                                                                              .

                                         .

                                         .

为能看清楚总共下载多少包,想想还是把它们全部都列出来:

 root@hens-desktop:/work/crosstool/crosstool_build# ../crosstool_install/bin/ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20120524.143846
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-linux-gnu
[EXTRA]      host   = i686-pc-linux-gnu
[EXTRA]      target = arm-hens-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.20s (at 00:04)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'ncurses-5.7'
[EXTRA]    Saving 'ncurses-5.7.tar.gz' to local storage
[INFO ]  Retrieving needed toolchain components' tarballs: done in 22.27s (at 00:26)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'linux-2.6.33.7'
[EXTRA]    Patching 'linux-2.6.33.7'
[EXTRA]    Extracting 'gmp-4.3.2'
[EXTRA]    Patching 'gmp-4.3.2'
[EXTRA]    Extracting 'mpfr-2.4.2'
[EXTRA]    Patching 'mpfr-2.4.2'
[EXTRA]    Extracting 'libelf-0.8.13'
[EXTRA]    Patching 'libelf-0.8.13'
[EXTRA]    Extracting 'binutils-2.19.1'
[EXTRA]    Patching 'binutils-2.19.1'
[EXTRA]    Extracting 'gcc-4.3.2'
[EXTRA]    Patching 'gcc-4.3.2'
[EXTRA]    Extracting 'glibc-2.9'
[EXTRA]    Patching 'glibc-2.9'
[EXTRA]    Extracting 'glibc-ports-2.9'
[EXTRA]    Patching 'glibc-ports-2.9'
[EXTRA]    Extracting 'dmalloc-5.5.2'
[EXTRA]    Patching 'dmalloc-5.5.2'
[EXTRA]    Extracting 'duma_2_5_15'
[EXTRA]    Patching 'duma-2_5_15'
[EXTRA]    Extracting 'gdb-6.8'
[EXTRA]    Patching 'gdb-6.8'
[EXTRA]    Extracting 'ncurses-5.7'
[EXTRA]    Patching 'ncurses-5.7'
[EXTRA]    Extracting 'expat-2.0.1'
[EXTRA]    Patching 'expat-2.0.1'
[EXTRA]    Extracting 'ltrace-0.5.3'
[EXTRA]    Patching 'ltrace-0.5.3'
[EXTRA]    Extracting 'strace-4.5.19'
[EXTRA]    Patching 'strace-4.5.19'
[INFO ]  Extracting and patching toolchain components: done in 211.31s (at 03:58)
[INFO ]  =================================================================
[INFO ]  Installing kernel headers
[EXTRA]    Installing kernel headers
[EXTRA]    Checking installed headers
[INFO ]  Installing kernel headers: done in 11.32s (at 04:09)
[INFO ]  =================================================================
[INFO ]  Installing GMP
[EXTRA]    Configuring GMP
[EXTRA]    Building GMP
[EXTRA]    Installing GMP
[INFO ]  Installing GMP: done in 283.14s (at 08:52)
[INFO ]  =================================================================
[INFO ]  Installing MPFR
[EXTRA]    Configuring MPFR
[EXTRA]    Building MPFR
[EXTRA]    Installing MPFR
[INFO ]  Installing MPFR: done in 52.61s (at 09:45)
[INFO ]  =================================================================
[INFO ]  Installing binutils
[EXTRA]    Configuring binutils
[EXTRA]    Building binutils
[EXTRA]    Installing binutils
[INFO ]  Installing binutils: done in 178.97s (at 12:44)
[INFO ]  =================================================================
[INFO ]  Installing static core C compiler
[EXTRA]    Configuring static core C compiler
[EXTRA]    Building static core C compiler
[EXTRA]    Installing static core C compiler
[INFO ]  Installing static core C compiler: done in 336.89s (at 18:21)
[INFO ]  =================================================================
[INFO ]  Installing C library headers
[EXTRA]    Configuring C library
[EXTRA]    Installing C library headers
[INFO ]  Installing C library headers: done in 45.14s (at 19:06)
[INFO ]  =================================================================
[INFO ]  Installing C library start files
[EXTRA]    Configuring C library
[WARN ]    Removing "-pipe" for use with glibc>=2.6
[EXTRA]    Building C library start files
[EXTRA]    Installing C library start files
[INFO ]  Installing C library start files: done in 35.80s (at 19:42)
[INFO ]  =================================================================
[INFO ]  Installing shared core C compiler
[EXTRA]    Configuring shared core C compiler
[EXTRA]    Building shared core C compiler
[EXTRA]    Installing shared core C compiler
[INFO ]  Installing shared core C compiler: done in 373.23s (at 25:55)
[INFO ]  =================================================================
[INFO ]  Installing C library
[EXTRA]    Configuring C library
[WARN ]    Removing "-pipe" for use with glibc>=2.6
[EXTRA]    Building C library
[EXTRA]    Installing C library
[EXTRA]    Fixing C library linker scripts
[INFO ]  Installing C library: done in 1118.93s (at 44:34)
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[EXTRA]    Configuring final compiler
[EXTRA]    Building final compiler
[EXTRA]    Installing final compiler
[INFO ]  Installing final compiler: done in 914.62s (at 59:49)
[INFO ]  =================================================================
[INFO ]  Installing libelf for the target
[EXTRA]    Configuring libelf
[EXTRA]    Building libelf
[EXTRA]    Installing libelf
[INFO ]  Installing libelf for the target: done in 14.22s (at 60:03)
[INFO ]  =================================================================
[INFO ]  Installing binutils for target
[EXTRA]    Configuring binutils for target
[EXTRA]    Building binutils' libraries (libiberty bfd) for target
[EXTRA]    Installing binutils' libraries (libiberty bfd) for target
[INFO ]  Installing binutils for target: done in 169.56s (at 62:53)
[INFO ]  =================================================================
[INFO ]  Installing dmalloc
[EXTRA]    Configuring dmalloc
[EXTRA]    Building dmalloc
[EXTRA]    Installing dmalloc
[INFO ]  Installing dmalloc: done in 17.31s (at 63:10)
[INFO ]  =================================================================
[INFO ]  Installing D.U.M.A.
[EXTRA]    Copying sources
[EXTRA]    Building libraries 'libduma.a libduma.so.0.0.0'
[EXTRA]    Installing libraries 'libduma.a libduma.so.0.0.0'
[EXTRA]    Installing shared library link
[EXTRA]    Installing wrapper script
[INFO ]  Installing D.U.M.A.: done in 2.73s (at 63:13)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[EXTRA]    Configuring cross-gdb
[EXTRA]    Building cross-gdb
[EXTRA]    Installing cross-gdb
[INFO ]  Installing cross-gdb: done in 324.74s (at 68:38)
[INFO ]  =================================================================
[INFO ]  Installing native gdb
[EXTRA]    Building static target ncurses
[EXTRA]    Building static target expat
[EXTRA]    Configuring native gdb
[EXTRA]    Building native gdb
[EXTRA]    Installing native gdb
[EXTRA]    Cleaning up ncurses
[INFO ]  Installing native gdb: done in 521.52s (at 77:19)
[INFO ]  =================================================================
[INFO ]  Installing gdbserver
[EXTRA]    Configuring gdbserver
[EXTRA]    Building gdbserver
[EXTRA]    Installing gdbserver
[INFO ]  Installing gdbserver: done in 14.75s (at 77:34)
[INFO ]  =================================================================
[INFO ]  Installing ltrace
[EXTRA]    Copying sources to build dir
[EXTRA]    Configuring ltrace
[EXTRA]    Building ltrace
[EXTRA]    Installing ltrace
[INFO ]  Installing ltrace: done in 5.92s (at 77:40)
[INFO ]  =================================================================
[INFO ]  Installing strace
[EXTRA]    Configuring strace
[EXTRA]    Building strace
[EXTRA]    Installing strace
[INFO ]  Installing strace: done in 24.17s (at 78:04)
[INFO ]  =================================================================
[INFO ]  Cleaning-up the toolchain's directory
[INFO ]    Stripping all toolchain executables
[EXTRA]    Installing the populate helper
[EXTRA]    Installing a cross-ldd helper
[EXTRA]    Creating toolchain aliases
[EXTRA]    Removing access to the build system tools
[INFO ]  Cleaning-up the toolchain's directory: done in 2.28s (at 78:07)
[INFO ]  Build completed at 20120524.155653
[INFO ]  (elapsed: 78:06.56)
[INFO ]  Finishing installation (may take a few seconds)...
[78:07] / root@hens-desktop:/work/crosstool/crosstool_build#

 

说明做的编译器真的成功了,应该可以小小的高兴一下。

 

 

建立链接,添加环境变量:

1.  sudo vim  /etc/profile,在其中文件的末尾添加这样一行:PATH=$PATH:/work/hens/crosstool/tools/bin,其实是我的工具的路径,可以根据实际需要来设定。

2.  source /etc/profile   使修改生效,不用重新登陆。

3.  arm-hens-linux-gnueabi-gcc -v  就会有如下的信息

恭喜成功了。不过我这里编译制作的编译工具链是基于于Linux-2.6.33.7来的,要是用作其他版本的要作相应的修改,这个以前面已经说到,这里不再重复。

 

 

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值