From 4d29b46a6ce14aab795b018c845645656df48f64 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Wed, 30 Sep 2026 17:02:16 -0500 Subject: [PATCH 01/14] Add omarchy-ane-dkms, the Apple Neural Engine driver The package builds ane.ko and ane_t6021.ko with DKMS from a joshuaswarren/omarchy-ane release. It installs the device-tree overlays, the readiness check, the M2 opt-in tools and their pacman hooks. aarch64 and edge only. ane_t6021 stays blocked by /etc/modprobe.d/ane_t6021.conf until the user opts in. Removal takes out the firmware and the opt-in line that omarchy-ane-m2-enable wrote. The watch follows published GitHub releases after 24 hours, on the reviewed lane. --- .../omarchy-ane-dkms/.omarchy/package.json | 11 +++ pkgbuilds/omarchy-ane-dkms/PKGBUILD | 71 +++++++++++++++++++ .../omarchy-ane-dkms/omarchy-ane-dkms.install | 12 ++++ 3 files changed, 94 insertions(+) create mode 100644 pkgbuilds/omarchy-ane-dkms/.omarchy/package.json create mode 100644 pkgbuilds/omarchy-ane-dkms/PKGBUILD create mode 100644 pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install diff --git a/pkgbuilds/omarchy-ane-dkms/.omarchy/package.json b/pkgbuilds/omarchy-ane-dkms/.omarchy/package.json new file mode 100644 index 0000000..6a457a1 --- /dev/null +++ b/pkgbuilds/omarchy-ane-dkms/.omarchy/package.json @@ -0,0 +1,11 @@ +{ + "source": "local", + "channels": ["edge"], + "min_release_age": "24h", + "upstream": { + "watch": { + "github": "joshuaswarren/omarchy-ane", + "pattern": "v(?P[0-9]+(?:\\.[0-9]+)*)" + } + } +} diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD new file mode 100644 index 0000000..e5e6c02 --- /dev/null +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> + +pkgname=omarchy-ane-dkms +_srcname=omarchy-ane +pkgver=0.3.0 +pkgrel=1 +pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' +arch=('aarch64') +groups=('omarchy-platform-apple-silicon') +url='https://github.com/joshuaswarren/omarchy-ane' +license=('GPL-2.0-only OR MIT') +# dtc 1.7.1 is the first release that keeps a labelled node's phandle when it +# applies an overlay (libfdt 1fad0650, 61e88fdc). Arch's dtc carries epoch 1. +depends=('dkms' 'dtc>=1:1.7.1' 'python') +makedepends=('dtc') +checkdepends=('fakeroot' 'linux-aurora-headers') +optdepends=('linux-aurora-headers: build the modules for linux-aurora' + 'linux-asahi-headers: build the modules for linux-asahi') +# ANE_ABI_MAJOR of ane.ko (ane/src/uapi/drm/ane_accel.h). omarchy-mlx depends on +# the ABI, not on a package version. +provides=('omarchy-ane-abi=1') +# ane_t6021 stays blocked until omarchy-ane-m2-enable edits this file. +backup=('etc/modprobe.d/ane_t6021.conf') +install=omarchy-ane-dkms.install +source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('1533e555dcff5c2392ffb460480991fe989e1a8534dc6907c421c972a674a9b1') + +prepare() { + # The DKMS source tree: dkms.conf, ane/Makefile, ane/src/ and ane/t6021/. + # PACKAGE_VERSION becomes /sys/module/ane/version. + local src="$_srcname-$pkgver" dst="dkms/$_srcname-$pkgver" + rm -rf dkms + install -d "$dst/ane" + cp -r "$src/dkms.conf" "$dst/" + cp -r "$src/ane/Makefile" "$src/ane/src" "$src/ane/t6021" "$dst/ane/" + sed -i "s/@PKGVER@/$pkgver/" "$dst/dkms.conf" +} + +check() { + cd "$_srcname-$pkgver" + python tools/test_ane_dt.py + python tools/test_ane_firmware_fetch.py + python tools/test_ane_m2.py + + local build=(/usr/lib/modules/*/build) + local kver=${build[0]%/build} + kver=${kver##*/} + rm -rf "$srcdir/check" + mkdir -p "$srcdir/check/dkms" "$srcdir/check/src" + local dkms_options=(--dkmstree "$srcdir/check/dkms" --sourcetree "$srcdir/check/src" -k "$kver") + fakeroot dkms "${dkms_options[@]}" add "$srcdir/dkms/$_srcname-$pkgver" + fakeroot dkms "${dkms_options[@]}" build "$_srcname/$pkgver" +} + +package() { + cd "$_srcname-$pkgver" + install -d "$pkgdir/usr/src" + cp -r --no-preserve=ownership "$srcdir/dkms/$_srcname-$pkgver" "$pkgdir/usr/src/" + + install -Dm755 -t "$pkgdir/usr/bin" \ + packaging/omarchy-ane-check packaging/omarchy-ane-dt \ + packaging/omarchy-ane-firmware-fetch packaging/omarchy-ane-m2-enable + install -Dm644 packaging/update-m1n1-dtbs "$pkgdir/usr/lib/omarchy-ane/update-m1n1-dtbs" + install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks" \ + packaging/90-omarchy-ane-dt.hook packaging/90-omarchy-ane-dt-remove.hook + install -Dm644 packaging/modprobe/ane_t6021.conf "$pkgdir/etc/modprobe.d/ane_t6021.conf" + # /usr/lib/omarchy-platform/dtb-overlays/PREFIX/omarchy-ane.dtbo + packaging/build-dtbo "$pkgdir" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install b/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install new file mode 100644 index 0000000..daaa402 --- /dev/null +++ b/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install @@ -0,0 +1,12 @@ +# omarchy-ane-m2-enable writes these two files. pacman does not own them, so +# remove them with the package, as omarchy-ane-m2-enable --disable does. +post_remove() { + rm -f /usr/lib/firmware/apple/ane/t602x_ane0_fw_selene_rc4x.macho + rmdir /usr/lib/firmware/apple/ane 2>/dev/null || : + + local opt_in=/etc/omarchy-platform/dtb-overlays.opt-in + if [[ -f $opt_in ]]; then + sed -i '/^ane-t6021$/d' "$opt_in" + [[ -s $opt_in ]] || rm -f "$opt_in" + fi +} From d00ac79e91f11bc5740f29b6f5d75493f67b5529 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Wed, 30 Sep 2026 18:51:20 -0500 Subject: [PATCH 02/14] omarchy-ane-dkms: take the v0.3.0 archive from omarchy-ane main d6babeb --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index e5e6c02..36182d6 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -23,7 +23,7 @@ provides=('omarchy-ane-abi=1') backup=('etc/modprobe.d/ane_t6021.conf') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('1533e555dcff5c2392ffb460480991fe989e1a8534dc6907c421c972a674a9b1') +sha256sums=('4090db21dc679e8d90aab213030b030058fa2c6204cd90e533906cba76a1c8c9') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/src/ and ane/t6021/. From a2b5c4000f1a013448af07a781d6cc340ab7ecf1 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Wed, 30 Sep 2026 19:19:31 -0500 Subject: [PATCH 03/14] omarchy-ane-dkms: use the published v0.3.0 release archive --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 36182d6..5c28e55 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -23,7 +23,7 @@ provides=('omarchy-ane-abi=1') backup=('etc/modprobe.d/ane_t6021.conf') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('4090db21dc679e8d90aab213030b030058fa2c6204cd90e533906cba76a1c8c9') +sha256sums=('255e1cd93d2ba591d39430f67b49ce48c54079d5cb173764266afb4ef1bbf28d') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/src/ and ane/t6021/. From 8e5c2d2a8b2f8460dca9490e484464f8c7e0809a Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Thu, 1 Oct 2026 18:49:47 -0500 Subject: [PATCH 04/14] omarchy-ane-dkms: ANE on by default on T6021 omarchy-ane removed omarchy-ane-m2-enable and the modprobe gate packaging/modprobe/ane_t6021.conf, and added 90-omarchy-ane-firmware.hook, which fetches the T6021 firmware after each install and upgrade (omarchy-ane receipts/2026-10-01-t6021-default-on). - package(): install the firmware hook; drop omarchy-ane-m2-enable, the gate file and its backup=() entry. On upgrade pacman deletes an unchanged gate file; a changed one becomes ane_t6021.conf.pacsave, which modprobe does not read (it reads only *.conf). - post_remove: remove both firmware files that omarchy-ane-firmware-fetch writes (T602x and T8112). Drop the ane-t6021 opt-in edit: no overlay reads that key now. - The overlay comment names /usr/share/omarchy-platform/dtb-overlays. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 10 ++++------ pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install | 13 ++++--------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 5c28e55..73de1e7 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -19,8 +19,6 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' # ANE_ABI_MAJOR of ane.ko (ane/src/uapi/drm/ane_accel.h). omarchy-mlx depends on # the ABI, not on a package version. provides=('omarchy-ane-abi=1') -# ane_t6021 stays blocked until omarchy-ane-m2-enable edits this file. -backup=('etc/modprobe.d/ane_t6021.conf') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") sha256sums=('255e1cd93d2ba591d39430f67b49ce48c54079d5cb173764266afb4ef1bbf28d') @@ -59,12 +57,12 @@ package() { install -Dm755 -t "$pkgdir/usr/bin" \ packaging/omarchy-ane-check packaging/omarchy-ane-dt \ - packaging/omarchy-ane-firmware-fetch packaging/omarchy-ane-m2-enable + packaging/omarchy-ane-firmware-fetch install -Dm644 packaging/update-m1n1-dtbs "$pkgdir/usr/lib/omarchy-ane/update-m1n1-dtbs" install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks" \ - packaging/90-omarchy-ane-dt.hook packaging/90-omarchy-ane-dt-remove.hook - install -Dm644 packaging/modprobe/ane_t6021.conf "$pkgdir/etc/modprobe.d/ane_t6021.conf" - # /usr/lib/omarchy-platform/dtb-overlays/PREFIX/omarchy-ane.dtbo + packaging/90-omarchy-ane-dt.hook packaging/90-omarchy-ane-dt-remove.hook \ + packaging/90-omarchy-ane-firmware.hook + # /usr/share/omarchy-platform/dtb-overlays/PREFIX/omarchy-NAME.dtbo packaging/build-dtbo "$pkgdir" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" diff --git a/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install b/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install index daaa402..250a76b 100644 --- a/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install +++ b/pkgbuilds/omarchy-ane-dkms/omarchy-ane-dkms.install @@ -1,12 +1,7 @@ -# omarchy-ane-m2-enable writes these two files. pacman does not own them, so -# remove them with the package, as omarchy-ane-m2-enable --disable does. +# omarchy-ane-firmware-fetch writes the ANE firmware (90-omarchy-ane-firmware.hook +# on T6021, by hand on T6020, T6022 and T8112). pacman does not own it. post_remove() { - rm -f /usr/lib/firmware/apple/ane/t602x_ane0_fw_selene_rc4x.macho + rm -f /usr/lib/firmware/apple/ane/t602x_ane0_fw_selene_rc4x.macho \ + /usr/lib/firmware/apple/ane/h14_ane_fw_bia_j4xx.macho rmdir /usr/lib/firmware/apple/ane 2>/dev/null || : - - local opt_in=/etc/omarchy-platform/dtb-overlays.opt-in - if [[ -f $opt_in ]]; then - sed -i '/^ane-t6021$/d' "$opt_in" - [[ -s $opt_in ]] || rm -f "$opt_in" - fi } From 7f2014bb98a150cd8ff3d9c3fbf95a49523499cf Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Thu, 1 Oct 2026 20:04:22 -0500 Subject: [PATCH 05/14] omarchy-ane-dkms: ship omarchy-ane-smoke and its runner omarchy-ane-smoke (joshuaswarren/omarchy-ane#50) runs the add program 20 times on the ANE and checks each output against the exact fp16 sum. It runs omarchy-ane-run from its own directory with the program in /usr/share/omarchy-ane/fixtures. - build(): make tools/ane-run. It links libane statically and needs only libc and libm at run time. libdrm is a makedepend for drm.h. - check(): add tools/test_ane_smoke.py (stub runner, fake root, no device). - package(): install omarchy-ane-smoke, tools/ane-run as omarchy-ane-run, and fixtures/h14-anec/add/program-0.anec. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 73de1e7..0f45581 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -12,7 +12,8 @@ license=('GPL-2.0-only OR MIT') # dtc 1.7.1 is the first release that keeps a labelled node's phandle when it # applies an overlay (libfdt 1fad0650, 61e88fdc). Arch's dtc carries epoch 1. depends=('dkms' 'dtc>=1:1.7.1' 'python') -makedepends=('dtc') +# libdrm: drm.h for libane, which omarchy-ane-run links statically. +makedepends=('dtc' 'libdrm') checkdepends=('fakeroot' 'linux-aurora-headers') optdepends=('linux-aurora-headers: build the modules for linux-aurora' 'linux-asahi-headers: build the modules for linux-asahi') @@ -34,11 +35,16 @@ prepare() { sed -i "s/@PKGVER@/$pkgver/" "$dst/dkms.conf" } +build() { + make -C "$_srcname-$pkgver/tools" ane-run +} + check() { cd "$_srcname-$pkgver" python tools/test_ane_dt.py python tools/test_ane_firmware_fetch.py python tools/test_ane_m2.py + python tools/test_ane_smoke.py local build=(/usr/lib/modules/*/build) local kver=${build[0]%/build} @@ -57,7 +63,11 @@ package() { install -Dm755 -t "$pkgdir/usr/bin" \ packaging/omarchy-ane-check packaging/omarchy-ane-dt \ - packaging/omarchy-ane-firmware-fetch + packaging/omarchy-ane-firmware-fetch packaging/omarchy-ane-smoke + # omarchy-ane-smoke runs omarchy-ane-run from its own directory with this program. + install -Dm755 tools/ane-run "$pkgdir/usr/bin/omarchy-ane-run" + install -Dm644 fixtures/h14-anec/add/program-0.anec \ + "$pkgdir/usr/share/omarchy-ane/fixtures/h14-anec/add/program-0.anec" install -Dm644 packaging/update-m1n1-dtbs "$pkgdir/usr/lib/omarchy-ane/update-m1n1-dtbs" install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks" \ packaging/90-omarchy-ane-dt.hook packaging/90-omarchy-ane-dt-remove.hook \ From fd8183890954ba33a08dcbf1261ce3c0be5c7dc7 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Thu, 1 Oct 2026 20:31:46 -0500 Subject: [PATCH 06/14] omarchy-ane-dkms: 0.4.0 The source is the published v0.4.0 release of joshuaswarren/omarchy-ane (commit 16d13ef). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.0.tar.gz. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 0f45581..c93fc3e 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.3.0 +pkgver=0.4.0 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,7 +22,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('255e1cd93d2ba591d39430f67b49ce48c54079d5cb173764266afb4ef1bbf28d') +sha256sums=('4061ae5c8531299c01519c03deeada4b1146c62a0809de1572534ca6c6ee562d') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/src/ and ane/t6021/. From 80d5711617c42c195e120f8b3581749480818c2b Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Fri, 2 Oct 2026 17:04:31 -0500 Subject: [PATCH 07/14] omarchy-ane-dkms: 0.4.1 The source is the published v0.4.1 release of joshuaswarren/omarchy-ane (commit 4f01bb3). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.1.tar.gz. - prepare(): both modules now compile ane/ane_stats_show.c and include ane/include/, so the DKMS tree copies them. Without them the DKMS build fails on the missing ane_stats.h. - package(): install tools/omarchy-ane-probe and the H13 add program that omarchy-ane-smoke runs on the M1 family. packaging/build-dtbo also installs the twelve data/ane-soc tables to /usr/share/omarchy-ane/soc and installs none of the data-only overlays. - check(): add test_ane_probe, test_validate_ane_soc and test_promotion_check. test_promote_chip and test_promote_from_verdict need a git checkout and stay out. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index c93fc3e..ce19d8d 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.0 +pkgver=0.4.1 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,16 +22,18 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('4061ae5c8531299c01519c03deeada4b1146c62a0809de1572534ca6c6ee562d') +sha256sums=('c11bfe8eedb58d6284ef07cd7f3e46dfa513224cbe8bebf34477417574a3a343') prepare() { - # The DKMS source tree: dkms.conf, ane/Makefile, ane/src/ and ane/t6021/. + # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, + # ane/include/, ane/src/ and ane/t6021/. # PACKAGE_VERSION becomes /sys/module/ane/version. local src="$_srcname-$pkgver" dst="dkms/$_srcname-$pkgver" rm -rf dkms install -d "$dst/ane" cp -r "$src/dkms.conf" "$dst/" - cp -r "$src/ane/Makefile" "$src/ane/src" "$src/ane/t6021" "$dst/ane/" + cp -r "$src/ane/Makefile" "$src/ane/ane_stats_show.c" "$src/ane/include" \ + "$src/ane/src" "$src/ane/t6021" "$dst/ane/" sed -i "s/@PKGVER@/$pkgver/" "$dst/dkms.conf" } @@ -45,6 +47,9 @@ check() { python tools/test_ane_firmware_fetch.py python tools/test_ane_m2.py python tools/test_ane_smoke.py + python tools/test_ane_probe.py + python tools/test_validate_ane_soc.py + python tools/test_promotion_check.py local build=(/usr/lib/modules/*/build) local kver=${build[0]%/build} @@ -64,15 +69,20 @@ package() { install -Dm755 -t "$pkgdir/usr/bin" \ packaging/omarchy-ane-check packaging/omarchy-ane-dt \ packaging/omarchy-ane-firmware-fetch packaging/omarchy-ane-smoke - # omarchy-ane-smoke runs omarchy-ane-run from its own directory with this program. + install -Dm755 tools/omarchy-ane-probe "$pkgdir/usr/bin/omarchy-ane-probe" + # omarchy-ane-smoke runs omarchy-ane-run from its own directory with these programs. install -Dm755 tools/ane-run "$pkgdir/usr/bin/omarchy-ane-run" install -Dm644 fixtures/h14-anec/add/program-0.anec \ "$pkgdir/usr/share/omarchy-ane/fixtures/h14-anec/add/program-0.anec" + install -Dm644 fixtures/h13-anec/add/program-0.anec \ + "$pkgdir/usr/share/omarchy-ane/fixtures/h13-anec/add/program-0.anec" install -Dm644 packaging/update-m1n1-dtbs "$pkgdir/usr/lib/omarchy-ane/update-m1n1-dtbs" install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks" \ packaging/90-omarchy-ane-dt.hook packaging/90-omarchy-ane-dt-remove.hook \ packaging/90-omarchy-ane-firmware.hook - # /usr/share/omarchy-platform/dtb-overlays/PREFIX/omarchy-NAME.dtbo + # Overlays to /usr/share/omarchy-platform/dtb-overlays/PREFIX/omarchy-NAME.dtbo, + # and data/ane-soc/SOC.json to /usr/share/omarchy-ane/soc/. The data-only + # overlays compile as a check and are never installed. packaging/build-dtbo "$pkgdir" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" From 7980d7b199409fbb1547dd058655e40323bb3172 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sat, 3 Oct 2026 05:26:23 -0500 Subject: [PATCH 08/14] omarchy-ane-dkms: 0.4.2 The source is the published v0.4.2 release of joshuaswarren/omarchy-ane (commit 545d059). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.2.tar.gz. No other recipe line changes: the DKMS build files, the packaged files and the check() tests are those of 0.4.1. dkms.conf now sets BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE", so DKMS skips a kernel that ships its own ANE driver and builds on every other kernel. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index ce19d8d..801f54e 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.1 +pkgver=0.4.2 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,7 +22,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('c11bfe8eedb58d6284ef07cd7f3e46dfa513224cbe8bebf34477417574a3a343') +sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, From 5ef9ebdcac02d74751dd40db85cae25d5c761e07 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sat, 3 Oct 2026 13:52:22 -0500 Subject: [PATCH 09/14] omarchy-ane-dkms: check() passes on kernels with the in-tree ANE driver dkms.conf sets BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE", so on a kernel that ships the in-tree driver "dkms build" exits 77 and builds nothing. check() treated that as a failure, and makepkg stopped in check(). check() now takes exit 77 as "no DKMS build" when the kernel's config sets CONFIG_DRM_ACCEL_ANE, and prints it. After a build it lists ane.ko and ane_t6021.ko from the DKMS tree. Every other dkms exit status still fails check(). --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 801f54e..852141f 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -58,7 +58,18 @@ check() { mkdir -p "$srcdir/check/dkms" "$srcdir/check/src" local dkms_options=(--dkmstree "$srcdir/check/dkms" --sourcetree "$srcdir/check/src" -k "$kver") fakeroot dkms "${dkms_options[@]}" add "$srcdir/dkms/$_srcname-$pkgver" - fakeroot dkms "${dkms_options[@]}" build "$_srcname/$pkgver" + local rc=0 + fakeroot dkms "${dkms_options[@]}" build "$_srcname/$pkgver" || rc=$? + case $rc in + 0) ls "$srcdir/check/dkms/$_srcname/$pkgver/$kver"/*/module/{ane,ane_t6021}.ko* ;; + 77) + # dkms.conf BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE": a kernel that + # ships the in-tree ANE driver keeps its own modules. + grep -qs '^CONFIG_DRM_ACCEL_ANE=[ym]' "${build[0]}"/{include/config/auto.conf,.config} || + { echo "check: dkms skipped $kver, which has no CONFIG_DRM_ACCEL_ANE" >&2; return 1; } + echo "check: no DKMS build: $kver ships the in-tree ANE driver (CONFIG_DRM_ACCEL_ANE)" ;; + *) return "$rc" ;; + esac } package() { From 3e2be185904f7ed475d19bd635daa187ba4d8f94 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sat, 3 Oct 2026 14:55:45 -0500 Subject: [PATCH 10/14] omarchy-ane-dkms: 0.4.3 The source is the published v0.4.3 release of joshuaswarren/omarchy-ane (commit 0477f72). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.3.tar.gz. No other recipe line changes: the DKMS build files and the 58 packaged paths are those of 0.4.2. In 0.4.3 the T6000 and T6020 overlays are enabled, and the firmware hook also fetches on T6020. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 852141f..fb03b87 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.2 +pkgver=0.4.3 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,7 +22,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566') +sha256sums=('dcd5442ea202a71c0423b608ff95fed282f4d8e36aad297936d065d4f531712d') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, From 48018d1fa5d3fc3110cc42522db2ba5261ae6538 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sat, 3 Oct 2026 15:02:52 -0500 Subject: [PATCH 11/14] omarchy-ane-dkms: back to 0.4.2 0.4.3 turns T6000 and T6020 on by default. Each flip rests on one community row from a kernel with the in-tree ANE driver, not from this package, so this first edge package keeps them opt-in and stays at 0.4.2. The check() change for kernels with the in-tree driver stays. pkgver and sha256sums are those of 7980d7b. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index fb03b87..852141f 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.3 +pkgver=0.4.2 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,7 +22,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('dcd5442ea202a71c0423b608ff95fed282f4d8e36aad297936d065d4f531712d') +sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, From 63b8340e03614ae56af12472ed99833b477876a1 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sat, 3 Oct 2026 17:38:55 -0500 Subject: [PATCH 12/14] omarchy-ane-dkms: 0.4.4 The source is the published v0.4.4 release of joshuaswarren/omarchy-ane (commit df902f5). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.4.tar.gz. 0.4.4 is a cleanup release of 0.4.3: no driver, libane or dkms.conf change, and the same 58 packaged paths. It keeps T6000 and T6020 on by default. The check() change for kernels with the in-tree driver stays. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 852141f..2451510 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.2 +pkgver=0.4.4 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,7 +22,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566') +sha256sums=('7f756bd8400158f952165786733c94a6226145359454944e88cf379d0a696817') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, From 80adc10c6cf6262ab796063d3377c7521b1779e5 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sat, 3 Oct 2026 17:43:07 -0500 Subject: [PATCH 13/14] omarchy-ane-dkms: back to 0.4.2 0.4.4 keeps T6000 and T6020 on by default. Both flips rest on community rows from kernels with the in-tree ANE driver, and this first edge package keeps those two chips opt-in, so the recipe stays at 0.4.2 until a row from this package exists on each. The recipe directory is the same as at 48018d1. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 2451510..852141f 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.4 +pkgver=0.4.2 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -22,7 +22,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('7f756bd8400158f952165786733c94a6226145359454944e88cf379d0a696817') +sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, From 76e9aead49cc6a4dab3660a6387eaf4d76779808 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Sun, 4 Oct 2026 01:05:53 -0500 Subject: [PATCH 14/14] omarchy-ane-dkms: 0.4.5, the omarchy-mac-boot overlay layout The source is the published v0.4.5 release of joshuaswarren/omarchy-ane (commit d882f48). sha256sums is the checksum of the GitHub archive archive/refs/tags/v0.4.5.tar.gz. 0.4.5 moves the overlays to /usr/lib/omarchy-mac-boot/dtb-overlays and the opt-in file to /etc/omarchy-mac-boot/dtb-overlays.opt-in, the layout of omarchy-mac-boot 20261004-2 (omacom/omarchy-mac-pkgs 2a3ed89). - conflicts=('omarchy-mac-boot<20261004-2'): an older omarchy-mac-boot does not read the new overlay directory, and its boot check fails on a DKMS module. A system without omarchy-mac-boot is not affected. - prepare() keeps T6000 and T6020 opt-in with the release's own tools/promote_chip.py, until a row from this package passes on each. - check() asserts that both stay opt-in: the overlay key, DEFAULT_ON of the firmware hook, and the UNTESTED line of omarchy-ane-check. --- pkgbuilds/omarchy-ane-dkms/PKGBUILD | 46 +++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/pkgbuilds/omarchy-ane-dkms/PKGBUILD b/pkgbuilds/omarchy-ane-dkms/PKGBUILD index 852141f..88dcfe7 100644 --- a/pkgbuilds/omarchy-ane-dkms/PKGBUILD +++ b/pkgbuilds/omarchy-ane-dkms/PKGBUILD @@ -2,7 +2,7 @@ pkgname=omarchy-ane-dkms _srcname=omarchy-ane -pkgver=0.4.2 +pkgver=0.4.5 pkgrel=1 pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)' arch=('aarch64') @@ -12,6 +12,11 @@ license=('GPL-2.0-only OR MIT') # dtc 1.7.1 is the first release that keeps a labelled node's phandle when it # applies an overlay (libfdt 1fad0650, 61e88fdc). Arch's dtc carries epoch 1. depends=('dkms' 'dtc>=1:1.7.1' 'python') +# omarchy-mac-boot reads package-owned overlays from +# /usr/lib/omarchy-mac-boot/dtb-overlays from 20261004-2 on (omacom/omarchy-mac-pkgs +# 2a3ed89). An older one does not read them, and its boot check fails on a DKMS +# module. A system without omarchy-mac-boot (Arch Linux ARM) is not affected. +conflicts=('omarchy-mac-boot<20261004-2') # libdrm: drm.h for libane, which omarchy-ane-run links statically. makedepends=('dtc' 'libdrm') checkdepends=('fakeroot' 'linux-aurora-headers') @@ -22,7 +27,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora' provides=('omarchy-ane-abi=1') install=omarchy-ane-dkms.install source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566') +sha256sums=('f19216e36e552b15c856a1d26b91f296fdebbf9d4322b0e29deadb6dd4029f3b') prepare() { # The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c, @@ -35,6 +40,15 @@ prepare() { cp -r "$src/ane/Makefile" "$src/ane/ane_stats_show.c" "$src/ane/include" \ "$src/ane/src" "$src/ane/t6021" "$dst/ane/" sed -i "s/@PKGVER@/$pkgver/" "$dst/dkms.conf" + + # T6000 and T6020 stay opt-in in this package until a row from this package + # passes on each: the rows that turned them on ran the kernel's own driver. + # The release's flip tool sets the overlay table, the opt-in key, + # omarchy-ane-check's UNTESTED list and the firmware hook's DEFAULT_ON. + local chip + for chip in t6000 t6020; do + python "$src/tools/promote_chip.py" --chip "$chip" --to opt-in --apply + done } build() { @@ -51,6 +65,27 @@ check() { python tools/test_validate_ane_soc.py python tools/test_promotion_check.py + # The opt-in that prepare() set: both overlays carry their key, the firmware + # hook leaves T6020 alone, and omarchy-ane-check calls both chips untested. + local optin=$srcdir/check-optin chip out + rm -rf "$optin" + packaging/build-dtbo "$optin/pkg" >/dev/null + if grep -q '^DEFAULT_ON = .*"apple,t6020"' packaging/omarchy-ane-firmware-fetch; then + echo "check: the firmware hook still fetches on T6020" >&2 + return 1 + fi + for chip in t6000 t6020; do + [[ $(fdtget -t s "$optin/pkg/usr/lib/omarchy-mac-boot/dtb-overlays/$chip/omarchy-ane.dtbo" \ + / omarchy,opt-in 2>&1) == "ane-$chip" ]] || + { echo "check: the $chip overlay has no omarchy,opt-in key" >&2; return 1; } + mkdir -p "$optin/$chip/sys/firmware/devicetree/base" + printf 'apple,%s\0' "$chip" >"$optin/$chip/sys/firmware/devicetree/base/compatible" + out=$(bash packaging/omarchy-ane-check --root "$optin/$chip" 2>&1 || :) + [[ $out == *"UNTESTED SoC: $chip"* ]] || + { echo "check: omarchy-ane-check does not call $chip untested" >&2; return 1; } + done + echo "check: T6000 and T6020 are opt-in" + local build=(/usr/lib/modules/*/build) local kver=${build[0]%/build} kver=${kver##*/} @@ -91,9 +126,10 @@ package() { install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks" \ packaging/90-omarchy-ane-dt.hook packaging/90-omarchy-ane-dt-remove.hook \ packaging/90-omarchy-ane-firmware.hook - # Overlays to /usr/share/omarchy-platform/dtb-overlays/PREFIX/omarchy-NAME.dtbo, - # and data/ane-soc/SOC.json to /usr/share/omarchy-ane/soc/. The data-only - # overlays compile as a check and are never installed. + # Overlays to /usr/lib/omarchy-mac-boot/dtb-overlays/PREFIX/omarchy-NAME.dtbo + # (omarchy-mac-boot ships the directory; without omarchy-mac-boot this + # package creates it), and data/ane-soc/SOC.json to /usr/share/omarchy-ane/soc/. + # The data-only overlays compile as a check and are never installed. packaging/build-dtbo "$pkgdir" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"