Skip to content

Instantly share code, notes, and snippets.

@Wowfunhappy
Created January 22, 2022 13:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wowfunhappy/2fca7ed5d1b1310de3854b92c65eef7e to your computer and use it in GitHub Desktop.
Save Wowfunhappy/2fca7ed5d1b1310de3854b92c65eef7e to your computer and use it in GitHub Desktop.
Building XNU for OS X 10.9.5.
# Install Xcode 5.0.2. Later versions will not work.
git clone https://github.com/apple-oss-distributions/xnu.git
cd xnu/
git checkout d2a0abf2ede8152c5a107fe51e032c1193d2015b
cd ..
git clone 'https://github.com/apple-oss-distributions/dtrace.git'
cd dtrace/
git checkout cdf0eec474eafb19dbb2c998320aaad28f755d0b
cd ..
git clone https://github.com/apple-oss-distributions/AvailabilityVersions.git
cd AvailabilityVersions/
git checkout 9e102063d8143f0c20fc2f71ac30af2289751fc2
cd ..
cd dtrace
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
cd ..
cd AvailabilityVersions
mkdir -p dst
make install SRCROOT=$PWD DSTROOT=$PWD/dst
sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local
cd ..
cd xnu
make ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment