Tools for Building the Linux Kernel
The tools and there version play a critical role in the building of a kernel. Most tools are required, but a few (such as the graphical packages required for gconfig or xconfig) are optional. Besides having the right tools installed on the system, the tool versions must match those required to build the installed kernel source. The purpose of this article is to minimize the chance of a kernel build failure due to a missing or improper version of a necessary tool.
The file Documentation/Changes contains a list of the tools required to build the kernel and the minimum version requirements. There is no guarantee that the versions specified in the Changes file are the versions used to build the running kernel. The best practice is to make sure that all the tool packages are up-to-date.
The Changes document lists the tools required to build the kernel. It does not tell you what packages are required to build the kernel. Like the kernel source code, there are differences in packaging between different distros of Linux. Some distros also require additional tools not referenced in the Changes document. The Changes file also ignores the packages required for the gconfig or xconfig targets of the kernel makefile.
CentOS 5.4
The Wiki How-To document “I Need to Build a Custom Kernel” lists the packages that you need to install to build the kernel. The command ‘yum groupinstall “Development Tools”" is a shotgun approach to install the required tools. It is a bit of overkill, but it works. Depending on your initial install, you still may be missing some files for the gmenu target of the kernel makefile.
Fedora 12
The “Building a Custom Kernel” document in the Fedora Wiki does not provide any instructions related to the required tools. The command ‘yum groupinstall “Development Tools”‘ is major overkill for Fedora. I suggest installing the individual packages listed in the CentOS Wiki page mentioned above. From their, you can go through the list of tools described in the Document/Changes file in the kernel source.
Linux Mint 8
The same as those for Ubuntu / Xubuntu.
Mandriva 2010
If all went well during the install, the package manager installed all the tools as dependencies of the kernel source.
openSUSE 11.2
The install script for openSUSE 11.2 allows you to install the kernel source and required tools as part of the installation process. If you skipped that part, there is still an easy way to install everything that is missing. YaST2′s Install Software option has an “RPM Groups” tab. If you click on Metapackages, you can install everything you need with “patterns-openSUSE-devel-basis” and “patterns-openSUSE-devel-kernel.”
SimplyMepis 8.0
If you followed the “Compiling and installing a new kernel” document when install the source, you should have installed the required packages for building the kernel.
Xubuntu 9.10
If you were following the step-by-step instructions in the “Kernel Compile” community document, you also installed the tools necessary to configure and compile the kernel.
Summary
Just like any building project, you need the correct tools to successfully complete the project. When it comes to software projects, tools versions are critical. When you change the version of gcc, for example, you change the resulting product. A lesson I learned from being the Product Line Engineering manager at Fortune Systems, a UNIX systems manufacturer that existed before Sun Microsystems.

