DistributedNetworks DistributedNetworks


Compiling Kernel   «Prev 

Configuring Linux Kernel before compilation

Step one: change into the /usr/src/linux directory. All subsequent commands will run relative to this directory.

Step two: type make mrproper to restore the kernel sources to a clean state.

Step three: copy a default configuration file to the arch/i386/defconfig file. In this example, you copied an Intel 686 default profile. Because a default profile already exists, Red Hat Linux will prompt you to overwrite the existing file. It is safe to answer "y."

Step four: create a starting Linux kernel configuration file by typing make oldconfig. This incorporates the default configuration you copied in the previous step into your Linux kernel configuration.

Step five: create the kernel configuration file using one of the standard configuration utilities: make xconfig, make menuconfig, or make config. make xconfig is X-based and menu driven; make menuconfig is VGA-based and menu driven; and make config is command-line driven. Try out all three possibilities and choose the one you find most comfortable to work with. make menuconfig is easy to use and text based, and it is often the best choice.

The colorized menu interface for make menuconfig is very useful. You can use the arrow keys to move up and down, and the Enter key to move into submenus. To build support for an item into the kernel, highlight the item and press Y. To build modular support, highlight the item and press M. To turn off support, highlight the item and press N.

Save your changes before you exit the configuration program.

Once you are outside of make menuconfig, you see that it prompts you for the next steps.

Step six: update the EXTRAVERSION variable in the Linux kernel configuration makefile. You can set this to any value, but something you easily recognize and that is different from your last kernel configuration is recommended. A good choice is simply to append a revision number to Red Hat's value, e.g. 2.2.14-5.0r1. Whatever value you choose, make sure it starts with a hyphen (-).

Step seven: type make dep to create the source dependencies and propagate configuration information to all makefiles in the development tree.

Step eight: type make clean to remove old object files.