Asahi Linux - Running Linux on Apple M1

Written byKalanKalan
💡

If you have any questions or feedback, pleasefill out this form

This post is translated by ChatGPT and originally written in Mandarin, so there may be some inaccuracies or mistakes.

Asahi Linux

Recently, I came across a tweet on Twitter aimed at porting Linux to Apple M1 machines, including the Mac Mini, MacBook Air, and MacBook Pro.

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 initiative is not about using an emulator or a virtual machine; it involves running the Linux kernel directly on the Apple M1. The development challenges and performance implications of these two approaches are vastly different. Due to the unique design of the Apple M1, simply compiling the Linux kernel to run on it is not viable.

Apple clearly won't share documentation for various drivers, meaning that drivers for external devices need to be written from scratch. Understanding the Apple M1 CPU architecture and internal design is critical, which essentially means relying on reverse engineering to gain insights.

This is incredibly exciting for me because achieving this requires not only a solid understanding of hardware communication but also knowledge of how to modify the Linux kernel—all while navigating in the dark. The entire development process is open-source, which is highly beneficial for understanding how Linux operates and how the Apple M1 is designed.

However, this endeavor seems to primarily attract the attention of Linux enthusiasts and some engineers, as the general public and even developers may not have a strong motivation to run Linux on the Apple M1. Yet, it does open up new possibilities—Apple M1 can run Linux.

The official website specifically mentions this in their FAQ:

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 do not use any code from macOS, this initiative is completely legal under the user agreement.

However, according to some users, legality is one thing; whether Apple decides to sue you is another matter altogether.

If you found this article helpful, please consider buying me a coffee ☕ It'll make my ordinary day shine ✨

Buy me a coffee