Next: Where to Start Looking
Up: The Linux Kernel Sources
Previous: Where to Get The
At the very top level of the source tree /usr/src/linux you will
see a number of directories:
- The arch subdirectory contains all of the
architecture specific kernel code. It has further
subdirectories, one per supported architecture, for
example i386 and alpha.
- The include subdirectory contains most of
the include files needed to build the kernel code. It too
has further subdirectories including one for every architecture
supported. The /include/asm subdirectory is a
soft link to the real include directory needed for this
architecture, for example /include/asm-i386.
To change architectures you need to edit the kernel makefile
and rerun the Linux kernel configuration program.
- This directory contains the initialization code
for the kernel and it is a very good place to start looking
at how the kernel works.
- This directory contains all of the memory management
code. The architecture specific memory management code lives
down in /arch/*/mm/, for example /arch/i386/mm/fault.c.
- All of the system's device drivers live in this
directory. They are further sub-divided into classes of
device driver, for example block.
- This directory contains the kernels inter-process
- This is simply a directory used to hold built
- All of the file system code. This is further sub-divided
into directories, one per supported file system, for example
vfat and ext2.
- The main kernel code. Again, the architecture
specific kernel code is in /arch/*/kernel.
- The kernel's networking code.
- This directory contains the kernel's library code.
The architecture specific library code can be found in
- This directory contains the
scripts (for example awk and tk scripts)
that are used when the kernel is configured.
David A. Rusling