Subject: [PATCH 0/7] Add some Asahi Linux packages

From: Roman Scherer <[email-masked]>
Date: Sat, 4 Mar 2023 15:44:15 +0100

Hi Guix,

this patch series adds some packages to run Guix on Apple silicon. They are
loosely based on the offical PKGBUILDs [1] of the Asahi Linux project and the
nixos-apple-silicon [2] packages.

u-boot-apple-m1 is a modified version of u-boot from the Asahi Linux team,
which is unlikely to be upstreamed from what I heard in the internet.

m1n1 is the bootloader of the Asahi Linux project, which is placed on the EFI
system partition under /boot/efi/m1n1/boot.bin by the Asahi Linux
installer. For now this is only the package, but I think we also need a proper
Guix bootloader for this. The final /boot/efi/m1n1/boot.bin should be
concatenation of the m1n1.bin binary, the u-boot-apple-m1 binary and the Linux
device trees. I'm not very familiar with how bootloaders work in Guix, but I
believe on a system reconfigure 2 bootloaders should be installed on the EFI
system partition, m1n1 itself and GRUB (I haven't tried extlinux yet).

asahi-fwextract is a tool that extracts a manifest.txt file and 2 archives,
firmware.cpio and firmware.tar from an archive which the Asahi Linux installer
places under /boot/efi/asahi/all_firmware.tar.gz. The all_firmware.tar.gz file
itself is extracted from the rescue partition of the MacOS installation when
installing. This tool can be used by a user to create an installation or
system image that includes the required firmware.

asahi-mesa is the mesa package that includes the GPU driver and is not
upstreamed yet. asahi-mesa-utils and asahi-mesa-headers are variants that use
asahi-mesa.

The next step would be to support building a Linux with Rust modules. I'm
waiting for some patches from the Rust team to do this.

Could you please review those patches?

Thanks, Roman.

[1] https://github.com/AsahiLinux/PKGBUILDs
[2] https://github.com/tpwrules/nixos-apple-silicon

Roman Scherer (7):
  gnu: Add asahi-fwextract.
  gnu: libdrm: Update to 2.4.114.
  gnu: Add asahi-mesa.
  gnu: Add asahi-mesa-headers.
  gnu: Add asahi-mesa-utils.
  gnu: Add m1n1.
  gnu: Add u-boot-apple-m1.

 gnu/packages/bootloaders.scm | 54 ++++++++++++++++++++++++
 gnu/packages/firmware.scm    | 35 ++++++++++++++++
 gnu/packages/gl.scm          | 79 ++++++++++++++++++++++++++++++++++++
 gnu/packages/xdisorg.scm     | 12 +++---
 4 files changed, 174 insertions(+), 6 deletions(-)

--
2.39.1