XNU Linux: macOS running under Arm64 Linux
Xnulinux runs Apple's XNU kernel inside Linux on Arm64, bringing the macOS desktop along for the ride. It's a clever LLM-assisted hack, although its practical uses remain to be seen.
It takes the existing FOSS source code for XNU, and builds it to run as a Linux kernel module, xnu.ko. Loading that runs the macOS kernel inside the Linux kernel. This means that you can load and run macOS, up to and including the Apple desktop, on a Linux system.
The XNU kernel gains some limited hardware access via another Linux module, called fki.ko, which bridges the hardware resources macOS needs from Linux through to the XNU kernel. As the README puts it: "Linux lends XNU its memory, timers, files, network and GPU."
The result sounds impressive, in an Island of Dr Moreau sort of way: macOS 27, running side-by-side with Linux on the same hardware at the same time. The organization behind this remarkable hack is called AFK AI, and it reports testing a bunch of macOS applications on the resulting hybrid OS. Alongside the login window and desktop, it had Safari, Notes, Calculator, TextEdit, System Settings, and even Spotlight working.
This does not mean a ready-to-use working runtime for Mac apps on Arm Linux - not yet, or maybe ever. For instance, macOS doesn't "know" that it's sharing the hardware, so it takes over the whole display. That's not great, because there's no hardware acceleration: all software must fall back to software rendering on the CPU. Although The Reg FOSS desk doesn't own any Arm64 kit powerful enough to try this on, we have built a few Hackintoshes in the past, and we know from direct personal experience that macOS without GPU assistance has been unusable since about OS X 10.3. The team has got it running on Nvidia DGX Spark hardware, which shows it's not tied to Apple hardware - although Apple's macOS license agreement [PDF] is.
There's also an effort called XNULINUX x86_64 to bring the same technology over to the x86-64 editions of macOS, but so far, it's at an even earlier stage.
It's not the first time the FOSS world has tried to come up with ways to run macOS on non-Apple kit, or run macOS apps on top of other OSes. Darling is the macOS equivalent of Wine, and it forms part of the ambitious ravynOS project - which we described back in July. (The NextBSD project we were talking about there now publishes daily snapshot images, but we couldn't test it: it freezes on boot in VirtualBox.) There was also Limbo, an attempt to run macOS on Linux in userspace, but development shut down in 2022. (R)