XNU Linux enables macOS userspace processes to run natively on ARM64 Linux
A new open-source project allows macOS software to run alongside Linux processes on ARM64 hardware by loading the XNU kernel as a Linux kernel module.
Summary
XNU Linux is a novel open-source project that enables macOS userspace software to execute on a Linux host without the overhead of a hypervisor. The project achieves this by adapting Apple's open-source XNU kernel components into a loadable Linux kernel module named xnu.ko.
This implementation is specifically designed for ARM64 architectures and allows macOS processes to run natively on the same CPUs as Linux processes. By utilizing a small interface module (fki.ko), the hosted XNU kernel leverages the existing Linux kernel for essential resources such as memory, timers, networking, files, and GPU access.
Technical implementation of XNU Linux
- Kernel Integration: The project functions by loading xnu.ko as a loadable kernel module into an unmodified ARM64 Linux kernel.
- Resource Delegation: Through the fki.ko interface module, the XNU kernel delegates memory management, timers, file systems, networking, and GPU tasks to the host Linux kernel.
- Hardware Execution: The hosted XNU kernel manages the CPU and Memory Management Unit (MMU) directly, allowing macOS processes to run natively alongside Linux processes.
- Architecture Support: Current development is strictly limited to ARM64 Linux systems and has been tested using macOS 27 system disks.
Why it matters
This development provides a potential path for running macOS-specific software on ARM64 Linux hardware, such as Apple Silicon-based devices or ARM servers, without virtualization. It represents a significant shift in how cross-platform compatibility is approached by bridging two distinct kernel ecosystems at the module level.
What to do
- Ensure you are using an ARM64 Linux system.
- Load the xnu.ko module using the insmod command.
- Provide your own macOS binaries from a macOS installation.
Original reference: www.phoronix.com →