Hardware Reference
In-Depth Information
$ git clone https://github.com/spotrh/rpihacks
In the new rpihacks directory, you will see a file named kernel-
book.config . Copy this file into your top-level Raspberry Pi Linux kernel
source directory (as .config ).
From here onward, you will need to specify the ARCH=arm CROSS_COMPILE=arm-rpi-
linux-gnueabi- options to all of the make invocations. This tells the Linux kernel
code that you are building for a non-native architecture (ARM) and with a specific
cross-compiler toolchain. The “-” at the end of the arm-rpi-linux-gnueabi- string
is important, because the Makefiles will append the necessary binary commands
(e.g., gcc , ar , ld ) to the end.
Now you need to make sure that this base configuration file is brought up to date:
$ make ARCH=arm CROSS_COMPILE=arm-rpi-linux-gnueabi- oldconfig
This command will ask you to provide answers to any values that are not defined in
the config file, and you're likely to have more than a few blanks to fill in. For the vast
majority, you should simply hit Enter to accept the default, but there are a few that we
recommend you set if prompted:
Cross-compiler tool prefix (CROSS_COMPILE) [] (NEW)
Set this to arm-rpi-linux-gnueabi- . This is not entirely necessary, but it is better
to be safe than sorry here.
Local version - append to kernel release (LOCALVERSION) [] (NEW)
Set this to something unique. This will help you differentiate your custom kernel
from the prebuilt kernel images. We suggest using something that you will identify
easily as it relates to your project, or something containing the build date.
Those two settings will come early on (usually as the first two you see). After they're
set, you just need to hit Enter several hundred times over the span of about 10 minutes.
Don't worry too much about reading or changing these other options, as there is a
better way to find and make configuration changes in the next step. Just keep hitting
Enter until it says:
#
# configuration written to .config
#
 
Search WWH ::




Custom Search