Porting Linux to Apple M1 Macs is proving trickier than previously imagined

MacBook Pro with Asahi Linux logo
(Image credit: Asahi Linux)

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 wasn’t going to be a walk in the park. The project’s first detailed progress report gives a glimpse of Apple’s 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 Asahi’s founder and lead developer, Hector Martin.

Long road ahead

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 you’d 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 Asahi’s 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.

Asahi’s 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 isn’t 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

TOPICS
Mayank Sharma

With almost two decades of writing and reporting on Linux, Mayank Sharma would like everyone to think he’s TechRadar Pro’s expert on the topic. Of course, he’s just as interested in other computing topics, particularly cybersecurity, cloud, containers, and coding.

Read more
MacBook Pro with Asahi Linux logo
Head of top Apple Mac Linux distro resigns, citing burnout and slamming Linus Torvalds leadership
Parallels Desktop 20.2
This software may finally kill Windows on desktops for good, and I think Apple should buy it now
A person using the M4 MacBook Pro.
Apple Mac in 2024: year in review
A mockup of the possible Apple M3 Ultra logo
Performance isn't the only reason you should buy Apple's M3 Ultra Mac Studio - it's reportedly one of the most power-efficient processors too
DC-Roma RISC-V Mainboard
The rise of RISC: 2025 will be the year of the first quasi-mainstream RISC-V laptop as confirmed by the CEO of Framework but I don't think it will be ready for primetime
The Chuwi Aubox 8745 mini PC pictured on a home office desk with monitor.
This is probably the best Windows alternative to the M4 Mac Mini: AMD-powered mini PC can drive four 8K monitors and has two 2.5Gb Ethernet connectors
Latest in Pro
Racks of servers inside a data center.
Modernizing data centers: an efficient path forward
Dr. Peter Zhou, President of Huawei Data Storage Product Line
Why AI commonization is so important for business intelligent transformation and what Huawei’s data storage has to offer
Wix automation
The world's leading website builder aims to save businesses time with new tool
Data Breach
Thousands of healthcare records exposed online, including private patient information
China
Juniper patches security flaws which could have let hackers take over your router
Hands typing on a keyboard surrounded by security icons
The psychology of scams: how cybercriminals are exploiting the human brain
Latest in News
Brad Pitt looks over his right shoulder with 'F1' written behind him
Apple Original Films will take you behind-the-scenes of a racing cockpit in this new thrilling F1 movie trailer
AI writer
Coding AI tells developer to write it himself
Reacher looking down at another character from the Prime Video TV series Reacher
Reacher season 3 becomes Prime Video’s biggest returning show thanks to Hollywood’s biggest heavyweight
Image showing detail of the Leica D-Lux 8
Still can't get a Fujifilm X100VI? This premium Leica compact costs less, and it's in stock
Man using iMessage on an iPhone
Apple will finally enable encrypted RCS messages between iOS and Android, and it's about time
Google Messages update
Google Messages could soon follow WhatsApp with an upgrade that makes it much easier to join group chats