Difference between revisions of "HIP:TS-7000:cross-compiling"

From Earlham CS Department
Jump to navigation Jump to search
(download and setup the toolchain)
(download and setup the toolchain)
Line 26: Line 26:
  
 
tar --use-compress-program bzip2 -xvf foo.tar.bz2
 
tar --use-compress-program bzip2 -xvf foo.tar.bz2
 +
 +
The toolchain will come ready to use. Make sure you haven't unpacked it into your home directory, as the configure scripts expect files to be in a specific location, and if the tools are in locations above or below that due to being in a local directory, it will cause errors.

Revision as of 14:48, 20 May 2008

about

This page describes the creation and usage of a toolchain for cross-compiling from a native linux environment to an ARM environment.

Building rdate to run in Technologic System's TS-Linux for ARM is used as an example, but the steps should be applicable to any application.

download and setup the toolchain

You can download the cross-compilation toolchain from:

http://www.embeddedarm.com/software/software-arm-linux.php

The various toolchains are near the bottom of the page. Make sure to download the toolchain with the glibc that matches the glibc of whatever environment you want to compile to.

You can find out what verison of glibc is on your computer by running either:

"rpm -q glibc" for Redhat RPM based systems, or:

"ls -al /lib/libc*" for other systems.

Then use tar to unpack the toolchain. Depending on the type of file, you may need to use different commands to unpack it:

tar -xvvf foo.tar

tar -xvzf foo.tar.gz

tar --use-compress-program bzip2 -xvf foo.tar.bz2

The toolchain will come ready to use. Make sure you haven't unpacked it into your home directory, as the configure scripts expect files to be in a specific location, and if the tools are in locations above or below that due to being in a local directory, it will cause errors.