LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-25-2011, 09:01 PM   #1
unimous
LQ Newbie
 
Registered: Mar 2011
Location: Anhui Normal University
Distribution: Ubuntu
Posts: 18
Blog Entries: 1

Rep: Reputation: 0
Unhappy Where can I download arm-linux-* toolchain ?


I wander where to download arm-linux-* toolchain?

I have found two website:

[1].http://www.arm.linux.org.uk/, but the toolchain is too old.

[2].http://www.gnuarm.com/, but the toolchian's name is arm-elf-*, not arm-linux-*, are they the same?

Is there an official organization who maintain the cross toolchain, and who is he?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-25-2011, 09:16 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
It looks like http://www.gnuarm.com/ should be it.
 
Old 03-26-2011, 04:16 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The only recommended tool chain is "crosstool-ng"

Other tools are poorly maintained or not maintained at all.

http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool

http://ymorin.is-a-geek.org/download...1.10.0.tar.bz2
 
2 members found this post helpful.
Old 03-26-2011, 04:17 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by knudfl View Post
The only recommended tool chain is "crosstool-ng"

Other tools are poorly maintained or not maintained at all.

http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool

http://ymorin.is-a-geek.org/download...1.10.0.tar.bz2
Ooo, thanks for that. I didn't come across that one.
 
Old 03-27-2011, 11:21 PM   #5
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
If you are using Ubuntu, the easiest way is probably to install the Linaro ARM cross-compiler

https://wiki.linaro.org/Resources/ToolchainInstall
 
Old 03-29-2011, 01:00 PM   #6
PoleStar
Member
 
Registered: Jul 2010
Posts: 231

Rep: Reputation: 2
I use fedora, they have a "cross" repository. After adding that you can have all this

Code:
[co@localhost ~]$ armv5tel-redhat-linux-gnueabi-
armv5tel-redhat-linux-gnueabi-addr2line  armv5tel-redhat-linux-gnueabi-gcc        armv5tel-redhat-linux-gnueabi-objcopy
armv5tel-redhat-linux-gnueabi-ar         armv5tel-redhat-linux-gnueabi-gcov       armv5tel-redhat-linux-gnueabi-objdump
armv5tel-redhat-linux-gnueabi-as         armv5tel-redhat-linux-gnueabi-gdb        armv5tel-redhat-linux-gnueabi-ranlib
armv5tel-redhat-linux-gnueabi-c89        armv5tel-redhat-linux-gnueabi-gdbtui     armv5tel-redhat-linux-gnueabi-readelf
armv5tel-redhat-linux-gnueabi-c99        armv5tel-redhat-linux-gnueabi-gprof      armv5tel-redhat-linux-gnueabi-run
armv5tel-redhat-linux-gnueabi-cc         armv5tel-redhat-linux-gnueabi-gstack     armv5tel-redhat-linux-gnueabi-size
armv5tel-redhat-linux-gnueabi-c++filt    armv5tel-redhat-linux-gnueabi-ld         armv5tel-redhat-linux-gnueabi-strings
armv5tel-redhat-linux-gnueabi-cpp        armv5tel-redhat-linux-gnueabi-nm         armv5tel-redhat-linux-gnueabi-strip
not bad eh?
 
Old 04-05-2011, 05:45 PM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
From my experience, there are so many permutations and combinations of Arm configurations (ABI: old vs new, floating point math: soft vs hardware, endianness, Arm versions/models, etc.), as well as building against various kernel headers, C library, and so on, that it is almost impossible to find a ready-made version that works perfectly with your hardware and OS. Building your own can also be somewhat painful, but Crosstool-NG is as good a tool as you'll find for building a cross toolchain.

--- rod.
 
2 members found this post helpful.
Old 04-07-2013, 04:36 PM   #8
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
I need a toolchain to cross-compile applications for the armv5tel processor used in the SheevaPlug.

Do I really must learn how to build a whole toolchain myself, or is there a binary toolchain already available somewhere?

Thank you.
 
Old 04-07-2013, 06:21 PM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
There is evidently a suitable cross toolchain available from a Ubuntu repository . A little Google searching should turn up a download method.
--- rod.
 
Old 04-08-2013, 06:15 AM   #10
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Thanks. It took a bit more than a little Googling to sort through old/incomplete/vague pages on the subject.

Turns out the toolchain is available here ("Host SW Support Package For Linux"):
http://www.plugcomputer.org/downloads/plug-basic/

However, no documentation is provided to explain what to do with the two directories it contains:
gcc/
rootfsv1.0/

How to go from this to a running "Hello, World!"?

Thank you.
 
Old 04-08-2013, 06:29 AM   #11
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
I am running Debian, but if I search in Synaptic, it turns up plenty of packages related to arm development. If you search for "arm" by "Name", scroll down a bit until you find the gcc packages. Select the appropriate packages and it should pull in the necessary ccp, binutils, etc. You should be able to do the same on Ubuntu.
 
Old 04-08-2013, 07:17 AM   #12
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Thanks.

