XNU Linux: Full OS X GUI Userspace on Linux github.com · 89 points · 31 comments...

@best

XNU Linux: Full OS X GUI Userspace on Linux github.com · 89 points · 31 comments · HN thread

TL;DR xnulinux builds Apple's open-source XNU kernel from published sources and loads it as a kernel module (xnu.ko) into an unmodified arm64 Linux kernel, so a macOS 27 userspace with Finder, Dock, Safari and Chrome runs natively alongside Linux processes on the same CPUs, without a hypervisor. It requires an Apple Silicon Mac running an arm64 Linux VM and a macOS 27 installation of the user's own, and the author lists several stopgaps such as a patched AMFI and relaxed SIP.

  • XNU runs as xnu.ko, a non-GPL module, while fki.ko (GPL) provides CPUs, memory, faults, IPIs, files, network and host calls between XNU and Linux.
  • Each hosted CPU is a Linux kernel thread pinned to a Linux CPU; memory is one physically contiguous CMA block managed by XNU's own pmap.
  • Reported boot time to the desktop is 31–48 s on an Apple Silicon Mac, versus 49 s for an Apple Virtualization macOS VM on the same machine.
  • A 30-minute stress run of Safari, Notes, Calculator, TextEdit, System Settings, Spotlight and disk walks reportedly finished with no panic or crash report.
  • GPU support goes through Metal-to-Vulkan and a DRM bridge to Mesa's Venus driver, with a lavapipe CPU fallback.
  • Stopgaps include the OS cryptex merged into the system volume, patched AMFI, relaxed SIP, and slower memory access due to 4K pages versus 16K on native macOS.

Discussion The thread is mostly impressed and amused, with a strong sub-thread on whether this is useful at all. Commenters ask whether the approach could work for Windows or on other hardware, speculate about Apple restricting OS binaries to hardware in future, and debate whether Apple would object, with several noting Apple has historically tolerated Hackintosh work and that the project needs Apple Silicon anyway. One long comment, from a commenter who grew up admiring Apple's design, is a nostalgic lament about recent Apple design choices. Overall the mood is admiring, with light skepticism and jokes.

  • Impressive technical feat, a sign of how far AI-assisted engineering has come (many): Several commenters are stunned that a full macOS GUI runs inside Linux, and attribute the pace of such projects to skilled operators using AI tooling. Some frame it as a sign that nothing is out of reach anymore.
  • Asks why anyone would do this when macOS is commercial and Apple-bound (some): A few commenters argue that if you want macOS you should buy a Mac, and that open-source alternatives exist. Others reply that the aesthetic or the technical challenge is reason enough.
  • Cross-platform development and iOS tooling are the practical draw (some): Some see value in building and testing Mac or iOS software from a Linux host, though others note Apple hardware is still required and that using it at work may breach EULAs.
  • Apple may object or harden its platform against this (some): Commenters expect possible legal or technical pushback, and speculate about future schemes where OS binaries are encrypted with hardware-only keys. Others argue the project mostly uses open source and that Apple has historically ignored Hackintosh hobbyists.
  • Wish it targeted x86_64 or an older macOS version instead (a few): One commenter would prefer OS X 10.9 on x86_64, but a reply points out that the PAC requirement limits the project to Apple Silicon for now.

Links from the comments

#macOS #XNU #Linux #kernelModules #Apple #virtualization