build: extra patch directories (patches.d/*.conf, EXTRA_PATCH_DIRS) #1

Merged
radu merged 1 commit from dvlink-patches-hook into main 2026-10-12 14:28:50 +00:00
Owner

Lets other kernel-patch projects (dvlink, radu/dvlink#16) add their amdgpu patches to the hdmi21 build, so the hdmi21 self-update no longer has to be paused.

What changes

  • Every non-comment line of patches.d/*.conf, and each entry of the colon-separated EXTRA_PATCH_DIRS, names a directory of *.patch files applied after patches/ (conf-file order, then name order).
  • Each extra directory must ship an executable check.sh PATCH SRC_DIR (exit 0 if SRC_DIR already shows the patch's effect). A patch whose effect the unpatched tag already has is skipped as retired upstream.
  • The checkout records a patch-set fingerprint in .git/patchset; a checkout built from a different set is re-created. A checkout without a stamp is still reused when no extra directories are configured, so existing installs do not rebuild from scratch after this merges.
  • patches.d/README, .gitignore entry for patches.d/*.conf.

No dvlink-specific code; with an empty patches.d the build behaves as before.

Checks

  • bash -n build.sh
  • The new extra-directory block run on its own with no patches.d content and no env var: 2 patches, 0 extra directories, valid fingerprint.
  • No kernel was built.

Update the PC's hdmi21 checkout, run dvlink's deploy/install.sh once without --apply-hook, remove the dvlink-noupdate.conf pause drop-in, and run hdmi-frl-grub.service once (steps in dvlink deploy/README.md).

🤖 Generated with Claude Code

Lets other kernel-patch projects (dvlink, radu/dvlink#16) add their amdgpu patches to the hdmi21 build, so the hdmi21 self-update no longer has to be paused. ## What changes - Every non-comment line of `patches.d/*.conf`, and each entry of the colon-separated `EXTRA_PATCH_DIRS`, names a directory of `*.patch` files applied after `patches/` (conf-file order, then name order). - Each extra directory must ship an executable `check.sh PATCH SRC_DIR` (exit 0 if SRC_DIR already shows the patch's effect). A patch whose effect the unpatched tag already has is skipped as retired upstream. - The checkout records a patch-set fingerprint in `.git/patchset`; a checkout built from a different set is re-created. A checkout without a stamp is still reused when no extra directories are configured, so existing installs do not rebuild from scratch after this merges. - `patches.d/README`, `.gitignore` entry for `patches.d/*.conf`. No dvlink-specific code; with an empty `patches.d` the build behaves as before. ## Checks - `bash -n build.sh` - The new extra-directory block run on its own with no `patches.d` content and no env var: 2 patches, 0 extra directories, valid fingerprint. - No kernel was built. ## After merge (dvlink side, in a PC session) Update the PC's hdmi21 checkout, run dvlink's `deploy/install.sh` once without `--apply-hook`, remove the `dvlink-noupdate.conf` pause drop-in, and run `hdmi-frl-grub.service` once (steps in dvlink `deploy/README.md`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lets a sibling project add its own kernel patches to the one
module this project builds, installs and self-heals, instead of a second
build pipeline fighting over updates/amdgpu.ko.zst. Each extra directory
brings a check.sh for the sanity check every patch needs; a patch whose
effect the unpatched tag already shows is skipped (retired upstream). A
checkout built from a different patch set is re-created.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
radu merged commit 3da8f57285 into main 2026-10-12 14:28:50 +00:00
radu deleted branch dvlink-patches-hook 2026-10-12 14:28:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
radu/steamos-hdmi21!1
No description provided.