Hardware Reference
In-Depth Information
Chapter 7
Cross-Compiling the Kernel
While normally not possible on embedded platforms, it is possible to build kernels
on your Raspberry Pi with its luxurious root file system. Despite this, cross-compiling
on desktop systems is preferred for faster compile times. This chapter examines the
procedure for building your Raspbian kernel.
It is assumed that you have the cross-compiler tools and environment ready. Either
the tool set built in Chapter 6 or an installed prebuilt tool chain will do. In this chapter, I
assume that the cross-compiler prefix is as follows (ending in a hyphen):
/opt/x−tools/arm-unknown−linux-gnueabi/bin/arm−unknown−linux−gnueabi−
Substitute as appropriate, if your tools are installed differently.
Image Tools
According to the “RPi Buying Guide” from eLinux.org, “The way the memory addresses
are arranged in the Broadcom SoC, you will need to prepare the compiled image for use.”
Consequently, an image tool must be used so that the built kernel image can be modified
for booting by the Raspberry Pi.
You can read more of the “RPi Buying Guide” at http://s3.amazonaws.com/
szmanuals/8d4eb934fa27c2cbecd2a7f3b6922848 .
Note
Let's begin by creating and changing to a work directory:
$ mkdir ~/work
$ cd ~/work
The tools can be downloaded from here:
$ wget https://github.com/raspberrypi/tools/archive/master.tar.gz
 
 
Search WWH ::




Custom Search