Welcome to AMD OS X

Why not register now to gain full access.

Development and testing of modified XNU Kernels for AMD CPUs on OS X
User avatar
by: ydeng
#26429
Shaneee wrote:
Tue Feb 07, 2017 11:30 pm
If you feel like building your own kernel for Sierra or wish to help out with it here is how to build it.

First of all you are going to need Xcode installed. It's in the App Store. Then download the Sierra XNU Preparation from the GitHub link below.. Open up Terminal and drag the build.sh file onto the Terminal window and press Enter. It'll ask for the password to perform the Sudo function.

Once it's done the System will have the required dependencies to build the XNU.

Now you can download the latest Sierra source. As of now it's 10.12.4. Here's the link,
Code: Select all
https://opensource.apple.com/tarballs/xnu/xnu-3789.51.2.tar.gz

Put it somewhere for example the desktop and unzip it. Then in Terminal run,
Code: Select all
cd Desktop/xnu-3789.51.2

Now you can apply my patches which are also attached at the bottom of this post. Still in Terminal in the XNU folder run this command. After the < Drag the diff onto the Terminal Window and press enter.
Code: Select all
patch -p1 < 

This will apply the patches onto the source. You are now free to tinker with the source code. Once ready to build run this in Terminal,
Code: Select all
sudo make SDKROOT=macosx ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE

If it completes successfully the built kernel will be in BUILD/obj/RELEASE_X86_64/

GitHub Link:
Code: Select all
https://github.com/Shaneee92/Sierra_XNU_Prep
Changelog:
  • Script added to GitHub.
  • dtrace updated.
  • AvailablityVersions updated.
  • Libdispatch updated.
  • Diff updated.
Need to install headers first, to build libfirehose_kernel from source:
Code: Select all
https://github.com/PureDarwin/Building-XNU-16.5_3789.51.2#installing-headers-to-build-libfirehose_kernela-for-xnu
Code: Select all
https://0xcc.re/building-xnu-kernel-macosx-sierrra-10-12-x/

 Advertising

User avatar
by: Shaneee
#26503
The prep script does this.

@qtwhl Absolutely! I find the devs did an amazing […]

Hello, My Friends! I'm a Brazilian user, my knowl[…]

I followed the tutorial here: https://vanilla.amd[…]

Will my config work as a ryzentossh?

I have never even built a PC and i really wanna ma[…]