Log in / create account Article Discussion History Go to the site toolbox

Setting up the codesourcery toolchain for X86 to ARM9 cross compiling

From Nas-central-wiki

Contents

About

Codesourcery has created the crosstoolchain

The codesourcery 2005q3 cross toolchain was used to compile the stock kernel of all arm9 based boxes from buffalo. As crosscompiling on a x86 workstation is much faster than native compiling on the slow boxes we have another reason to install it.

This wiki page does not only cover how to install the codesourcery 2005q3 toolchain, it describes how to install all 3 toolchains (which can be downloaded here) in parallel.


http://forum.nas-central.org/viewtopic.php?f=37&t=3356

Installation on Ubuntu 7.10

As i thought the easiest way to install the crosstoolchains is to install it by executing a single script. This instructions where written for Ubuntu 7.10, but they should work for every linux flavor.

Here are the instructions for using the script:

1) Open up a terminal

2) Go to a folder of your choice (i recommend the home directory) and download the script

wget http://downloads.nas-central.org/ALL_ARM9/DevelopmentTools/CrossToolchains/codesourcery-toolchains-setup.sh

3) Make it executable

chmod -x codesourcery-toolchains-setup.sh

4) Execute it!

./codesourcery-toolchains-setup.sh

You can check the code of the script on the talk-page.

To finish the installation after running the script you need to login into a new terminal so the new enhanced PATH gets effective.

Using the toolchain

These are the subfolders created by the script in the folder where you run the script

./CROSSCOMPILING/
./CROSSCOMPILING/CROSSTOOLCHAINS/
./CROSSCOMPILING/CROSSTOOLCHAINS/arm-2005q3
./CROSSCOMPILING/CROSSTOOLCHAINS/arm-2007q1
./CROSSCOMPILING/CROSSTOOLCHAINS/arm-2007q3
./CROSSCOMPILING/COMPILING
./CROSSCOMPILING/COMPILING/KERNELS

And there is a symlink called

./CROSSCOMPILING/USED_TOOLCHAIN

pointing to the toolchain that is currently in use. By default it is the 2005q3 toolchain.

You can change the used toolchain by simply pointing it to a different directory as PATH-variable was enhanced via

echo "export PATH=~/CROSSCOMPILING/USED_TOOLCHAIN/bin:$PATH" >> ~/.bashrc

Changing the toolchain

In that case you only need to point the symlink called USED_TOOLCHAIN in ./CROSSCOMPILING/ to a different toolchaindirectory inside ./CROSSCOMPILING/CROSSTOOLCHAINS/

Site Toolbox:

Personal tools
Communication
Optware
Downloads
Attribution-Share Alike 3.0 Unported
This page was last modified 17:32, 2 March 2008. - This page has been accessed 2,905 times. - Disclaimers - About Nas-central-wiki