Apply package-owned device tree overlays to m1n1 stage 2 - #677
Open
joshuaswarren wants to merge 4 commits into
Open
joshuaswarren wants to merge 4 commits into
joshuaswarren wants to merge 4 commits into
Conversation
A package that adds a device tree node the kernel lacks ships a compiled overlay as /usr/lib/omarchy-platform/dtb-overlays/PREFIX/NAME.dtbo. /etc/default/update-m1n1 sources lib/dtb-overlays.sh: when an overlay applies to one of the newest kernel's device trees, DTBS names that kernel's device trees with overlaid copies in /run in place of the originals. The kernel files stay as packaged. With no overlays, DTBS keeps update-m1n1's default and boot.bin does not change. An overlay's root string list omarchy,skip-if-compatible keeps it out of a device tree that already has that node. An overlay that fails, or a result dtc cannot read, leaves the device tree as the kernel shipped it. dtc older than 1.7.1 gets no overlays: its fdtoverlay renumbers a labelled existing node and breaks every reference to it. The boot check applies the same overlays in its rebuild, requires each overlay to belong to a package, and reads the configuration with OMARCHY_DTB_OVERLAYS=0. 95-omarchy-mac-dtb-overlays.hook runs update-m1n1 when an overlay is added, changed or removed. CI installs dtc for the new test.
joshuaswarren
marked this pull request as ready for review
September 30, 2026 15:53
An overlay whose root string omarchy,opt-in names a key applies only when that key is a line of /etc/omarchy-platform/dtb-overlays.opt-in. The boot check reads the same file through the same library, so its rebuild follows the owner's choice. This serves hardware whose driver must not start by default.
…tform The rest of quattro-upstream installs platform data under /usr/share/omarchy-platform (keyrings, Hypr defaults); the overlay directory belongs there too. No compatibility path: nothing shipped the old /usr/lib location yet. The owner's opt-in file stays at /etc/omarchy-platform/dtb-overlays.opt-in, owner configuration under /etc. The README now says what this buys: any package may ship an overlay, so a new SoC or device needs only a new .dtbo in that package, never a change to omarchy-mac-boot; omarchy-ane will move its overlays here and drop its own update-m1n1 hooks once this merges.
The kernel package ships modules.* that depmod regenerates on every install and after any DKMS module. Until now the boot check only tolerated modification-time mismatches there, so any DKMS package (ANE, xone, xpadneo) failed omarchy update's update-verify on a modules.alias size mismatch. Accept size and SHA-256 checksum mismatches only when a fresh depmod run over the installed modules reproduces the file byte for byte; modules.builtin and modules.builtin.modinfo are depmod's inputs, not outputs, and stay strict.
This was referenced Oct 2, 2026
Merged
1 of 11 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A package can now add a device tree node that the kernel's device trees do not have yet, and
omarchy updatekeeps working.Why
The ANE driver (joshuaswarren/omarchy-ane) binds only to an
apple,t*-anenode. linux-aurora 7.1.12 and linux-asahi 7.1.13 do not ship one. Today a Mac cannot add it: the boot check refuses a changed package DTB, aDTBSentry the kernel package does not own, and aboot.binthat differs from its rebuild. Soupdate-verifystopsomarchy update.After omacom#13362, this plugs straight into its
update-verifyoperation: omarchy-mac-boot is the package that implements it, and this branch touches only omarchy-mac-boot.What changes
/usr/share/omarchy-platform/dtb-overlays/PREFIX/NAME.dtbo, the platform root the rest of quattro-upstream and Converge omarchy-mac and omarchy-mx-mac into upstream Omarchy omarchy#13362 use.PREFIXselects device trees by file name:t8103selects everyt8103-*.dtb..dtboin that package's file list, never a change to omarchy-mac-boot. Once this merges, omarchy-ane moves its overlays into this directory and drops its own update-m1n1 hooks./etc/default/update-m1n1sourceslib/dtb-overlays.sh. When an overlay applies to one of the newest kernel's device trees,DTBSnames that kernel's device trees, with overlaid copies in/run/omarchy-dtb-overlaysin place of the originals. The kernel's files do not change, so the mtree check still holds.DTBSkeeps update-m1n1's default andboot.binis byte-identical to today.omarchy,skip-if-compatiblestays out of a device tree that already has that node. When a kernel adds the node, the kernel's node is used.omarchy,opt-inapplies only when that string is a line of/etc/omarchy-platform/dtb-overlays.opt-in. This is for hardware whose driver must not start until the owner chooses it. The first user is the M2 Max ANE, whose driver cannot be unloaded once it starts. The boot check reads the same file.0xfto0xc7. libfdt1fad0650and61e88fdc(both in v1.7.1) fix this.boot.bin. Each overlay must belong to a package. The check reads/etc/default/update-m1n1withOMARCHY_DTB_OVERLAYS=0, so reading it builds nothing.95-omarchy-mac-dtb-overlays.hookrunsupdate-m1n1when a package adds, changes or removes an overlay. This is the same step95-m1n1-install.hookruns after a kernel update. Please review this hook with extra care.DKMS update-verify breakage
omarchy-apple-silicon-boot-checkalso runs the kernel package's mtree against the installed files. The kernel shipsmodules.depand the sibling maps and depmod rewrites them on every install and after any DKMS module, so their modification time, size and SHA-256 checksum never match the mtree once a DKMS package (ANE, xone, xpadneo, …) is present. Until now the check only tolerated modification-time mismatches there, so a freshomarchy updateon a Mac with any DKMS module failed with "installed linux-aurora files do not match the package mtree: warning: linux-aurora: /usr/lib/modules/7.1.12-2-7-ARCH/modules.alias (Size mismatch)". A size or checksum mismatch on amodules.*file is now accepted only whiledepmod -o $fresh $kverover the installed modules reproduces the file byte for byte;modules.builtinandmodules.builtin.modinfoare depmod's inputs, not its outputs, and stay strict. A map that depmod would not write, or one it writes differently (a corrupted or stale map), still fails.Tests
test/dtb-overlays-test.sh, with real dtc: prefix selection, skip-if-compatible, opt-in, a failed overlay, same bytes on every run, the update-m1n1DTBSresult, and dtc before 1.7.1.test/apple-silicon-boot-check-test.sh: an overlaidboot.binpasses in--boot-chainand full mode. A staleboot.binfails. An overlay that no package owns fails. The depmap acceptance runsdepmodagainst the fixture's modules tree.dtc: 25 of 28 files pass on this branch, 24 of 28 on the base branch (fd9b7e88). The same three files fail in both runs (mac-migrate-test.sh,mac-migrate-mx-test.sh,mac-reset-test.sh) — pre-existing failures unrelated to this branch.dtb-overlays,apple-silicon-boot-check,update-m1n1-locale,update-verify,mac-boot-install) pass again in the same chroot.update-m1n1(20260127.1-1) wroteboot.binto a file, not an ESP. The overlaid T8103 and T6001 device trees were in it, and the check's rebuild path produced the same bytes. With no overlays,boot.binequaled m1n1 + the stock DTBs + U-Boot.Tested on a MacBook Pro 13-inch M1 (T8103) running a fresh Omarchy install: the ANE overlay from a package applied to boot.bin on update-m1n1, the board device tree carried the node after reboot, and the driver bound (/dev/accel/accel0).
For the package recipe
omarchy-mac-bootneedsdtcincheckdependsfor the new test. At run time,dtcis needed only when overlays exist. The package that ships an overlay depends on it. CI now installsdtc.