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: Shaneee
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

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

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

GitHub Link:
Code: Select all
  • Script added to GitHub.
  • dtrace updated.
  • AvailablityVersions updated.
  • Libdispatch updated.
  • Diff updated.
(114.14 KiB) Downloaded 73 times
Last edited by Shaneee on Wed Mar 29, 2017 3:39 pm, edited 1 time in total.


User avatar
by: Ackados
From what I'm told, you need X Code, or at least Mac OS X. I'm going to see if I can getting on working on Windows too.
User avatar
by: Shaneee
As far as I'm aware running from OS X is required. Xcode and the dependencies are a requirement.
User avatar
by: Ackados
Could be correct. I did try installing Cygwin on Windows and it didn't work, and I think you do need OS X. Maybe on Linux.
User avatar
by: BlazeThunderkush
Ackados wrote:Could be correct. I did try installing Cygwin on Windows and it didn't work, and I think you do need OS X. Maybe on Linux.
I'm afraid it requires an OSX Environment and Xcode for Apple's Clang. Plus i have no idea if there are cross compilers for xnu executables. More info: i found this helper tool which works very well
Code: Select all
, you can switch SDK's (ive been able to build vanilla-xnu kernel using older sdk's) in case of problems installing binaries usingf Shaneee's script should fix that. Also i'm working on doing a proper merge of xnu kernel with full commits tree
Code: Select all
. I recommend this tools, because everything goes to /usr/local instead of system wide, because i dont want to risk breaking the system :) I broke bash and c library once and had to do refresh install :)

I need to modify your script so it won't install deps system-wide, or better, make a package installing deps and deps deps using either
Code: Select all
or use
Code: Select all
because im familar with portage. Also, i need to study this linux patch
Code: Select all
Also i reccomend this tool
Code: Select all
and this arm port
Code: Select all
This weekend im gonna meld a x86 tree an arm tree and hackintosh tree of version 10.9 to have lowest common denominator
We're dealing with a POSIX kernel that follows design and programming patterns, so i gues freebsd kernel should be analyzed to see where is the easiest to port modules and amd opcode. We may even need to patch clang for that :D
edit: forum bug on chrome @ yosemite :)
Last edited by Shaneee on Sun Feb 26, 2017 5:20 pm, edited 4 times in total. Reason: Links coded.
Ackados liked this
User avatar
by: Shaneee
The builder script won't break your system. I tested it on multiple installs to be sure. I have the xnu on github just haven't got round to adding all the commits.
BlazeThunderkush liked this
User avatar
by: BlazeThunderkush
Shaneee wrote:The builder script won't break your system. I tested it on multiple installs to be sure. I have the xnu on github just haven't got round to adding all the commits.
I'm sorry if you got me wrong, your script is fine, i broke the c runtime on my own :) it's just i'm terribly picky when it comes to "make instal" style installation, on every server i'm guarding there's no single file in the system tree that's not managed by package manager, and everything done with "make" goes either to /usr/local or /opt
Cheers, this weekend it's gonna be me and xnu. Death by xnu xnu :)
Shaneee liked this
User avatar
by: Shaneee
Post updated :geek:
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]