Kalan's Blog

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

四零二曜日電子報上線啦!訂閱訂起來

Software Engineer / Taiwanese / Life in Fukuoka
This blog supports RSS feed (all content), you can click RSS icon or setup through third-party service. If there are special styles such as code syntax in the technical article, it is still recommended to browse to the original website for the best experience.

Current Theme light

我會把一些不成文的筆記或是最近的生活雜感放在短筆記,如果有興趣的話可以來看看唷!

Please notice that currenly most of posts are translated by AI automatically and might contain lots of confusion. I'll gradually translate the post ASAP

Asahi Linux - Running Linux on Apple M1

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