Linux Source code directory structure

Source: Internet
Author: User
Tags dio nfsd

Linux Source code directory tree structure (2008-04-21 09:14)

Category: Linux/unix

LinuxThe source code used to support various architectures contains about 4,500 C-language programs, which are stored in about 270 subdirectories, totaling approximately 2 million lines of code, about 58MB of disk space.

Source code All in directory:/usr/src/linux (most Linux distributions)

InitKernel initialization code
KernelKernel core part: process, timing, program execution, signal, module ...
MmMemory processing
ArchPlatform-related code
i386 IBMThe PC architecture
KernelKernel Core section
MmMemory management
Math-emuFloating-point Unit software simulation
LibHardware-related tool functions
BootBoot program
CompressedCompression kernel Processing
ToolsA program that generates a compressed kernel image
AlphaCompaq's Alpha Architecture
s390 IBMThe system/390 architecture
SPARC SunThe SPARC architecture
SPARC64 SunThe ULTRA-SPARC architecture
MIPS SGIThe MIPS architecture
PPC MOTOROLA-IBMPowerPC-based architecture
m68k Motorolamc680x0-based architecture
ArmARM Processor-based architecture
FsFile system
Proc/procVirtual file system
Devpts/dev/ptsVirtual file system
Ext2 LinuxLocal EXT2 File system
Isofs ISO9660File System (CD-ROM)
NfsNetwork File System (NFS)
NfsdIntegrated Network File System server
FatGeneric code for FAT-based file systems
MsdosMS-DOS file system for Microsoft
VfatMicrosoft's Windows file System (VFAT)
NlsLocal language support
NtfsMicrosoft's Windows NT file system
SmbfsMicrosoft Windows Server Message Block (SMB) file system
Umsdos UmsdosFile system
Minix MinixFile system
HPFS IBMThe Os/2 file system
SysV SYSTEMV, SCO, Xenix, coherent, and Version7 file systems
Ncpfs NovellThe NetWare core Protocol (NCP0
UFS Unixbsd, SunOs, FreeBSD, NetBSD, OpenBSD, and NeXTSTEP file systems
Affs AmigaThe Fast file system (FFS)
CODA CODANetwork File system
HfSApple's Macintosh File system
ADFS AcornDisk-populated file system
EFS SGI IRIXThe EFS file system
qnx4 QNX4 OSUsing a file system that is not
RomfsRead-only small file system
AutoFSSupport for the Catalog Auto Loader program
LockdSupport for remote file locking
NetNetwork Code
IPC System VInter-process communicationDrivers Device driver    block block device driver       paride Access IDE device support from the port     SCSI SCSI device driver    char character device driver       joystick joystick        ftape Tape streaming device       hfmodem Radio equipment        IP2 intelliport Multi-port serial Controller    net card device    sound audio card device     Video card device    cdrom dedicated CD-ROM device (except ATAPI and SCSI)    isd0n ISDN devices     apl000 Fuji's AP1000 device    macintosh Apple's Macintosh device    SGI SGI device    FC4 fiber optic device    acorn Acorn device    misc misc device    PNP Plug and Play support    usb Support for Universal Serial Bus (USB)    PCI PCI bus support    sbus Sun's SPARC sbus support    nubus Apple's Macintosh NuBus support    zorro Amiga's Zorro bus support    dio HP's HP300 Dio bus support     TC Sun's TURBOchannel support (not yet completed) Lib generic kernel functions Include header file (. h)    linux kernel core section         LOCKD Remote file Lock       NFSD integrated network file Server        SUNRPC Sun's remote procedure call       byteorder byte Exchange function        modules Module supports    asm-generic platform-independent low-level header file    asm-i386 IBM PC Architecture     Asm-alpha Compaq's Alpha Architecture    asm-mips SGI's MIPS architecture    asm-m68k MOTOROLA-IBM's PowerPC-based architecture    ASM-PPC MOTOROLA-IBM PowerPC Architecture    asm-s390 IBM's system/390 Architecture    asm-sparc Sun's SPARC architecture    ASM-SPARC64 Sun's ULTRA-SPARC architecture    asm-arm ARM Processor-based architecture    net network    SCSI SCSI Support     Video    config supports the header file that defines the macro configuration of the kernel scripts the external program that generates the kernel image documentation a text file that contains general explanations and comments about the various parts of the kernel

by huihoo.com Allen)

: "Understanding the LINUX KERNEL" DANIEL P.bovet & MARCO Cesati

-------------------------------------------------


Arch: Contains code related to hardware architecture, each of which occupies a corresponding directory. and 32-bit PC-related code is stored in the I386 directory, where the more important include kernel (kernel core), mm (memory management), MATH-EMU (floating-point unit emulation), LIB (Hardware-related tool function), boot (boot program), PCI (PCI bus) and power (CPU-related status).

block: Part of the block device driver.

Crypto: Commonly used encryption and hashing algorithms (such as AES, SHA, etc.), there are some compression and CRC check algorithms.

documentation: General explanations and comments about the parts of the kernel.

drivers: A device driver that consumes a subdirectory for each different driver.

FS: Various supported file systems, such as EXT, FAT, NTFS, and so on.

include: Header file. Among them, the system-related header files are placed under the Linux sub-directory.

init: Kernel Initialization code (Note Not the system boot code)。

IPC: The code for inter-process communication.

kernel: The core components of the kernel, including process scheduling, timers, etc., are part of the platform-related code in the Arch/*/kernel directory.

Lib: Library file code.

mm: Memory management code, and part of the platform-related code is placed in the ARCH/*/MM directory.

net: Network-related code, the implementation of a variety of common network protocols.

scripts: the script file used to configure the kernel files.

security: is primarily a selinux module.

sound: drivers for commonly used audio devices.

usr: implements a cpio.

Under the i386 system, the system boot will be executed starting from Arch/i386/kernel/head.s, and then transferred to the main () function in init/main.c to initialize the kernel. I personally think that can be read in this order (preferably first read the main data structure definition, etc.), for each module code a cursory look at it, the emphasis should be placed in the direction you want to study. You know, it is difficult for a person to master all the Linux kernel source code!

Linux Source code directory structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.