Upgrading and Customizing the Linux Kernel


Upgrading and Customizing the Linux Kernel

One reason that Linux is so exciting is that many programmers are constantly improving it. Some programmers, for example, write drivers that add support for new hardware, such as a new sound card or a new networking card. All these innovations come to you in the form of new versions of the Linux kernel.

Although you do not have to upgrade or modify the Linux operating system-the kernel-every time a new version is available, sometimes you need to upgrade simply because the new version corrects some problems or supports your hardware better. On the other hand, if an earlier kernel version has everything you need, there is no need to rush out and upgrade.

Sometimes you may want to rebuild the kernel even when there are no fixes or enhancements. The Linux kernel on the companion CD-ROM is generic and uses modules to support all types of hardware. You may want to build a new kernel that links in the drivers for only the devices installed on your system. In particular, if you have a SCSI hard disk, you may want to create a kernel that supports your SCSI adapter. Depending on your needs, you may also want to change some of the kernel-configuration options, such as creating a kernel that's specific for your Pentium processor (instead of a generic Intel 386 processor).

The rest of this chapter explains how to upgrade a kernel using a kernel RPM provided by Red Hat as well as how to rebuild and install a new Linux kernel.

Upgrading with a Red Hat Kernel RPM

Red Hat distributes all software updates, including new versions of kernels, in the form of RPM files. To download and install the kernel RPMs, follow these steps:

  1. Use a Web server to download the kernel RPM files from Red Hat's FTP server (the next section explains the details). If you want to rebuild the kernel, you have to download the kernel-source RPM corresponding to the new version of the kernel.

  2. Install the RPMs by using the rpm -i command.

  3. Create a new, initial RAM disk by running the /sbin/mkinitrd command.

  4. Reconfigure GRUB to boot the new kernel.

  5. Try out the new kernel by rebooting the system.

The next few sections further describe these steps.

Downloading New Kernel RPMs

Red Hat makes software updates available in the form of RPMs-packages-at its FTP server or one of the mirror sites listed at http://www.redhat.com/download/mirror.html. The updates are organized in directories according to Red Hat Linux version numbers. For example, any updates for Red Hat Linux 9 for Intel x86 systems reside in the 9/en/os/i386 directory. Use a Web browser (for example, Mozilla) to visit the FTP site and download any kernel RPMs available at that site.

Installing the Kernel RPMs

