NSLU2-Linux
view · edit · print · history

HowTo.CompileCrossTool History

Hide minor edits - Show changes to markup

May 29, 2005, at 11:31 AM by rwhitby --
Changed lines 1-2 from:

Note that the Unslung packages build system now builds its own toolchain, so the following information is no longer required, and can be considered as purely historical information.

to:

Note that the Unslung packages build system now builds its own toolchain, so the following information is no longer required, and can be considered as purely historical information.

January 19, 2005, at 02:43 PM by rwhitby --
Added lines 1-2:

Note that the Unslung packages build system now builds its own toolchain, so the following information is no longer required, and can be considered as purely historical information.

January 18, 2005, at 12:12 PM by schinckel --
Changed line 58 from:

eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` LINUX_DIR=linux-2.4.22 sh all.sh --notest

to:

eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` =]LINUX_DIR=linux-2.4.22[= sh all.sh --notest

Deleted lines 78-80:

I needed to remove the %red% and %% from the eval line to get it to work on MacOSX? 10.3 By get it to work, I mean start to work...

January 18, 2005, at 12:05 PM by schinckel --
Added lines 79-81:

I needed to remove the %red% and %% from the eval line to get it to work on MacOSX? 10.3 By get it to work, I mean start to work...

January 06, 2005, at 08:53 PM by Lex Delani --
Changed line 37 from:

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, cut and pasted from your shell window), and the error messages (again, cut and pasted from your shell window). Also tell us what version of GCC you are using to compile crosstool.

to:

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, copy and paste from your shell window or bash_history), and the error messages (again, copy and paste from your shell window). Also tell us what version of GCC you are using to compile crosstool.

Changed lines 43-49 from:
 #!/bin/sh
 set -ex
 TARBALLS_DIR=$HOME/downloads
 RESULT_TOP=/opt/crosstool
 export TARBALLS_DIR RESULT_TOP
 GCC_LANGUAGES="c,c++"
 export GCC_LANGUAGES
to:
 [=
  1. !/bin/sh

set -ex TARBALLS_DIR=$HOME/downloads RESULT_TOP=/opt/crosstool export TARBALLS_DIR RESULT_TOP GCC_LANGUAGES="c,c++" export GCC_LANGUAGES

Changed lines 52-54 from:
 # Really, you should do the mkdir before running this,
 # and chown /opt/crosstool to yourself so you don't need to run as root.
 mkdir -p $RESULT_TOP
to:
  1. Really, you should do the mkdir before running this,
  2. and chown /opt/crosstool to yourself so you don't need to run as root.

mkdir -p $RESULT_TOP

Changed line 56 from:
 # Build the toolchain. Takes a couple hours and a couple gigabytes.
to:
  1. Build the toolchain. Takes a couple hours and a couple gigabytes.
Changed line 58 from:
 eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` LINUX_DIR=linux-2.4.22 sh all.sh --notest
to:

eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` LINUX_DIR=linux-2.4.22 sh all.sh --notest

Changed lines 60-61 from:
 echo Done.
to:

echo Done. =]

January 02, 2005, at 02:42 AM by tjyang --
Deleted lines 72-101:

27 Dec 2004:
Built ok on Red Hat AS 3.01 U1.
Thanks for the demo-nslu2.sh script.
Enclosed log is the partial log to show the result.

table border=0 width=100% bgcolor=#eeeeff? cell? [tjyang@dual crosstool-0.28-rc37]$ ./demo-nslu2.sh
<snip>
+/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -static hello.c -o armv5b-softfloat-linux-hello-static
+/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc hello.c -o armv5b-softfloat-linux-hello
+ test -x \\/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ + cat
+ /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ -static hello2.cc -o armv5b-softfloat-linux-hello2-static
+ /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ hello2.cc -o armv5b-softfloat-linux-hello2
+ echo testhello: C compiler can in fact build a trivial program.
testhello: C compiler can in fact build a trivial program.
+ test = 1
+ test
= 1
+ test 1 =
+ test
= 1
+ echo Done.
Done.
[tjyang@dual crosstool-0.28-rc37]$ uname -a
Linux dual 2.4.21-9.ELsmp? #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux
[tjyang@dual crosstool-0.28-rc37]$ more /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 1)
[tjyang@dual crosstool-0.28-rc37]$ tableend?

