Building xnu requires Xcode and some additional open-source (but not pre-installed) dependencies. You can build xnu manually by doing:
- Install OS X Mavericks and Xcode 5.0.1, make sure the Xcode license has been agreed-to with "sudo xcodebuild -license"
- Download the source for the dtrace and AvailabilityVersions projects, which are required dependencies, as well as xnu itself
$ curl -O http://opensource.apple.com/tarballs/dtrace/dtrace-118.tar.gz $ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz $ curl -O http://opensource.apple.com/tarballs/xnu/xnu-2422.1.72.tar.gz
- Build and install CTF tools from dtrace
$ tar zxf dtrace-118.tar.gz $ cd dtrace-118 $ mkdir -p obj sym dst $ xcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst ... $ sudo ditto $PWD/dst/usr/local /usr/local Password: $ cd ..
- Install AvailabilityVersions
$ tar zxf AvailabilityVersions-6.tar.gz $ cd AvailabilityVersions-6 $ mkdir -p dst $ make install SRCROOT=$PWD DSTROOT=$PWD/dst $ sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local $ cd ..
- Build xnu
$ tar zxf xnu-2422.1.72.tar.gz $ cd xnu-2422.1.72 $ make ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE