现在的位置: 首页 > 综合 > 正文

Cross Compilation Toolchains

2012年08月26日 ⁄ 综合 ⁄ 共 3804字 ⁄ 字号 评论关闭

Cross Compilation Toolchains

There may be other viable toolchains, but
the following are the ones used by EuroTech engineers in development and
support of our products. They are used to build the pre-compiled kernel and
bootloader images. The release pages for the kernels and bootloaders specify
which toolchain we used. Other images like filesystems are built natively using
the tools available in the full
Debian
 distributions. 

While the toolchains below that include libraries such as libc can be used to
build user-land applications, we generally recommend that user-land software be
built natively on a development system and not cross-compiled. Doing so avoids
running into issues where the toolchain references shared libraries that are
not part of the target filesystem. Furthermore native compilation avoids the
difficulties of configuration for cross-compilation.

Tip: One way to change your environment permanently is to make the
changes in the .bashrc file in your home directory. This will allow you to
issue commands like arm-linux-gcc and arm-linux-g++ just as you would gcc and
g++.

PS(definition of "user-land":

A conventional computer operating system usually segregates virtual memory into kernel space and user space. Kernel space is strictly reserved for running the kernel, kernel extensions, and most device drivers. In contrast, user space is the memory area where all user mode applications work and this memory can beswapped out when necessary.

Similarly, the term userland refers to all application software that runs in user space.[1] Userland usually refers to the various programs and libraries that the operating system uses to interact with the kernel: software that performs input/output, manipulates file system objects, etc.)

 


gcc 4.2.3 (EABI)

This toolchain is for building EABI kernels, modules and userland utilities.
This is our primary cross compiler for recent 2.6.24 and later kernels.

Download arm-none-linux-gnueabi-gcc-4.2.3 [MD5],
originally from the codesourcery.com,
and install it using the commands below:

cd /usr/local/arm
tar -jxf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

Set the following variables in your shell
environment:

export
PATH=/usr/local/arm/arm-2008q1/bin:${PATH}
export CROSS_COMPILE=arm-none-linux-gnueabi-

Note that while this toolchain can be
installed in other locations, other development tools from EuroTech will use
the above path.

 


gcc 4.1.1 (EABI, no
libc)

This toolchain is for building EABI kernels and modules. We used this toolchain
to build our pre-compiled kernels prior to 2.6.26.

Download arm-unknown-linux-gnueabi-gcc-4.1.1 [MD5],
and install it using the commands below:

cd /
bzcat eabi-gcc-4.1.1.tar.bz2 | tar -x

Set the following variables in your shell
environment:

export
PATH=/opt/crosstool/gcc-4.1.1/bin:${PATH}
export CROSS_COMPILE=arm-unknown-linux-gnueabi-

The /opt/crosstool/gcc-4.1.1 path
is hardcoded. Do not attempt to install it anywhere else. This is the only
location that will work.

Note that this toolchain does not include glibc. It is only intended for
cross-compiling linux kernels.

 


gcc 3.3.2 (OABI)

This is the standard toolchain for pre-EABI software. It is used to build the
bootloader and is compatible with the non-armel (EABI) root filesystems.

Download arm-linux-gcc-3.3.2 [MD5]
originally from the handhelds.org website,
untar it in your root directory, and add it to your path.

cd /
bzcat arm-linux-gcc-3.3.2.tar.bz2 | tar -x

Set the following variables in your shell
environment:

export
PATH=/usr/local/arm/3.3.2/bin:${PATH}
export CROSS_COMPILE=arm-linux-

The /usr/local/arm/3.3.2 path is
hardcoded in this toolchain. Do not attempt to install it anywhere else. This
is the only path that will work.

 


gcc 2.95.3

This toolchain was used to build StrongARM kernels. It is not suitable for
XScale and later architectures, nor is it suitable for kernels beginning with
2.4.26 due to ARM-linux kernel changes.

Download the LART cross compiler,
arm-linux-cross.tar.bz2 (gcc 2.95.3), from the LART website.
Instructions for installing this tool-chain are also on the LART website. There
are hardcoded paths in this image so you must install it in
the /data/lart directory as follows:

mkdir -p /data/lart
cd /data/lart
tar xvf arm-linux-cross.tar

Set the following variables in your shell
environment:

export PATH=/data/lart/cross/bin:${PATH}

 

抱歉!评论已关闭.