Asahi Linux
Recently, I came across a tweet on Twitter with the goal of porting Linux to Apple M1 devices, including the Mac Mini, MacBook Air, and MacBook Pro.
LLVMPipe, my shoddy display controller, and hours of @svenpeter42's patience presents....
— Alyssa Rosenzweig (@alyssarzg) August 22, 2021
GNOME Shell on the Apple M1, bare metal.
No, it's not GPU accelerated. Yes, I'm sending this tweet from it. pic.twitter.com/P4YuPEnbvp
Asahi Linux is a project and community with the goal of porting Linux to Apple Silicon Macs, starting with the 2020 M1 Mac Mini, MacBook Air, and MacBook Pro. Our goal is not just to make Linux run on these machines but to polish it to the point where it can be used as a daily OS. Doing this requires a tremendous amount of work, as Apple Silicon is an entirely undocumented platform. In particular, we will be reverse engineering the Apple GPU architecture and developing an open-source driver for it. Asahi Linux was founded by Hector Martin "marcan" after the launch of the first M1 devices.
This is not achieved through emulation or virtualization but by directly running the Linux kernel on Apple M1. The development difficulty and performance of the two methods are completely different because of the unique design of Apple M1. It is not possible to run the Linux kernel on Apple M1 by simply compiling it.
Clearly, Apple does not provide documentation for all the drivers. The drivers for external devices need to be written independently, and understanding the Apple M1 CPU architecture and internal design is necessary. Therefore, reverse engineering is the only way to comprehend it.
This is really cool to me because achieving this requires not only understanding hardware communication but also knowing how to modify the Linux kernel, all while navigating in the dark. The entire development code is open source, which is helpful for understanding how Linux works and the design of Apple M1.
However, this matter obviously only attracts Linux enthusiasts or some engineers' attention. After all, the general public or even developers do not have a strong motivation to run Linux on Apple M1. But it does open up new possibilities - Apple M1 can be used to run Linux.
Is it legal?
The official website has a specific mention of this:
As long as no code is taken from macOS to build the Linux support, the result is completely legal to distribute and for end-users to use, as it would not be a derivative work of macOS. Please see our Copyright & Reverse Engineering Policy for more information.
As long as you are not using any code from macOS, according to the user agreement, this matter is completely legal.
However, according to some netizens, whether it is legal or not is one thing, and whether Apple will sue you is another thing