Advice Regarding Installing Arm Toolchain on Ubuntu Vm (64Bit)

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

  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"

build kernel with aarch64-linux-gnu-gcc

looks like a PATH issue. what happens when you just type "aarch64-linux-gnu-gcc "in your shell? does it find the compiler?

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

You downloaded the wrong toolchain.

arm-linux-gnueabi-g++ is built using arm-none-eabi, which is used for bare metal programs. This does not contain libc i.e the standard libraries (glibc or eglibc) are not present in this toolchain.

So, you need to download the arm-none-linux-gnueabi toolchain (i.e arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2, not arm-2013.11-24-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
).

To verify the above, type:

cd /home/kang/Utils/arm-2013.05/arm-none-eabi 

Here you will find only bin include lib share, and no libc directory.

Download arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2; here you'll find a folder arm-2013.05/arm-none-linux-gnueabi/libc.

You can also verify by writing:

arm-linux-eabi-g++ -print-sysroot and 
arm-none-linux-gnueabi-g++ -print-sysroot

Also refer to this previous question: how to work with external libraries when cross compiling?

How to Compile 32-bit Apps on 64-bit Ubuntu?

To get Ubuntu Server 12.04 LTS 64-bit to compile gcc 4.8 32-bit programs, you'll need to do two things.

  1. Make sure all the 32-bit gcc 4.8 development tools are completely installed:

    sudo apt-get install lib32gcc-4.8-dev

  2. Compile programs using the -m32 flag

    gcc pgm.c -m32 -o pgm

How to fix GLIBC version mismatch between target and build machine?

how do I fix this?

You need to install EGLIBC-2.13 on the build host and configure your cross-compiler to use it (obviously it's currently using GLIBC-2.17 or later).

Since you provided no details about the origin of your cross-compiler or the build setup, you can't expect someone to be able to tell you exactly what's wrong with your current setup.



Related Topics



Leave a reply



Submit