XNU is a very powerful kernel, stemming from the NeXT Mach days and prior to that. I really, really like XNU and have always wanted to have my own fork of it to play with, compile and boot in a bare VM.
I don't want to install macOS in a VM just to run an XNU build. I just want raw XNU. Unfortunately, none of this is really possible I've slowly realised on AARCH64 or x86_64.
Here is some of my experience with XNU and microkernel projects on macOS. To begin, I've spent continued days, if not weeks or months on this. For starters I will lay out what I've observed.
Present day XNU = builds, impossible to boot bare in a VM.
Older than a couple of years XNU = harder to build, still can't boot.
Even older XNU = impossible to build outright, I don't even know if it can boot.
Of course, this may not be the same for everyone but still. I also can't seem to build the BCM2837 (I think that's the SoC name) kernels either. In the end, after multiple late nights, I've still gotten essentially nowhere.
Now what about microkernels, perhaps the same fate isn't present here? Immediately we have to rule off Google Fuchsia (Zircon), Managarm and a boatload of others.
Google basically hard-killed building Fuchsia on macOS completely and Managarm just seems to not even get anywhere close to building on macOS.
Anything like fiasco.oc, L4Re, seL4, etc are either unbuildable on macOS or too hard for me to figure out. There is just so many that would be buildable on Linux but I rather prefer BSD and macOS overall, so I don't usually pull out my Linux laptop. Perhaps I'll cover that in another blog post.
I do plan that maybe someday I could smash different parts of kernels together. I'd most likely want to see a XNU/Zircon combo. XNU with Mach dropped for Zircon would be cool. Maybe a new kernel that just combines parts of Zircon and XNU together.
I know this blog post is quite short but this isn't something that I could put lots of detail that wouldn't bore people to death.
In the end, I'll probably end up writing my own microkernel.