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.
This commit is contained in:
1 parent
80adc10c6c
commit
76e9aead49
1 file changed
+41
-5
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
pkgname=omarchy-ane-dkms
|
pkgname=omarchy-ane-dkms
|
||||||
_srcname=omarchy-ane
|
_srcname=omarchy-ane
|
||||||
pkgver=0.4.2
|
pkgver=0.4.5
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)'
|
pkgdesc='Apple Neural Engine driver for Apple Silicon Macs (DKMS)'
|
||||||
arch=('aarch64')
|
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
|
# 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.
|
# applies an overlay (libfdt 1fad0650, 61e88fdc). Arch's dtc carries epoch 1.
|
||||||
depends=('dkms' 'dtc>=1:1.7.1' 'python')
|
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.
|
# libdrm: drm.h for libane, which omarchy-ane-run links statically.
|
||||||
makedepends=('dtc' 'libdrm')
|
makedepends=('dtc' 'libdrm')
|
||||||
checkdepends=('fakeroot' 'linux-aurora-headers')
|
checkdepends=('fakeroot' 'linux-aurora-headers')
|
||||||
@@ -22,7 +27,7 @@ optdepends=('linux-aurora-headers: build the modules for linux-aurora'
|
|||||||
provides=('omarchy-ane-abi=1')
|
provides=('omarchy-ane-abi=1')
|
||||||
install=omarchy-ane-dkms.install
|
install=omarchy-ane-dkms.install
|
||||||
source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
source=("$_srcname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
||||||
sha256sums=('c26179882e1e78b446c8062a9826acca1776130f452ae970fd1fc9ca150a9566')
|
sha256sums=('f19216e36e552b15c856a1d26b91f296fdebbf9d4322b0e29deadb6dd4029f3b')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
# The DKMS source tree: dkms.conf, ane/Makefile, ane/ane_stats_show.c,
|
# 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" \
|
cp -r "$src/ane/Makefile" "$src/ane/ane_stats_show.c" "$src/ane/include" \
|
||||||
"$src/ane/src" "$src/ane/t6021" "$dst/ane/"
|
"$src/ane/src" "$src/ane/t6021" "$dst/ane/"
|
||||||
sed -i "s/@PKGVER@/$pkgver/" "$dst/dkms.conf"
|
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() {
|
build() {
|
||||||
@@ -51,6 +65,27 @@ check() {
|
|||||||
python tools/test_validate_ane_soc.py
|
python tools/test_validate_ane_soc.py
|
||||||
python tools/test_promotion_check.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 build=(/usr/lib/modules/*/build)
|
||||||
local kver=${build[0]%/build}
|
local kver=${build[0]%/build}
|
||||||
kver=${kver##*/}
|
kver=${kver##*/}
|
||||||
@@ -91,9 +126,10 @@ package() {
|
|||||||
install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks" \
|
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-dt.hook packaging/90-omarchy-ane-dt-remove.hook \
|
||||||
packaging/90-omarchy-ane-firmware.hook
|
packaging/90-omarchy-ane-firmware.hook
|
||||||
# Overlays to /usr/share/omarchy-platform/dtb-overlays/PREFIX/omarchy-NAME.dtbo,
|
# Overlays to /usr/lib/omarchy-mac-boot/dtb-overlays/PREFIX/omarchy-NAME.dtbo
|
||||||
# and data/ane-soc/SOC.json to /usr/share/omarchy-ane/soc/. The data-only
|
# (omarchy-mac-boot ships the directory; without omarchy-mac-boot this
|
||||||
# overlays compile as a check and are never installed.
|
# 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"
|
packaging/build-dtbo "$pkgdir"
|
||||||
|
|
||||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
|||||||
Reference in new issue
Block a user