Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Complete Idiot's Guide to Linux
(Publisher: Macmillan Computer Publishing)
Author(s): Manuel Ricart
ISBN: 078971826x
Publication Date: 12/22/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Configuring the New Kernel

Kernel compiling is done with special tools included in the Linux kernel source. You have three tools to choose from:

  config
  menuconfig
  xconfig

Config is an interactive script that asks you questions for each of the options about which it needs information to configure properly. I find an interactive program is better for this sort of exercise. Use menuconfig if you are using a shell or xconfig if you are working under X (or KDE as it is also called).

To start the configuration tool, first change to the /usr/src/linux directory and enter:

     make toolname


Xconfig provides buttons to configure the various options.

Where toolname is the name of the tool you want to use. Here’s the screen you’ll see if you use xconfig.

In this window, take a look at the options included. Xconfig gives you buttons for the following configuration settings:

  Code maturity level options
  Loadable module support
  General setup
  Floppy, IDE, and other block devices
  Networking options
  SCSI support
  SCSI low-level drivers
  Network device support
  ISDN subsystem
  CD-ROM drivers (not for SCSI or IDE/ATAPI drives)
  Filesystems
  Character devices
  Sound
  Kernel hacking
  STREAMS subsystem

If you know for a fact that your system doesn’t contain specific hardware, disable it in the configuration. If you aren’t positive, it’s best to leave the default setting. Limit your initial experimentation with kernel building to the general setup, networking options, sound, SCSI support and SCSI low-level drivers. Provided that you know the hardware you have, you will be able to eliminate a lot from these options and leave only those items that apply to your specific hardware. If you are unsure about an item, leave it be. (It’s not a bad idea to check out the online help system if you come across something you need to know more about…it’s what it’s there for!)

After you have configured all your drivers, click the Save, then the Exit button. This saves a new configuration file.


Check This Out:  Say what? You want sound?
With Linux, you either have sound or you don’t. I know, it seems like a joke, but it’s the truth. Sound cards for all Linux users are either easy or hard to configure (not much gray area to that).

If you happen to be among those who have an easy sound card, then the process of recompiling the kernel discussed in this chapter will get you on the road to cranking out sound. During the recompilation configuration process, you’ll see a series of sound questions such as the following:

     Sound card support (CONFIG_SOUND) [Y/n/m/?]
     /dev/dsp and /dev/audio support (CONFIG_AUDIO) [Y/n/?]
     MIDI interface support (CONFIG_MIDI) [Y/n/?]
     FM synthesizer (YM3812/OPL-3) support (CONFIG_YM3812) [Y/n/?]
     ProAudioSpectrum 16 support (CONFIG_PAS) [N/y/?]
     Sound Blaster (SB, SBPro, SB16, clones) support (CONFIG_SB)
       [Y/n/?]
     Generic OPL2/OPL3 FM synthesizer support (CONFIG_ADLIB) [Y/n/?]
     Gravis Ultrasound support (CONFIG_GUS) [N/y/?]

For basic sound support, always answer yes to the CONFIG_SOUND, CONFIG_AUDIO, and CONFIG_ADLIB options. You’ll also need to choose at least one sound card to support. If you know the model and make of your sound card, then you’re in good shape and can answer Y to the right one. After you choose your card, you’ll need to answer a couple of questions about it (IRQ, base address, and so on). With an easy sound card, the setup isn’t much different than setting up SCSI controllers, multiport serial boards, or parallel devices.

If you’re one of the unfortunate souls who has a hard sound card, like the Creative AWE Plug’N’Play cards, you’re better off without sound for a while. The concepts you’ll need to know to get this type of sound card going are something for the more seasoned Linux user rather than the beginner, so hang in there!


Compiling the Kernel and Necessary Modules

Compiling builds binary files that your computer is able to execute. To build your new kernel, enter the following commands in a root shell. Note that these commands generate a lot of output that I have omitted:

     [root@digital linux]# make dep
     [root@digital linux]# make clean
     [root@digital linux]# make zImage
     [root@digital linux]# make modules

The preceding commands (especially make zImage) will take a while. It can be anywhere from a few minutes (on a Pentium computer) to several days (on a 386 computer), depending on your choices and the speed of your hardware. If they all finish without any errors, you are ready to install your new kernel.

Installing the New Kernel

The newly built kernel exists in /usr/src/linux/arch/i386/boot/zImage. Before you install it, you need to make sure that you don’t overwrite the existing kernels. These are stored as /vmlinuz and in /boot/vmlinuz-2.0.35-modular (the version will depend on your installation). You don’t need to move them, simply make sure that you don’t overwrite them. If you do and your new kernel fails to work properly, your system might become unbootable.

Copy your new kernel, with a new name, into the /boot directory:

     # cp /usr/src/linux/arch/i386/boot/zImage /boot/vmlinuz-2.0.35-apm

I named my new kernel for its version and added the apm (Advanced Power Management) portion so that I can distinguish it from the existing kernels. Any additional name is fine, provided you don’t overwrite an existing kernel.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.