Hardware Reference
In-Depth Information
Configure the Cross-Compiler
Now it is time to actually build the Raspberry Pi cross-compiler. In the process of doing
so, crosstool-ng will download quite a lot of source files from the Internet. To keep
things clean, you should make a temporary home (a sandbox ) and work in that direc-
tory:
$ mkdir ~/cross-sandbox
$ cd ~/cross-sandbox
Now you can safely launch the crosstool-ng configuration utility by running:
$ ct-ng menuconfig
crosstool-ng supports a wide variety of different toolchains and subvariants of tool-
chains. For the best optimization, we recommend using the Linaro variant of the GCC
compiler. Linaro is a nonprofit organization that specializes in optimizing and improv-
ing open source technologies for the ARM platform, and they tend to make the nicest
ARM Linux compilers.
On that recommendation, next you're going to build a Linaro GCC cross-compiler
specifically optimized for the hardware inside the Raspberry Pi.
In GCC language, this is an arm-bcm2708hardfp-linux-gnueabi toolchain. The
bcm2708 describes the specific CPU type (Broadcom 2708), hardfp means that it
is using a hardware floating point unit (specifically, it means that values are being
passed to functions in the floating-point registers), linux is the OS, and gnueabi
means that it supports the GNU Embedded Application Binary Interface (EABI).
The EABI allows for different compilers to generate compatible code.
While most of the crosstool-ng settings are fine at their default values, you will need
to double-check some of them. When you launch ct-ng menuconfig , it will open a Text
User Interface (or TUI for short) in your terminal window. It will present you with a
series of menus that you can navigate using the arrow keys, the Enter key (to select
an item or menu), and the spacebar (to enable or disable specific items). Items which
are enabled have either an asterisk or a set value next to them.
The top menu looks like Figure 2-1 .
 
Search WWH ::




Custom Search