An Overview of Kernel Options

The Linux kernel supports a huge number of options. A .config file for recent kernels includes hundreds or even thousands of configuration options, depending upon your selections. Even the number of top-tier configuration areas is quite large—36 in a 2.5.67 kernel. Rather than try to cover every option, this section presents an overview of these major areas. The next section, "Optimizing Kernel Performance," provides information on the options that are most important if you want to improve the system's overall performance. Some other chapters of this book mention specific options in specific areas. In the latest kernels (2.5.67 and 2.4.20), the main kernel configuration areas are as follows:

Code Maturity Level Options This menu has just one option: Prompt for Development and/or Incomplete Code/Drivers. If enabled, the kernel configuration tool lets you select features that are considered "experimental." Such features are potentially risky, even in a stable kernel, but sometimes they're necessary. If you don't enable this option, the experimental features remain hidden or are grayed out in the configuration tool.

General Setup This menu contains a few high-level options that don't fit neatly into other menus, such as support for process accounting systems. In the 2.4.20 kernel, this menu also includes options that, in the 2.5.67 kernel, appear under the Power Management Options, Bus Options, and Executable File Formats menus, described shortly.

Loadable Module Support In order to support options compiled as modules, you must enable this support in the kernel, via the Enable Loadable Module Support option. This menu also provides a few additional options, such as Kernel Module Loader, which enables the kernel to run user-mode tools to load kernel modules when it needs them.

Processor Type and Features This menu provides features that relate directly to the CPU and motherboard architecture, including the CPU type, support for symmetric multiprocessor (SMP) motherboards, and so on.

Power Management Options This menu provides options relating to both Advanced Power Management (APM) and Advanced Configuration and Power Interface (ACPI) power management tools. These tools provide different ways to reduce CPU, disk, screen, and other system demands for power, and to turn off a computer's power when you select the shutdown option. Which options work best is very dependent upon your hardware, so you may need to experiment to learn what works best. These options are folded into the General Setup menu in the 2.4.20 kernel.

Bus Options A computer bus is a set of data interfaces linking devices together. This menu covers mostly internal busses used by plug-in cards, such as the Industry Standard Architecture (ISA), MicroChannel Architecture (MCA), and Peripheral Component Interconnect (PCI) busses. This menu's contents are part of the General Setup menu in the 2.4.20 kernel.

Executable File Formats This menu enables support for three types of executable file formats: The a.out format, which has been abandoned in the Linux world for several years, the Executable and Linkable Format (ELF), which is now the standard, and miscellaneous binaries (used by shell scripts and assorted other program types). You can safely omit a.out support unless you need to run very old binaries, but you should keep the others.

Memory Technology Devices MTD devices are solid-state storage tools often used on embedded systems. If you're compiling a kernel for a desktop or laptop computer, chances are you don't need this support; it's most useful for Linux running on embedded devices such as cell phones and palmtop computers.

Parallel Port Support This menu provides options for handling parallel (printer) ports. To use a parallel printer, you need to enable the Parallel Port Support and (on IA-32 systems) PC-Style Hardware options. Some printers may also require you to select Y to the IEEE 1284 Transfer Modes option. The Support Foreign Hardware option supports non-IA-32 or other exotic hardware. Chapter 3, "Using External Peripherals," covers parallel-port configuration in more detail. Chapter 13, "Managing Printers," covers printer configuration in more detail.

Plug and Play Support This menu (called Plug and Play Configuration in the 2.4.20 kernel) enables Linux to automatically configure Plug and Play (PnP) devices—particularly ISA PnP cards.

Block Devices This menu enables support for generic block devices—devices that perform input and output in multibyte blocks. The devices enabled on this menu include the floppy disk, old-style hard disks, parallel-port hard disks, the loopback device (which enables access to a file as if it were a disk), and RAM disks (which enables access to memory as if it were a disk). Some important block devices, such as most hard disk interfaces, have their own main menu entries—the ATA/ATAPl/MFM/RLL Device Support and SCSI Device Support options.

