Appendix C. Source Code Structure

To help you to find your way through the files of the source code, we briefly describe the organization of the kernel directory tree. As usual, all pathnames refer to the main directory of the Linux kernel, which is, in most Linux distributions, /usr/src/linux.

Linux source code for all supported architectures is contained in about 8750 C and Assembly files stored in about 530 subdirectories; it consists of about 4 million lines of code, which occupy more than 144 megabytes of disk space.

The following list illustrates the directory tree containing the Linux source code. Please notice that only the subdirectories somehow related to the target of this book have been expanded.

Directory

Description

Documentation

Text files with general explanations and hints about kernel components

arch

Platform-dependent code

i386

IBM’s PC architecture

kernel

Kernel core

mm

Memory management

math-emu

Software emulator for floating-point unit

lib

Hardware-dependent utility functions

boot

Bootstrapping

compressed

Compressed kernel handling

tools

Programs to build compressed kernel image

alpha

Hewlett-Packard’s Alpha architecture

arm

Architectures based on ARM processors

cris

Axis Communication AB’s Code Reduced Instruction Set architecture used by thin-servers

ia64

Workstations based on Intel’s 64-bit Itanium microprocessor

m68k

Motorola’s MC680x0-based architecture

mips

MIPS architecture ...

Get Understanding the Linux Kernel, Second Edition 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.