I tried this on the PC I intend to use to cross-compile applications for the SheevaPlug:
Code:
# apt-cache search arm gcc
cpp-4.6-arm-linux-gnueabi - GNU C preprocessor
cpp-4.6-arm-linux-gnueabihf - GNU C preprocessor
cpp-4.7-arm-linux-gnueabi - GNU C preprocessor
cpp-4.7-arm-linux-gnueabihf - GNU C preprocessor
cpp-arm-linux-gnueabi - The GNU C preprocessor (cpp) for armel architecture
cpp-arm-linux-gnueabihf - The GNU C preprocessor (cpp) for armhf architecture
gcc-4.6-arm-linux-gnueabi - GNU C compiler
gcc-4.6-arm-linux-gnueabi-base - GCC, the GNU Compiler Collection (base package)
gcc-4.6-arm-linux-gnueabihf - GNU C compiler
gcc-4.6-arm-linux-gnueabihf-base - GCC, the GNU Compiler Collection (base package)
gcc-4.6-multilib-arm-linux-gnueabi - GNU C compiler (multilib files)
gcc-4.6-multilib-arm-linux-gnueabihf - GNU C compiler (multilib files)
gcc-4.7-arm-linux-gnueabi - GNU C compiler
gcc-4.7-arm-linux-gnueabi-base - GCC, the GNU Compiler Collection (base package)
gcc-4.7-arm-linux-gnueabihf - GNU C compiler
gcc-4.7-arm-linux-gnueabihf-base - GCC, the GNU Compiler Collection (base package)
gcc-4.7-multilib-arm-linux-gnueabi - GNU C compiler (multilib files)
gcc-4.7-multilib-arm-linux-gnueabihf - GNU C compiler (multilib files)
gcc-arm-linux-gnueabi - The GNU C compiler for armel architecture
gcc-arm-linux-gnueabihf - The GNU C compiler for armhf architecture
gccgo-4.7-arm-linux-gnueabi - GNU Go compiler
gccgo-4.7-arm-linux-gnueabihf - GNU Go compiler
gfortran-arm-linux-gnueabi - The GNU Fortran 95 compiler for armel architecture
gfortran-arm-linux-gnueabihf - The GNU Fortran 95 compiler for armhf architecture
gobjc++-arm-linux-gnueabi - The GNU Objective-C++ compiler for armel architecture
gobjc++-arm-linux-gnueabihf - The GNU Objective-C++ compiler for armhf architecture
gobjc-arm-linux-gnueabi - The GNU Objective-C compiler for armel architecture
gobjc-arm-linux-gnueabihf - The GNU Objective-C compiler for armhf architecture
libgcc1-armel-cross - GCC support library
libgcc1-armhf-cross - GCC support library
libgcc1-dbg-armel-cross - GCC support library (debug symbols)
libgcc1-dbg-armhf-cross - GCC support library (debug symbols)
libhfgcc1-armel-cross - GCC support library (hard float ABI)
libhfgcc1-dbg-armel-cross - GCC support library (debug symbols)
libsfgcc1-armhf-cross - GCC support library (soft float ABI)
libsfgcc1-dbg-armhf-cross - GCC support library (debug symbols)
I have no idea what to install to compile code for the ARMv5TE that the Plug uses.

Wouldn't it be a better idea to use the cross-compiler provided by Marvell instead?
 
Old 04-08-2013, 07:48 AM   #13
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
gcc-4.7-arm-linux-gnueabi looks like the one you want. It's for endian little processors.

According to http://infocenter.arm.com/help/index.../BABJCGCF.html, the processor supports both, but legacy support for big endian. Check out that page, it specifies compiler options you may need to know, even if you use their toolchain.

If you use the file from Marvell, it appears that the gcc.tar.bz2 has the toolchain you're looking for. Extract it, and add the (path)/bin to your PATH. Then use the appropriate directories for include and libs when building.

Last edited by goumba; 04-08-2013 at 07:50 AM.
 
Old 04-08-2013, 08:47 AM   #14
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Thanks. I'd rather use the toolchain provided by Marvell, and install another toolchain if it doesn't work.

I successfully compiled and ran "Hello, World".

Am I correct in understanding that cross-compiling an application basically means:
1. Editing PATH once so the build process knows where to find the toolchain
2. Using the right path in "./configure" so it knows where to find the includes/libraries?

Also, any idea why Marvell also packed a root fs in the toolchain ZIP?

Thank you.
 
Old 04-08-2013, 09:13 AM   #15
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Much of the toolchain requires library files, headers, and sundry other components in order to work. The convention for cross toolchains is to put these in a skeleton filesystem that is part of the toolchain. This is known as 'sysroot'. Sometimes a toolchain gets built with a hardcoded expectation of where the sysroot is installed, and this may not match your requirements. Also, the components of the sysroot should be an exact or very close match to the respective components on the actual target host.
You need to know something about the target host architecture software (libc, libm, etc.) to make sure this is the case. Sadly, there is a very large universe of possible mismatches in the ARM architecture. 'Hello World' may run just fine, but other more complex code may fail in strange ways. This accounts for the plethora of gcc's found in the repository someone posted.
The list of compatibility issues includes (but not limited to):
  • endian-ness - little, big
  • ABI - old, enhanced
  • math - FPU (which), emulated, software
  • ARM architecture - ArmX
  • Standard C lib version
  • Threading model - POSIX, Linuxthreads
Every CPU, and every board implementation has its particular idiosyncrasies, and the toolchain should match these. Vendor-supplied toolchains can be the best way to go, although these aren't always the best either.

Using the toolchain to build packages with the usual 'configure; make; make install' routine can frequently be accomplished by pointing $PATH to the cross toolchain binary directory, as well as providing the correct '--host=xxxxx' toolchain prefix to the configure script.

--- rod.

Last edited by theNbomr; 04-08-2013 at 04:19 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: GNU ARM toolchain embedded development on Linux LXer Syndicated Linux News 0 05-22-2009 06:11 AM
GNU ToolChain for ARM, Linux 2.6.14-2/binutil-2.16/gcc 4.0.2/glibc-2.3.5 kumar_bst Linux - Software 0 01-22-2008 04:59 AM
ARM Toolchain Problem richardji Linux - General 2 08-08-2005 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration