XNU kernel is part of the Darwin operating system for use in macOS and iOS operating systems. XNU is an acronym for X is Not Unix. XNU is a hybrid kernel combining the Mach kernel developed at Carnegie Mellon University with components from FreeBSD and a C++ API for writing drivers called IOKit. XNU runs on x86_64 and ARM64 for both single processor and multi-processor configurations.
config- configurations for exported apis for supported architecture and platformSETUP- Basic set of tools used for configuring the kernel, versioning and kextsymbol management.EXTERNAL_HEADERS- Headers sourced from other projects to avoid dependency cycles when building. These headers should be regularly synced when source is updated.libkern- C++ IOKit library code for handling of drivers and kexts.libsa- kernel bootstrap code for startuplibsyscall- syscall library interface for userspace programslibkdd- source for user library for parsing kernel data like kernel chunked data.makedefs- top level rules and defines for kernel build.osfmk- Mach kernel based subsystemspexpert- Platform specific code like interrupt handling, atomics etc.security- Mandatory Access Check policy interfaces and related implementation.bsd- BSD subsystems codetools- A set of utilities for testing, debugging and profiling kernel.
See BUILDING.md.