December 29, 2004, at 06:54 PM by bobtm --
Changed line 3 from:

Note that crosstool-0.28-rc35 uses kernel 2.4.26 headers, whereas crosstool-0.28-rc35 uses kernel 2.6.8 headers. Neither of these match the kernel that unslung uses, which is 2.4.22. This can cause compilation problems for some Unslung packages, and may also cause run-time problems.

to:

Note that crosstool-0.28-rc35 uses kernel 2.4.26 headers, whereas crosstool-0.28-rc37 uses kernel 2.6.8 headers. Neither of these match the kernel that unslung uses, which is 2.4.22. This can cause compilation problems for some Unslung packages, and may also cause run-time problems.

December 28, 2004, at 12:59 PM by tjyang --
Changed line 74 from:

Built ok on RedHat? AS 3.01 U1. \\

to:

Built ok on Red Hat AS 3.01 U1. \\

Changed line 76 from:

Enclosed is the partial log to show the result.

to:

Enclosed log is the partial log to show the result.

December 28, 2004, at 02:29 AM by tjyang --
Changed lines 76-77 from:

Enclosed is the partial log to show the result.\\

to:

Enclosed is the partial log to show the result.

December 28, 2004, at 02:28 AM by tjyang --
Changed lines 74-76 from:

Built ok on RedHat? AS 3.01 U1. Thanks for the demo-nslu2.sh script.

to:

Built ok on RedHat? AS 3.01 U1.
Thanks for the demo-nslu2.sh script.
Enclosed is the partial log to show the result.\\

Changed lines 79-80 from:

[tjyang@dual crosstool-0.28-rc37]$ ./demo-nslu2.sh

to:

[tjyang@dual crosstool-0.28-rc37]$ ./demo-nslu2.sh \\

Changed line 81 from:

+/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -static hello.c -o armv5b-softfloat-linux-hello-static

to:

+/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -static hello.c -o armv5b-softfloat-linux-hello-static \\

Changed line 83 from:

+ test -x \\/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++

to:

+ test -x \\/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++

Changed line 100 from:

[tjyang@dual crosstool-0.28-rc37]$ \\

to:

[tjyang@dual crosstool-0.28-rc37]$

December 28, 2004, at 02:26 AM by tjyang --
Changed lines 95-102 from:

[tjyang@dual crosstool-0.28-rc37]$ uname -a

Linux dual 2.4.21-9.ELsmp? #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux [tjyang@dual crosstool-0.28-rc37]$ more /etc/redhat-release

Red Hat Enterprise Linux AS release 3 (Taroon Update 1)

[tjyang@dual crosstool-0.28-rc37]$

to:

[tjyang@dual crosstool-0.28-rc37]$ uname -a
Linux dual 2.4.21-9.ELsmp? #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux
[tjyang@dual crosstool-0.28-rc37]$ more /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 1)
[tjyang@dual crosstool-0.28-rc37]$ \\

December 28, 2004, at 02:24 AM by tjyang --
Changed lines 79-93 from:

<snip> + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -static hello.c -o armv5b-softfloat-linux-hello-static + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc hello.c -o armv5b-softfloat-linux-hello + test -x /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ + cat + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ -static hello2.cc -o armv5b-softfloat-linux-hello2-static + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ hello2.cc -o armv5b-softfloat-linux-hello2 + echo testhello: C compiler can in fact build a trivial program. testhello: C compiler can in fact build a trivial program. + test '' = 1 + test '' = 1 + test 1 = '' + test '' = 1 + echo Done. Done.

to:

<snip>
+/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -static hello.c -o armv5b-softfloat-linux-hello-static +/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc hello.c -o armv5b-softfloat-linux-hello
+ test -x \\/opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ + cat
+ /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ -static hello2.cc -o armv5b-softfloat-linux-hello2-static
+ /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ hello2.cc -o armv5b-softfloat-linux-hello2
+ echo testhello: C compiler can in fact build a trivial program.
testhello: C compiler can in fact build a trivial program.
+ test = 1
+ test
= 1
+ test 1 =
+ test
= 1
+ echo Done.
Done. \\