To install the kernel and the modules, follow these steps:

  1. Log in as root.

  2. Use the cd command to change directory to where the RPM files (the ones you have downloaded from Red Hat's FTP server) are located.

  3. Type the following command to install the kernel RPM:

    rpm -ivh kernel*.rpm

You need to install the kernel-source RPM only if you want to build a new kernel.

Making a New, Initial RAM Disk

Next, you have to make a new, initial RAM disk image-a file that the kernel can copy into a block of memory and use as a memory-resident disk.

Usually, the initial RAM disk image is stored in a file whose name begins with initrd. initrd is shorthand for initial RAM disk; the mkinitrd command is so named because it makes an initrd file.

Log in as root and type a command-line of the following form to create the initrd file:

mkinitrd /boot/initrd-filename.img  module-dir-name

The initrd file has to be in the /boot directory where the kernel is located. You can use any filename for initrd-filename. The module-dir-name is the name of the directory in /lib/modules where the module files are located. By convention, the module directory name is the same as the kernel version number. For example, if your kernel version (type the uname -r command to see the version number) is 2.4.20-2.48, the module directory name is 2.4.20-2.48. Another common practice is to use an initrd filename created by appending the version number to the initrd- prefix. Thus, for kernel version 2.4.20-2.48, the initrd file is initrd-2.4.20-2.48.img.

To create the initial RAM disk image for kernel version 2.4.20-2.48, type the following command:

/sbin/mkinitrd /boot/initrd-2.4.20-2.48.img 2.4.20-2.48

This creates the file initrd-2.4.20-2.48.img in the /boot directory. You refer to this initrd file in the GRUB configuration file (/etc/grub.conf).

Trying out the New Kernel

After installing the new kernel RPM, creating the initial RAM disk file, and reconfiguring GRUB, it's time to try the new kernel. To restart the system, log in as root and type the following command from the Linux prompt:

reboot

You may also reboot the system as you log out of the GNOME or KDE desktop. Select Restart the computer from the dialog box, and click OK.

When the system reboots and you see the GRUB screen, press the arrow key to select the new kernel's name. If you have added the new kernel description before all other operating systems in the GRUB configuration file, that kernel should boot even if you don't do anything at the boot screen.

After Red Hat Linux starts, you should see the usual graphical login screen. Log in as a user, open a terminal window, and type the uname -sr command to see the version number. The response should show that your system is running the new version of the kernel.

Rebuilding the Kernel

Rebuilding the kernel refers to creating a new binary file for the core Linux operating system. This binary file is the one that runs when Linux boots. You may have to rebuild the kernel for various reasons:

  • After you initially install Linux, you may want to create a new kernel that includes support for only the hardware installed on your system. In particular, if you have a SCSI adapter, you may want to create a kernel that links in the SCSI driver. The kernel in the companion CD-ROM includes the SCSI driver as an external module you load at start up.

  • If you have a system with hardware for which only experimental support is available, you have to rebuild the kernel to include that support into the operating system.

  • You may want to recompile the kernel and generate code that works well on your specific Pentium processor (instead of the generic 386 processor code that comes in the standard Red Hat Linux distribution).

To rebuild the Linux kernel, you need the kernel source files. The kernel source files are not normally installed. Use the following steps to install the kernel source files on your system:

  1. Log in as root and insert the second Red Hat Linux CD-ROM into the CD-ROM drive.

  2. If the CD-ROM drive does not mount automatically, type the following command to mount the CD-ROM drive:

    mount /mnt/cdrom

    If you are using GNOME or KDE, the CD-ROM is automatically mounted, and you should not have to perform this step manually.

  3. Change the directory to the RedHat/RPMS directory on the CD-ROM, and use the rpm command to install the kernel source files. Type the following commands:

    cd /mnt/cdrom/RedHat/RPMS
    rpm -ivh kernel-source*

    After the rpm command finishes installing the kernel source package, the source files appear in the /usr/src/linux-2.4 directory.

    Note 

    If you cannot find the kernel-source RPM on this book's CD-ROMs, you have to download that file from one of the mirror sites listed at www.redhat.com/download/mirror.html. Click on the Distribution link next to one of the listed FTP sites and then look in the directory corresponding to the Red Hat Linux version number. For example, the RPM files for Red Hat Linux 9 should be in the 9/en/os/i386/RedHat/ RPMS directory. Use a Web browser to download the kernel-source RPM file and install it by following the steps outlined above.

Building the kernel involves the following key phases:

  • Configuring the kernel

  • Building the kernel

  • Building and installing the modules (if any)

  • Installing the kernel and setting up GRUB

The next section describes the use of modules versus linking hardware support directly into the kernel. Subsequent sections describe the phases of kernel building.

Insider Insight 

When you create a custom kernel for your hardware configuration, you may want to link all required device drivers into the kernel. In this case, you can keep the size of such a monolithic kernel under control because you link in device drivers only for the hardware installed on your system.

Configuring the Kernel

The first phase in rebuilding a kernel is configuring it. To configure the kernel, log in as root. Then change the kernel source directory by using the cd command as follows:

cd /usr/src/linux*

To configure the kernel, you have to indicate which features and device drivers you want to include in your Linux system. In essence, you build a copy of Linux with the mix-and-match features you want.

Linux provides several ways for you to configure the kernel:

  • Type make menuconfig to enter the kernel-configuration parameters through a text-based interface similar to the one the Red Hat installation program uses.

  • Type make xconfig to use an X Window System-based configuration program to configure the kernel. You have to run X to use this configuration program with a graphical interface.

  • Type make config to use a shell script that prompts you for each configuration option one by one. You can use this configuration program from the Linux command prompt. When you use this option, you undergo a long question-and-answer process to specify the configuration parameters.

  • Type make oldconfig to use a shell script to reconfigure the kernel after upgrading the sources. This configuration script keeps the existing options and prompts you only for new or changed options.

Here are some lines from the .config file on my system (after I configure the kernel):

more .config
#
# Automatically generated make config: don't edit
#

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMIII is not set
CONFIG_MPENTIUM4=y 
(rest of the file not shown)    

Essentially, each configuration option has a name, and each one is assigned a value. The name begins with CONFIG_ followed by a word that identifies the option. Each selected option has a value of y (to link in support for that feature) or m (to use a module for that feature). Lines beginning with # are comments. Comment lines list features not selected.

Note 

I describe the configuration process through the make config command. Although this approach is somewhat tedious because it walks you through each option one by one, it is ideal as a learning tool. As you step through the groups of configuration options, I provide notes explaining what most of the options mean. You can then use any configuration tool (make xconfig, make menuconfig, make config, or make oldconfig) to configure the kernel.

As you configure the kernel with the make config command, you have to select how to include support for specific devices. Typically, for each configuration option, you have to respond with one of the following choices:

  • y to link support into the kernel

  • m to use a module

  • n to skip the support for that specific device

  • ? to get help on that kernel-configuration option

If a device does not have a modular device driver, you won't see the m option. For some configuration options, you may have to type a specific answer. For example, when responding to the processor type, type Pentium-4 to indicate that you have a Pentium 4 PC.

Starting the Kernel Configuration

To start configuring the kernel, type:

rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
/bin/sh scripts/Configure arch/i386/config.in
#
# Using defaults found in configs/kernel-2.4.20-i686.config
#
*
* Code maturity level options
*
Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]

