Chapter 2. Requirements for building and using the kernel
This chapter describes the programs you need to configure a kernel, build it, and successfully boot it. It's a smart idea to consult the file Documentation/Changes to verify the specific version number you should have of each tool described in this chapter. This chapter was based on the 2.6.18 kernel, and describes the versions of tools that work with that kernel. If you are using a different kernel, please verify that you have the required versions as specified in this file, or things might not work properly and it can be very hard to determine what went wrong.
Tools to build the kernel
Most Linux distributions offer an installation option to install a
range of Kernel Hacking
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.
Only three packages that are needed in order to successfully build a kernel: a compiler, a linker, and a make utility. This section describes the contents of each package.
Compiler
The Linux kernel is written 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 entitiled 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.
As of the 2.6.18 kernel release, the 3.2 version of GCC is the ...
Get Linux Kernel in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.