4 The following directory listing is *not* meant to be exhaustive. Rather, it
5 is intended to demonstrate the general organization. Deviations should be
6 avoided but are by no means forbidden.
9 arch - architecture/platform specific code
10 arch/sparc - sparc architecture/platform specific code
11 arch/x86 - x86 architecture/platform specific code
12 bin - commands (/bin /usr/bin)
13 contrib - 3rd party code
15 include - headers (/usr/include)
16 kernel - all arch/plat independent kernel code
17 kernel/comstar - ... COMSTAR
18 kernel/cpr - ... suspend & resume
19 kernel/disp - ... dispatcher
20 kernel/drivers - ... drivers
21 kernel/drivers/block - ... block device drivers
22 kernel/drivers/net - ... NIC drivers
23 kernel/drivers/net/bar - ... the 'bar' NIC driver
24 kernel/fs - ... file system code
25 kernel/fs/ufs - ... UFS kernel code
26 kernel/krtld - ... linker
27 kernel/mk - kernel build makefiles
28 kernel/net - ... network code
29 kernel/os - ... kernel code
30 kernel/sched - ... scheduler code
31 kernel/syscall - ... syscall code
32 kernel/vm - ... vm code
34 share - misc files (/usr/share)
38 Architecture Subdirectories
39 ---------------------------
41 In general, the structure of each subdirectory in `arch` mirrors the same
42 layout as the top level. That is, there are sub-subdirectories such as
43 `include` and `kernel`. In other words, the contents are:
46 arch/x86/bin - x86 specific commands
47 arch/x86/include - x86 specific headers
48 arch/x86/kernel - x86 specific kernel code
49 arch/x86/lib - x86 specific libs
52 In general, every effort should be made to avoid putting code in
53 architecture specific directories. That is, if a feature is in theory
54 architecture independent, the code code should be put in the architecture
55 independent directories. If only some architectures are not fully
56 supported, proper Sconfig based build-time guards should be used.
58 Example 1: a PCI device driver that hasn't been ported to sparc should live
59 in `kernel/drivers` even though it only builds on x86 since PCI devices are
60 standard between architectures.
62 Example 2: a CPU microcode updating driver should be placed in `arch/x86`
63 since microcode update procedures are architecture specific.