Table of Contents
This module will describe the kernel source tree and the documentation available. We will also apply patches and recompile patched kernels. Information found in the /proc directory will be highlighted.
In the kernel source tree /usr/src/linux,
the kernel components are stored in various subdirectories:
| Subdirectory | Description | Example |
|---|---|---|
./drivers | contains code for different types of hardware support | pcmcia |
./fs | code for filesystem supported | nfs |
./net | code for network support | ipx |
These components can be selected while configuring the kernel (see Section 1.2, “Compiling a Kernel”).
The various kernel image types differ depending only on the type of compression used to compress the kernel.
The make tool will read the
/usr/src/linux/Makefile to compile:
A compressed linux kernel using gzip is
compiled with make zImage. The compiled kernel will be
/usr/src/linux/arch/i386/boot/zImage.
A compressed linux kernel using better compression is
compiled with: make bzImage. The compiled image will be
/usr/src/linux/arch/i386/boot/bzImage.
One can also use make zdisk or
make bzdisk to create compressed kernels on
a floppy. The compiled kernel will be written to
/dev/fd0. Remember to put a floppy in the
drive!
Most documentation is available in the
/usr/src/linux/Documentation directory.
The main files are the following:
| File | Description |
|---|---|
00-INDEX | Summary of the contents for each file in the
Documentationdirectory |
Configure.help | Contains the help displayed when configuring a kernel |
The Configure.help file also provides
further information for when a kernel module doesn't load properly.
Specific options and aliases for /etc/modules.conf
are specified in that file.
Information about compiling and documentation is available in
/usr/src/linux/README.
The version of the kernel is set at the beginning of the Makefile.
VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 22 EXTRAVERSION =
Make sure to add something to the
EXTRAVERSION line like
EXTRAVERSION=-test.
This will build a kernel called
2.4.22-test
![]() | Note |
|---|---|
You need the - sign in
|