Add brcmfmac-awdl-dkms for aarch64 - #466
Open
brentkearney wants to merge 2 commits into
Open
brentkearney wants to merge 2 commits into
brentkearney wants to merge 2 commits into
Conversation
AWDL (AirDrop's link layer) support for the BCM4387 on Apple Silicon: a DKMS module plus the root-side helpers the omdrop bar plugin drives it through. The module installs to updates/dkms/, which depmod prefers over the in-tree driver without replacing it: a build that fails after a kernel upgrade costs AirDrop, never the network link. The build downloads one 384 KB tarball and runs offline in about two seconds. The three kernel directories DKMS compiles are vendored in that tarball, pristine from asahi-7.1.13-2, and the AWDL patches are applied to a copy at build time, so the diff against upstream is exactly the patch set. No kernel-header dependency, per the base-install guarantee.
The eleven patches were reaching the build inside the release tarball, so they were invisible to this repository: nothing here could diff, review or rebase them. They now sit beside the PKGBUILD, listed in source() and checksummed individually, and prepare() applies that copy -- the shape yt6801-dkms and intel-ipu7-camera already use, and what the README asks for. Also drops the generated-file header. Omarchy owns every checked-in recipe; a banner pointing at an external source of truth said otherwise. The tarball still carries the vendored kernel directories DKMS compiles.
5 tasks
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.
Patches for the BCM4387 wifi chip that ships in several Apple M1 and M2 computers that add support to it's firmware implementation of AWDL (Apple Wireless Direct Link) protocol. A DKMS module plus the root-side helpers that the omdrop bar widget drives, so an Apple computer running Omarchy can receive files from an unmodified iPhone or Mac over AirDrop.
Packaging
arch=('aarch64'), sopackage_supports_archskips it on x86_64 builds rather than failing them.asahi-7.1.13-2(13aba96f), and the AWDL patches are applied to a copy of them inprepare()— so the diff against upstream is exactly the eleven patches in the tarball, and the build runs offline in about two seconds. That matters here because aarch64 builds run under emulation.patch(1), notgit apply: the latter resolves paths against an enclosing repository's root, which silently applies nothing when the build happens inside a checkout.PKGBUILDthere, so the two cannot drift.Failsafe
The module installs to
updates/dkms/, whichdepmodprefers over the in-tree driver without replacing it. If a kernel upgrade breaks the out-of-tree build, stockbrcmfmacloads and Wi-Fi keeps working — you lose AirDrop, never the network. That is the whole reason this is packaged as DKMS rather than a replacement module.Privilege surface
One root helper at
/usr/lib/omdrop/omdrop-discoverable, reachable through a named polkit action (allow_active=yes,auth_adminfor remote and inactive sessions). It needsCAP_NET_ADMINfor nl80211 vendor command passthrough andCAP_NET_RAWfor the action frames AWDL synchronisation requires. The action binds to that one root-owned path. Nothing else in the package is privileged, and the file receiver runs as the user.Validation
makepkgagainst the published tarball: checksum passes, eleven patches apply, packaged sources carry them (41 AWDL references incore.c).brcmfmac.koagainst7.1.13-2-1-ARCHheaders.validate_package_metadatapasses;package_supports_archreportsaarch64supported andx86_64skipped.j316s/t6000) running Asahi. Receiving works end to end from iOS and macOS senders; sending is not implemented yet.Maintenance
The patches are pinned to one Asahi tag deliberately — a newer tree may need them rebased, and building against whatever is current would turn a rebase conflict into a runtime surprise. I maintain the patch set and will keep it current with Asahi tags; the re-vendoring sequence is documented in the source repository so it is not tribal knowledge.