Sam Vaughan wrote:
Once upon a time you could build a debug kernel with:
make KERNEL_CONFIGS=DEBUG all
you still can
set the KERNEL_CONFIGS environment variable to DEBUG
% export KERNEL_CONFIGS=DEBUG
I assume this works with DarwinBuild[1], as the environment variables will be inherited by the child process,
but have not tried it.
Alternatively ....
I have a patched kernel[2] I am having trouble building for x86 so what I tend to do is
% cd /Volumes/Builds/Build8C46od1
% sudo -s
# pushd BuildRoot/Users/Shared/
# tar xzvf ../../../Sources/xnu-792.2.4.tar.gz
# popd
# chroot BuildRoot /bin/sh
sh-2.05b# cd Users/Shared/xnu-792.2.4/
sh-2.05b# make KERNEL_CONFIGS=DEBUG all
the advantage here is that everything I need to build xnu is already installed
and I have a build environment I can destroy while leaving my machine in one piece.