Hardware Reference
In-Depth Information
on an eight-core laptop, it would be 12. Using that example with this flag, the command
to kickoff the build is:
$ make ARCH=arm CROSS_COMPILE=arm-rpi-linux-gnueabi- -j12
If you do not want to run a parallel compilation, simply omit the -j## flag from the
command (note, however, that this will cause the build to take significantly longer).
At this point, your laptop is cross-compiling the core Linux kernel image. Depending
on the options you have selected, this might take a while, but if all goes well, it will
finish compiling without errors. Next, you'll need to build the matching kernel mod-
ules.
To keep the size of the core Linux kernel image small, many of the drivers for devices,
filesystems, and optional functionality are normally configured to be built as Linux
kernel modules. These make up a large tree of files, where each file is an individually
loadable device driver.
Most Linux distributions (including Pidora and Raspbian) contain support for auto-
loading appropriate kernel modules as they are needed, but you might find some sit-
uations in which you'll want to load a kernel module manually. This model also helps
with memory management and boot object size. The default configuration we provide
with this topic modularizes as much as possible.
To start the Linux kernel modules build, run:
$ make ARCH=arm CROSS_COMPILE=arm-rpi-linux-gnueabi- modules -j12
This will also take some time, but it should finish without errors. If a module fails to
build, you might need to disable it in the kernel configuration file and restart the whole
process, but this is unlikely. Now, you just need to install your new kernel.
Install a New Kernel
The core Linux kernel image for the Raspberry Pi is a specially formatted copy of the
zImage binary, compiled as an ARM boot executable. This image contains the primary
functions of the Linux kernel, and it contains all the necessary code for booting into
the Linux operating system.
This is the file that is booted by the Raspberry Pi GPU firmware. It is not usually a large
file (slightly less than 3 MB). If you've built a custom Linux kernel from source as
described in the previous sections, you can find a copy of the core Linux kernel image
at arch/arm/boot/Image within that kernel source tree.
To install a new kernel, you will need to copy files onto the SD card containing your
Raspberry Pi Linux distribution. If you have not already mounted your SD card on your
Linux laptop, go ahead and do so by following the directions in Hack #02 . Make sure
 
Search WWH ::




Custom Search