The crowdsourced Asahi Linux project has published its first detailed status report to summarize the progress, and challenges, of getting Linux to run natively on the Apple M1 Macs.

Porting an operating system as complex as Linux to a system-on-a-chip as closed as the Apple Silicon wasnt going to be a walk in the park. The projects first detailed progress report gives a glimpse of Apples unique boot process, and the challenges it presents to getting another operating system to run on the hardware.

“The way they [Apple Silicon Macs] work is more akin to embedded platforms (like Android phones, or, of course, iOS devices), but with quite a few bespoke mechanisms thrown in. However, Apple has taken a few steps to make this boot process feel closer to that of an Intel Mac, so there has been a lot of confusion around how things actually work,” wrote Asahis founder and lead developer, Hector Martin.

Prolific Linux porter Martin officially began work on the Apple Silicon port in January this year. His first target is the M1 Mac Mini, though he intends to eventually get Linux to run on all M1 macs.

The first big challenge, Martin writes, is the boot process of the M1 Macs, which he says is different from anything youd find in the traditional Arm ecosystem. For instance, you cannot boot Apple Silicon Macs from external storage in the same way as you can on other computers.

So Martin set out to get a lay of the land to understand not just how the boot process works, but also how the partitions were laid out in the disk, and how this compares to a standard PC environment. Very thoughtfully Martin has documented his learnings in great detail on Asahis GitHub page.

Working with mainline

In terms of concrete progress, Martin has been able to use his knowledge of the boot process to write a custom bootloader named m1n1 that bridges the Apple peculiarities with the standard way of booting an OS on 64-bit ARM.

Asahis progress might appear slow, being as it is security startup Corellium have managed to get to a working Ubuntu desktop on top of the M1. 

However, as Martin explains that his intention isnt just to get Linux running on the M1, but to do so while upstreaming his work to the mainline Linux kernel, for everyone to benefit. 

“Our approach is to upstream early, and work with the overall community from day 1. To this end, we have been working with the upstream Linux maintainers, and in fact several key Linux folks now hang around in the Asahi Linux IRC channels,” says Martin.

Via: The Register