Arch Linux ARM on Apple M1/Pro/Max

This is for ARMv8 based devices

Arch Linux ARM on Apple M1/Pro/Max

Postby SaveOurARMs » Sun Mar 20, 2022 4:19 pm

The Asahi Linux team recently released their installer with support for Apple M1/Pro/Max SoCs and offer a desktop and CLI remix of Arch Linux ARM (https://asahilinux.org/2022/03/asahi-li ... a-release/). It would be great if we can start working on enabling (maybe official?) support for the platform via the fixes that have already been upstreamed to the mainline kernel.
SaveOurARMs
 
Posts: 1
Joined: Sat Mar 19, 2022 1:59 am

Re: Arch Linux ARM on Apple M1/Pro/Max

Postby marcan » Fri Mar 25, 2022 7:25 am

Hi! We've already been in contact with kmihelich about this, and you may have noticed I also sponsor an Arch Linux ARM mirror now :-)

The TL;DR is that Asahi Linux, as a distro, is intended to be a thin bleeding edge overlay on top of Arch Linux ARM. As such, we want everything long-term to be upstreamed. We already had a couple PRs merged into ALARM, and our repo is quite tiny:

https://cdn.asahilinux.org/aarch64/asahi/

Right now upstream Linux should boot on M1 (not Pro/Max/Ultra) albeit with limitations, and 5.18 should boot on Pro/Max once it's out (+Ultra soon, needs bootloader changes only) with even more limitations. The ALARM generic kernel package does not last I tried, which is probably a config issue, and it's on my list to track that down. Once that's fixed, generic ALARM armv8 archboot ISOs should "just work" on M1, after the UEFI boot environment is first set up via the Asahi Linux installer (which is how we provide support for arbitrary distros).

The rest of the Asahi support packages are mostly automation around boot configs intended for our "reference" use case of booting via u-boot+GRUB, plus the bootloaders (m1n1 and u-boot) themselves, and some magic to deal with WiFi firmware copying. Since Arch is very much a roll-it-yourself thing, none of that is strictly necessary. The Asahi Linux installer will seed m1n1+u-boot for you, so you only need those packages for upgrades right now.

Given all this, I'd say:

* If you want ALARM on M1 today, just install the Asahi Linux CLI image. That's literally all it is, ALARM plus a little extra repo and a few packages preinstalled. Pretty much just enough to make WiFi work (with iwd/iwcli) so you can actually get a network. You can see how we build the images out of ArchLinuxARM-aarch64-latest.tar.gz here: https://github.com/AsahiLinux/asahi-alarm-builder/tree/main/scripts/base. If you don't like some of the packages you can just uninstall them, or even remove the repo entirely, and you'd be left with something that is barely different from ALARM (just keep in mind you need our kernel package for now). I don't really intend to significantly change or add more bloat to this image at this point; it really is meant to be just Arch Linux ARM + bootloaders + iwd + utility scripts.

* In the short term, once we fix the kernel config issue, tpowa's archboot ISO should just work, modulo that kernel still being very limited. There isn't much more to do at that point. You could then roll with that or add the Asahi repo on top manually and pick out whatever packages you want, replace the kernel with our bleeding edge package, etc.

* As things get upstreamed into Linux, I'd like to see ALARM ship a 16K page size build of the kernel, and the archisos offer it as a boot option. That would allow WiFi to work with manual firmware copying, and improve performance.

* In the longer term, once a good amount of hardware is supported in the upstream kernel, it'd probably make sense for ALARM to package our u-boot tree (which is actually already mostly upstream) + m1n1 (our bootloader) and perhaps the pacman hook to update them like we do. At that point, there would be no reason for users to use the Asahi package overlay unless they want bleeding edge packages, and we could say M1 support is "official".
marcan
 
Posts: 5
Joined: Fri Mar 25, 2022 6:54 am


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 11 guests

cron