December 28, 2004, at 02:22 AM by tjyang --
Added line 78:
December 28, 2004, at 02:21 AM by tjyang --
Added line 93:
Added line 95:
Added line 98:
Added line 100:
December 27, 2004, at 10:29 PM by tjyang --
Changed lines 75-76 from:
to:
Changed line 98 from:
to:
December 27, 2004, at 09:58 PM by tjyang --
Added lines 73-97:

27 Dec 2004:
Built ok on RedHat? AS 3.01 U1. Thanks for the demo-nslu2.sh script.

[tjyang@dual crosstool-0.28-rc37]$ ./demo-nslu2.sh <snip> + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -static hello.c -o armv5b-softfloat-linux-hello-static + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc hello.c -o armv5b-softfloat-linux-hello + test -x /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ + cat + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ -static hello2.cc -o armv5b-softfloat-linux-hello2-static + /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ hello2.cc -o armv5b-softfloat-linux-hello2 + echo testhello: C compiler can in fact build a trivial program. testhello: C compiler can in fact build a trivial program. + test '' = 1 + test '' = 1 + test 1 = '' + test '' = 1 + echo Done. Done. [tjyang@dual crosstool-0.28-rc37]$ uname -a Linux dual 2.4.21-9.ELsmp? #1 SMP Thu Jan 8 17:08:56 EST 2004 i686 i686 i386 GNU/Linux [tjyang@dual crosstool-0.28-rc37]$ more /etc/redhat-release Red Hat Enterprise Linux AS release 3 (Taroon Update 1) [tjyang@dual crosstool-0.28-rc37]$

December 11, 2004, at 11:22 AM by peteru --
Changed lines 3-5 from:

Note that crosstool-0.28-rc37 switches from using kernel 2.4.26 headers to using kernel 2.6.8 headers. This can cause compilation problems for some Unslung packages, and may also cause run-time problems (as the Unslung kernel is a 2.4 kernel). So if you do want to use a later version of crosstool (later than crosstool-0.28-rc35), then make sure you edit the gcc-3.3.4-glibc-2.2.5.dat file to specify 2.4.26 kernel headers.

to:

Note that crosstool-0.28-rc35 uses kernel 2.4.26 headers, whereas crosstool-0.28-rc35 uses kernel 2.6.8 headers. Neither of these match the kernel that unslung uses, which is 2.4.22. This can cause compilation problems for some Unslung packages, and may also cause run-time problems.

If you have built crosstool according to the instructions previously published here, you may wish to rebuild using the updated instructions - these will explicitly request kernel headers that match what is used by the unslung firmware.

Added lines 41-42:
Changed line 57 from:
 eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` sh all.sh --notest
to:
 eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` LINUX_DIR=linux-2.4.22 sh all.sh --notest
Added line 60:
Deleted lines 63-64:

Note that crosstool-0.28-rc37 switches from using kernel 2.4.26 headers to using kernel 2.6.8 headers. This can cause compilation problems for some Unslung packages, and may also cause run-time problems (as the Unslung kernel is a 2.4 kernel). So if you do want to use a later version of crosstool (after 0.28-rc35), then make sure you edit the gcc-3.3.4-glibc-2.2.5.dat file to specify 2.4.26 kernel headers.

December 10, 2004, at 01:31 PM by rwhitby --
Added lines 3-4:

Note that crosstool-0.28-rc37 switches from using kernel 2.4.26 headers to using kernel 2.6.8 headers. This can cause compilation problems for some Unslung packages, and may also cause run-time problems (as the Unslung kernel is a 2.4 kernel). So if you do want to use a later version of crosstool (later than crosstool-0.28-rc35), then make sure you edit the gcc-3.3.4-glibc-2.2.5.dat file to specify 2.4.26 kernel headers.

December 10, 2004, at 01:30 PM by rwhitby --
Added lines 58-59:

Note that crosstool-0.28-rc37 switches from using kernel 2.4.26 headers to using kernel 2.6.8 headers. This can cause compilation problems for some Unslung packages, and may also cause run-time problems (as the Unslung kernel is a 2.4 kernel). So if you do want to use a later version of crosstool (after 0.28-rc35), then make sure you edit the gcc-3.3.4-glibc-2.2.5.dat file to specify 2.4.26 kernel headers.

December 06, 2004, at 09:41 PM by Christopher Blunck --
Changed lines 58-65 from:

