Kalan's Blog

Software Engineer / Taiwanese / Life in Fukuoka

Current Theme light

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.

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.

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

Prev

The code fonts I have used over the years

Next

Frontend Anxiety Disorder

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

Buy me a coffee

作者

Kalan 頭像照片,在淡水拍攝,淺藍背景

愷開 | Kalan

Hi, I'm Kai. I'm Taiwanese and moved to Japan in 2019 for work. Currently settled in Fukuoka. In addition to being familiar with frontend development, I also have experience in IoT, app development, backend, and electronics. Recently, I started playing electric guitar! Feel free to contact me via email for consultations or collaborations or music! I hope to connect with more people through this blog.