交叉工具链的安装

版权声明: https://blog.csdn.net/qq_38697681/article/details/82555755

使用的操作系统:ubuntu 12.04发行版

1、如果要自己编译工具链,从以下链接下载源码

       crosstools-ng下载地址

http://ymorin.is-a-geek.org/download/crosstool-ng/

       同时对每一个版本都有相应的补丁我们尽量把这些补丁打上,这些补丁的下载地址是

http://ymorin.is-a-geek.org/download/crosstool-ng/01-fixes/

 

2、工具的安装

在使用之前先安装下列软件

$ sudo apt-get install libncurses5-dev

  1. 解压工具链压缩包

$  cd  ~

$ tar  xvf  arm-cortex_a8-linux-gnueabi.tar.bz2

$ mv  arm-cortex_a8  toolchain

  1. 环境变量的添加

修改文件/etc/bash.bashrc添加如下内容

export   PATH=$PATH:/home/linux/arm-cortex_a8/bin

重启配置文件

$ source   /etc/bash.bashrc

  1. 工具链的测试

$ arm-cortex_a8-linux-gnueabi-gcc   –v

Using built-in specs.

Target : arm-cortex_a8-linux-gnueabi

Configured with: /home/linux/src/gcc-4.4.6/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-cortex_a8-linux-gnueabi --prefix=/home/linux/toolchain --with-sysroot=/home/linux/toolchain/arm-cortex_a8-linux-gnueabi//sys-root --enable-languages=c,c++,fortran --disable-multilib --with-arch=armv7-a --with-float=soft --with-pkgversion=crosstool-NG-1.12.4-none --disable-sjlj-exceptions --enable-__cxa_atexit --disable-libmudflap --with-gmp=/home/linux/toolchain/toolchain-build/targets/arm-cortex_a8-linux-gnueabi/build/static --with-mpfr=/home/linux/ toolchain/toolchain-build/targets/arm-cortex_a8-linux-gnueabi/build/static --enable-threads=posix --enable-target-optspace --with-local-prefix=/home/linux/toolchain/arm-cortex_a8-linux-gnueabi//sys-root --disable-nls --enable-symvers=gnu --enable-c99 --enable-long-long

Thread model: posix

gcc version 4.4.6 (crosstool-NG  1.12.4)

这样我们的交叉工具链就安装好了

本文中使用的编译工具链:https://github.com/XiaoYaoNet/crosstool

猜你喜欢

转载自blog.csdn.net/qq_38697681/article/details/82555755