Changes between Version 2 and Version 3 of CSPFL_GentooCrossCompiling

Show
Ignore:
Author:
hardert (IP: 67.169.210.177)
Timestamp:
11/05/09 21:28:00 (3 weeks ago)
Comment:

Fill out the instructions to get a basic cross-compile toolchain working

Legend:

Unmodified
Added
Removed
Modified
  • CSPFL_GentooCrossCompiling

    v2 v3  
    11= Cross-compiling for the OSWALD using Gentoo = 
    2 [http://www.gentoo.org Gentoo] provides a nice setup for cross-compiling software for various target architectures including ARM, which the OSWALD uses. This page outlines the basic instructions necessary for an experienced Gentoo user to get a working cross-compiler that can build binaries for the OSWALD. 
     2[http://www.gentoo.org Gentoo] provides a nice setup for cross-compiling software for various target architectures including ARM, which the OSWALD uses. This page outlines the basic instructions necessary for an experienced Gentoo user to get a working cross-compiler that can build binaries for the OSWALD. For the official Gentoo embedded documentation see the [http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml Gentoo Embedded Handbook]. 
    33 
    4 = Installing the necessary packages
    5 TODO..
     4== Install crossdev =
     5First, install the crossdev package
    66 
    7 = Building a cross-compiler = 
    8 TODO... 
     7== Building a cross-compiling toolchain == 
     8Next, use crossdev to build a cross-compile toolchain for the OSWALD. This can be using the following command: 
     9 
     10{{{ 
     11sudo crossdev -t armv7a-softfloat-linux-gnueabi 
     12}}} 
     13 
     14By default, crossdev will use the latest stable versions of the toolchain packages. If this does not work, you should manually select which versions to use for the various toolchain packages -- use the help output from crossdev to figure out how to do this. 
     15 
     16== Cross-compiling with portage == 
     17If crossdev successfully built a cross-compile toolchain, it should be located in the /usr/armv7a-softfloat-linux-gnueabi directory. In order to use the cross-compiler it is easiest to use some wrapper scripts provided by the crossdev-wrappers package that setup the necessary environment variables. Therefore, install crossdev-wrappers and it should automatically initialize the armv7a-softfloat-linux-gnueabi cross-compile toolchain. 
     18 
     19Now you should be able to use either of the following commands 
     20 
     21{{{ 
     22emerge-wrapper --target armv7a-softfloat-linux-gnueabi <emerge options> 
     23}}} 
     24 
     25or 
     26 
     27{{{ 
     28emerge-armv7a-softfloat-linux-gnueabi 
     29}}} 
     30 
     31to cross-compile packages using portage. 
     32 
     33Also, the various compilers can be manually running using by prefixing the command with the CTARGET. For example, 
     34 
     35{{{ 
     36armv7a-softfloat-linux-gnueabi-gcc 
     37}}} 
     38 
     39should invoke the selected gcc compiler for the armv7a-softfloat-linux-gnueabi cross-compile toolchain.