ATA/ATAPI/MFM/RLL Device Support This menu, which is called ATA/IDE/MFM/RLL Support in the 2.4.20 kernel, includes submenus in which Advanced Technology Attachment (ATA), ATA Packet Interface (ATAPI), and some older disk hardware can be enabled. Options include support for specific device types (disks, tape backup units, CD-ROM drives, and so on), and support for specific ATA interfaces. One unusual item is the SCSI Emulation Support option, which makes ATA devices look like SCSI devices. This feature is useful for a few devices, such as recordable CD and DVD drives, for which Linux's SCSI support is stronger than its ATA support. This option can also be handy sometimes if you want to get multiple ATA controllers to coexist, by enabling you to bypass some types of device conflicts. If you boot from an ATA hard disk, you must normally include the appropriate ATA options in the kernel itself (compiled with the Y option), both for the basic disk support and for your ATA chipset. One way around this requirement is to use a RAM disk as part of the boot process, but it's usually easier to compile support into the main kernel file.

SCSI Device Support This menu contains options equivalent to those on the ATA/ATAPI/MFM/RLL Device Support menu, but for Small Computer System Interface (SCSI) rather than ATA. If you boot from a SCSI hard disk, you must normally include both the SCSI Disk Support option and the option for your specific SCSI host adapter in the kernel file proper (that is, compiled with the Y option). As with ATA support, you can bypass this requirement by using a RAM disk, but it's usually easier to compile the support into the main kernel file.

Old CD-ROM Drivers This menu provides drivers for assorted old CD-ROM drives. These devices are mostly 4x speed or slower, and they interface through sound cards or dedicated ISA cards. No modern computers ship with these devices, but you might be using one on an old system or if you scavenged parts from an old computer.

Multi-Device Support Redundant Array of Independent Disks (RAID) technology enables you to tie together multiple physical disks and treat them as a single disk, in order to improve reliability, improve transfer speed, or both. This menu provides support for software RAID, as well as for Logical Volume Manager (LVM), aka Device Mapper, which enables mapping of disk sectors in a way that can aid in advanced partition management.

Fusion MPT Device Support This menu is devoted to an exotic piece of hardware known as the Fusion Message Passing Technology (MPT), which provides both SCSI and networking features.

IEEE 1394 (FireWire) Support This entire menu is considered experimental. It enables support for IEEE-1394 devices, aka FireWire. This protocol is becoming popular as a means of connecting external hard disks and video sources such as video cameras. Once activated, many IEEE-1394 devices look like SCSI devices to the kernel; therefore, you should activate support for the appropriate SCSI features, such as SCSI disk support.

I20 Device Support The Intelligent Input/Output (I20) protocol is a way to break device drivers into two parts: an OS-specific component and a hardware-specific component. In theory, an 120-enabled device can ship with an 120 hardware driver that works with any 120-enabled OS. You can add the Linux side of 120 support using this menu. 120 is not common in 2003.

Networking Support This menu is called Networking Options in the 2.4.20 kernel, and it provides a way to activate support for TCP/IP, AppleTalk, and other network stacks. Many of the options on this menu relate to specific TCP/IP options. The 2.5.67 kernel incorporates the Network Device Support menu as a submenu of this one.

Network Device Support This menu hosts drivers for most network interfaces—Ethernet, Token Ring, Point-to-Point Protocol (PPP), and so on. This menu is a submenu of the Networking Support menu in the 2.5.67 kernel, but it is an independent top-level menu in the 2.4.20 kernel.

Amateur Radio Support Protocols exist to enable computers to communicate over amateur radio frequencies. If you want to use such equipment, look for support in this menu. Note that this menu does not contain drivers for conventional wireless networking hardware, which is available from the Networking Device Support menu (under Networking Support in the 2.5.67 kernel).

IrDA (Infrared) Support Some computers (particularly laptop and palmtop systems) support infrared communications. You can enable support for such hardware in this menu.

ISDN Subsystem Integrated Services Digital Network (ISDN) is a type of digital telephone service. ISDN modems exist and can operate at up to 128Kbps, compared to 56Kbps for conventional dial-up modems. ISDN is moderately popular in Europe, but it has never caught on in North America. ISDN devices are supported from this menu.

Telephony Support Linux supports one line of dedicated telephony cards, the QuickNet Internet. This device enables you to plug a telephone into the computer to use voice-over-IP (VoIP) applications in Linux, but you must enable the drivers in this menu to do so.

Input Device Support This menu (called Input Core Support in the 2.4.20 kernel) provides support for miscellaneous input devices, such as keyboards, mice, and joysticks. Normally, you should activate at least keyboard support, which is usually built into the kernel proper. The 2.5.67 kernel provides substantially more options in this menu than does the 2.4.20 kernel.

