From: William Raezer Subject: [PATCH] Documentation: Add a source tree map overview This patch introduces a high-level map of the Linux kernel source tree, describing the purpose of each top-level directory. The goal is to help new and experienced contributors alike understand the structure of the kernel source code. This documentation aims to improve the discoverability and accessibility of various kernel subsystems and will be extended with subsystem-level maps in future contributions. Signed-off-by: William Raezer diff --git a/Documentation/source-map.rst b/Documentation/source-map.rst new file mode 100644 index 000000000000..111111111111 --- /dev/null +++ b/Documentation/source-map.rst @@ +.. SPDX-License-Identifier: GPL-2.0 + +======================== +Linux Kernel Source Map +======================== + +This document provides an overview of the Linux kernel source tree, describing the +purpose of each top-level directory. It serves as a reference for developers +looking to understand the structure of the kernel source code. + +Top-Level Directories +===================== + +- **arch/**: Architecture-specific code for supported CPU platforms (e.g., x86, arm64). +- **block/**: Generic block layer code for managing block devices. +- **certs/**: Certificate management used for module signing and kernel verification. +- **crypto/**: Cryptographic algorithms and the crypto API. +- **Documentation/**: Kernel documentation, mostly in reStructuredText format. +- **drivers/**: Device drivers organized by class. +- **fs/**: Filesystem code and the Virtual Filesystem Switch (VFS). +- **include/**: Header files shared across kernel components. +- **init/**: Code for kernel boot and initialization. +- **io_uring/**: High-performance asynchronous I/O support. +- **ipc/**: Inter-process communication mechanisms. +- **kernel/**: Core kernel functionality including scheduling, signals, and system calls. +- **lib/**: Common utility functions. +- **LICENSES/**: SPDX license metadata for compliance. +- **mm/**: Memory management subsystem. +- **net/**: Networking protocols and infrastructure. +- **rust/**: Infrastructure for Rust-based kernel components. +- **samples/**: Sample modules and test code. +- **scripts/**: Build and configuration scripts. +- **security/**: Security modules like SELinux and AppArmor. +- **sound/**: Audio subsystem and drivers. +- **tools/**: User-space tools related to the kernel. +- **usr/**: Initramfs image construction code. +- **virt/**: Virtualization infrastructure (e.g., KVM). + +See Also +======== + +- `MAINTAINERS <../MAINTAINERS>`_: Maintainer contact information. +- `kernel.org Documentation `_