To configure compile-time kernel options, you must begin with the kernel source code. All major distributions ship with this, but it may or may not be installed by default. Many distributions make changes to the standard kernel (say, to add new drivers that aren't yet standard). You may prefer to start with a standard kernel and add only those patches you need (it's possible you won't need any). Check http://www.kernel.org or a major Linux archive site like ftp://sunsite.unc.edu for the latest kernel source code. (You can also obtain kernel source code from your Linux distribution, but many distributions ship with kernels that have been patched to include non-standard drivers. Using a more standard kernel can be beneficial if you run into problems and need help solving them.) NOTE
Kernel source code normally resides in /usr/src/linux , or in a subdirectory of /usr/src that includes the kernel version number, like /usr/src/linux-2.4.17 . In the latter case, it's common practice to create a symbolic link called /usr/src/linux and point it to the true Linux source directory. This allows other programs that assume the source is in /usr/src/linux to function correctly, even if you want to keep multiple versions of the kernel source code; you can simply change the symbolic link as required. Once you've uncompressed the kernel source code into /usr/src/linux , you should change to that directory in a normal command shell. You can then issue a command to configure the kernel options. Possibilities include the following:
All of these methods present the same options, which are organized into broad categories. (Some categories also include subcategories .) When you select one category with make menuconfig or make xconfig , a new menu appears showing the options within that category. (Figure 1.1 shows this for make xconfig .) Of particular interest for networking are the Networking Options and Network Device Support categories, which are the subject of the next two sections. Figure 1.1. Linux kernel compilation options are organized into categories and subcategories, each with its own menu.
NOTE
Most kernel options use a two- or three-way toggle (the Y , M , and N options shown in Figure 1.1). Y and N refer to the option's presence or absence in the kernel file itself, respectively, and M stands for modular compilation ”compiling the option as a separate file that can be loaded and unloaded. These options are described in more detail in the upcoming section, "Drivers: Modules or Built-In." |