Character Devices This menu provides drivers for an assortment of character devices. The most important of these are the RS-232 serial driver options, which include drivers for standard RS-232 serial ports and for various nonstandard multiport cards. This menu also includes options for the I2C interface used by various hardware sensors, drivers for some mice, support for the Direct Rendering Interface (DRI) used for 3D support in XFree86, and more. In the 2.4.20 kernel, support for PS/2 mice appears here rather than in the Input Device Support menu; but the 2.5.67 kernel moves PS/2 mouse options to Input Device Support and puts only bus mouse options in this menu. Chapter 3 covers RS-232 serial configuration in more detail.

Multimedia Devices If you want to use a video capture card, a digital video broadcast card, or a radio card in Linux, you must activate the appropriate drivers in this menu.

File Systems Activate support for filesystems from this menu. In the 2.5.67 kernel, the main menu provides support for most disk-based filesystems, such as ext2fs and ReiserFS, while submenus provide support for various specialized filesystems, such as CD-ROM filesystems and network filesystems. You must normally compile the filesystem used on your root (/) partition into the kernel itself—that is, using the Y option. You can get around this requirement by using a boot-time RAM disk, but setting this up is usually more effort than compiling the filesystem support into the kernel.

Graphics Support This menu is called Console Drivers in the 2.4.20 kernel. It provides drivers to support frame buffer devices. These devices enable you to access high-resolution graphics modes on video cards in a device-independent manner. In theory, you could then use a single driver in XFree86 for all cards. In practice, frame buffer drivers are usually slower than direct drivers. Some systems (particularly non-IA-32 systems) require the frame buffer drivers to function in X or to present legible text modes. You may also need to activate some of these options to support special boot-time video modes that are set in your boot loader.

Sound This menu provides sound card driver options. The 2.4.20 kernel supports only the original Open Sound System (OSS) drivers, but the 2.5.67 kernel delivers separate submenus for OSS and Advanced Linux Sound Architecture (ALSA) drivers. (You can add ALSA support for 2.4.x kernels by compiling it from a separate package, as described in Chapter 1.) Indications are that the OSS drivers will eventually disappear, but probably not in the 2.5.x or 2.6.x kernels' lifetimes. The arrangement of drivers in the 2.4.20 kernel and in the OSS section of the 2.5.67 kernel is chaotic. Some drivers appear only if you select the OSS Sound Modules option. These are the original OSS drivers, whereas others were written by other people but follow the OSS model. I consider all of these drivers to be OSS drivers, compared to the radically different ALSA model.

USB Support The Universal Serial Bus (USB) has become a very popular means of connecting devices ranging from keyboards to external hard disks. Linux provides USB support, which is accessible from this menu. You must activate support for both the low-level interface used on your system (EHCI, OHCI, or UHCI) and for the device type (keyboard, scanner, camera, mass storage, etc.). Chapter 3 covers USB devices in more detail.

Bluetooth Support Bluetooth is a wireless protocol designed to replace IrDA and short-range wires, such as those used to connect printers and keyboards to computers. Linux provides limited Bluetooth support, accessible from this menu.

Profiling Support Profiling is a technique used by programmers to determine what sections of a program are consuming the most CPU time. The 2.5.67 kernel includes a profiling option that enables programmers to profile anything running on the system, including the kernel itself. You will probably need this support only if you're a kernel

This document was created by an unregistered ChmMagic, please go to to regist* hacker.

Kernel Hacking This menu provides options that are primarily of interest to kernel hackers. You can tell the system to include assorted facilities that can be helpful in debugging drivers or other kernel features.

Security Options This menu, which is present on the 2.5.67 kernel but not the 2.4.20 kernel, adds support for various security hooks (kernel code that can be used to simplify implementation of security features). In 2003, this facility isn't used much, but it might become important for firewalls, virtual private networks (VPNs), access control, or other facilities in the future.

Cryptographic Options This menu is another one that's present in 2.5.67 but not 2.4.20. It adds kernel-level support for various cryptographic tools, which may be used in creating network security tools in the future.

Library Routines This menu provides 32-bit Cyclic Redundancy Check (CRC32) functions in the 2.5.67 kernel. In the 2.4.20 kernel, this menu provides options for zlib compression and decompression. In either case, the option is available so that the features will be available when no in-kernel modules need the support but kernel modules from another source do require these functions.

If you've never compiled a Linux kernel before, I recommend that you set aside an hour or more to peruse the options in each of these menus. If in doubt about what an option does, your safest course of action is usually to compile that option, at least as a module (M). On the other hand, this action can create a bloated kernel, particularly for features that provide no modular compilation option.

Team LIB

0 0

Post a comment