Press Enter to accept the default Yes answer. This causes the configuration process to show all experimental device drivers.

Insider Insight 

The possible answers to each prompt appear in square brackets with the default answer in uppercase. Thus, [Y/n/?] means the default answer is Yes, and two other possible answers are n and ?. To accept the default, press Enter. For help on this option, press ?. If you have questions about any option, press ? and carefully read the help text before you decide what to do.

Enabling Support for Loadable Modules

The next group of options asks you about support for loadable modules. A loadable module is a block of code that the Linux kernel can load and execute as if it were a part of the operating system.

*
* Loadable module support
*
Enable loadable module support (CONFIG_MODULES) [Y/n/?]
  Set version information on all module symbols (CONFIG_MODVERSIONS) [Y/n/?]
  Kernel module loader (CONFIG_KMOD) [Y/n/?]

You want to include support for modules, so answer Yes to the first question. The next question asks you about including version information in each module. If modules have version information, the module is checked for compatibility with the current kernel version. Because it is easy to unload a module that does not work, I tend to answer No to this option. However, you may safely accept the default and press Enter. The third question asks whether or not you want the kernel to be capable of loading required modules. You should answer Yes to this option.

Configuring Processor-Related Features

The next set of questions involves the processor type and support for specific processor-related features. The first question of this set queries you about a new configuration parameter-CONFIG_LOLAT-when this parameter is set to y, the kernel uses code that tries to lower the latency (the time elapsed between an interrupt and starting the interrupt handler). You can press Enter to accept the default Yes answer.

The next question asks about your system's processor family. If you answer 386, the compiled kernel can run on any other processor (such as a 486 or any type of Pentium). However, if you are creating a kernel specifically for your system, enter your processor type from the choices shown in parentheses. If you have an older 386 or 486SX PC that does not have a math coprocessor, you should answer Yes to the math-emulation question and have the kernel perform floating-point arithmetic in software. You can also enable symmetric multiprocessing (SMP) support, but you should do so only if your system's motherboard has two or more processors.

There are a host of other processor-specific options in this section. You can read the help for each option and select the ones that apply to your system.

Configuring General Options

Next, comes a set of general options that deal with networking, PCI bus, MCA bus, PCMCIA, parallel port, and advanced power management (APM) BIOS support.

You can simply press Enter to accept the default answers for these options. If you don't understand what an option means, press ? to get help on that option.

Cross Ref 

One of the general options is CONFIG_SYSCTL. By answering Yes to this option, you enable the necessary support in the kernel so you can use the /sbin/sysctl program to view or set kernel parameters. Chapter 20 shows you how to use the sysctl program.

Enabling Plug and Play Support

The next two questions ask if you want to enable Plug and Play (PnP) support in the kernel. If you enable PnP support, the kernel automatically configures PnP devices (just as Windows does). You should press Enter to accept the default choices for these two questions.

*
* Plug and Play configuration
*
Plug and Play support (CONFIG_PNP) [Y/m/n/?]
  ISA Plug and Play support (CONFIG_ISAPNP) [Y/m/n/?]
Configuring Floppy and Parallel Port IDE Devices

The next set of questions involves the floppy and IDE (Integrated Drive Electronics) devices connected to the PC's parallel port.

*
* Block devices
*
Normal floppy disk support (CONFIG_BLK_DEV_FD) [Y/m/n/?]
XT hard disk support (CONFIG_BLK_DEV_XD) [M/n/y/?]
Parallel port IDE device support (CONFIG_PARIDE) [M/n/?]

The first question asks if you want floppy-drive support. Because most PCs do have a floppy drive, your answer generally is Yes. You should press Enter to accept the default for the third question if you have external CD-ROM or disk devices that connect through your PC's parallel port. Some IDE devices use a parallel port IDE adapter-that's what the PARIDE in the CONFIG_PARIDE option refers to.

The next set of options is for various parallel IDE drivers. You may want to build in support for parallel port IDE devices through loadable modules. That way, the modules are there if you need them, but the kernel doesn't become bloated with extra code.

Configuring Additional Block Devices

Next comes another set of options for block devices, which refers to devices that transfer data in chunks (as opposed to a keyboard that transfers data one character at a time). The CONFIG_BLK_DEV_LOOP option is for loopback device. Enabling the loopback device lets Linux manipulate an entire file system inside a single large file. The multiple devices driver (CONFIG_BLK_DEV_MD option) allows Linux to combine several hard-disk partitions into a single logical device. This option supports RAID (Redundant Array of Independent Disks) devices. The RAM disk support allows the kernel to use a portion of your system's memory as a disk capable of storing a file system. Typically, a RAM disk functions only during system startup when the hard disk may not yet be available. The RAM disk is essential if you are booting a SCSI disk and you haven't compiled the SCSI drivers into the kernel.

Enabling Cryptography Support

Next comes a set of options for enabling cryptography support in the kernel. You can build them as modules, as the default selections of the following options show:

*
* Cryptography support (CryptoAPI)
*
CryptoAPI support (CONFIG_CRYPTO) [M/n/y/?]
Cipher Algorithms (CONFIG_CIPHERS) [M/n/?]
*
* 128 bit blocksize
*
 AES (aka Rijndael) cipher (CONFIG_CIPHER_AES) [M/n/?]
 Identity Function cipher (CONFIG_CIPHER_IDENTITY) [M/n/?]
Crypto Devices (CONFIG_CRYPTODEV) [M/n/?]
 Loop Crypto support (CONFIG_CRYPTOLOOP) [M/n/?]
Configuring the Network

The next set of options deals with networking. How you answer depends on how you want to use your Linux system in a network. Here are some guidelines:

  • Answer Yes to enable CONFIG_NETFILTER if you want to use your Linux system as a firewall-an intermediary system that controls information flowing between a local area network (LAN) and the Internet. When you enable CONFIG_NETFILTER, you can use the Linux PC as a packet-filtering firewall. (See Chapter 22 for more information on packet filters.) You should also turn on this option if you want to use IP masquerading, which allows many systems on a private LAN to access the Internet through a Linux system with a single public IP address. Also, you have to turn on CONFIG_IP_NF_CONNTRACK, CONFIG_IP_NF_IPTABLES, and CONFIG_IP_NF_NAT. Chapter 13 explains IP masquerading.

  • If you answer Yes to CONFIG_IP_ALIAS, you can assign multiple IP addresses to a single network interface card.

  • You should always enable CONFIG_INET for TCP/IP networking.

  • Answer Yes to CONFIG_IP_ADVANCED_ROUTER if you want to use your Linux system as a router-a gateway between two LANs.

  • You should turn on CONFIG_IP_MULTICAST if you employ the Linux system to address several networked computers at once using IP multicasting.

  • You can enable CONFIG_SYN_COOKIES if you want Linux to resist a type of attack known as SYN flooding, which can overwhelm the network connection.

  • You can safely answer No to the IP tunneling (CONFIG_NET_IPIP) option. You need to address this option only in certain situations, such as moving a laptop from one network to another, without changing its IP address.

Note that the Linux kernel now supports the next version of the Internet Protocol: IP version 6 (IPv6, also called IPng or IP next generation).

Configuring Telephony Support

Next come two options for telephony support in Linux. With the right hardware and software, telephony support enables you to use the Linux system for making phone calls over the Internet (also known as voice over IP or VoIP).

*
* Network testing
*
Packet Generator (USE WITH CAUTION) (CONFIG_NET_PKTGEN) [N/y/m/?]
*
* Telephony Support
*
Linux telephony support (CONFIG_PHONE) [M/n/y/?]
QuickNet Internet LineJack/PhoneJack support (CONFIG_PHONE_IXJ) [M/n/?]
QuickNet Internet LineJack/PhoneJack PCMCIA support (CONFIG_PHONE_IXJ_PCMCIA) [M/n/?]

