The 24x Kernel Configuration Tools

The 2.4.x kernel configuration procedure relies on the make facility, which also directs the kernel compilation process. To configure the kernel, change into the kernel source directory and type one of three commands:

make config This command uses a simple text-mode interface. The system asks you whether or how you want to compile each kernel component, and gives you the ability to set particular options. Each option is presented precisely once, and there's no ability to jump back or forward in the sequence. As a result, this method of kernel configuration tends to be extremely tedious to use.

make menuconfig This command presents a more sophisticated text-mode interface. Unlike make config, make menuconfig uses the curses library to present a text-based menuing system, as shown in

Figure 15.1. When first started, the system presents the main configuration categories. Use the arrow keys to position the cursor on one and then press the spacebar to enter a submenu. (Figure 15.1 shows the Processor Type and Features submenu.) You can then select or deselect specific options, enter further submenus, and so on. Use the Tab key to pick between the Select, Exit, and Help functions at the bottom of the screen. When one of these is highlighted, press the Enter key to activate it. The Help function is particularly important when you want to know what an option does.

Figure 15.1: The make menuconfig kernel configuration command presents a text-based menuing system for selecting options.

make xconfig This command presents a menuing configuration system that's structured logically much like the make menuconfig options; however, make xconfig use the Tcl/Tk scripting language to present a GUI selection system, as shown in Figure 15.2. The main window (in the background in Figure 15.2) presents the general categories. Clicking one of these options brings up a new window in which specific options can be set, and this menu occasionally presents further submenus. Clicking Help displays information about the purpose of an option.

Figure 15.2: The make xconfig kernel configuration command presents a GUI menuing system for selecting options.

No matter how you select kernel options, many options have three possible values: Y to compile a feature directly into the main kernel file, M to compile an option as a module, or N to not compile a feature at all. (The make menuconfig procedure presents the Y option as an asterisk and the N option as an empty space, as shown in Figure 15.1.) The Y option ensures that the kernel feature will always be accessible when the system is running. This characteristic can be convenient, but it can be a big RAM-waster if you don't need the feature. Because of the wide variety of hardware available, therefore, most distributions ship with many features compiled as modules. The modules can be loaded or unloaded at will, as described in Chapter 1. On the other hand, a few features must be compiled into the main kernel file. Two examples are support for your boot disk's hardware and support for the root filesystem. Some features cannot be compiled as modules, and so don't present an M option. Many of these options are modifiers for other options, so the Y choice becomes available only after you select Y or M for the parent option. Other modifier options can be set to any of these values, but the Y choice is available only if you select Y for the parent option.

A few options can be set to numeric values or to any of several multiple-choice settings. For instance, you can pick your CPU type from a list (in the Processor Family option visible in Figures 15.1 and 15.2). The configuration utility won't allow you to enter an illegal value, although it can't protect you against all blunders. For instance, if you don't compile support for your root filesystem, the tool won't alert you to that fact.

Whatever method you use, when you're finished you select an exit option. The utility asks if you want to save your changes. Answer in the affirmative and the program saves a configuration file in the .config file in the kernel source directory.

0 0

Post a comment