What is XNU?
===========
-XNU kernel is part of the Darwin operating system for use in OS X and iOS operating systems. XNU is an acronym for XNU is Not Unix.
+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 C++ API for writing drivers called IOKit.
-XNU runs on I386, X86_64 for both single processor and multi-processor configurations.
+XNU runs on x86_64 for both single processor and multi-processor configurations.
XNU Source Tree
===============
Where:
- * \<sdkroot>: path to MacOS SDK on disk. (defaults to `/`)
+ * \<sdkroot>: path to macOS SDK on disk. (defaults to `/`)
* \<variant>: can be `debug`, `development`, `release`, `profile` and configures compilation flags and asserts throughout kernel code.
- * \<arch> : can be valid arch to build for. (E.g. `i386` or `X86_64`)
+ * \<arch> : can be valid arch to build for. (E.g. `X86_64`)
To build a kernel for the same architecture as running OS, just type
Define architectures in your environment or when running a make command.
- $ make ARCH_CONFIGS="I386 X86_64" exporthdrs all
+ $ make ARCH_CONFIGS="X86_64" exporthdrs all
Other makefile options
----------------------
* $ make REMOTEBUILD=user@remotehost # perform build on remote host
* $ make BUILD_JSON_COMPILATION_DATABASE=1 # Build Clang JSON Compilation Database
+The XNU build system can optionally output color-formatted build output. To enable this, you can either
+set the `XNU_LOGCOLORS` environment variable to `y`, or you can pass `LOGCOLORS=y` to the make command.
Debug information formats
Definition -
INSTALL_KF_MI_LCL_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES}
+ e. `EXPORT_MI_LIST` : Exports header file to all of xnu (bsd/, osfmk/, etc.)
+ for compilation only. Does not install anything into the SDK.
+ Definition -
+ EXPORT_MI_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES}
+
If you want to install the header file in a sub-directory of the paths
described in (1), specify the directory name using two variables
`INSTALL_MI_DIR` and `EXPORT_MI_DIR` as follows -
header files installed in all the paths described above in (1) will not
have code enclosed within this macro.
- b. `KERNEL_PRIVATE` : Same as PRIVATE
+ b. `KERNEL_PRIVATE` : If true, code is available to all of the xnu kernel and Apple
+ internal kernel extensions.
c. `BSD_KERNEL_PRIVATE` : If true, code is available to the xnu/bsd part of
the kernel and is not available to rest of the kernel, kernel extensions