ci: Check U-Boot and Linux patch format - #688
Open
huaqianli wants to merge 2 commits into
Open
Conversation
huaqianli
force-pushed
the
lee/ci-patches
branch
2 times, most recently
from
August 11, 2026 02:30
2941cb4 to
806f950
Compare
Validate U-Boot and Linux recipe patches with their respective upstream checkpatch.pl implementations and git mailinfo. Check the patch metadata required by CONTRIBUTING.md, including zero-commit, non-numbered subjects, abbreviated diff indexes, and the absence of format-patch signatures. Also reject whitespace-only metadata lines before the diffstat separator, which catches the formatting issue identified by PR #687. Signed-off-by: Li Hua Qian <[email protected]>
Signed-off-by: Li Hua Qian <[email protected]>
huaqianli
force-pushed
the
lee/ci-patches
branch
from
August 11, 2026 02:53
806f950 to
7be12b9
Compare
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.
Summary
Add CI checks for the format of U-Boot and Linux kernel patches used by
the recipes.
The reusable checker is located at
scripts/host/check-patch-format.sh,
and the GitHub Actions workflow is defined in
.github/workflows/patch-check.yml.
Motivation
PR #687 showed that incorrectly generated patches can pass unnoticed
until review. In particular, whitespace-only metadata lines before the
diffstat separator are not produced by the documented
git format-patchcommand.
This change moves the validation into CI so that malformed patches are
detected before review or merge.
Checks
The CI job performs the following checks:
git mailinfo, matching the parser used bygit am.--zero-commit.[PATCH 1/2], matching--no-numbered.--abbrev=12.--no-signature.format-patchdiffstat separator.checkpatch.plfor U-Boot patches.checkpatch.plfor Linux patches.Trailing whitespace diagnostics are ignored because blank lines in a
unified diff legitimately contain a leading space.
Scope
The check covers patches in:
meta/recipes-bsp/u-boot/files/meta/recipes-kernel/linux/files/patches/The upstream
cleanpatchutility was considered but is not included inCI because it modifies patch files and is intended as a cleanup tool,
not as a read-only validation tool.
Validation
checkpatch.plimplementations.