No problems with crosstool-0.28-rc37 using RHL 9.0 or Gentoo (~x86 as at 20 Oct 2004)

to:

20 Oct 2004:
No problems with crosstool-0.28-rc37 using RHL 9.0 or Gentoo x86

06 Dec 2004:
No Problems with crosstool-0.28-rc35 using Gentoo 2004.3 amd64:
Linux night 2.6.9-gentoo-r6 #9 Sat Dec 4 18:09:48 EST 2004 x86_64 AMD Athlon(tm) 64 Processor 3400+ AuthenticAMD? GNU/Linux

November 15, 2004, at 01:33 PM by tman --
Changed line 15 from:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). (OS-X users see the HowTo.CompileCrossToolOnOSX for instructions on setting up some prerequisites then procede as below.)

to:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of GCC that I used was: "gcc (GCC) 3.3.4 (Debian 1:3.3.4-3)". (Mac OS-X users see the HowTo.CompileCrossToolOnOSX for instructions on setting up some prerequisites then proceed as below.)

November 15, 2004, at 07:31 AM by seadevil --
Changed lines 15-16 from:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). (OS-X users see the HowTo.CompileCrossToolOnOSX for instructions on setting up some prerequisites then procede as below.)

to:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). (OS-X users see the HowTo.CompileCrossToolOnOSX for instructions on setting up some prerequisites then procede as below.)

November 15, 2004, at 07:31 AM by seadevil --
Changed lines 15-16 from:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). Don't ask about how to do it on a Mac OS-X box, because I can't help you. Hopefully someone else will work that out and post a how-to like this one.

to:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). (OS-X users see the HowTo.CompileCrossToolOnOSX for instructions on setting up some prerequisites then procede as below.)

October 23, 2004, at 12:14 AM by peteru --
Changed line 58 from:

No problems with crosstool-0.28-rc37 using RHL 9.0

to:

No problems with crosstool-0.28-rc37 using RHL 9.0 or Gentoo (~x86 as at 20 Oct 2004)

October 21, 2004, at 05:55 AM by rwhitby --
Changed line 7 from:

Also, before you start, make sure you are using a new version of GCC on your build machine. GCC 2.95 is not a new version :-)

to:

Also, before you start, make sure you are using a recent stable version of GCC on your build machine. GCC 2.95 is not a recent version :-)

Changed line 33 from:

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, cut and pasted from your shell window), and the error messages (again, cut and pasted from your shell window).

to:

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, cut and pasted from your shell window), and the error messages (again, cut and pasted from your shell window). Also tell us what version of GCC you are using to compile crosstool.

October 21, 2004, at 05:54 AM by rwhitby --
Added lines 7-8:

Also, before you start, make sure you are using a new version of GCC on your build machine. GCC 2.95 is not a new version :-)

October 21, 2004, at 05:21 AM by peteru --
Added lines 58-59:

http://kegel.com/crosstool/crosstool-0.28-rc37/buildlogs/0.28 has a compatibility matrix for crosstool.

October 19, 2004, at 12:34 AM by tman --
Changed line 5 from:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.

to:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.

Changed lines 9-10 from:

1/ Grab a Linux box (I used Debian 3.1 "testing" on an Intel architecture). Make sure you have bzip2 installed.

to:
  1. Grab a Linux box (I used Debian 3.1 "testing" on an Intel architecture).

    Make sure you have bzip2 installed.

    Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). Don't ask about how to do it on a Mac OS-X box, because I can't help you. Hopefully someone else will work that out and post a how-to like this one.
Changed lines 15-20 from:

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). Don't ask about how to do it on a Mac OS-X box, because I can't help you. Hopefully someone else will work that out and post a how-to like this one.

to:
  1. Download crosstool-0.28-rc35 from:

    http://kegel.com/crosstool/crosstool-0.28-rc35.tar.gz
  2. Untar that - it will create a crosstool-0.28-rc35 directory.
Changed lines 21-23 from:

2/ Download crosstool-0.28-rc35 from:

to:
  1. Copy the demo-nslu2.sh file from the end of this page and put it in that directory.

    This file assumes that you have write access to /opt/crosstool (this is where your resulting toolchain will end up) and $HOME/downloads (this is where all the downloads will be stored). If you don't, then change the paths to suit. Do *not* change any of the tool version numbers in this file. Don't even be tempted ...
Changed line 25 from:

http://kegel.com/crosstool/crosstool-0.28-rc35.tar.gz

to:
  1. Change directory into the crosstool-0.28-rc35 directory.
Changed line 27 from:

3/ Untar that - it will create a crosstool-0.28-rc35 directory.

to:
  1. Type sh demo-nslu2.sh and wait for a long time (yes it could be hours).
Changed line 29 from:

4/ Copy the demo-nslu2.sh file from the end of this page and put it in that directory.

to:
  1. Add the /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin directory to your PATH. Verify that you can run armv5b-softfloat-linux-gcc --version.
Changed lines 31-51 from:

This file assumes that you have write access to /opt/crosstool (this is where your resulting toolchain will end up) and $HOME/downloads (this is where all the downloads will be stored). If you don't, then change the paths to suit. Do *not* change any of the tool version numbers in this file. Don't even be tempted ...

5/ Change directory into the crosstool-0.28-rc35 directory.

6/ Type "sh demo-nslu2.sh" and wait for a long time (yes it could be hours).

7/ Add the /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin directory to your PATH. Verify that you can run "armv5b-softfloat-linux-gcc --version".

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs? and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, cut and pasted from your shell window), and the error messages (again, cut and pasted from your shell window).

to:

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, cut and pasted from your shell window), and the error messages (again, cut and pasted from your shell window).

October 18, 2004, at 06:50 PM by snhenson --
Added line 72:

No problems with crosstool-0.28-rc37 using RHL 9.0

October 16, 2004, at 04:18 PM by kaste --
Changed lines 9-10 from:

1/ Grab a Linux box (I used Debian 3.1 "testing" on an Intel architecture)

to:

1/ Grab a Linux box (I used Debian 3.1 "testing" on an Intel architecture). Make sure you have bzip2 installed.

September 19, 2004, at 09:49 PM by rwhitby --
Deleted lines 21-30:

You need to use crosstool version 0.28-rc35 (not rc34, and not rc36, and not any other version either). You're on your own if you decide to ignore this advice. Other versions probably will work (with some patching), but no-one has posted a how-to for a different version, so why waste your time? Of course, if you are the person who is knowledgeable enough to get a newer version to work without bugging any other people who are happily using 0.28-rc35, then please do so and post your how-to here so that we can *all* upgrade to the new version *together*.

Changed line 24 from:

4/ Detach the demo-nslu2.sh file from this message and put it in that directory.

to:

4/ Copy the demo-nslu2.sh file from the end of this page and put it in that directory.

September 19, 2004, at 09:48 PM by rwhitby --
Changed line 1 from:

For NSLU2 Linux development, we are currently using crosstool-0.28-rc32.

to:

For NSLU2 Linux development, we are currently using crosstool-0.28-rc35.

Changed line 18 from:

2/ Download crosstool-0.28-rc32 from:

to:

2/ Download crosstool-0.28-rc35 from:

Changed line 20 from:

http://kegel.com/crosstool/crosstool-0.28-rc32.tar.gz

to:

http://kegel.com/crosstool/crosstool-0.28-rc35.tar.gz

Changed line 22 from:

