XNU Linux a macOS kernel és felhasználói környezet betöltéséhez Linuxban

Heyang Zhou, a creator of the Deno Deploy platform, has published the XNU Linux project, which allows you to build and load the XNU kernel as a Linux kernel module and use it to run a macOS user environment on Linux. XNU is used in macOS, is part of the open-source Darwin project, and is a hybrid kernel that combines the Mach microkernel, FreeBSD kernel subsystems, and the C++ API IOKit for writing drivers. By loading XNU as a kernel module, you can run the standard macOS graphical environment inside Linux, where macOS applications, including the Safari browser, will operate.

The XNU kernel is built from Apple-provided source code and runs in Linux in the form of the kernel module xnu.ko, which directly interacts with the CPU and Memory Management Unit (MMU), allowing Linux and macOS processes to run side by side on the same CPU without the involvement of a hypervisor. To enable the XNU kernel's access to memory, files, timers, exception handling, networking, and GPU through the Linux kernel, a foreign kernel interface module fki.ko has been created.

The XNU kernel module operates in its own address space — the XNU kernel receives a continuous block of physical memory from Linux and manages it through its pmap, while part of the address space for user processes is shared between Linux and XNU. Each virtual CPU for macOS is represented as a Linux kernel thread, pinned to a physical CPU core. Drivers acting as a layer are provided for accessing the disk image with macOS, display, keyboard, mouse, Ethernet, and GPU. The Metal graphic API is implemented on top of Vulkan through the metal2vulkan layer.

The binding module and accompanying utilities developed by the project are distributed under the GPLv2 license, while components of the XNU kernel module are provided under the APSL-2.0 license. Drivers like XnuDisplay, XnuEthernet, and XnuInput, borrowed from the macOS-DroidVM project, are available under the BSD license. XNU Linux also utilizes developments from the UniXNU project, which allows macOS and iOS to run on ARM64 systems not made by Apple. The development of XNU Linux is being conducted with the assistance of the AI assistant Claude. An example is demonstrated by launching the macOS system disk, created by Apple’s installer, in Ubuntu Linux. Currently, it only supports running on Apple ARM computers with M1 chips and newer.



Forrás: opennet.ru
Megbízható hosting vásárlása weboldalak számára, DDoS védelemmel, VPS VDS szerverek. 🔥 Megbízható webtárhely vásárlása DDoS védelemmel, VPS VDS szerverek | ProHoster