Asahi Linux — Running Linux on Apple M1
Asahi Linux
Recently, I came across a tweet about an effort to port Linux to Apple M1 machines, 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 isn’t running through an emulator or a virtual machine; it’s about running the Linux kernel directly on bare-metal Apple M1. The development difficulty and performance between the two approaches are entirely different. Because of Apple M1’s proprietary design, simply compiling the Linux kernel and trying to run it on the M1 won’t work out of the box.
Apple obviously isn’t going to hand you documentation for their drivers. Drivers for peripherals need to be written from scratch, and you need to understand the Apple M1’s CPU architecture and internal design—meaning they essentially have to rely on reverse engineering to figure it all out.
I find this incredibly cool. Achieving this requires not only a deep understanding of low-level hardware communication, but also the expertise to modify the Linux kernel—all while flying completely blind. The entire codebase is open source, which makes it tremendously helpful for understanding how Linux works under the hood as well as the inner workings of Apple M1.
That said, this project will likely only attract Linux enthusiasts and a subset of engineers. After all, the general public and even most developers don’t have a compelling reason to run Linux on an Apple M1. Still, it opens up an exciting new possibility: running Linux on Apple Silicon.
Is It Legal?
The official website specifically addresses this question:
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 don’t use any proprietary macOS code, doing this is completely legal under the terms.
Though as netizens have pointed out, whether it’s legal is one thing; whether Apple decides to sue you anyway is another.
Related Resources
Related Posts
- Words That Changed My Outlook on Life Feynman, Chaplin, and the movie Hyakumeter: from an insecure boy to someone capable of helping others, sharing the reflections and life philosophies that shaped me most.
- N Benefits of an Independent Website Why spend time running your own blog in an era dominated by short-form video and social media? Here are my thoughts after nearly a decade of blogging.
- Reflections on Fitness and Weight Training Sharing my thoughts and journey with weight training over the past period.
- Authority and Responsibility: The Root Cause of Workplace Friction Want employees to work late every day and hustle like a founder? Give them equity.