Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

Porting operating systems to Apple Silicon leagues harder than migrating software

Working with Apple Silicon directly is a tough task, a developer attempting to port Linux to run natively on the M1 chip advises, with Apple using a highly customized process to boot the Mac that is different from versions used by other 64-bit ARM systems.

In its introduction of Apple Silicon to developers, Apple has provided assistance to developers to port their Intel-compatible apps over to M1. For developers performing more ambitious feats, such as porting Linux over to Apple Silicon, the task is multiple times harder.

In a blog post about the Asahi Linux project, the team discusses its findings in trying to set up an alternative boot kernel on Apple Silicon systems. While most of the feature has been implemented, the lack of support for a command that allows the installation of a non-Apple kernel led to an attempt to document the undocumented system.

The main hurdle faced was that Apple Silicon boots differently from PCs, and works "more akin to embedded platforms" like Android or iOS devices. There are differences and a "few bespoke mechanisms" in use, though Apple apparently made the boot process "feel closer" to an Intel Mac.

These differences result in some behaviors that were unexpected, such as how Apple Silicon Macs handles booting from external storage. It was also found the bootloader cannot show a graphical user interface and that the "Boot Picker" is a "full-screen macOS app, not part of the bootloader."

The developers believe the boot process is "not based on any existing standard" and instead uses "a bespoke Apple mechanism that has slowly evolved from the early days of iOS."

DeviceTree was selected to be used as part of the boot process, in part because it is similar to Apple Device Tree, which Apple Silicon uses. Both Apple Device Tree and the open DeviceTree standard are based on the Open Firmware specification, which was used for booting older PowerPC Macs.

However, the difference in binary format that cannot be easily converted automatically without high-level details about what the data represents is a hurdle for the project to cross. "Trying to unify Apple's and Linux's ideas of how device trees should work would be a nightmare," the project team claims.

To solve the problem, the team worked on "m1n1," a bootloader for Apple Silicon to "take care of as many Apple-isms' as possible" for anyone developing their own Linux or other OS ports. Using the took, which is based on a minimal environment originally made to examine the Nintendo Wii's security CPU, the project has started to document Apple's custom ARM instructions, system registers, and hardware like the Apple Interrupt Controller.

The Asahi Linux project joins another effort by Corellium to port Linux to M1. In January, Corellium mentioned a similar untraditional boot process and the use of a non-standard controller, as well as allegedly managing to boot Linux.

Directly working with Apple Silicon is a big jump in difficulty from the experience of porting Intel-based macOS apps over to the chip.

On March 12, Adobe revealed it had a "smooth experience" in converting Photoshop over. Along with initial Intel app support using Rosetta 2, the development team partnered with Apple to refactor and implement features such as Context Aware Fill to work with M1.

Praise was also offered for Apple's "significant investment in the developer toolchain and experience," elements that teams porting Linux to Apple Silicon simply do not have.

Stay on top of all Apple news right from your HomePod. Say, "Hey, Siri, play AppleInsider," and you'll get latest AppleInsider Podcast. Or ask your HomePod mini for "AppleInsider Daily" instead and you'll hear a fast update direct from our news team. And, if you're interested in Apple-centric home automation, say "Hey, Siri, play HomeKit Insider," and you'll be listening to our newest specialized podcast in moments.



30 Comments

netrox 12 Years · 1510 comments

That's why I cannot use M1 Macs for work. I must have Intel compatibility to run VMs at near native speed. Unfortunately, I will have to buy Intel laptop. 

sflocal 16 Years · 6138 comments

netrox said:
That's why I cannot use M1 Macs for work. I must have Intel compatibility to run VMs at near native speed. Unfortunately, I will have to buy Intel laptop. 

If you run it as a VM, it should run at near native speeds... for ARM-specific OS'es of course.  Windows10 for ARM apparently works, but Microsoft isn't allowing it... yet.


If you're referring to X86 OS'es, then yes... you'll have to go with an Intel Mac for the time being until someone figures out a way to run x86 OSes on ARM architecture.  It's why I bought a 2020 iMac.  I still have to run multiple flavors of x86 Windows and ASi will not do it for the foreseeable future.  Hopefully, when it comes time to retire my iMac in around 5-7 years, Apple will have some offerings, but for now... don't hold your breath.

therunningvm 8 Years · 96 comments

netrox said:
That's why I cannot use M1 Macs for work. I must have Intel compatibility to run VMs at near native speed. Unfortunately, I will have to buy Intel laptop. 

This has nothing to do with virtual machines.

shamino 17 Years · 541 comments

netrox said:
That's why I cannot use M1 Macs for work. I must have Intel compatibility to run VMs at near native speed. Unfortunately, I will have to buy Intel laptop. 
Your problem will exist whether or not the Linux community figures out how to write a boot-loader for M1 Macs.

if you need to run x86 code without emulation, then you need an x86-based computer.  Right now, you can still get x86 laptops from Apple - two model MacBook Pros (one 13" and one 16") and one MacBook Air are still Intel-based.  When Apple stops selling these, you'll need to buy your computer from someone else.  But Apple's M1 boot-loader architecture has nothing to do with this.

But, of course, you don't have to run Windows as a result of this.  That x86 laptop can run Linux natively, which can host your VMs.  If you think the computer will only be used for VM hosting, you can also install something like vSphere ( https://www.vmware.com/products/vsphere-hypervisor.html ) and avoid having anything other than a thin hypervisor between your VMs and the hardware.


lkrupp 19 Years · 10521 comments

netrox said:
That's why I cannot use M1 Macs for work. I must have Intel compatibility to run VMs at near native speed. Unfortunately, I will have to buy Intel laptop. 

So you’ve made the assumption that this will never happen. Why?