Requirements for building and using the kernel
Tools to build the kernel
Most linux distributions offfer an installation option to install a range of kernel backing packages.
If your distribution offers this option, it is easiest to install this instead of trying to track down all of the individual programs that are needed for this task.
-------------------------------------------------------------------------------------------------------------------------------
COMPILER
The linux kernel is write in the C programming language, with a small amount of assembly language in some places.
To build the kernel, the gcc C compiler must be used.
Most linux distributions have a package entitled gcc that should be installed.
If you wish to download the compiler and build it yourself, you can find it at http://gcc.gnu.org
To determine whick version of gcc you have on your system, run the following command:
$gcc --version
-----------------------------------------------------------------------------------------------------------------------------------
LINKER
The C compiler, gcc, does not all of the compiling on its own.
It needs an additional set of tools known as binutils to do the linking and assembing of source files.
The binutils package also contains useful utilities that can manipulate object files in lots of usful ways, such as to view the contents of a library.
To determine which version of binutils you have on your system, run the following command:
$ld --version
--------------------------------------------------------------------------------------------------------------------------
MAKE
make is a tool that walks the kernel source tree to determine which files need to be compiled, and then calls the compiler and other build tools to do the work in building the kernel.
The kernel requires the GNU version of make, which can usually be found in a package called make for your distribution.
To determine which version of make you have on your system, run the following command:
$make --version
-----------------------------------------------------------------------------------------------------------------------------------------------
UTIL-LINUX
The util-linux package is a collection of small utilties that do a wide range of different tasks.
Most of these utilities handle the mounting and creation of disk partitions and manipulation of the hardwrare clock in the system.
To determine which version of the util-linux package you have on your system, run the following command
$fdformat --version
-----------------------------------------------------------------------------------------
module-init-tools
The module-init-tools package is needed if you wish to use linux kernel modules.
A kenel module is a loadable chunck of code that can be added to or removed from the kernel while the kernel is running.
It is useful to compile device drivers as modules and then load only the ones that correspond to the hardward present in the system.
To determine which version of the module-init-tools package your have on your system, run the following command:
$depmod --version
---------------------------------------------------------------------------------------------------------------------------------