Linked by Thom Holwerda on Thu 13th Jul 2017 20:52 UTC
Mac OS X

From version to version, I always love to play around with the kernel. And it has always been a great lack in guides and documentation on how to build Mac OSX's kernel, XNU. For those of you that already have tried compiling XNU for Mac OSX 10.12 (Sierra), you probably noticed that earlier build guides like ssen's blog - Building xnu for OS X 10.11 El Capitan don't work anymore. However, many thanks to ssen to put in time to write a guide.

The problem is that Apple introduced something named Circular dependency with the libdispatch library and the kernel headers. So the order of the build process just got really important.

Order by: Score:
Comment by Drumhellar
by Drumhellar on Fri 14th Jul 2017 06:43 UTC
Drumhellar
Member since:
2005-07-12

I know what I'm doing this weekend.

Though, neither this nor ssen's blog explains why I might want to do this.

I've built linux and *bsd kernels many, many times, with specific purposes in mind. What can I accomplish with a custom built XNU kernel, though?

Reply Score: 3

RE: Comment by Drumhellar
by The123king on Fri 14th Jul 2017 07:45 UTC in reply to "Comment by Drumhellar"
The123king Member since:
2009-05-28

Not a lot IIRC. The software stack for it is quite limited from my experience.

Reply Score: 2

RE[2]: Comment by Drumhellar
by avgalen on Fri 14th Jul 2017 08:42 UTC in reply to "RE: Comment by Drumhellar"
avgalen Member since:
2010-09-23

I agree. I only played with this almost a decade ago but except for curiosity to see what was powering a Mac I didn't find anything interesting/useful about it for me personally.

If you want to run BSD, there are several flavors of it with a much richer community and userlands.
If you want to run macOS, buy a Mac or experiment with a Hackintosh
If you want to know more about different kernels that are used in the real world, have a go with XNU ... but I can almost guarantee that you will not start using it for anything except gathering knowledge

Reply Score: 2

Comment by dukzcry
by dukzcry on Fri 14th Jul 2017 10:21 UTC
dukzcry
Member since:
2008-07-01

I believe he could learn something from PureDarwin team (and vice versa).

Reply Score: 1

RE: Comment by dukzcry
by The123king on Mon 17th Jul 2017 13:42 UTC in reply to "Comment by dukzcry"
The123king Member since:
2009-05-28

Sure, you could learn something. You could also learn something from building Plan 9, or GNU/
HURD. That doesn't mean it's useful.

Reply Score: 2

BlueofRainbow
Member since:
2009-01-06

I have been aware of the cascading issues with dependies in the BSD and Linux worlds. There are many, many horror stories - although such stories are rarer today than even five years ago.

From what I understand, circular dependencies forces a specific order in the compilation of the parts to build the executable. Isn't this risky for the long term reliability/stability of the kernel?

Reply Score: 2