Skip to content

kernel: k3-6.18: fix BeagleBadge e-ink overlay patch not applying - #10380

Merged
igorpecovnik merged 1 commit into
mainfrom
fix/k3-beaglebadge-eink-patch-apply
Aug 9, 2026
Merged

kernel: k3-6.18: fix BeagleBadge e-ink overlay patch not applying#10380
igorpecovnik merged 1 commit into
mainfrom
fix/k3-beaglebadge-eink-patch-apply

Conversation

@igorpecovnik

@igorpecovnik igorpecovnik commented Aug 9, 2026

Copy link
Copy Markdown
Member

Problem

k3 kernel builds (e.g. sk-am62-lp / BRANCH=vendor-edge) fail during kernel patching:

0003-arm64-dts-ti-add-BeagleBadge-GDEY042T81-overlay.patch
  Hunk #1 FAILED at 64  →  1 out of 1 hunk FAILED
Exception: Failed to apply 1 patches.  →  build aborts

(reported via a build log paste)

Root cause

The overlay patch's arch/arm64/boot/dts/ti/Makefile hunk anchors on a base-board line:

dtb-$(CONFIG_ARCH_K3) += k3-am62l3-badge.dtb        # ← does not exist

That line isn't in the ti-linux 6.18 kernel. The board is actually named k3-am62l3-beaglebadge.dtb there (and lives after the # Boards with AM62Lx SoCs comment). The patch was generated against a tree that named/placed the board differently, so the hunk context never matches and the whole k3 patch series fails.

Fix

Re-anchor the Makefile hunk onto the real k3-am62l3-beaglebadge.dtb line, adding the overlay entry next to its board. Only the patch's Makefile hunk changes; the .dtso payload is untouched.

Verification

Applied the patch with the exact command the build usespatch --batch -p1 -N --reject-file=… --quoting-style=c (from lib/tools/common/patching_utils.py) — against the real ti-linux 6.18 arch/arm64/boot/dts/ti/Makefile:

  • exit 0, no rejects; the .dtso overlay file is created.
  • The canonical diff -u hunk applies at GNU patch's default fuzz (the previous hand-anchor needed fuzz 3, which the build's default-fuzz patch call would reject).

Note

The base BeagleBadge board is k3-am62l3-beaglebadge, but the overlay this patch adds is still named k3-am62l3-badge-eink-gdey042t81 (as the original author wrote it). It compiles fine standalone. If the maintainer (@Andrei1998 / the SSD16xx series) wants naming consistency, the overlay could be renamed to k3-am62l3-beaglebadge-eink-gdey042t81 in a follow-up — out of scope for this unblock.

Summary by CodeRabbit

  • New Features
    • Added support for the GDEY042T81 e-paper display on the AM62L BeagleBadge.
    • Configured display communication, control signals, and 2 MHz operation.
    • Included the display overlay in the device tree build.

The overlay patch's Makefile hunk anchored on a base-board line
"k3-am62l3-badge.dtb" that does not exist in the ti-linux 6.18 kernel:
the board is named k3-am62l3-beaglebadge.dtb there (and sits after the
"# Boards with AM62Lx SoCs" comment). The hunk rejected, failing kernel
patching for the whole k3 family (e.g. sk-am62-lp).

Re-anchor the hunk onto the real k3-am62l3-beaglebadge.dtb line so the
overlay entry is added next to its board. Verified with the exact command
the build uses (patch --batch -p1 -N) against the ti-linux 6.18 Makefile:
applies cleanly, no rejects.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@github-actions github-actions Bot added the 08 Milestone: Third quarter release label Aug 9, 2026
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a GDEY042T81 e-paper device-tree overlay for the AM62L BeagleBadge. The overlay configures SPI0, pin multiplexing, display control GPIOs, and a 2 MHz display device. The K3 DTB build now registers the overlay.

Changes

BeagleBadge e-paper support

Layer / File(s) Summary
E-paper overlay and DTB registration
patch/kernel/archive/k3-6.18/0003-arm64-dts-ti-add-BeagleBadge-GDEY042T81-overlay.patch
The overlay configures SPI0, pin multiplexing, reset/DC/busy GPIOs, and the GDEY042T81 display at 2 MHz. The K3 device-tree build registers the resulting DTBO.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • armbian/build#10333: Includes the BeagleBadge GDEY042T81 device-tree overlay in broader e-paper display integration.

Suggested labels: Ready to merge

Suggested reviewers: jonaswood01, glneo, grippy98

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: fixing the BeagleBadge e-ink overlay patch so it applies correctly.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/k3-beaglebadge-eink-patch-apply

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Aug 9, 2026
@igorpecovnik
igorpecovnik merged commit dc871cb into main Aug 9, 2026
13 checks passed
@igorpecovnik
igorpecovnik deleted the fix/k3-beaglebadge-eink-patch-apply branch August 9, 2026 09:18
@Andrei1998

Andrei1998 commented Aug 9, 2026

Copy link
Copy Markdown

If the maintainer (@Andrei1998 / the SSD16xx series) wants naming consistency, the overlay could be renamed to k3-am62l3-beaglebadge-eink-gdey042t81 in a follow-up

@igorpecovnik I think you might have gotten the wrong Andrei.

@igorpecovnik

Copy link
Copy Markdown
Member Author

You are right, appologize.

igorpecovnik added a commit that referenced this pull request Aug 10, 2026
…10392)

The k3 branches use different kernel snapshots that name/place the board
differently in arch/arm64/boot/dts/ti/Makefile:
  - vendor / vendor-rt (TI PSDK tag 12.00.00.07): k3-am62l3-badge.dtb
  - edge / vendor-edge (ti-linux-6.18.y branch):  k3-am62l3-beaglebadge.dtb

The previous anchor (k3-am62l3-beaglebadge.dtb, PR #10380) fixed edge but
broke vendor/vendor-rt (e.g. beaglebadge/vendor-rt: "Hunk #1 FAILED at 67").

Re-anchor the Makefile hunk to the evm overlay entries (…-eqep/mcan/pwm.dtbo),
which are identical and contiguous in both snapshots, and add the eink .dtbo
there. Overlay entry belongs with the other overlays anyway.

Verified with the build's exact command (patch --batch -p1 -N) against both
the PSDK tag 12.00.00.07 and the ti-linux-6.18.y branch Makefiles: applies
clean, no rejects, on both.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants