Originally Published: Thursday, 11 January 2001 Author: Brian Richardson
Published to: enhance_articles_hardware/Hardware Articles Page: 1/1 - [Printable]

Kernel Upgrade: Know Your Hardware

Lots of documentation exists describing how to compile the kernel. Now it's time for a document that talks about what to do before the kernel is compiled.

   Page 1 of 1  

Now that the 2.4.0 Linux kernel has been officially released, the great orgy of compiling has begun. Thousands of progressive Linux users are downloading kernel sources, preparing to reap the benefits of new and improved hardware support. As the flurry of upgrading goes on, many newer Linux users are searching the Web for kernel assistance. Many kernel help pages tell users how to compile the kernel, but do not explain how to prepare for a new kernel.

Kernel Functions

The kernel of any operating system provides basic hardware support. Many operating system kernels provide very broad support, allowing one pre-compiled binary to work with a variety of hardware combinations. Linux is unique in that the kernel can be form-fitted to your configuration. Picking the right options at compile time creates a lightweight kernel, optimized for your specific machine.

The question is how to make sure the right options get compiled into your kernel.

Know Your Hardware

The key to proper kernel configuration is knowing exactly what you have in your computer, and what you want to support (note the extreme emphasis on personal choice). The kernel can include modules for many possible devices, or be a minimalist piece of code for your particular beige box. Either way, your system configuration must be known before compilation.

There are many specific things you need to know about your system to build the proper kernel. In general, they break down into the following major groups:

  • CPU - The kernel offers optimizations for most major processor architectures.
  • Motherboard Chipset - This determines processor, bus, storage, and peripherals supported by your computer.
  • Add-in cards - Video cards, SCSI controllers, sound cards, network cards and other devices connecting directly to a major bus (PCI, AGP, ISA, PCMCIA, ..).
  • Peripherals - Storage, input devices, and various electrical devices attached to your computer to provide functionality. This is a large group of devices, very dependent on the motherboard chipset and add-in cards. Despite being attached to a bus, USB devices fall into this catagory.
There are various mechanisms to obtain this information:
  1. Product Documentation: This is helpful for determining the chipset and processor support for your motherboard (assuming the manuals weren't discarded after installation).
  2. Visual Inspection: Brand names, model numbers, chipset versions ... cryptic sequence of numbers printed on green and black items in the beige box.
  3. Examine Current System Configuration: Your currently running Linux configuration contains most of the required information, assuming you know how to interpret it. Examine the contents of files in /proc to see how Linux has configured your system (/proc/cpuinfo, /proc/pci, /proc/bus/*, /proc/ide/*, /proc/scsi/*, ...). Graphical representations of this information exist on various distributions (HardDrake).
Be Prepared

A few last notes before rushing headlong into kernel-land ..

  • If you are unfamiliar with kernel compilation, read documentation on the process before downloading. Searching the Web generates a variety of help guides.
  • Make sure you have installed some sort of boot loader, like lilo or grub. This makes it easier to install new kernel boot images, and to boot back to the previous kernel in the event of a minor disaster.
  • Write down your system configuration (unless you've got it memorized). Keep it handy. Obtain all of this information before you download the kernel source. The most important information is the motherbord chipset, which determines IDE hard disk controller support.
  • If the device is not required for booting, load device support as modules instead of compiled directly into the kernel. This makes the kernel smaller, and prevents the kernel from hanging if an error is encountered at load time.
Arming yourself with the proper system information before kernel compilation makes the process easier. Stay tuned to linux.com for more articles on the 2.4 kernel and how to compile it to suit your needs.
Those present at LWCE 2001 can find Brian Richardson loitering at the Linux.com booth. Linux.com Live! will have a demonstration of the 2.4.0 kernel at the show.

   Page 1 of 1