Advice regarding installing ARM toolchain on Ubuntu VM (64bit)

陌路散爱 提交于 2019-11-27 18:48:13

问题


Trying to compile Linux kernel for arm platform on a Ubuntu virtual machine

$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

It fails as follows

arm-none-linux-gnueabi-gcc: not found

Tried to install

$sudo apt-get install arm-none-linux-gnueabi-gcc

E: unable to locate package arm-none-linux-gnueabi-gcc

Where to find the correct package? how to include it in the system? (I found a couple of links on line that didn't work for me). It would be great if you could provide a correct solution or reference.


回答1:


  1. Download arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 from https://sourcery.mentor.com/GNUToolchain/

    or https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription?@template=lite

    Get correct version of the arm-none-linux-gnueabi toolchain (i.e. targetting GNU/Linux rather than EABI).

  2. untar it

    tar xvf arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
    
  3. open bashrc

    vi .bashrc
    

    at the end add below comand

    export PATH=$PATH:{path to toolchain}arm-2013.05/bin
    

    e.g export PATH=$PATH:/home/vinay/under_linux/arm-2013.05/bin

    save it and quit the terminal.

then you can cross-compile without everytime export.

Also take of correct toolchain there are two toolchain available choose according to your requirement.

Cross compile error "arm-none-eabi-g++ cannot find entry symbol"




回答2:


The Ubuntu package names are gcc-arm-linux-gnueabi/gcc-arm-linux-gnueabihf.

For building the kernel, which one you use does not make much difference. For building anything else, "gnueabihf" is the hard-float version. For any modern ARM processor (this statement excludes the Raspberry PI), this is the one you would want.



来源:https://stackoverflow.com/questions/22266586/advice-regarding-installing-arm-toolchain-on-ubuntu-vm-64bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!