Building the kernel

Building the actual kernel is rather trivial compared to the toolchain. The following command will built the default kernel configuration.

% cd ~/src/xnu-517.7.21
% make 

The resulting kernel can be found in the BUILD/obj/RELEASE_$ARCH/ directory and is called mach_kernel. $ARCH can be either PPC or I386.

By changing the KERNEL_CONFIGS environment variable you can specify which kernel configuration you want to build. For example, to build a debug version of the kernel, do this:

% make KERNEL_CONFIGS=DEBUG all