You need to use crosstool version 0.28-rc32 (not rc34, and not rc35,

to:

You need to use crosstool version 0.28-rc35 (not rc34, and not rc36,

Changed line 28 from:

any other people who are happily using 0.28-rc32, then please do so

to:

any other people who are happily using 0.28-rc35, then please do so

Changed line 32 from:

3/ Untar that - it will create a crosstool-0.28-rc32 directory.

to:

3/ Untar that - it will create a crosstool-0.28-rc35 directory.

Changed line 42 from:

5/ Download the required patch from:

to:

5/ Change directory into the crosstool-0.28-rc35 directory.

Changed line 44 from:

http://www.knowledgemessaging.com/nslu2/gcc-3.3.2-arm-softfloat.patch

to:

6/ Type "sh demo-nslu2.sh" and wait for a long time (yes it could be hours).

Changed lines 46-55 from:

6/ Put the patch in the patches/gcc-3.3.3 directory (yes, I know the patch says 3.3.2 - put it in the 3.3.3 directory anyway). Don't try and apply it manually or anything like that - just put it there and leave it alone.

7/ Change directory into the crosstool-0.28-rc32 directory.

8/ Type "sh demo-nslu2.sh" and wait for a long time (yes it could be hours).

9/ Add the /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.3-glibc-2.2.5/bin

to:

7/ Add the /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.4-glibc-2.2.5/bin

Deleted lines 49-55:

This process was worked out by Benoit on Aug 17 (http://groups.yahoo.com/group/nslu2-linux/message/422), and has been followed successfully by at least 10 different people since then. So if you have problems, it's not because of crosstool or the patch (and no, you shouldn't try a different version if you can't get this version to work). Look to your own actions first.

Deleted lines 59-61:

[Did I mention that you have to use crosstool version 0.28-rc32? I did? Good.]

Changed line 74 from:
 eval `cat armv5b-softfloat.dat gcc-3.3.3-glibc-2.2.5.dat` sh all.sh --notest
to:
 eval `cat armv5b-softfloat.dat gcc-3.3.4-glibc-2.2.5.dat` sh all.sh --notest
September 16, 2004, at 07:58 AM by dyoung --
Changed lines 79-95 from:
  1. !/bin/sh

set -ex TARBALLS_DIR=$HOME/downloads RESULT_TOP=/opt/crosstool export TARBALLS_DIR RESULT_TOP GCC_LANGUAGES="c,c++" export GCC_LANGUAGES

  1. Really, you should do the mkdir before running this,
  2. and chown /opt/crosstool to yourself so you don't need to run as root.

mkdir -p $RESULT_TOP

  1. Build the toolchain. Takes a couple hours and a couple gigabytes.

eval `cat armv5b-softfloat.dat gcc-3.3.3-glibc-2.2.5.dat` sh all.sh --notest

echo Done.

to:
 #!/bin/sh
 set -ex
 TARBALLS_DIR=$HOME/downloads
 RESULT_TOP=/opt/crosstool
 export TARBALLS_DIR RESULT_TOP
 GCC_LANGUAGES="c,c++"
 export GCC_LANGUAGES

 # Really, you should do the mkdir before running this,
 # and chown /opt/crosstool to yourself so you don't need to run as root.
 mkdir -p $RESULT_TOP

 # Build the toolchain. Takes a couple hours and a couple gigabytes.

 eval `cat armv5b-softfloat.dat gcc-3.3.3-glibc-2.2.5.dat` sh all.sh --notest

 echo Done.
September 14, 2004, at 10:20 PM by ka6sox --
Changed lines 5-96 from:

http://groups.yahoo.com/group/nslu2-linux/message/1136

to:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.


1/ Grab a Linux box (I used Debian 3.1 "testing" on an Intel architecture)

Other architectures and versions of Linux may well work. If you get errors, then start again on an i386 Debian 3.1 box. In particular the version of gcc that I used was: gcc (GCC) 3.3.4 (Debian 1:3.3.4-3). Don't ask about how to do it on a Mac OS-X box, because I can't help you. Hopefully someone else will work that out and post a how-to like this one.

2/ Download crosstool-0.28-rc32 from:

http://kegel.com/crosstool/crosstool-0.28-rc32.tar.gz

You need to use crosstool version 0.28-rc32 (not rc34, and not rc35, and not any other version either). You're on your own if you decide to ignore this advice. Other versions probably will work (with some patching), but no-one has posted a how-to for a different version, so why waste your time? Of course, if you are the person who is knowledgeable enough to get a newer version to work without bugging any other people who are happily using 0.28-rc32, then please do so and post your how-to here so that we can *all* upgrade to the new version *together*.

3/ Untar that - it will create a crosstool-0.28-rc32 directory.

4/ Detach the demo-nslu2.sh file from this message and put it in that directory.

This file assumes that you have write access to /opt/crosstool (this is where your resulting toolchain will end up) and $HOME/downloads (this is where all the downloads will be stored). If you don't, then change the paths to suit. Do *not* change any of the tool version numbers in this file. Don't even be tempted ...

5/ Download the required patch from:

http://www.knowledgemessaging.com/nslu2/gcc-3.3.2-arm-softfloat.patch

6/ Put the patch in the patches/gcc-3.3.3 directory (yes, I know the patch says 3.3.2 - put it in the 3.3.3 directory anyway). Don't try and apply it manually or anything like that - just put it there and leave it alone.

7/ Change directory into the crosstool-0.28-rc32 directory.

8/ Type "sh demo-nslu2.sh" and wait for a long time (yes it could be hours).

9/ Add the /opt/crosstool/armv5b-softfloat-linux/gcc-3.3.3-glibc-2.2.5/bin directory to your PATH. Verify that you can run "armv5b-softfloat-linux-gcc --version".

This process was worked out by Benoit on Aug 17 (http://groups.yahoo.com/group/nslu2-linux/message/422), and has been followed successfully by at least 10 different people since then. So if you have problems, it's not because of crosstool or the patch (and no, you shouldn't try a different version if you can't get this version to work). Look to your own actions first.

If you have problems (and have followed this exact procedure twice with the same result), then post your complete Linux O/S details, the URLs? and md5sums of all the files you downloaded (including the demo-nslu2.sh file you detached from this message), the *exact* commands you typed (yes, every single one of them, cut and pasted from your shell window), and the error messages (again, cut and pasted from your shell window).

Have fun!

[Did I mention that you have to use crosstool version 0.28-rc32? I did? Good.]

  1. !/bin/sh

set -ex TARBALLS_DIR=$HOME/downloads RESULT_TOP=/opt/crosstool export TARBALLS_DIR RESULT_TOP GCC_LANGUAGES="c,c++" export GCC_LANGUAGES

  1. Really, you should do the mkdir before running this,
  2. and chown /opt/crosstool to yourself so you don't need to run as root.

mkdir -p $RESULT_TOP

  1. Build the toolchain. Takes a couple hours and a couple gigabytes.

eval `cat armv5b-softfloat.dat gcc-3.3.3-glibc-2.2.5.dat` sh all.sh --notest

echo Done.

Changed lines 100-101 from:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.

to:

[http://groups.yahoo.com/group/nslu2-linux/message/1136]

September 14, 2004, at 10:00 PM by bnz --
Changed line 9 from:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.

to:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.

September 14, 2004, at 01:45 AM by glum --
Changed line 9 from:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH in your shell. Otherwise, you will be unhappy when the build dies partway through.

to:

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH in your environment. Otherwise, you will be unhappy when the build dies partway through. The error message is quite understandable, but once you've unset the variable as directed, the build starts over from scratch.

September 14, 2004, at 01:20 AM by glum --
Changed lines 7-9 from:

If you have confirmed that a later version of crosstool will build and run correctly, then insert the details here.

to:

If you have confirmed that a later version of crosstool will build and run correctly, then insert the details here.

Before following the instructions in the above link, make sure you unset LD_LIBRARY_PATH in your shell. Otherwise, you will be unhappy when the build dies partway through.

September 13, 2004, at 01:23 AM by rwhitby --
Changed line 1 from:

For Linux development, we are currently using crosstool-0.28-rc32.

to:

For NSLU2 Linux development, we are currently using crosstool-0.28-rc32.

September 12, 2004, at 09:42 PM by rwhitby --
Changed line 1 from:

For NSLU2 Linux development, we are currently using crosstool-0.28-rc32.

to:

For Linux development, we are currently using crosstool-0.28-rc32.

September 12, 2004, at 09:39 PM by rwhitby --
Changed lines 1-7 from:

http://groups.yahoo.com/group/nslu2-linux/message/1136

to:

For NSLU2 Linux development, we are currently using crosstool-0.28-rc32.

The instructions for building this toolchain can be found here:

http://groups.yahoo.com/group/nslu2-linux/message/1136

If you have confirmed that a later version of crosstool will build and run correctly, then insert the details here.

September 12, 2004, at 09:37 PM by rwhitby --
Changed line 1 from:

Describe CompileCrossTool here.

to:

http://groups.yahoo.com/group/nslu2-linux/message/1136

view · edit · print · history · Last edited by rwhitby.
Based on work by rwhitby, schinckel, Lex Delani, tjyang, bobtm, peteru, Christopher Blunck, tman, seadevil, snhenson, kaste, dyoung, ka6sox, bnz, and glum.
Originally by rwhitby.
Page last modified on May 29, 2005, at 11:31 AM