Skip to content

desktops: enable panthor-gpu DT overlay on rk3588 vendor-kernel desktops#886

Merged
igorpecovnik merged 1 commit into
mainfrom
desktops-panthor-overlay
Apr 21, 2026
Merged

desktops: enable panthor-gpu DT overlay on rk3588 vendor-kernel desktops#886
igorpecovnik merged 1 commit into
mainfrom
desktops-panthor-overlay

Conversation

@igorpecovnik

Copy link
Copy Markdown
Member

Summary

Ports armbian/build's extensions/mesa-vpu.sh extension_prepare_config__3d hook into module_desktops install so the panthor-gpu DT overlay is enabled at the desktop-install layer, not only at image-build time.

Mesa's panthor driver needs the panthor-gpu DT overlay to claim the rk3588 Mali-G610 via the vendor kernel's kbase interface. Without it, GL / Vulkan / GBM fall back to llvmpipe software rendering. Previously the build-side extension appended panthor-gpu to DEFAULT_OVERLAYS at extension_prepare_config time — fine for image-built desktops, but desktops installed on top of a minimal image via armbian-config never got the overlay.

Change

New helper _module_desktops_add_3d_overlay in module_desktops.sh with the same gating upstream has:

  • BOARDFAMILY in {rockchip-rk3588, rk35xx}
  • BRANCH == vendor
  • release not in {bookworm, bullseye, buster, focal, jammy} (panthor kernel bits unusable on those)
  • tier != minimal (overlay is only useful with a Mesa/Vulkan stack that mid/full pulls in)
  • DESKTOP_ENVIRONMENT not in {xfce, i3-wm} (X11-only in our defaults, no GBM path)

All conditions match → delegate to the existing module_devicetree_overlays install overlays=panthor-gpu. That module already owns:

  • atomic /boot/armbianEnv.txt rewrite (temp + mv, .bak preserved)
  • validation against the discovered .dtbo set
  • idempotence (silently no-op if panthor-gpu already enabled)

No reimplementation needed.

Callsite

Wired into the install pipeline right after _module_desktops_configure_networking, so both build-mode (armbian-config --api module_desktops install mode=build) and runtime installs converge on the same overlay set image-built desktops already have.

Environment

BOARDFAMILY and BRANCH are sourced from /etc/armbian-release at configng init time by module_env_init.sh — present in the chroot during mode=build because armbian-base-files (which ships the file) is installed before module_desktops on every build path.

Companion PR

Pairs with armbian/build#9683 commit deb764dc6, which removes extension_prepare_config__3d from extensions/mesa-vpu.sh (and the post_armbian_repo_customize_image__browser hook — also redundant with configng's browser virtual token, and the cause of the chromium master_preferences dpkg prompt that kicked off this refactor).

Test plan

  • bash -n module_desktops.sh passes.
  • Helper is a no-op on non-matching BOARDFAMILY / BRANCH / release / tier / DE (gating mirrors mesa-vpu exactly).
  • Image build of noble/rk3588/vendor/gnome/mid ends with panthor-gpu in /boot/armbianEnv.txt overlays= line.
  • Runtime armbian-config --api module_desktops install de=gnome tier=mid on a noble/rk3588/vendor minimal image writes panthor-gpu into /boot/armbianEnv.txt idempotently and keeps a .bak.
  • Same call on an rk3566 or x86 board: helper early-returns silently, no overlay write.

Ports armbian/build extensions/mesa-vpu.sh 'extension_prepare_config__3d'
into module_desktops install so the overlay is enabled at the
desktop-install layer rather than only at image-build time.

Mesa's panthor driver needs the panthor-gpu DT overlay to claim the
rk3588 Mali-G610 via the vendor kernel's kbase interface. Without the
overlay, GL / Vulkan / GBM run as llvmpipe software. build's
extensions/mesa-vpu.sh set the overlay by appending panthor-gpu to
DEFAULT_OVERLAYS at extension_prepare_config time. That covers
image-built desktops but not desktops installed on top of a minimal
image via armbian-config.

Add _module_desktops_add_3d_overlay to module_desktops.sh with the
same gating upstream has:

  BOARDFAMILY in {rockchip-rk3588, rk35xx}
  BRANCH == vendor
  release not in {bookworm, bullseye, buster, focal, jammy}
  tier != minimal
  de not in {xfce, i3-wm}   (X11-only, no GBM path)

All conditions match → delegate to the existing
module_devicetree_overlays install overlays=panthor-gpu. That module
already handles the atomic armbianEnv.txt rewrite, validates the
name against the discovered .dtbo set, keeps a .bak, and is
idempotent. No reimplementation needed.

BOARDFAMILY + BRANCH are trusted as already-sourced globals —
module_env_init.sh sources /etc/armbian-release at configng init
time, before any module_* function runs. armbian-base-files (which
ships the file) is installed before module_desktops on every build
path, so the file is present in the chroot during mode=build.

Call site: right after _module_desktops_configure_networking in the
install pipeline, so both build-mode and runtime installs converge
on the same overlay set that image-built desktops already have.
@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@igorpecovnik has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 46 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 58 minutes and 46 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02a7c7f7-56ae-4895-944d-59959b28bf48

📥 Commits

Reviewing files that changed from the base of the PR and between 27eea9b and 8248b49.

📒 Files selected for processing (1)
  • tools/modules/desktops/module_desktops.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch desktops-panthor-overlay

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 and usage tips.

@github-actions github-actions Bot added 05 Milestone: Second quarter release size/medium PR with more then 50 and less then 250 lines labels Apr 21, 2026
@igorpecovnik igorpecovnik merged commit 41310ef into main Apr 21, 2026
1 check passed
@igorpecovnik igorpecovnik deleted the desktops-panthor-overlay branch April 21, 2026 17:40
@HeyMeco

HeyMeco commented May 29, 2026

Copy link
Copy Markdown
Contributor

@igorpecovnik what would be an approach for when we want to have Mali GPU driver instead of Panthor on the final build. Since the mesa-vpu extension is not in build anymore and this seems to be a default how can we overwrite this with an extension in build?

@EvilOlaf

Copy link
Copy Markdown
Member

Tried to re-use the function name? Usually if you use a function name within an extension it will override the one in the framework. Somethin like

_module_desktops_add_3d_overlay() {
    :
}

@HeyMeco

HeyMeco commented May 29, 2026

Copy link
Copy Markdown
Contributor

@EvilOlaf I'm currently figuring out the architectural approach so I haven’t tried it yet. Can you link me (if there are) any examples where build overwrites a function from configng?

@EvilOlaf

EvilOlaf commented May 29, 2026

Copy link
Copy Markdown
Member

oh, that's within configng. Then, I'm afraid, no, don't know an example. Well honestly I don't know one from framework by heart either, would need to search for one.

@HeyMeco

HeyMeco commented May 29, 2026

Copy link
Copy Markdown
Contributor

Yeah not really a fan of the move of this to configng. At least the panthor overlay aspect should probably stay in build as an extension while the packages make sense to be in the desktop config here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release size/medium PR with more then 50 and less then 250 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants