Previous Section  < Day Day Up >  Next Section

Recipe 10.5. Building the 2.6 Kernel

10.5.1 Problem

You would like to try the 2.6 kernel, and you need to know the new build commands, which are different from those for the 2.4 kernel.

10.5.2 Solution

In this example, our new kernel is version 2.6.3. Back up of all of your data, and have a rescue disk at hand.

Make hard copies of the outputs of dmesg, lscpi, cat /proc/cpuinfo, and lsusb.

Download and unpack new kernel sources into a folder in your home directory, such as ~/src. Change to the top-level directory of your new source tree (~/src/linux-2.6.3).

Edit the new kernel makefile (~/src/linux-2.6.3/Makefile), giving a custom value to EXTRAVERSION, such as EXTRAVERSION =-test. Then run the following commands:

$ make mrproper

$ make xconfig

$ make

$ su

# make modules_install

# cp ~/src/linux-2.6.3/arch/i386/boot/bzImage  /boot/vmlinuz-2.6.3-test

# cp ~/src/linux-2.6.3/System.map  /boot/System.map-2.6.3-test

Save a copy of your new .config file in a directory outside of the build tree. Add the new kernel to your bootloader, reboot, and have fun.

10.5.3 Discussion

You need Qt, qt-devel, and X to run xconfig. menuconfig also works nicely.

The make command, all by itself, replaces make dep, make bzImage, and make modules.

10.5.4 See Also

  • This chapter's "Introduction," for where to get kernel sources

  • Recipe 10.2, for explanations of the build commands and how to configure the bootloader

  • The online help in the kernel configurator—almost every configuration item has an entry

    Previous Section  < Day Day Up >  Next Section