Chapter 4. Configuring and Building
Now that you have downloaded the source for your selected kernel version and installed it into a local directory, it is time to build the code. The first step is to configure the kernel with the appropriate options; the kernel can then be compiled. Both tasks are done through the standard make utility.
Creating a configuration
The kernel configuration is kept in a file called .config in the top directory of the kernel source tree. If you have just expanded the kernel source code, there will be no .config file, so it needs to be created. It can be created from scratch, created by basing it on the "default configuration," taken from a running kernel version, or taken from a distribution kernel release. We will cover the first two methods here, and the last two methods in Chapter 7.
Configuring from scratch
The most basic method of configuring a kernel is to use the make config method:
$cd linux-2.6.17.10$make configmake config scripts/kconfig/conf arch/i386/Kconfig * * Linux Kernel Configuration * * * Code maturity level options * Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?]Y* * General setup * Local version - append to kernel release (LOCALVERSION) []Automatically append version information to the version string (LOCALVERSION_AUTO) [Y/n/?]Y...
The kernel configuration program will step through every configuration option and ask you if you wish to enable this option or not. Typically, your choices for each ...