desktops: enable panthor-gpu DT overlay on rk3588 vendor-kernel desktops#886
Conversation
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.
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@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? |
|
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() {
:
} |
|
@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? |
|
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. |
|
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. |
Summary
Ports armbian/build's
extensions/mesa-vpu.shextension_prepare_config__3dhook intomodule_desktops installso thepanthor-gpuDT overlay is enabled at the desktop-install layer, not only at image-build time.Mesa's panthor driver needs the
panthor-gpuDT 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 appendedpanthor-gputoDEFAULT_OVERLAYSatextension_prepare_configtime — fine for image-built desktops, but desktops installed on top of a minimal image viaarmbian-confignever got the overlay.Change
New helper
_module_desktops_add_3d_overlayinmodule_desktops.shwith the same gating upstream has:BOARDFAMILYin{rockchip-rk3588, rk35xx}BRANCH == vendor{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_ENVIRONMENTnot 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:/boot/armbianEnv.txtrewrite (temp + mv,.bakpreserved).dtbosetpanthor-gpualready 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
BOARDFAMILYandBRANCHare sourced from/etc/armbian-releaseat configng init time bymodule_env_init.sh— present in the chroot duringmode=buildbecausearmbian-base-files(which ships the file) is installed beforemodule_desktopson every build path.Companion PR
Pairs with armbian/build#9683 commit
deb764dc6, which removesextension_prepare_config__3dfromextensions/mesa-vpu.sh(and thepost_armbian_repo_customize_image__browserhook — also redundant with configng'sbrowservirtual token, and the cause of the chromium master_preferences dpkg prompt that kicked off this refactor).Test plan
bash -n module_desktops.shpasses.BOARDFAMILY/BRANCH/ release / tier / DE (gating mirrors mesa-vpu exactly).panthor-gpuin/boot/armbianEnv.txtoverlays=line.armbian-config --api module_desktops install de=gnome tier=midon a noble/rk3588/vendor minimal image writespanthor-gpuinto/boot/armbianEnv.txtidempotently and keeps a.bak.