SRC(7)
โจ SRC(7) โจ
okay bestie, so you want the tea on the NetBSD source tree layout? this is the SRC(7) page from the Miscellaneous Information Manual and honestly it's giving map-of-the-whole-realm energy ๐บ๏ธโจ. buckle up, we're going on a tour of every single directory, no cap.
๐ธ DESCRIPTION ๐ธ
An outline of the NetBSD source code hierarchy. literally the whole vibe of where stuff lives. slay.
bin/โ Critical utilities for the system and users. the essentials, periodt.sbin/โ Critical utilities for the system and the superuser. big main-character privileges only ๐usr.bin/โ Not-so critical utilities for the system and users. still cute, just less life-or-death ๐usr.sbin/โ Not-so critical utilities for the system and the superuser. chill but still for the sudo girlies.common/โ Sources shared between kernel and userland.dist/โ Utilities. Every utility has its own subdirectory, where its source and Makefile are located.include/โ Include headers. Every group of header files has its own subdirectory, where it and its Makefile are located.lib/โ Libraries. Every library has its own subdirectory, where it and its Makefile are located.
compat/โ A framework to (re)build the libraries shipped with NetBSD for different ABI than the default for that platform. iykyk.compat/<arch1>/<arch2>/โ Everycompat/<arch1>/<arch2>/directory contains aMakefileand a makefile fragment for building an<arch2>compat libraries for<arch1>. For example,compat/amd64/i386/is where the 32-bit compat libraries for the amd64 port are being built.compatsubdir.mkโ The list of subdirectories (the libraries andld.elf_so) to build with this ABI.archdirs.mkโ The list of subdirectories for each port.Makefile.compatโ The basic framework to force the right paths for library andld.elf_solinkage.dirshack/Makefileโ A hack to get objdirs created timely. it's called a hack, I'm just reporting the facts bestie ๐ซถ
crypto/โ Cryptographic source, which may have import or export restrictions. โ ๏ธ careful with this one.dist/โ Original sources. This is deprecated;crypto/external/should be used instead.external/โ Original sources, grouped by license, and then package per license.crypto/external/<license>/<package>/dist/contain original sources for given package; other directories contain Makefiles and given package's config files.
dist/โ Unmodified sources from third parties. This is deprecated;external/should be used instead. bye bestie ๐distrib/โ Tools and data-files for making distributions.<arch>/โ Architecture-specific files, grouped by image type. For example,distrib/<arch>/floppies/contains Makefiles for making images for various types of floppies;<arch>/ramdisk/contains makefiles for making ramdisks etc.cdrom/โ Was used to create bootable CD images. This is deprecated;build.sh'siso-imagetarget should be used instead.common/โ Common files for images generation.miniroot/โ Files for miniroot.notes/<arch>โ Architecture-specific parts of release notes.sets/โ Scripts for making file sets.utils/โ Utilities for installation ramdisk.
doc/โ Development documentation files: changelogs, build readmes etc.doc/roadmaps/contains roadmaps. reading the docs is self-care fr fr ๐etc/โ Default configuration files to be put into/etc.etc/etc.<arch>/โ Architecture-specific config files.
external/โ Unmodified sources from third parties, grouped by license. Everyexternal/<license>/<package>/may contain:dist/โ Unmodified third party source for a given packagebin/usr.bin/usr.sbin/etc.โ Such subdirectories contain reachover Makefiles, README's and various import helper scripts. For example,external/public-domain/contains sources licensed under Public Domain license;external/public-domain/sqlite/dist/contains original sources;external/public-domain/sqlite/bin/,external/public-domain/sqlite/lib/andexternal/public-domain/sqlite/itself contain reachover Makefiles.
games/โ Sources for utilities/files in/usr/games; each utility has its own subdirectory, where its sources and Makefiles are located. ๐ฎ iconic.include/โ Files to be put into/usr/include.lib/โ Source for libraries in/usr/liband some scripts for them. Every directory contains source for given library and Makefiles.libexec/โ Source for utilities in/usr/libexec. Every directory contains source for given utility and Makefiles.regress/โ Various regression tests in/usr/tests. This is deprecated; most tests are being migrated intotests/once they are migrated to theatf(7)test framework.rescue/โ Makefiles for copying utilities to/rescue.share/โ Source for utilities/files in/usr/share. Every utility has its own subdirectory, where its source and Makefile are located.sys/โ Kernel source. this is the big one bestie, hold on tight ๐คaltq/โ Network packet alternate queueing.arch/โ Files to specific hardware platforms.coda/โ Coda file system driver.compat/โ Support for older version NetBSD binaries and non-NetBSD binaries.conf/โ Misc files for building kernel.crypto/โ Crypt algorithms used by IPsec.ddb/โ Client code for local kernel debugger.dev/โ Device drivers.dist/โ Parent directory for the OpenBSD packet filterpf(4).external/โ Sources from third parties, grouped by license.fs/โ File systems storing data on physical drives.gdbscripts/โgdb(1)macros.kern/โ NetBSD's Kernel code, such as resource management, signal delivering, etc.lib/โ Libraries used by the kernel.miscfs/โ Drivers for file systems used to store layered data for kernel features.modules/โ Kernel components, including hardware specific drivers and upper-level drivers.net/โ Lowlevel network: protocol drivers, packet filters and access interfaces for NICs.net80211/โ Drivers for 802.11 wireless network.netatalk/โ Appletalk protocol stackatalk(4).netbt/โ Bluetooth stackbluetooth(4).netcan/โ Controller Area Network stackcan(4).netinet/โ IPv4 protocol stackip(4).netinet6/โ IPv6 protocol stack.netipsec/โ IPsec protocol stackipsec(4).netmpls/โ MPLS protocol stackmpls(4).nfs/โ Network file system driver.opencrypto/โ Cryptographic hardware frameworkopencrypto(9).rump/โ Rump kernelrump(3).secmodel/โ Security model frameworksecmodel(9).stand/โ Source for several standalone programs that aren't used by NetBSD currently.sys/โ Header files that get installed into/usr/include/sys.ufs/โ UFS file system driver.uvm/โ Virtual memory manager.
tests/โ Source for test programs in/usr/tests. These tests use theatf(7)test framework. For library routines, including system calls, the directory structure of the tests should follow the directory structure of the real source tree. For instance, interfaces available via the C library should follow:src/lib/libc/gen->src/tests/lib/libc/gen,src/lib/libc/sys->src/tests/lib/libc/sys, etc. Equivalently, all tests for userland utilities should try to follow their location in the source tree. If this can not be satisfied, the tests for a utility should be located under the directory to which the utility is installed. Thus, a test forenv(1)should go tosrc/tests/usr.bin/env. Likewise, a test fortcpdump(8)should be insrc/tests/usr.sbin/tcpdump, even though the source code for the program is located undersrc/external. the way that test layout mirrors reality? obsessed ๐tools/โ Reachover build structure for the host build tools. Every utility has its own directory, where its Makefile is located.x11/โ Reachover build structure for X11R7; the source is inX11SRCDIR. The directory structure copies the system's; every directory contains a Makefile.
๐ฆ SEE ALSO ๐ฆ
hier(7)โ go read it bestie, it's the companion piece โจ
๐ HISTORY ๐
This file was created as a part of Google Code-in 2012/2013. a whole era, honestly.
๐ AUTHORS ๐
This manpage was written by Elvira Khabirova <skinder0@gmail.com>, the sys/ part by Mingzhe Wang. absolute icons, both of them ๐
ok that's the whole tree bestie. go forth and navigate src/ like the main character you are. periodt. ๐
โจ
Debian ยท May 14, 2020 ยท that's the version + date tea, mwah ๐
๐ฆ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2012, 2013 Mingzhe Wang and Elvira Khabirova
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms