Linux on Mac M1s? Asahi Linux takes shape, the project that will make Torvalds happy
Source: HW Upgrade added 09th Jan 2021
Asahi Linux starts to take shape, a project led by developer Hector Martin who aims to bring Linux to Macs with Apple M1 processor. The project is collaborative, but complex and therefore very intriguing.
by Manolo De Agostini published 09 January 2021 , at 10: 01 in the Operating Systems channel
Apple MacBook iMac Linux
In recent weeks Linus Torvalds had expressed his interest in the new MacBooks with Apple M1 processor (review of the Air), complaining however of the impossibility of being able to run Linux natively. The community was not watching and the developer Hector Martin, also known in the world as “Marcan”, had launched a Patreon to raise funds and please not only the creator of the Linux kernel, but also all fans of the open world. source.
The project is slowly taking shape with the name Asahi Linux (GitHub repository), defined as “an Arch Linux ARM remix designed to include state-of-the-art M1 chip support and practical installation instructions”. “All Arch Linux users should feel at home,” added Martin, explaining that development is open to anyone (and the code can also be used by other projects), so much so that he will be helped in the enterprise by Alyssa Rosenzweig , developer who is already working on Panfrost, a free and open source graphics stack for ARM Mali GPUs used in Android devices.
The entry into the scene of Rosenzweig is very useful, in fact the support of ARM Mali GPUs in Linux has always been complicated by the closed nature of official drivers: the same is true for the GPU integrated into the Apple chip . “This custom GPU from Apple has neither public documentation nor open source drivers. Some speculate that it could descend from PowerVR GPUs, such as those used in older iPhones, while others believe the GPU is completely custom,” said Rosenzweig.
The approach to the object of mystery started by applying the same reverse engineering processes used for Mali GPUs , but there are some hitches to resolve. “Although standard Linux / BSD system calls exist on macOS, they are not used for graphics drivers. Apple’s IOKit framework is used for both kernel and user space drivers, with the critical entry point being IOConnectCallMethod, an analog of ioctl “.
The first of the M1 chip-based Apple products being worked on is the Mac Mini , then we will proceed to support the other models (and future generations, time permitting). “Apple allows unsigned / custom kernels to boot on Apple Silicon Macs without jailbreaking. This is not a hack or omission, but an actual feature that Apple has built into these devices. This means that, unlike iOS devices, Apple does not intend to dictate which operating system you can use on Macs (although they probably won’t help us with development) “, underlines Hector” Marcan “Martin.
The enthusiast also stated that there should be no problems with legal character , as reverse engineering to ensure interoperability is a possibility guaranteed by law in many countries. “As long as no code is taken from macOS in order to create Linux support, the end result is legally distributable and usable by end users, as it would not be a macOS derivative work.”