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.




Text files with general explanations and hints about kernel components


Platform-dependent code

' i386

IBM's PC architecture

^ kernel

Kernel core

^ mm

Memory management


Software emulator for floating-point unit

— lib

Hardware-dependent utility functions

^ boot



Compressed kernel handling


Programs to build compressed kernel image

^ alpha

Hewlett-Packard's Alpha architecture


Architectures based on ARM processors

- o*

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


Workstations based on Intel's 64-bit Itanium microprocessor

^ m68k

Motorola's MC680x0-based architecture

^ mips

MIPS architecture adopted by Silicon Graphics and other computer manufacturers

^ mips64

64-bit MIPS architecture

^ parisc

HP 9000 parisc workstations

■ i- ppc

Motorola-IBM's PowerPC-based architectures

* s390

IBM's ESA/390 and 32-bit zSeries architectures

^ s390x

IBM's 64-bit zSeries architectures

— sh

SuperH-based embedded computers


Sun's SPARC architecture

^ sparc64

Sun's Ultra-SPARC architecture


Device drivers


Acorn's devices

- acpi

Advanced Configuration Power Interface (a power management standard that provides more features than APM)

— atm

Support for ATM network architecture

^ block

Block device drivers

^ paride

Support for accessing IDE devices from parallel port

^ bluetooth

Drivers for devices connected through the Bluetooth wireless protocol


Proprietary CD-ROM devices (neither ATAPI nor SCSI)


Character device drivers

■ agp

Drivers for AGP video cards

Driver that supports the Xfree86 Direct Rendering Infrastructure

^ drm-4.0

Another driver that supports the Xfree86 Direct Rendering Infrastructure

^ ftape

Tape-streaming devices

— ip2

Computone Intelliport II multiport serial controllers



^ mwave

IBM's Winmodem-like driver for Linux


Driver for PCMCIA serial device

— rio

Driver for the Specialix Rio multiport serial card

— dio

Hewlett-Packard's HP300 DIO bus support

— fc4

Fibre Channel devices


Support for hotplugging of PCI devices

— i2c

Driver for Philips' I2C 2-wire bus

Drivers for IDE disks

^ ieee1394

Driver for IEEE1394 high-speed serial bus

— input

Input layer module for joysticks, keyboards, and mouses


ISDN devices


Apple's Macintosh devices

— md

Layer for "multiple devices" (disk arrays and Logical Volume Manager)

^ media

Drivers for radio and video devices

^ message

High performance SCSI + LAN/Fibre Channel drivers


Miscellaneous devices

— mtd

Support for Memory Technology Devices (especially flash devices)

— net

Network card devices

^ nubus

Apple's Macintosh Nubus support

^ parport

Parallel port support

— pci

PCI bus support

^ pcmcia

PCMCIA card support


Plug-and-play support

* s390

IBM's ESA/390 and zSeries device support

^ sbus

Sun's SPARC SBus support

SCSI device drivers

— sgi

Silicon Graphics' devices

^ sound

Audio card devices

— tc

Hewlett-Packard (formerly DEC) TURBOChannel bus support

^ telephony

Support for voice-over-IP devices

— USb

Universal Serial Bus (USB) support

^ video

Video card devices


Amiga's Zorro bus support




Acorn Disc Filing System

— affs

Amiga's Fast File System (FFS)

^ autofs

Support for kernel-based filesystem automounter daemon

^ autofs4

Another version of support for kernel-based filesystem automounter daemon (Version 4)

— bfs

SCO UnixWare Boot File System

^ coda

Coda network filesystem


Data compressing filesystem for MTD devices

^ devfs

Device filesystem


Pseudoterminal support (Open Group's Unix98 standard)

— efs

SGI IRIX's EFS filesystem

— ext2

Linux native Ext2 filesystem

^ ext3

Linux native Ext3 filesystem

Common code for FAT-based filesystems


Veritas VxFS filesystem used by SCO UnixWare

Apple's Macintosh filesystem

— hpfs

IBM's OS/2 filesystem


Layer for decompressing files in cramfs and iso9660 filesystems

^ intermezzo

InterMezzo high-availability distributed filesystem

^ isofs

ISO9660 filesystem (CD-ROM)

Journaling filesystem layer used by Ext3

— f

Journaling filesystems for MTD devices


Another journaling filesystems for MTD devices

^ lockd

Remote file locking support

^ minix

MINIX filesystem

^ msdos

Microsoft's MS-DOS filesystem

— ncpfs

Novell's Netware Core Protocol (NCP)

— nfs

Network File System (NFS)

— nfsd

Integrated Network filesystem server

— nls

Native Language Support

— ntfs

Microsoft's Windows NT filesystem

^ openpromfs

Special filesystem for SPARC's OpenPROM device tree

^ partitions

Code for reading several disk partition formats

— proc

/proc virtual filesystem

— qnx4

Filesystem for QNX 4 OS


Simple RAM filesystem

^ reiserfs

Reiser filesystem

^ romfs

Small read-only filesystem

^ smbfs

Microsoft's Windows Server Message Block (SMB) filesystem

— sysv

System V, SCO, Xenix, Coherent, and Version 7 filesystem

— Udf

Universal Disk Format filesystem (DVD)

— f

Unix BSD, SunOS, FreeBSD, OpenBSD, and NeXTStep filesystem

^ umsdos

UMSDOS filesystem

Microsoft's Windows filesystem (VFAT)


Header files (.h)


Platform-independent low-level header files

^ asm-i386

IBM's PC architecture

^ asm-xxx

Header files for other architecture


Kernel core


Byte-swapping functions


ISDN functions

^ lockd

Remote file locking

— mtd

MTD devices


Filtering for TCP/IPv4


Filtering for TCP/IPv6

— nfsd

Integrated Network File Server

— raid

RAID disks

^ sunrpc

Sun's Remote Procedure Call


Mathematical coprocessor emulation

— net


^ pcmcia

PCMCIA support

— scsi

SCSI support

^ video

Frame buffer support


Kernel initialization code


System V's Interprocess Communication


Kernel core: processes, timing, program execution, signals, modules, etc.


General-purpose kernel functions


Memory handling


A bunch of networking protocols


External programs for building the kernel image

I [email protected] RuBoard

Continue reading here: Books on Unix Kernels

Was this article helpful?

0 0