Skip to content

[wrynose] dtbo: deploy overlays.txt on MediaTek machines - #631 - #66

Merged
MatheusRodrigues-tor merged 2 commits into
torizon:wrynose-8.x.yfrom
EmcraftSystems:overlays-txt-mediatek-wrynose
Nov 25, 2026
Merged

MatheusRodrigues-tor merged 2 commits into
torizon:wrynose-8.x.yfrom
EmcraftSystems:overlays-txt-mediatek-wrynose

Conversation

@vdskvortsov

Copy link
Copy Markdown
Contributor

Forward-port of torizon/meta-toradex-torizon#631, merged into scarthgap-7.x.y, for torizon/meta-toradex-torizon#629. Both commits apply unchanged.

Not built: MediaTek's BSP layers do not support wrynose yet. The change was tested on scarthgap-7.x.y in #631.

Please add the backport-to-master label.

On MediaTek machines virtual/dtb is the BSP's dtbo recipe rather than
toradex-devicetree, so no overlays.txt reaches DEPLOY_DIR_IMAGE and
ostree-kernel-initramfs installs none into the deployment. The OSTree
deployment then has no dtb/ directory, which leaves the boot script's
overlay import unused and makes TorizonCore Builder's kernel-argument
and device-tree-overlay commands abort.

Deploy overlays.txt from the dtbo recipe with the same contract as
toradex-devicetree.bbclass: TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT lists
the overlays applied at boot, none by default.

With that, kernel-argument customisation works on the Genio raw image;
TorizonCore Builder never rejected it for raw/WIC images, only
secure-boot signing. Device-tree overlays are added to the kernel FIT,
but TorizonCore Builder writes the added image without its hash value,
so U-Boot skips the overlay at boot. Correct the build guide and the
converter configuration accordingly.

Signed-off-by: Vladimir Skvortsov <vskvortsov@emcraft.com>
uenv_extra_configs set fdtfile to the FIT configuration name without its
conf- prefix (mediatek_<dtb>) unconditionally, because U-Boot's default fdtfile,
lec-mtk-i1200-ufs.dtb, names no configuration in the kernel FIT. It also
overwrote the fdtfile that TorizonCore Builder's 'dt apply' writes into
uEnv.txt, so a custom device tree was silently ignored and the board
booted the stock one.

Set KERNEL_DTB_PREFIX to "mediatek/", as the NXP machines do with their
vendor directories, so the boot script selects conf-mediatek_${fdtfile}
and both U-Boot's default and a device tree set in uEnv.txt resolve to a
configuration. TorizonCore Builder reads the prefix from the bootm line
in uEnv.txt and names the configurations it adds to match. Drop the
fdtfile override, and set fdt_file to fdtfile: OSTree writes no fdt_file
for FIT kernels, and a rollback to a deployment built before overlays.txt
was deployed, which has no dtb/ directory, boots by fdt_file.

Document that custom device trees, like overlays, need a TCB release
that writes FIT hash values for the images it adds.

Signed-off-by: Vladimir Skvortsov <vskvortsov@emcraft.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@MatheusRodrigues-tor MatheusRodrigues-tor added the backport-to-master Tag the PR to be automatically backported to the master branch. label Nov 25, 2026
@MatheusRodrigues-tor
MatheusRodrigues-tor merged commit 05e9a02 into torizon:wrynose-8.x.y Nov 25, 2026
@github-actions

Copy link
Copy Markdown

Successfully created backport PR for master:

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

Labels

backport-to-master Tag the PR to be automatically backported to the master branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants