Installing Linaro ARM Cross Toolchain on Ubuntu

You can easily install Linaro arm cross-compiler on Ubuntu 10.04 (Lucid), 10.10 (Maverick) and 11.04 (Natty) as follows:

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

This will install Linaro cross-toolchain version 4.4 on Ubuntu 10.04 and 10.10, and version 4.5 on Ubuntu 11.04.

You can check the installation worked by checking the cross-compiler version

[email protected]:~$ arm-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v –with-pkgversion=’Ubuntu/Linaro 4.4.4-14ubuntu4′ –with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs –enable-languages=c,c++,fortran,objc,obj-c++ –prefix=/usr –program-suffix=-4.4 –enable-shared –enable-multiarch –enable-linker-build-id –with-system-zlib –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.4.5 –libdir=/usr/lib –enable-nls –enable-clocale=gnu –enable-libstdcxx-debug –enable-objc-gc –disable-sjlj-exceptions –with-arch=armv7-a –with-float=softfp –with-fpu=vfpv3-d16 –with-mode=thumb –disable-werror –enable-checking=release –program-prefix=arm-linux-gnueabi- –includedir=/usr/arm-linux-gnueabi/include –build=i686-linux-gnu –host=i686-linux-gnu –target=arm-linux-gnueabi –with-headers=/usr/arm-linux-gnueabi/include –with-libs=/usr/arm-linux-gnueabi/lib
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4)

You can also install the latest version 4.5 (recommended) on Lucid and Maverick:

sudo add-apt-repository ppa:linaro-maintainers/toolchain
sudo apt-get update
sudo apt-get install gcc-4.5-arm-linux-gnueabi

If you are using an ARM platform running Ubuntu 10.10 or higher, you could also use the native GCC compiler.

sudo apt-get install gcc-4.5

Source: https://wiki.linaro.org/Resources/ToolchainInstall

Support CNX Software - Donate via PayPal or become a Patron on Patreon
Advertisements
Subscribe
Notify of
guest
20 Comments
oldest
newest most voted
Smith
9 years ago

thank you for sharing it i was unable to do it from this now i can install linaro arm cross tool chain on ubuntu

vivek yarra
vivek yarra
8 years ago

This is awesome

ITH
ITH
8 years ago

Thank you very much for your post. I’ve been looking around for this for a very long time. This is really awesome!

kalpesh
kalpesh
8 years ago

I am trying to build my u-boot like source code with the above toolchain i.e. “sudo apt-get install gcc-arm-linux-gnueabi” but it is giving me below error, can anybody please help

arm-linux-gnueabi-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x40304350 -I/home/kalpesh/Projects/Hitachi/panda_sdk/x-loader-omap4-L24.9git20100901/include -fno-builtin -ffreestanding -nostdinc -isystem /home/kalpesh/Projects/Hitachi/toolchain/arm_toolchain_linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -mabi=apcs-gnu -c -o cpu/omap4/start.o /home/kalpesh/Projects/Hitachi/panda_sdk/x-loader-omap4-L24.9git20100901/cpu/omap4/start.S
/home/kalpesh/Projects/Hitachi/toolchain/arm_toolchain_linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.1/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
/home/kalpesh/Projects/Hitachi/toolchain/arm_toolchain_linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.1/../../../../arm-linux-gnueabi/bin/as: /lib/libz.so.1: no version information available (required by /home/kalpesh/Projects/Hitachi/toolchain/arm_toolchain_linaro/i686-linux-gnu/arm-linux-gnueabi/lib/libbfd-2.21.53.20110810.so)
make: *** [cpu/omap4/start.o] Error 1

kalpesh
kalpesh
8 years ago

1. Where can I find the linaro arm toolchain precompiled binaries so that I can use them to compile u-boot, linux, applications etc 2. I have checked out the linaro website but they have everything in source code format they do not have precompiled arm toolchain 3. I should be able to download the linaro toolchain in a user specified directory so that I can tar it and freely use on any machine I want eg: I download the linaro toolchain on ubuntu I should be able to tar the toolchain put it on fedora/suse etc and compile my SDK… Read more »

kalpesh
kalpesh
8 years ago

Ok, do you mean to say I have to download and install the linaro arm toolchain on every ubuntu machine I use for development, I dont have the flexibility to download it only once and then use the copy of the downloaded toolchain on other ubuntu machine. Is my understanding correct?

Thanks,
Kalpesh

kalpesh
kalpesh
8 years ago

Thank you very much for the update. Let me know if you have any idea of when will they release the tar package. Also do you have any guide/doc of building/cross-compiling the linaro toolchain

Nishanth
Nishanth
8 years ago

Hi, I have downloaded linaro tool chain by $ sudo apt-get install gcc-arm-linux-gnueabi I wanted to have Eglibc and uClibc for ARM, so that I can compile my application and link against them. So i followed the below steps: Eglibc: i)Downloaded Eglibc 2.15.90. ii)Cross compiled for ARM using the below commands: $ BUILD_CC=gcc CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-cpp AR=arm-linux-gnueabi-ar RANLIB=arm-linux-gnueabi-ranlib /home/user/EGLIBC/eglibc/libc/configure –prefix=/home/user/EGLIBC/eglibc/INSTALL –with-headers=/usr/arm-linux-gnueabi/include –build=i686-linux-gnu –host=arm-linux-gnueabi –enable-kernel=2.6.15–enable-add-ons=libidn,ports,nptl –with-tls –with-__thread $ make $ sudo make install By the above steps got libc.so.6 in the prefix directory. iii)I checked the library by linking against an example application both statically and dynamically.Below is the steps i followed.… Read more »

Rashi
Rashi
6 years ago

Hi
i am doing apt-get install gcc-arm-linux-gnueabi,
but it is giving
Couldn’t find package gcc-arm-linux-gnueabi
Please tell me the solution for it

suriya
suriya
3 years ago

1.i need the steps to download and install gcc-arm-none-eabi-5-4-2016q3.tar.bz2 toolchain on ubuntu
2.how to build and compile a c program on the above gcc toolchain
3.how to execute the program in the toolchain on ubuntu

Advertisements