GNU Toolchain

From Chumby Wiki
Revision as of 20:42, 28 November 2010 by Jose.Torres (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Note: As of Ironforge firmware version 1.7, we have switched to GCC 4.3.2, GLIBC 2.8. For instructions on installing a toolchain compatible with firmware versions <= 1.6, see the GCC 4.1.2b section below.

GCC 4.3.2

ironforge_small.jpg falconwing_small.jpg infocast_small.jpg

  • if you had a previous toolchain installed, rename any existing /usr/arm-linux dir and remove any link named /usr/arm-linux
[ -d /usr/arm-linux ] && sudo mv /usr/arm-linux /usr/arm-linux-4.1.2
[ -L /usr/arm-linux ] && sudo rm -f /usr/arm-linux
  • download the toolchain
mkdir -p ~/dev/toolchain
cd ~/dev/toolchain
wget http://files.chumby.com/toolchain/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 
  • extract and create directory symlink
tar xjvf arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
sudo mv arm-2008q3 /usr
sudo ln -s /usr/arm-2008q3 /usr/arm-linux
  • move any old gcc files out of /usr/bin
cd /usr/bin
sudo mkdir arm-linux-4.1.2
sudo mv arm-linux-[a-z]* arm-linux-4.1.2/
  • set up new symlinks in /usr/arm-linux/bin
cd /usr/arm-linux/bin
for i in *; do sudo ln -s $i `echo $i|awk -F"-" '{print $NF;}'`; done
sudo rm -f 4.3.2
sudo ln -s arm-none-linux-gnueabi-gcc-4.3.2 gcc-4.3.2

You should end up with:

lrwxrwxrwx 1 ken ken      32 2009-01-30 04:40 addr2line -> arm-none-linux-gnueabi-addr2line
lrwxrwxrwx 1 ken ken      25 2009-01-30 04:40 ar -> arm-none-linux-gnueabi-ar
-rwxr-xr-x 1 ken ken  480776 2008-11-18 07:06 arm-none-linux-gnueabi-addr2line
-rwxr-xr-x 2 ken ken  502800 2008-11-18 07:06 arm-none-linux-gnueabi-ar
-rwxr-xr-x 2 ken ken  862456 2008-11-18 07:06 arm-none-linux-gnueabi-as
-rwxr-xr-x 2 ken ken  194440 2008-11-18 07:06 arm-none-linux-gnueabi-c++
-rwxr-xr-x 1 ken ken  479768 2008-11-18 07:06 arm-none-linux-gnueabi-c++filt
-rwxr-xr-x 1 ken ken  193224 2008-11-18 07:06 arm-none-linux-gnueabi-cpp
-rwxr-xr-x 2 ken ken  194440 2008-11-18 07:06 arm-none-linux-gnueabi-g++
-rwxr-xr-x 2 ken ken  192168 2008-11-18 07:06 arm-none-linux-gnueabi-gcc
-rwxr-xr-x 2 ken ken  192168 2008-11-18 07:06 arm-none-linux-gnueabi-gcc-4.3.2
-rwxr-xr-x 1 ken ken   23132 2008-11-18 07:06 arm-none-linux-gnueabi-gcov
-rwxr-xr-x 1 ken ken 2623096 2008-11-18 07:06 arm-none-linux-gnueabi-gdb
-rwxr-xr-x 1 ken ken 2623096 2008-11-18 07:06 arm-none-linux-gnueabi-gdbtui
-rwxr-xr-x 1 ken ken  540828 2008-11-18 07:06 arm-none-linux-gnueabi-gprof
-rwxr-xr-x 2 ken ken  875776 2008-11-18 07:06 arm-none-linux-gnueabi-ld
-rwxr-xr-x 2 ken ken  490760 2008-11-18 07:06 arm-none-linux-gnueabi-nm
-rwxr-xr-x 2 ken ken  628000 2008-11-18 07:06 arm-none-linux-gnueabi-objcopy
-rwxr-xr-x 2 ken ken  753176 2008-11-18 07:06 arm-none-linux-gnueabi-objdump
-rwxr-xr-x 2 ken ken  502800 2008-11-18 07:06 arm-none-linux-gnueabi-ranlib
-rwxr-xr-x 1 ken ken  250408 2008-11-18 07:06 arm-none-linux-gnueabi-readelf
-rwxr-xr-x 1 ken ken  482556 2008-11-18 07:06 arm-none-linux-gnueabi-size
-rwxr-xr-x 1 ken ken  302584 2008-11-18 07:06 arm-none-linux-gnueabi-sprite
-rwxr-xr-x 1 ken ken  482056 2008-11-18 07:06 arm-none-linux-gnueabi-strings
-rwxr-xr-x 2 ken ken  628000 2008-11-18 07:06 arm-none-linux-gnueabi-strip
lrwxrwxrwx 1 ken ken      25 2009-01-30 04:40 as -> arm-none-linux-gnueabi-as
lrwxrwxrwx 1 ken ken      26 2009-01-30 04:40 c++ -> arm-none-linux-gnueabi-c++
lrwxrwxrwx 1 ken ken      30 2009-01-30 04:40 c++filt -> arm-none-linux-gnueabi-c++filt
lrwxrwxrwx 1 ken ken      26 2009-01-30 04:40 cpp -> arm-none-linux-gnueabi-cpp
lrwxrwxrwx 1 ken ken      26 2009-01-30 04:40 g++ -> arm-none-linux-gnueabi-g++
lrwxrwxrwx 1 ken ken      26 2009-01-30 04:40 gcc -> arm-none-linux-gnueabi-gcc
lrwxrwxrwx 1 hen hen      32 2009-02-10 18:19 gcc-4.3.2 -> arm-none-linux-gnueabi-gcc-4.3.2
lrwxrwxrwx 1 ken ken      27 2009-01-30 04:40 gcov -> arm-none-linux-gnueabi-gcov
lrwxrwxrwx 1 ken ken      26 2009-01-30 04:40 gdb -> arm-none-linux-gnueabi-gdb
lrwxrwxrwx 1 ken ken      29 2009-01-30 04:40 gdbtui -> arm-none-linux-gnueabi-gdbtui
lrwxrwxrwx 1 ken ken      28 2009-01-30 04:40 gprof -> arm-none-linux-gnueabi-gprof
lrwxrwxrwx 1 ken ken      25 2009-01-30 04:40 ld -> arm-none-linux-gnueabi-ld
lrwxrwxrwx 1 ken ken      25 2009-01-30 04:40 nm -> arm-none-linux-gnueabi-nm
lrwxrwxrwx 1 ken ken      30 2009-01-30 04:40 objcopy -> arm-none-linux-gnueabi-objcopy
lrwxrwxrwx 1 ken ken      30 2009-01-30 04:40 objdump -> arm-none-linux-gnueabi-objdump
lrwxrwxrwx 1 ken ken      29 2009-01-30 04:40 ranlib -> arm-none-linux-gnueabi-ranlib
lrwxrwxrwx 1 ken ken      30 2009-01-30 04:40 readelf -> arm-none-linux-gnueabi-readelf
lrwxrwxrwx 1 ken ken      27 2009-01-30 04:40 size -> arm-none-linux-gnueabi-size
lrwxrwxrwx 1 ken ken      29 2009-01-30 04:40 sprite -> arm-none-linux-gnueabi-sprite
lrwxrwxrwx 1 ken ken      30 2009-01-30 04:40 strings -> arm-none-linux-gnueabi-strings
lrwxrwxrwx 1 ken ken      28 2009-01-30 04:40 strip -> arm-none-linux-gnueabi-strip
  • set up new symlinks in /usr/bin
for i in `ls /usr/arm-2008q3/bin/arm-none-linux-gnueabi-*`; do name=`echo $i|awk -F"-" {'print $NF'}`; sudo ln -s $i /usr/bin/arm-linux-$name; done
sudo rm /usr/bin/arm-linux-4.3.2
sudo ln -s /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gcc-4.3.2 /usr/bin/arm-linux-gcc-4.3.2

You should end up with:

ken@chumby-dev-ubuntu:~$ ls -l /usr/bin/arm*
lrwxrwxrwx 1 root root   52 2009-01-23 01:04 /usr/bin/arm-linux-addr2line -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-addr2line
lrwxrwxrwx 1 root root   45 2009-01-23 01:04 /usr/bin/arm-linux-ar -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-ar
lrwxrwxrwx 1 root root   45 2009-01-23 01:04 /usr/bin/arm-linux-as -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-as
lrwxrwxrwx 1 root root   46 2009-01-23 01:04 /usr/bin/arm-linux-c++ -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-c++
lrwxrwxrwx 1 root root   50 2009-01-23 01:04 /usr/bin/arm-linux-c++filt -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-c++filt
lrwxrwxrwx 1 root root   46 2009-01-23 01:04 /usr/bin/arm-linux-cpp -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-cpp
lrwxrwxrwx 1 root root   46 2009-01-23 01:04 /usr/bin/arm-linux-g++ -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-g++
lrwxrwxrwx 1 root root   46 2009-01-23 01:04 /usr/bin/arm-linux-gcc -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gcc
lrwxrwxrwx 1 root root   52 2009-02-10 18:24 /usr/bin/arm-linux-gcc-4.3.2 -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gcc-4.3.2
lrwxrwxrwx 1 root root   47 2009-01-23 01:04 /usr/bin/arm-linux-gcov -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gcov
lrwxrwxrwx 1 root root   46 2009-01-23 01:04 /usr/bin/arm-linux-gdb -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gdb
lrwxrwxrwx 1 root root   49 2009-01-23 01:04 /usr/bin/arm-linux-gdbtui -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gdbtui
lrwxrwxrwx 1 root root   48 2009-01-23 01:04 /usr/bin/arm-linux-gprof -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-gprof
lrwxrwxrwx 1 root root   45 2009-01-23 01:04 /usr/bin/arm-linux-ld -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-ld
lrwxrwxrwx 1 root root   45 2009-01-23 01:04 /usr/bin/arm-linux-nm -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-nm
lrwxrwxrwx 1 root root   50 2009-01-23 01:04 /usr/bin/arm-linux-objcopy -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-objcopy
lrwxrwxrwx 1 root root   50 2009-01-23 01:04 /usr/bin/arm-linux-objdump -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-objdump
lrwxrwxrwx 1 root root   49 2009-01-23 01:04 /usr/bin/arm-linux-ranlib -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-ranlib
lrwxrwxrwx 1 root root   50 2009-01-23 01:04 /usr/bin/arm-linux-readelf -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-readelf
lrwxrwxrwx 1 root root   47 2009-01-23 01:04 /usr/bin/arm-linux-size -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-size
lrwxrwxrwx 1 root root   49 2009-01-23 01:04 /usr/bin/arm-linux-sprite -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-sprite
lrwxrwxrwx 1 root root   50 2009-01-23 01:04 /usr/bin/arm-linux-strings -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-strings
lrwxrwxrwx 1 root root   48 2009-01-23 01:04 /usr/bin/arm-linux-strip -> /usr/arm-2008q3/bin/arm-none-linux-gnueabi-strip

GCC 4.1.2b

ironforge_small.jpg

NOTE: This section is for the installation of the GNU toolchain for Ironforge production chumbys <= software version 1.6. For Foo/Katamari chumbys, see GCC Toolchain.

This installation assumes you're running a relatively recent version of Linux on an x86-based computer or virtual machine

  • Download the archive to /
cd /
sudo wget http://files.chumby.com/toolchain/arm-linux-v4.1.2b.tar.gz
  • Unpack:
sudo tar zxvf arm-linux-v4.1.2b.tar.gz

The source code for the toolchain and libraries can be found here.