Repository navigation
Apply package-owned device tree overlays to m1n1 stage 2 - #3
Merged
Merged
Conversation
A package can add a device tree node the kernel's device trees lack (the ANE driver needs an apple,t*-ane node) without update-verify stopping omarchy update. Overlays ship as /usr/share/omarchy-platform/dtb-overlays/PREFIX/NAME.dtbo; /etc/default/update-m1n1 sources lib/dtb-overlays.sh so DTBS names overlaid copies in /run, leaving the kernel's files and its mtree intact. An overlay can skip a tree that already has the node, or wait for the owner's opt-in. The boot check applies the same overlays when it rebuilds boot.bin, and accepts depmod-rewritten modules.* maps only when depmod reproduces them. A pacman hook reruns update-m1n1 when an overlay changes. CI installs dtc. Ported from omacom/omarchy-mac#677 (5 commits) with paths mapped to this repository. Co-authored-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The platform root /usr/share/omarchy-platform belongs to the single platform package and holds only what Omarchy reads, so overlays move to /usr/lib/omarchy-mac-boot/dtb-overlays/PREFIX/NAME.dtbo, which omarchy-mac-boot ships empty for any package to drop into. /usr/lib because an overlay is architecture-specific binary data a tool reads, like the kernel's device trees and firmware. The opt-in list moves with it to /etc/omarchy-mac-boot/dtb-overlays.opt-in. The pacman hook targets */*.dtbo under that directory, so it fires on an overlay and never on the package's own directory. The README notes that the hook does not run in the transaction that first installs it.
update-m1n1 builds an administrator's DTBS as given, without the overlays, so the check now rebuilds it the same way and warns instead of failing a boot.bin that matches. The locale test reads the defaults file with OMARCHY_DTB_OVERLAYS=0, as the boot check does, so a host's own overlays stay out of it.
Collaborator
Author
|
Second review: no blockers. Fixed two verified findings in 7d6fec8: the boot check now leaves overlays out when the administrator sets DTBS (as update-m1n1 does), and the locale test no longer reads a host's own overlays. Suites green in CI and in an ALARM container (boot 221 ok, integration 50). |
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.
Port of omacom/omarchy-mac#677 by @joshuaswarren (5 commits squashed), with
packages/omarchy-mac/bootmapped toomarchy-mac-boot/. Co-authored commit; CI installsdtc.A package can ship
/usr/lib/omarchy-mac-boot/dtb-overlays/PREFIX/NAME.dtbo; update-m1n1 buildsboot.binfrom overlaid copies and the boot check rebuilds the same way, soupdate-verifyno longer stopsomarchy update(needed by the ANE driver). The boot check also accepts depmod-rewrittenmodules.*maps only when depmod reproduces them. See #677 for the full design.Overlay location (owner decision): not the platform root, which omarchy-mac alone owns. omarchy-mac-boot ships
/usr/lib/omarchy-mac-boot/dtb-overlays/empty for any package to drop into (/usr/lib: architecture-specific binary data a tool reads, like/usr/lib/modules/*/dtbsand/usr/lib/firmware). The opt-in list is/etc/omarchy-mac-boot/dtb-overlays.opt-in. The pacman hook targets*/*.dtbothere, so it fires on an overlay and not on this package's own directory. The README notes that the hook doesn't run in the transaction that first installs it.Tested: in an ALARM aarch64 container (dtc 1.8.1) against runtime bf659459a,
omarchy-mac-boot/test/all(222),omarchy-mac/test/all(86) andtest/integration/all(50) pass. With real pacman: a dir-only upgrade of the owning package doesn't fire the hook; installing and removing an overlay package does; the directory stays owned. No overlays still leavesboot.binbyte-identical. The original PR was tested on an M1 MacBook Pro.Recipe note:
omarchy-mac-bootneedsdtcincheckdepends. omarchy-ane-dkms (omacom/omarchy-pkgs#745) must install its overlays and opt-in key at the new paths.