安装ARM交叉编译器
1、开发平台
虚拟机:VMware 12
操作系统:Ubuntu 14.04 64bit
2、准备ARM交叉编译工具包
编译uboot和linux kernel都需要ARM交叉工具链支持,这里使用Linaro提供的交叉编译工具。下载地址为:http://releases.linaro.org/
注意:如果主机是64bit,请选择64位的交叉编译器工具链,32bit的主机选择32位的交叉工具链。
The Linaro Toolchain Working Group is pleased to announce this quarter’s release of the Linaro Toolchain Binaries, a pre-built version of Linaro GCC and Linaro GDB that runs on generic Linux or Windows and targets the glibc Linaro Engineering Build. Beginning 2014.11, Linaro is changing the layout and structure of its prebuilt toolchain binary releases. 2014.11 is the first release built with ABE, adding more maintainable code base and automatic testing. For further details on ABE, please visit https://wiki.linaro.org/ABE. The folder names above describe the target triplets, i.e. the system on which you want your programs/applications to run. For more details on triplets, please click here. Inside each folder is also a manifest.txt file further describing the target and host systems meant for the toolchain, plus source component versions. Essentially, the main folder contents are as follows: aarch64-linux-gnu · gcc-linaro-*x86_64_aarch64-linux-gnu.tar.xz o Linux 64-bit binaries for the Aarch64 Linux cross-toolchain · gcc-linaro-*i686-mingw32_aarch64-linux-gnu.tar.xz o Windows 32-bit binaries for the Aarch64 Linux cross-toolchain aarch64-none-elf · gcc-linaro-*x86_64_aarch64-elf.tar.xz o Linux 64-bit binaries for the Aarch64 bare-metal cross-toolchain · gcc-linaro-*i686-mingw32_aarch64-elf.tar.xz o Windows 32-bit binaries for the Aarch64 bare-metal cross-toolchain aarch64_be-linux-gnu · gcc-linaro-*x86_64_aarch64_be-linux-gnu.tar.xz o Linux 64-bit binaries for the Aarch64 Linux Big Endian cross-toolchain · gcc-linaro-*i686-mingw32_aarch64_be-linux-gnu.tar.xz o Windows 32-bit binaries for the Aarch64 Linux Big Endian cross-toolchain aarch64_be-none-elf · gcc-linaro-*x86_64_aarch64_be-elf.tar.xz o Linux 64-bit binaries for the Aarch64 bare-metal Big Endian cross-toolchain · gcc-linaro-*i686-mingw32_aarch64_be-elf.tar.xz o Windows 32-bit binaries for the Aarch64 bare-metal Big Endian cross-toolchain arm-linux-gnueabi · gcc-linaro-*x86_64_arm-linux-gnueabi.tar.xz o Linux 64-bit binaries for the ARMv7 Linux soft float cross-toolchain · gcc-linaro-*i686-mingw32_arm-linux-gnueabi.tar.xz o Windows 32-bit binaries for the ARMv7 Linux soft float cross-toolchain arm-linux-gnueabihf · gcc-linaro-*x86_64_arm-linux-gnueabihf.tar.xz o Linux 64-bit binaries for the ARMv7 Linux hard float cross-toolchain · gcc-linaro-*i686-mingw32_arm-linux-gnueabihf.tar.xz o Windows 32-bit binaries for the ARMv7 Linux hard float cross-toolchain arm-none-eabi · gcc-linaro-*x86_64_arm-eabi.tar.xz o Linux 64-bit binaries for the ARMv7 bare-metal cross-toolchain · gcc-linaro-*i686-mingw32_arm-eabi.tar.xz o Windows 32-bit binaries for the ARMv7 bare-metal cross-toolchain armeb-linux-gnueabihf · gcc-linaro-*x86_64_armeb-linux-gnueabihf.tar.xz o Linux 64-bit binaries for the ARMv7 Linux Big Endian hard float cross-toolchain · gcc-linaro-*i686-mingw32_armeb-linux-gnueabihf.tar.xz o Windows 32-bit binaries for the ARMv7 Linux Big Endian hard float cross-toolchain armeb-none-eabi · gcc-linaro-*x86_64_armeb-eabi.tar.xz o Linux 64-bit binaries for the ARMv7 bare-metal Big Endian cross-toolchain · gcc-linaro-*i686-mingw32_armeb-eabi.tar.xz o Windows 32-bit binaries for the ARMv7 bare-metal Big Endian cross-toolchain NOTE · The binary source package is no longer distributed as the components are now archived at http://abe.tcwglab.linaro.org/snapshots and downloaded automatically based on manifest.txt when (re)building with ABE. · The source package releases for the individual components are still at http://releases.linaro.org/latest/components/toolchain. Select the component (e.g. gcc, glibc, binutils, gdb) as necessary. · The binary tarball has been splitted into 3 parts. As a result, you can install only the parts needed: o gcc-linaro-*.tar.xz – the compiler and tools o runtime-linaro-*.tar.xz – runtime libraries needed on the target o sysroot-linaro-*.tar.xz – sysroot (a set of libraries and headers to develop against) · Beginning 2014.11, sysroots will use the latest glibc release provided by Linaro engineers in order that users get the latest features and optimizations in the system libraries. · Eglibc 2.15 compatible sysroots will no longer be released. Users that require Eglibc 2.15 sysroots that need the latest Linaro GCC compiler should use the previous quarterly released sysroot. · x86 (32-bit) Linux host toolchains are no longer provided. x86_64 (64-bit) Linux host toolchains are provided instead. · Soft-float targeted toolchains are no longer supported. |
笔者使用的ARM交叉工具链版本为gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar.xz
下载地址为:
3、安装步骤
3.1、Ubuntu14.04 64bit系统下安装标准的C开发环境
sudo apt-get install gcc g++ libgcc1 libg++ make gdb
或者 sudo apt-get install build-essential
3.2、下载gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar.xz
1> 在/usr/local/文件夹下建立名为ARM-toolchain的文件夹
$ sudo mkdir /usr/local/ARM-toolchain |
2> 下载gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar.xz
$ cd /usr/local/ARM-toolchain sudo wget http://releases.linaro.org/components/toolchain/binaries/6.1-2016.08/ arm-linux-gnueabi/gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar.xz |
3.3、安装gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi
解压gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar.xz
$ xz –d gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar.xz $ tar xvf gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi.tar |
3.4、修改环境变量,把交叉编译器的路径加入到PATH
修改/etc/bash.bashrc文件(此文件只对当前用户适用)
$sudo gedit /etc/bash.bashrc
然后在文件的末尾空白处加入一下代码:
# Add ARM toolschain path if [ -d /usr/local/ARM-toolchain/gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi ] ; then PATH= /usr/local/ARM-toolchain/gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi/bin:"${PATH}" fi |
3.5、使新的环境变量生效(不用重启电脑)
$ source /etc/bash.bashrc
3.6. 检查是否将路径加入到PATH:
$ echo $PATH
若显示的内容中含有:/usr/local/ARM-toolchain/gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi/bin 说明已经将交叉编译器的路径加入PATH。
至此,交叉编译环境安装完成。
3.7. 测试是否安装成功
$ arm-linux-gnueabi-gcc -v
执行上面的命令,显示arm-linux-gnueabi-gcc -v信息和版本:
$ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/usr/local/ARM-toolchain/gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi/bin/../libexec/gcc/arm-linux-gnueabi/6.1.1/lto-wrapper Target: arm-linux-gnueabi Configured with: /home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/snapshots/gcc-linaro-6.1-2016.08/configure SHELL=/bin/bash --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap --with-cloog=no --with-ppl=no --with-isl=no --disable-nls --enable-c99 --enable-gnu-indirect-function --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --disable-multilib --enable-multiarch --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/_build/sysroots/arm-linux-gnueabi --enable-lto --enable-linker-build-id --enable-long-long --enable-shared --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabi/libc --enable-languages=c,c++,fortran,lto --enable-checking=release --disable-bootstrap --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabi --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg/target/arm-linux-gnueabi/_build/builds/destdir/x86_64-unknown-linux-gnu Thread model: posix gcc version 6.1.1 20160711 (Linaro GCC 6.1-2016.08) |
安装ARM交叉编译器的更多相关文章
- ubuntu 10.04 安装arm交叉编译器
家里有一台cotext-A9(armv7-a) 的盒子,现在不用了, 一直想着废物利用.于是想怎么为这盒子编译程序. 目标机器: root@routon-h1:/# uname -a Linux ro ...
- Ubuntu 18.04安装arm-linux-gcc交叉编译器
Ubuntu 18.04安装arm-linux-gcc交叉编译器
- Ubuntu上Xilinx ARM交叉编译器安装
1,Windows中下载交叉编译器 2,在ubuntu中创建zedboard目录,并将交叉编译器复制进来 3,将该交叉编译器设置成可执行程序 chmod a+x xilinx-2011.09-50 ...
- 安装arm-linux-gcc交叉编译器
1.开发平台 虚拟机:VMware 12 操作系统:Ubuntu 14.04 2.准备交叉编译工具包(arm-linux-gcc-4.5.1) 编译uboot和linux kernel都需要gnu交叉 ...
- Ubuntu 18.04安装arm-linux-gcc交叉编译器(超简单,附安装包下载地址)
目前网上搜索发现,最多人安装的是4.4.3版本的: arm-linux-gcc-4.4.3.tar.gz下载地址:https://pan.baidu.com/s/1rAIBASIRZAXl-P1UOW ...
- linux安装配置交叉编译器arm-linux-gnueabi-gcc
要使我们在x86架构下运行的程序迁移至ARM架构的开发板中运行时,需要通过交叉编译器将x86下编写的程序进行编译后,开发版才能运行. 在安装之前我们需要了解,什么是交叉编译器. 一.下载交叉编译器 这 ...
- arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
命名规则 交叉编译工具链的命名规则为:arch [-vendor] [-os] [-(gnu)eabi] arch – 体系架构,如ARM,MIPSvendor – 工具链提供商os – 目标操作系统 ...
- 【转】arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
原文网址:http://www.veryarm.com/296.html 命名规则 交叉编译工具链的命名规则为:arch [-vendor] [-os] [-(gnu)eabi] arch - 体系架 ...
- linux 下安装arm-linux-gnueabi交叉编译器
1,开发平台 虚拟机:vm12 系统:ubuntu14.04 LTS 32位 2.准备ARM交叉编译工具包 编译uboot和linux kernel都需要ARM交叉工具链支持,这里使用Linaro提 ...
随机推荐
- java 线程安全
要认识java线程安全,必须了解两个主要的点:java的内存模型,java的线程同步机制.特别是内存模型,java的线程同步机制很大程度上都是基于内存模型而设定的. 浅谈java内存模型: 不同的平台 ...
- Hibernate 乐观锁(Optimistic Locking)
1.hibernate基于数据版本(Version)记录机制实现.为数据增加一个版本标识,一般是通过为数据库表增加一个"version"字段来实现. 读取出数据时,将此版本号一同读 ...
- 使用过滤器(Filter)解决请求参数中文乱码问题(复杂方式)
前述: 在写这篇笔记之前,对笔记中的设计模式进行介绍: 本篇笔记中将要使用到的设计模式是:装饰(包装)设计模式 (1)装饰(包装)设计模式口诀: ...
- (三)、Struts第三天
(三).Struts第三天 Struts核心业务: (Struts提供了哪些功能?) 1. 请求数据自动封装(params拦截器) 2. struts数据处理方式 * ActionContext ...
- Java-老夫对泛型的理解。。
什么是泛型,在我看来 泛型就是能够限制类,方法,数组-变量的类型 比如说 List<String,int> list = new List<String,int> 就是有尖括 ...
- usb转串口驱动时会出现“文件的哈希值不在指定的目录”这样的提示
一般在安装一些usb转串口驱动时会出现“文件的哈希值不在指定的目录”这样的提示,那么怎么解决呢?知道的别喷我哦,我只是再普及一下,嘿嘿1.鼠标移到右下角,点击“设置”,再点击“更改电脑设置”2.点击最 ...
- HRBUST 1909 理工门外的树(双数组实现线段树功能)
线段树固然可以做,但是在考虑线段树之前应该先考虑一下,这种用两个数组来解决问题的方法能不能行,如果行的话,就会为我们省很多时间,毕竟线段树代码量比较大 #include<iostream> ...
- Struts2升级出现的问题
由于大家都懂的原因,涉struts2的项目需要将struts2相关包升级至2.3.15.1.今将升级方法和常见问题解决简单总结如下. 一.基本升级操作 1. 获取Struts2.3.15.1jar包 ...
- 各种命令,以及FAQ..持续更新.....
Linux 篇: CentOs 7 修改主机名 hostnamectl --static set-hostname <host-name> 统计最多的10条记录 awk '{print $ ...
- 浏览器兼容问题 chrome iframe location href
报了个错 var dt2=new Date(d2Arr[0],d2Arr[1],d2Arr[2]); if(dt1>dt2){//比较日期 alert("开始日期不能晚于结束日期!&q ...