Note the increase in size of the kernel files as the release numbers increase. This is an illustration of code bloat, which is endemic to computer software as new features and support for new hardware are added. One major reason for re-building your kernel is to reduce the negative impact of code bloat by tailoring the kernel to match your needs.
gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0EIf you see a message like 'gpg: Good signature from "Linux Kernel Archives Verification Key
gpg --verify linux-2.6.37.tar.bz2.sign linux-2.6.37.tar.bz2
If there is a question about the correctness of the public key, see http://www.kernel.org/signature.html.
Kernel modules are used to reduce memory requirements; they are only loaded as needed. They are stored in /lib/modules, with a seperate sub-directory for each kernel version. Modules can be loaded and removed manually with insmod and rmmod, but usually one uses the modprobe command so that all the required modules are loaded at once. Both insmod and modprobe allow the setting of module parameters, but unless you are playing or debugging, module parameters are usually stored in /etc/modules.conf:
options (module-name, without the ".ko") (parameters)Note that in order to build a kernel, the root filesystem must be mounted writable since both /boot and /lib are written to.
cp /boot/config-2.6.32.full .config
cp .config /boot/config-custom
(make) 2>&1 | tee ../kernel.log
cp arch/i386/boot/bzImage /boot/bzImage-custom
cp System.map /boot/System.map-custom
(make modules_install) 2>&1 | tee -a ../kernel.log
These commands assume that you wish to modify the existing kernel configuration (stored in /boot/config-lfsgeneral). It is always a good idea to make relatively few changes at a time to an existing, tested configuration.
The make targets perform the following actions on the kernel source tree:
Some options must be selected to be built-in, ie., not as a module. This includes any support necessary to access your root filesystem (ie., Enable the block layer, Device Drivers - ATA/ATAPI/MFM/RLL support with its subcategories generic ATA/ATAPI disk support and ATA disk dupport, and any chipset support required).
Some hardware seems to work best built-in, but if you build it as a module you have the option to play with parameters without rebooting, which can be a real benefit if you're having trouble getting it working. And some parameters are not available as modules; these must either be built-in in order to function properly, or are parameters which do not involve additional code.
A few configuration parameters deserve additional comment:
In general, enable all devices which you might ever use as modules; in particular,
There are several kernel boot options which may be useful:
©2012, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.