Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asahi (Apple Silicon) Survey 20231111 #4816

Merged
merged 14 commits into from
Nov 13, 2023
Merged

Conversation

MingcongBai
Copy link
Member

@MingcongBai MingcongBai commented Nov 13, 2023

Topic Description

This topic introduces a collection of packages and configurations to enable out-of-the-box support for Apple Silicon-based devices:

Apple Silicon Specific

  • m1n1 => uboot-asahi => {EFI} => GRUB boot infrastructure.
  • asahi-common: Basic device configuration and helper scripts (such as update-m1n1 for updating m1n1 stage2 images - containing device trees and the aforementioned boot infrastructure).
  • linux-kernel-asahi: Linux Kernel 6.5.11 with AOSC and Asahi patches.
  • alsa-ucm-conf-asahi: ALSA layout configuration for Apple Silicon devices.
  • asahi-base: Meta package for Apple Silicon support.
  • apfs-fuse: Read-only FUSE driver for APFS.
  • fd: Fix crash on launch on 16K kernel page devices (such as Apple Silicon devices).
  • mesa: Preemptive asahi DRI enablement (support should be stable by 24.0.0) - not enabled by default.

General Updates and Fixes

  • audio-base: Add alsa-ucm-conf, useful for newer x86 devices.
  • arch-install-scripts: Fix extraneous pseudo filesystem entries in genfstab.
  • kernel-build-common: Support Rust toolchain configuration.

Package(s) Affected

See "Files changed."

Security Update?

No

Build Order

For all architectures:

apfs-fuse arch-install-scripts audio-base kernel-build-common mesa

For AArch64:

m1n1 uboot-asahi asahi-fwextract asahi-common kernel-build-common linux-kernel-asahi linux+kernel+asahi mesa fd arch-install-scripts audio-base alsa-ucm-conf-asahi apfs-fuse asahi-base 

Test Build(s) Done

Primary Architectures

  • AMD64 amd64
  • AArch64 arm64

Secondary Architectures

Architectural progress for "secondary," or experimental ports does not impede on merging of this topic.

  • Loongson 3 loongson3
  • MIPS R6 64-bit (Little Endian) mips64r6el
  • PowerPC 64-bit (Little Endian) ppc64el
  • RISC-V 64-bit riscv64

eatradish and others added 14 commits November 13, 2023 11:57
- Install m1n1.bin to /usr/lib/asahi-boot.
- Introduce a default m1n1.conf template.
- Use AOSC OS logo.

Co-authored-by: Mingcong Bai <[email protected]>
This package contains most components found in AOSC-Dev/asahi-scripts, which is
forked from AsahiLinux/asahi-scripts to adapt the scripts for AOSC OS.

Also contains a trigger for updating m1n1's stage2 image whenever the kernel,
u-boot image, or device trees were updated.
- Clear CONFIG_DEFAULT_HOSTNAME to use local fallback.
- Disable "embedded system" and "expert configuration."
- Use "schedutil" as the default CPUFreq governor.
- Disable ACPI Error Injection support.
- Enable the Data Access MONitoring (DAMON) framework.
- Build-in Apple Z2 (touchbar) support, just in case.
- (In source) Bump Rust version to 1.72.1, Bindgen to 0.68.1, matching versions
  recorded in Asahi Linux's kernel config.
- Build-in CONFIG_DRM_ASAHI, lest build fails due to unsatisfied module
  dependencies (manifested in Rust errors).
- Trigger update-m1n1 after installation. [^1]

[^1] Kernel updates may introduce incompatible device tree updates, which were
     in turn bundled and initialised with u-boot, a part of the m1n1 stage2
     image.

     This should no longer be necessary when we switch to use the mainline
     kernel for Apple Silicon devices.

Co-authored-by: Mingcong Bai <[email protected]>
This driver will not work with Kernel 6.5. This is just so we wouldn't forget
to enable it come time for 24.0.0.
set `JEMALLOC_SYS_WITH_LG_HUGEPAGE=25` and `JEMALLOC_SYS_WITH_LG_PAGE=16`
to fix run in Apple Silicon and other 16k page size device
- Rebase pacstrap patches.
- Add a patch to genfstab to exclude fuse.portal as a pseudo filesystem.
This package is often needed for newer x86 platforms.
@MingcongBai MingcongBai added upgrade Topic/issue involves a package upgrade survey Topic is a survey of a set or category of packages hardware-support Hardware support related labels Nov 13, 2023
@MingcongBai
Copy link
Member Author

Out-of-the-box usability tested on a Mac mini (M1, 2020) with 1Gbps ethernet.

@MingcongBai MingcongBai merged commit 290bd44 into stable Nov 13, 2023
@MingcongBai MingcongBai deleted the asahi-survey-20231111 branch November 13, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware-support Hardware support related survey Topic is a survey of a set or category of packages upgrade Topic/issue involves a package upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants