xnulinux (cloud ARM fork)
Why it exists
xnulinux is not mine. AFK-surf wrote it, and all credit for the idea and the
code goes to them. It builds XNU from Apple’s published sources and runs it
as a kernel module (xnu.ko) inside an unmodified arm64 Linux kernel, so
macOS processes run next to Linux ones on the same CPUs with no hypervisor
between them. With a stock Ubuntu kernel it boots a macOS 27 disk to the
desktop.
Upstream expects a Mac with Xcode to make the disk and build the GPU parts. I wanted to know how far it gets on a rented cloud ARM VM (Google Cloud C4A) with neither.
What my branch adds
On the cloud-arm branch:
- No Mac needed. A script fetches macOS 27.2 from Apple’s update server onto the VM and builds a bootable disk there in about 6 minutes. A second one cross-builds the GPU bundle that draws the desktop, in about an hour and a half. A no-Mac proof run built the disk and the GPU bundle on Linux unattended; 2 of 94 boots failed in the first seconds, only while the VM was compiling.
- A guide from an empty VM to the desktop, with measured numbers, the failures I met, and what does not work.
- Fixes. Two went upstream as pull requests (pointer authentication
keys off for plain arm64 processes, and lavapipe keeping immutable
samplers). The build scripts now work on a fresh Ubuntu 26.04 host, and a
restart loop in
bluetoothdis reported upstream and worked around with a boot argument. - A runbook for coding agents, with a prompt that stops before anything that costs money or needs a login.
Related
macOS-DroidVM, a fork of Droid-VM/macOS-DroidVM, is one of the projects this work leans on, along with UniXNU and metal2vulkan.
What it is not
Not a product and not my kernel work. The desktop renders on the CPU, with no GPU. Upstream lists what is still a stopgap, including a patched AMFI, relaxed SIP and slower memory access than a native VM.