NSLU2-Linux
view · edit · print · history

HowTo.CompileCrossToolOnOSX History

Hide minor edits - Show changes to markup

September 08, 2007, at 08:13 AM by mhornsby --
Changed lines 7-8 from:

2 Install libpcap sudo port install arm-elf-gcc

to:

2 Install the cross tools sudo port install arm-elf-gcc

September 08, 2007, at 08:04 AM by mhornsby --
Changed lines 7-8 from:

2 Install libpcap sudo port install arm-elf

to:

2 Install libpcap sudo port install arm-elf-gcc

September 08, 2007, at 08:00 AM by mhornsby --
Changed lines 1-2 from:

Cross tools can be downloaded from: |http://www.gnuarm.org/files.html

to:

Cross tools can be downloaded from: http://www.gnuarm.org/files.html

September 08, 2007, at 07:59 AM by mhornsby -- tools now availabe for download on web
Changed lines 1-81 from:

Here are the extra steps I used to get crosstool to run on a Mac OS-X 10.3 system:

  uname -srv
  > Darwin 7.6.0 Darwin Kernel Version 7.6.0: Sun Oct 10 12:05:27 PDT 2004; root:xnu/xnu-517.9.4.obj~1/RELEASE_PPC

Step 1 - Get a new GCC (I had problems with 3.1)

  gcc --version
  > gcc (GCC) 3.1 20020420 (prerelease)

Visit the apple developer connection (http://developer.apple.com free registration required.) and download "Xcode Tools v1.5" from the free downloads section.

  gcc --version
  > gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666)

