Linux Kernel Files Basic
After downloading the linux kernel from https://www.kernel.org/ , it contains the following file structure.
- arch. This directory contains architecture-specific files. You will see separate subdirectories under arch/
for processors such as ARM, Motorola 68K, s390, MIPS, Alpha, SPARC, and IA64.
- block. This primarily contains the implementation of I/O scheduling algorithms for block storage devices.
- crypto. This directory implements cipher operations and the cryptographic API, used, for example, by
some WiFi device drivers for implementing encryption algorithms.
- Documentation. This directory has brief descriptions of various kernel subsystems.
- drivers. Device drivers for numerous device classes and peripheral controllers reside in this directory. The
device classes include character, serial, Inter-Integrated Circuit (I2C), Personal Computer Memory Card
International Association (PCMCIA), Peripheral Component Interconnect (PCI), Universal Serial Bus (USB),
video, audio, block, Integrated Drive Electronics (IDE), Small Computer System Interface (SCSI), CDROM,
network adapters, Asynchronous Transfer Mode (ATM), Bluetooth, and Memory Technology Devices
(MTD). Each of these classes live in a separate subdirectory under drivers/.
- fs. This directory contains the implementation of filesystems such as EXT3, EXT4, reiserfs, FAT, VFAT,
sysfs, procfs, isofs, JFFS2, XFS, NTFS, and NFS.
- include. Kernel header files live here. Subdirectories prefixed with asm contain headers specific to the
particular architecture. So the directory include/asm-x86/ contains header files pertaining to the x86
architecture, whereas include/asm-arm/ holds headers for the ARM architecture.
- init. This directory contains high-level initialization and startup code.
- ipc. This contains support for Inter-Process Communication (IPC) mechanisms such as message queues,
semaphores, and shared memory.
- kernel. The architecture-independent portions of the base kernel can be found here.
- lib. Library routines such as generic kernel object (kobject) handlers and Cyclic Redundancy Code (CRC)
computation functions stay here.
- mm. The memory management implementation lives here.
- net. Networking protocols reside under this directory. Protocols implemented include Internet Protocol
version 4 (IPv4), IPv6, Internetwork Protocol eXchange (IPX), Bluetooth, ATM, Infrared, Link Access
Procedure Balanced (LAPB), and Logical Link Control (LLC).
- scripts. Scripts used during kernel build reside here.
- security. This directory contains the framework for security.
- sound. The Linux audio subsystem is based in this directory.
- usr. This currently contains the initramfs implementation.
That’s it. Cheers!!