You can accept the default choices to build driver modules for telephony support if you have a telephony card, such as the Internet PhoneJACK or Internet LineJACK manufactured by Quicknet Technologies, Inc. If you do not have any Quicknet telephony cards, you can safely ignore this option.

Configuring IDE Devices

The next set of questions involves IDE devices, such as hard disks and ATAPI CD-ROM drives.

*
* ATA/IDE/MFM/RLL support
*
ATA/IDE/MFM/RLL support (CONFIG_IDE) [Y/m/n/?]
*
* IDE, ATA and ATAPI Block devices
*
Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (CONFIG_BLK_DEV_IDE) [Y/m/n/?]

This set of questions has four acronyms: ATA, IDE, MFM, and RLL. All of these relate to hard disks or interface of disk drives to the PC. Here's what they mean:

  • ATA stands for Advanced Technology Attachment and refers to the PC-AT style interface used to connect hard disks and CD-ROM drives to the PC's motherboard.

  • IDE stands for Integrated Drive Electronics and refers to the original PC hard disks that integrated the disk controller onto the hard disk itself. The IDE interface is more accurately described as AT Attachment Packet Interface, or ATAPI. You typically see the terms IDE, ATA, and ATAPI used interchangeably.

  • MFM stands for modified frequency modulation and refers to the way data was encoded on older hard drives. These hard drives can work over an IDE interface.

  • RLL stands for run length limited and is also a technique for storing data on hard disk. RLL disks can work over an IDE interface.

The first question asks if you want the kernel to support IDE devices. The second question asks if you want to use the full-featured IDE device that can control up to 10 IDE interfaces. Because each IDE interface can have a master and a slave device, this enables Linux to access a total of up to 20 IDE devices, such as disks or CD-ROM drives. You can press Enter to accept the default choices of Yes for both of these options.

Insider Insight 

The next set of options concerns various IDE drivers. The initial comment starts with a note that refers to the file /usr/src/linux-2.4/Documentation/ide.txt. You can find many useful help files (these are all text files) in the /usr/src/linux-2.4/Documentation directory.

You can accept the default answers for these options. Note that IDE/ATAPI FLOPPY refers to IDE floppy drives, such as Iomega Zip drive or Imation Superdisk LS-120 drive. The questions about CMD640 and RZ1000 bug fixes refer to some known problems with specific chipsets used in IDE interfaces.

Configuring SCSI Devices

Next follows an entire set of options that has to do with SCSI devices. SCSI stands for Small Computer Systems Interface and refers to a type of interface through which you can connect multiple devices such as hard disks and scanners to the PC. If your system has a SCSI adapter, you should start by answering Yes to the CONFIG_SCSI option. After that, you have to answer questions about the types of devices (disk, tape, CD-ROM) connected to the SCSI adapter. Finally, you must enable support for the specific SCSI adapter model on your system.

Insider Insight 

If your system has a SCSI adapter, always press y in response to all the needed SCSI options. Do not press m to create SCSI modules. You have to go through several extra steps to install a kernel that has to load modular SCSI device drivers. The easiest approach is to simply link in the SCSI support by answering y to options such as CONFIG_SCSI, CONFIG_BLK_DEV_SD and the configuration option corresponding to your SCSI adapter.

Configuring IEEE 1394 Support

The next set of options is for enabling IEEE 1394 support, either as a module or linked into the kernel. IEEE 1394 is a high-speed serial bus for connecting peripherals to PCs. Apple calls this bus FireWire; Sony calls it i.Link. IEEE 1394 is similar to USB, but it can transfer data at rates up to 400 Mbps, which is more than 30 times the data rate of the older USB version 1.1 (note that USB 2.0 is much faster; it can transfer data at rates of up to 480 Mbps). Because of its high data-transfer rates, IEEE 1394 is ideal for connecting high-speed peripherals such as digital audio and video devices and external hard drives to the PC.

The Linux kernel includes experimental support for the IEEE 1394 bus. Currently, Linux supports IEEE 1394 chipsets that are compatible with Texas Instruments PCILynx/ PCILynx2 and OHCI chipsets. If your PC has an IEEE 1394 adapter, you can build the necessary drivers through the following options:

*
* IEEE 1394 (FireWire) support (EXPERIMENTAL)
*
IEEE 1394 (FireWire) support (EXPERIMENTAL) (CONFIG_IEEE1394) [M/n/y/?]
*
* Device Drivers
*
  Texas Instruments PCILynx support (CONFIG_IEEE1394_PCILYNX) [N/m/?]
  OHCI-1394 support (CONFIG_IEEE1394_OHCI1394) [M/n/?]
*
* Protocol Drivers
*
  OHCI-1394 Video support (CONFIG_IEEE1394_VIDEO1394) [M/n/?]
  SBP-2 support (Harddisks etc.) (CONFIG_IEEE1394_SBP2) [M/n/?]
    Enable Phys DMA support for SBP2 (Debug) (CONFIG_IEEE1394_SBP2_PHYS_DMA) [Y/n/?]
  Ethernet over 1394 (CONFIG_IEEE1394_ETH1394) [M/n/?]
  OHCI-DV I/O support (CONFIG_IEEE1394_DV1394) [M/n/?]
  Raw IEEE1394 I/O support (CONFIG_IEEE1394_RAWIO) [M/n/?]
  IEC61883-1 Plug support (CONFIG_IEEE1394_CMP) [M/n/?]
    IEC61883-6 (Audio transmission) support (CONFIG_IEEE1394_AMDTP) [M/n/?]
Excessive debugging output (CONFIG_IEEE1394_VERBOSEDEBUG) [N/y/?]

To learn more about using IEEE 1394 peripherals in Linux, visit the website of the IEEE 1394 for Linux project at http://www.linux1394.org/.

Configuring I2O drivers

Pronounced eye-two-oh, I20 refers to Intelligent Input/Output-a new device driver architecture independent of the operating system and the controlled device. I2O functions by logically separating the part responsible for managing the device from the part that contains operating system-specific details (it's called the I2O Split Driver model). The two parts of an I2O driver are the OS Services Module (OSM), which works with the operating system, and the Hardware Device Module (HDM) that interfaces with the particular device the driver manages. The OSM and HDM communicate by passing messages to each other. To learn more about I2O, visit the Intelligent-IO.com website at http://www.intelligent-io.com/.

Linux comes with some I2O drivers for SCSI and PCI devices. You can build the I2O drivers through the following configuration options:

*
* I2O device support
*
I2O support (CONFIG_I2O) [M/n/y/?]
  I2O PCI support (CONFIG_I2O_PCI) [M/n/?]
  I2O Block OSM (CONFIG_I2O_BLOCK) [M/n/?]
  I2O LAN OSM (CONFIG_I2O_LAN) [M/n/?]
  I2O SCSI OSM (CONFIG_I2O_SCSI) [M/n/?]
  I2O /proc support (CONFIG_I2O_PROC) [M/n/?]
Configuring Network Adapters

The next group of options involves networking. It includes the configuration of LAN adapters such as Ethernet (10/100 Mpbs as well as Gigabit Ethernet), ATM (Asynchronous Transfer Mode), Token ring, ARCnet, and AppleTalk network adapters. You can also enable dial-up and wide area network (WAN) support by using SLIP and PPP through options in this category.

For Ethernet, you can build support for the Ethernet card installed on your system. This category also includes support for wireless networking and drivers for wireless Ethernet cards.

Network adapters also includes support for modems built into sound cards.

Enabling Support for Infrared Devices

The Linux kernel now supports IrDA-compliant infrared (IR) devices. This set of options allows you to enable support for IrDA devices. If your PC has any IrDA interfaces, you can build the modules needed to support such devices.

Many IR interfaces are in the form of dongles-small adapters that typically attach to the serial port of the PC. You can use the options in this section to enable support for several common types of dongles.

Enabling Support for ISDN

The next set of options enables you to include support for ISDN (Integrated Services Digital Network)-a digital telephone line you can use to connect the Linux system to the Internet. These ISDN-related options include the configuration of specific ISDN adapters.

You should build the ISDN driver only if your PC has an ISDN card. If you anticipate adding an ISDN card and purchase ISDN service from the phone company, you can build the driver as a module. Read the file /usr/src/linux-2.4/Documentation/isdn/ README for more information on how to set up and use the ISDN driver in Linux.

Configuring CD-ROM Drives with Proprietary Interfaces

If you have a CD-ROM drive with a proprietary interface-not a SCSI or IDE (ATAPI) CD-ROM drive-you should select your CD-ROM interface from the following set of options:

*
* Old CD-ROM drivers (not SCSI, not IDE)
*
Support non-SCSI/IDE/ATAPI CDROM drives (CONFIG_CD_NO_IDESCSI) [Y/n/?]

If you enter y for that option, you can select the specific model of proprietary CD-ROM drive that your system has.

Typically, you can ignore the CD-ROM options, unless you have an old non-IDE and non-SCSI CD-ROM drives.

Configuring Character Devices

The next few options deal with configuring character devices, which include devices connected to the serial and parallel ports. These options also include configuration of multiport serial interface cards that enable you to connect multiple terminals or other devices to your Linux system. Answer No if you do not have any such devices on your system. Near the end of the list, you see a question about parallel-printer support (CONFIG_PRINTER). If you plan to connect a printer to the parallel port, answer Yes to this option.

Configuring I2C Protocol

I2C-pronounced eye-squared-see-is a protocol Philips has developed for communication over a pair of wires at rates between 10 and 100 kHz. System Management Bus (SMBus) is a subset of the I2C protocol. Many modern motherboards have an SMBus meant for connecting devices such as EEPROM (electrically erasable programmable read-only memory) and chips for hardware monitoring. Linux supports the I2C and SMBus protocols. You need this support for Video for Linux. If you have any hardware sensors or video equipment that needs I2C support, answer m to the CONFIG_I2C option, and answer m to the specific driver for your hardware. For example, if you want to use a BT848 frame-grabber board (to capture video), you should answer m to the CONFIG_I2C_ALGOBIT option.

To learn more about the I2C, read the documentation in the /usr/src/linux-2.4/ Documentation/i2c directory. In particular, the summary file briefly describes the I2C and SMBus protocols.

Specifying the Type of Mouse

From the next set of options, specify the type of mouse on your PC:

*
* Mice
*
Bus Mouse Support (CONFIG_BUSMOUSE) [M/n/y/?]
  ATIXL busmouse support (CONFIG_ATIXL_BUSMOUSE) [M/n/?]
  Logitech busmouse support (CONFIG_LOGIBUSMOUSE) [M/n/?]
  Microsoft busmouse support (CONFIG_MS_BUSMOUSE) [M/n/?]
Mouse Support (not serial and bus mice) (CONFIG_MOUSE) [Y/m/n/?]
  PS/2 mouse (aka "auxiliary device") support (CONFIG_PSMOUSE) [Y/n/?]
  C&T 82C710 mouse port support (as on TI Travelmate) (CONFIG_82C710_MOUSE) [M/n/y/?]
  PC110 digitizer pad support (CONFIG_PC110_PAD) [M/n/y/?]
  MK712 touch screen support (CONFIG_MK712_MOUSE) [M/n/y/?]
Enabling Support for Joysticks

If you have a joystick or a special game controller (steering wheel, game pad, six-degrees-of-freedom controller), you can build the driver modules for your game controller from the options in this section.

Enabling Support for a Non-SCSI Tape Drive

If you have a non-SCSI tape drive that uses the QIC-02 format, you should answer Yes to the next question; otherwise, answer No:

QIC-02 tape support (CONFIG_QIC02_TAPE) [N/y/m/?] 
Configuring the Watchdog Timer

Configuration options in the next set enable you to turn on support for the watchdog timer. Essentially, this causes the kernel to create a special file; failure to open the file and write to it every minute causes the system to reboot. Some watchdog boards can monitor the PC's status (including the temperature). You can also enable support for specific watchdog cards from this set of options.

If you want access to the PC's nonvolatile (battery-backed) memory-NVRAM-in the real-time clock, answer Yes to the CONFIG_NVRAM option. You can get access to the real-time clock by enabling the CONFIG_RTC configuration option.

Configuring Floppy Tape Drive

If you have a tape drive connected to your floppy controller, answer y or m to the next option, and select the other parameters appropriately (or accept the default choices):

*
* Ftape, the floppy tape device driver
*
Ftape (QIC-80/Travan) support (CONFIG_FTAPE) [M/n/y/?]
  Zftape, the VFS interface (CONFIG_ZFTAPE) [M/n/?]
  Default block size (CONFIG_ZFT_DFLT_BLK_SZ) [10240]

You can also enable several parameters related to floppy tape drives.

Configuring Graphics Support

The next set of options configures support for advanced video cards that can perform hardware-accelerated, 3D graphics. You can enable the first option to build the AGP (Accelerated Graphics Port) driver and can answer Yes to the option for your specific chipset.

/dev/agpgart (AGP Support) (CONFIG_AGP) [M/n/y/?]
  Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support (CONF
IG_AGP_INTEL) [Y/n/?]
  Intel I810/I815/I830M (on-board) support (CONFIG_AGP_I810) [Y/n/?]
  VIA chipset support (CONFIG_AGP_VIA) [Y/n/?]
  AMD Irongate, 761, and 762 support (CONFIG_AGP_AMD) [Y/n/?]
  AMD 8151 support (CONFIG_AGP_AMD_8151) [Y/n/?]
  Generic SiS support (CONFIG_AGP_SIS) [Y/n/?]
  ALI chipset support (CONFIG_AGP_ALI) [Y/n/?]
  Serverworks LE/HE support (CONFIG_AGP_SWORKS) [Y/n/?]

Next, you have to configure a set of options for the Direct Rendering Manager (DRM)-a device-independent driver that supports the XFree86 Direct Rendering Infrastructure (DRI). DRI is meant for direct access to 3D graphics hardware in advanced graphics cards,

such as 3Dfx Banshee and Voodoo3. To learn more about DRI, use your Web browser to visit the URL http://dri.sourceforge.net/.

If you have a 3D graphics card, you can answer Yes to CONFIG_DRM and build the module for the graphics card in your system. If you do not have one of the listed graphics cards, you should answer No to these options.

Configuring Audio and Video Devices

The next set of options involves audio and video devices, including FM radio cards. For more information on these devices, consult the documentation in the /usr/src/linux-2.4/Documentation/video4linux directory.

Enabling Support for Specific File Systems

The next set of options enables you to turn on support for specific types of file systems. You can make your choices based on the guidelines shown in Table 21-2.

Table 21-2: Common File System Configuration Options

Option

Description

CONFIG_ADFS_FS

Enables Linux to read from the ADFS-the Acorn Disc Filing System-the standard file system of the RiscOS operating system that runs on Acorn's ARM-based Risc PC systems and the Acorn Archimedes systems. Answer y if you want Linux to read from ADFS partitions on hard drives and from ADFS floppy disks.

CONFIG_AFFS_FS

Enables support for the Fast File System (FFS)-the file system used by Amiga systems since AmigaOS version 1.3 (34.20). Answer y if you need to read from and write to an Amiga FFS partition on your hard drive. Note that this support does not enable Linux to read from Amiga floppy disks because of an incompatibility of the floppy controller used in an Amiga and the standard floppy controller in PCs.

CONFIG_CODA_FS

Enables support for Coda, an advanced network file system that is similar to NFS but that better supports disconnected operation (for example, laptops) and is a better security model. Answer y only if you need your Linux system to act as a Coda client. Consult the file /usr/src/linux-2.4/ Documentation/filesystems/coda.txt for more information.

CONFIG_EXT2_FS

Enables support for the second extended file system. You should definitely answer y to turn on this option.

CONFIG_EXT3_FS

Enables support for the journaling version of the second extended file system-the current standard file system for Linux. You should definitely answer y to turn on this option. The use of journaling means that you do not have to check the file system after a crash-the journal keeps track of all changes and can keep the file system consistent even if there is a crash.

CONFIG_FAT_FS

Turns on support for any File Allocation Table (FAT)-based file system (including MS-DOS and Windows 95 VFAT file systems). Answer y if you want to access MS-DOS or VFAT files.

CONFIG_HFS_FS

Enables Linux to mount Macintosh-formatted floppy disks and hard drive partitions with full read/write access. Answer y if you want to access Macintosh file systems.

CONFIG_HPFS_FS

Enables your Linux system to access and read an OS/2 HPFS file system (you can only read HPFS files). Answer y if you have an OS/2 partition on your hard disk.

CONFIG_ISO9660_FS

Turns on support for the standard ISO 9660 file system used on CD-ROMs (this is also known as the High Sierra File System and is referred to as hsfs on some UNIX workstations). If you have a CD-ROM drive, answer y here.

CONFIG_JOLIET

Enables support for Microsoft's Joliet extension for the ISO 9660 CD-ROM file system, which allows for long filenames in Unicode format (Unicode is the new 16-bit character code that can encode the characters of almost all languages of the world.) Answer y if you want to be able to read Joliet CD-ROMs under Linux.

CONFIG_MINIX_FS

Supports the Minix file system-the original file system of Linux. This simple file system still functions on floppy disks, so you should answer m to include support in the form of a module.

CONFIG_MSDOS_FS

Supports MS-DOS file systems. Press y if you want to read an MS-DOS partition on the hard disk or an MS-DOS floppy.

CONFIG_NFS_FS

<