Question

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.

Was it helpful?

Solution 2

  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"

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top