XNULinux project loads Apple XNU kernel as a Linux kernel module
XNULinux enables macOS to run natively alongside Linux on ARM64 hardware by loading the XNU kernel as a module rather than using a hypervisor.
Summary
The experimental XNULinux project, developed by Heyang Zhou, introduces a method to run the macOS desktop environment on Linux without the overhead of a traditional virtual machine. By compiling Apple's XNU kernel as a kernel module, the project allows macOS processes to run on the same CPU as Linux processes.
Currently, the project is highly experimental and limited to ARM64 architectures, as it relies on the Apple Silicon-compatible versions of macOS. While core components like Finder, Safari, and networking are functional, the system lacks GPU acceleration, resulting in CPU-based graphics rendering. The setup requires specific hardware conditions, including an ARM64 device with at least 16GB of RAM and a Linux kernel configured with 4KB memory pages.
Technical implementation of XNULinux
- Kernel Integration: The project builds the XNU kernel source into a kernel module named
xnu.ko, which is loaded into an unmodified ARM64 Linux kernel. - Inter-kernel Communication: A secondary module,
fki.ko, acts as an intermediary to provide the XNU kernel with necessary resources, including CPU time, memory, and network access from the Linux host. - Hardware Requirements: Successful execution requires an ARM64 architecture, a minimum of 16GB of RAM, and a Linux kernel utilizing 4KB memory pages.
- Graphics and Performance: Due to the absence of mature GPU support, all graphical rendering is handled by the CPU, and macOS security features must be patched or relaxed to facilitate the integration.
- System Isolation: There is no integration between the two operating systems; macOS apps do not appear in Linux desktop environments, though SSH access is available from macOS to the Linux host.
Why it matters
While highly experimental, this project demonstrates a novel approach to kernel-level interoperability that could theoretically revive interest in non-standard hardware configurations. However, its reliance on ARM64 and the need to bypass macOS security features make it impractical for general users or stable production environments.
Original reference: www.omgubuntu.co.uk →