Step 2 - Set up tools dir (I use ~/local/nslu2, use whatever you want)

  (note that I'm using bash syntax)
  mkdir -p ~/local/nslu2
  PATH=~/local/nslu2/bin:$PATH ; export PATH
  mkdir -p ~/local/downloads
  cd ~/local/downloads

Step 3 - Install wget (crosstool needs this and so will we)

  (download http://ftp.gnu.org/pub/gnu/wget/wget-1.9.1.tar.gz into ~/local/downloads)
  tar xzf wget-1.9.1.tar.gz
  cd wget-1.9.1
  ./configure --prefix=$HOME/local/nslu2
  make
  make install
  cd ..
  rm -rf wget-1.9.1

Step 4 - Install "install" (one of the pgs in crosstool has trouble with the BSD install)

  wget http://ftp.gnu.org/pub/gnu/fileutils/fileutils-4.1.tar.gz
  tar xzf fileutils-4.1.tar.gz
  cd fileutils-4.1
  ./configure --prefix=$HOME/local/nslu2
  make
  make install
  cd ..
  rm -rf fileutils-4.1

Step 5 - Install GNU sed (glibc config will hang with the bsd sed)

  wget http://ftp.gnu.org/pub/gnu/sed/sed-4.1.2.tar.gz
  tar xzf sed-4.1.2.tar.gz
  cd sed-4.1.2
  ./configure --prefix=$HOME/local/nslu2
  make
  make install
  cd ..
  rm -rf sed-4.1.2

Step 6 - Install gettext (glibc requires this)

  wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.14.tar.gz
  tar xzf gettext-0.14.tar.gz
  cd gettext-0.14
  ./configure --prefix=$HOME/local/nslu2 --disable-csharp
  make
  make install
  cd ..
  rm -rf gettext-0.14

Step 7 - # Install GNU expr (glibc config will crash with the bsd one)

  wget http://ftp.gnu.org/pub/gnu/sh-utils/sh-utils-2.0.tar.gz
  tar xzf sh-utils-2.0.tar.gz
  cd sh-utils-2.0
  ./configure --prefix=$HOME/local/nslu2 --host=powerpc
  make
  cp src/expr $HOME/local/nslu2/bin
  (I heard there are problems with some of the other utils, so I only install expr)
  cd ..
  rm -rf sh-utils-2.0

At this point you can follow the directions on the CompileCrossTool page. (make sure you keep the PATH from above)

Here are my 2 choices for directories in 'demo-nslu2.sh'

 TARBALLS_DIR=$HOME/local/downloads
 RESULT_TOP=$HOME/local/crosstool

I have tested the helloWorld program and it runs on the nslu2!

You can see my notes on trying to build all the individual tools by hand on the HowTo.SetUpAToolChainOnAMac page. (Be aware those steps are not working yet! crosstool is much easier!)

For comments I can be reached at seadevil@gmail.com

to:

Cross tools can be downloaded from: |http://www.gnuarm.org/files.html

Or can be installed using Macports:

1 Download and install the MacPorts software.

2 Install libpcap sudo port install arm-elf

January 23, 2006, at 10:21 PM by Sharth -- removing stuff.
Changed lines 81-89 from:

For comments I can be reached at seadevil@gmail.com


Alternate method on OS X 10.4.3 with fink.

  • Using crosstool .38 instead of the one suggested on the CompileCrossTool page.
  • fink install wget fileutils sed gettext-dev
  • mkdir crosstool-0.38/patches/linux-2.4.22
  • cp crosstool-0.38/patches/linux-2.4.24/linux-2.4-bsd-expr.patch crosstool-0.38/patches/linux-2.4.22/

Then you should be ready to follow the new original directions. Enjoy. Any questions, contact me at wlynch (at) udel.edu --Sharth

to:

For comments I can be reached at seadevil@gmail.com

December 08, 2005, at 01:32 PM by Sharth -- cleaning up my previous edit.
Deleted line 81:
Changed lines 83-89 from:

I've done the same as above except for a few differences. I decided to use the newest crosstool as well (.38 at the time of this writing). I'm using 10.4.3 with the newest developer tools available to me. I also have fink installed so I used that to install all of the above tools. The only one not available was gnu-expr. So, to fix this problem, a patch exists for hte linux kernel. Goto crosstool-.38/patches/. In this directory, create a directory called linux-2.4.22, and then copy "linux-2.4.24/linux-2.4-bsd-expr.patch" into it. This will let you use the bsd-expr that comes with os x. --Sharth

to:

Alternate method on OS X 10.4.3 with fink.

  • Using crosstool .38 instead of the one suggested on the CompileCrossTool page.
  • fink install wget fileutils sed gettext-dev
  • mkdir crosstool-0.38/patches/linux-2.4.22
  • cp crosstool-0.38/patches/linux-2.4.24/linux-2.4-bsd-expr.patch crosstool-0.38/patches/linux-2.4.22/

Then you should be ready to follow the new original directions. Enjoy. Any questions, contact me at wlynch (at) udel.edu --Sharth

December 08, 2005, at 01:20 PM by Sharth -- alternate method for preparing to create crosstool on os x.
Added lines 82-84:

I've done the same as above except for a few differences. I decided to use the newest crosstool as well (.38 at the time of this writing). I'm using 10.4.3 with the newest developer tools available to me. I also have fink installed so I used that to install all of the above tools. The only one not available was gnu-expr. So, to fix this problem, a patch exists for hte linux kernel. Goto crosstool-.38/patches/. In this directory, create a directory called linux-2.4.22, and then copy "linux-2.4.24/linux-2.4-bsd-expr.patch" into it. This will let you use the bsd-expr that comes with os x. --Sharth

January 19, 2005, at 02:14 AM by schinckel --
Changed line 79 from:

You can see my notes on trying to build all the individual tools by hand on the HowTo.SetUpAToolChanOnAMac? page. (Be aware those steps are not working yet! crosstool is much easier!)

to:

You can see my notes on trying to build all the individual tools by hand on the HowTo.SetUpAToolChainOnAMac page. (Be aware those steps are not working yet! crosstool is much easier!)

November 16, 2004, at 02:54 AM by seadevil --
Changed lines 77-78 from:

Note that I can now build ARM executables, but have not actually tested them on the NSLU2 yet.

to:

I have tested the helloWorld program and it runs on the nslu2!

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

Step 1 - get a new gcc (I had problems with 3.1)

to:

Step 1 - Get a new GCC (I had problems with 3.1)

Changed line 12 from:

Step 2 - set up tools dir (I use ~/local/nslu2, use whatever you want)

to:

Step 2 - Set up tools dir (I use ~/local/nslu2, use whatever you want)

Changed line 19 from:

Step 3 - install wget (crosstool needs this and so will we)

to:

Step 3 - Install wget (crosstool needs this and so will we)

Changed line 29 from:

Step 4 - install "install" (one of the pgs in crosstool has trouble with the bsd install)

to:

Step 4 - Install "install" (one of the pgs in crosstool has trouble with the BSD install)

Changed line 39 from:

Step 5 - install gnu sed (glibc config will hang with the bsd sed)

to:

Step 5 - Install GNU sed (glibc config will hang with the bsd sed)

Changed line 49 from:

Step 6 - install gettext (glibc requires this)

to:

Step 6 - Install gettext (glibc requires this)

Changed line 59 from:

Step 7 - # install gnu expr (glibc config will crash with the bsd one)

to:

Step 7 - # Install GNU expr (glibc config will crash with the bsd one)

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

Note that I can now build arm executables, but have not actually tested them on the nlsu2 yet.

to:

Note that I can now build ARM executables, but have not actually tested them on the NSLU2 yet.

November 15, 2004, at 07:34 AM by seadevil --
Changed lines 77-79 from:

Note that I have can now build arm executables, but have not actually tested them on the nlsu2. You can see my notes on trying to build all the individual tools by hand on the howto SetUpAToolChanOnAMac? page. (be aware that ath is not wrking yet. crosstool is much easier!)

to:

Note that I can now build arm executables, but have not actually tested them on the nlsu2 yet. You can see my notes on trying to build all the individual tools by hand on the HowTo.SetUpAToolChanOnAMac? page. (Be aware those steps are not working yet! crosstool is much easier!)

November 15, 2004, at 07:25 AM by seadevil --
Changed lines 1-81 from:

Describe CompileCrossToolOnOSX here.

to:

Here are the extra steps I used to get crosstool to run on a Mac OS-X 10.3 system:

  uname -srv
  > Darwin 7.6.0 Darwin Kernel Version 7.6.0: Sun Oct 10 12:05:27 PDT 2004; root:xnu/xnu-517.9.4.obj~1/RELEASE_PPC

Step 1 - get a new gcc (I had problems with 3.1)

  gcc --version
  > gcc (GCC) 3.1 20020420 (prerelease)

Visit the apple developer connection (http://developer.apple.com free registration required.) and download "Xcode Tools v1.5" from the free downloads section.

  gcc --version
  > gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666)

Step 2 - set up tools dir (I use ~/local/nslu2, use whatever you want)

  (note that I'm using bash syntax)
  mkdir -p ~/local/nslu2
  PATH=~/local/nslu2/bin:$PATH ; export PATH
  mkdir -p ~/local/downloads
  cd ~/local/downloads

Step 3 - install wget (crosstool needs this and so will we)

  (download http://ftp.gnu.org/pub/gnu/wget/wget-1.9.1.tar.gz into ~/local/downloads)
  tar xzf wget-1.9.1.tar.gz
  cd wget-1.9.1
  ./configure --prefix=$HOME/local/nslu2
  make
  make install
  cd ..
  rm -rf wget-1.9.1

Step 4 - install "install" (one of the pgs in crosstool has trouble with the bsd install)

  wget http://ftp.gnu.org/pub/gnu/fileutils/fileutils-4.1.tar.gz
  tar xzf fileutils-4.1.tar.gz
  cd fileutils-4.1
  ./configure --prefix=$HOME/local/nslu2
  make
  make install
  cd ..
  rm -rf fileutils-4.1

Step 5 - install gnu sed (glibc config will hang with the bsd sed)

  wget http://ftp.gnu.org/pub/gnu/sed/sed-4.1.2.tar.gz
  tar xzf sed-4.1.2.tar.gz
  cd sed-4.1.2
  ./configure --prefix=$HOME/local/nslu2
  make
  make install
  cd ..
  rm -rf sed-4.1.2

Step 6 - install gettext (glibc requires this)

  wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.14.tar.gz
  tar xzf gettext-0.14.tar.gz
  cd gettext-0.14
  ./configure --prefix=$HOME/local/nslu2 --disable-csharp
  make
  make install
  cd ..
  rm -rf gettext-0.14

Step 7 - # install gnu expr (glibc config will crash with the bsd one)

  wget http://ftp.gnu.org/pub/gnu/sh-utils/sh-utils-2.0.tar.gz
  tar xzf sh-utils-2.0.tar.gz
  cd sh-utils-2.0
  ./configure --prefix=$HOME/local/nslu2 --host=powerpc
  make
  cp src/expr $HOME/local/nslu2/bin
  (I heard there are problems with some of the other utils, so I only install expr)
  cd ..
  rm -rf sh-utils-2.0

At this point you can follow the directions on the CompileCrossTool page. (make sure you keep the PATH from above)

Here are my 2 choices for directories in 'demo-nslu2.sh'

 TARBALLS_DIR=$HOME/local/downloads
 RESULT_TOP=$HOME/local/crosstool

Note that I have can now build arm executables, but have not actually tested them on the nlsu2. You can see my notes on trying to build all the individual tools by hand on the howto SetUpAToolChanOnAMac? page. (be aware that ath is not wrking yet. crosstool is much easier!)

For comments I can be reached at seadevil@gmail.com

view · edit · print · history · Last edited by mhornsby.
Based on work by mhornsby, Sharth, schinckel, seadevil, and tman.
Originally by seadevil.
Page last modified on September 08, 2007, at 08:13 AM