Hi, I have a device tree overlay where I configure some GPIO pins. When I build my image the first time it works. After I did some modification to my test-gpio-overlay.dts file the build fails and I get the following error in my log file.
ERROR: test-gpio-overlay.dtbo is not installed in your boot filesystem, please make sure it’s in TEZI_EXTERNAL_KERNEL_DEVICETREE or being provided by virtual/dtb.
When I remove the _BOOT part it will build the image a second time. I don’t understand what is happening. I followed this example. I use a Verdin AM62 with Dahlia carrier board.
The behavior you’re describing with the build working the first time but failing on subsequent builds suggests there might be a platform-specific configuration issue. Once I know your exact setup, I can provide more targeted guidance for your Verdin AM62 with Dahlia carrier board configuration.
Common platforms to consider:
Hardware: Verdin AM62, Dahlia Carrier Board
OS: Yocto 7.2.0, Torizon OS 6, BSP 7, Torizon OS 7.2.0-build.13
Integration: Device tree overlays, GPIO configuration
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT only tells the image generation logic that this overlay should be listed in overlays.txt and loaded at boot. However, the overlay binary also has to be installed into the boot filesystem. That is done through TEZI_EXTERNAL_KERNEL_DEVICETREE.
Why it may work the first time but fail after modification:
Yocto may have reused previously generated/deployed artifacts from the first build. After you modified the .dts, BitBake had to rebuild or revalidate the overlay deployment path, and then detected that the .dtbo was requested for boot but was not declared as an external kernel device tree to be installed into the boot filesystem.
When you remove _BOOT, the image builds because the overlay is no longer requested in overlays.txt. But that also means it may not be automatically enabled at boot.
do_collect_overlays:prepend() {
for DTS in ${CUSTOM_OVERLAYS_SOURCE}; do
cp ${WORKDIR}/${DTS} ${S}
done
}
Now I get an error saying that a .dtbo from toradex itself is missing.
ERROR: verdin-am62_dsi-to-hdmi_overlay.dtbo is not installed in your boot filesystem, please make sure it’s in TEZI_EXTERNAL_KERNEL_DEVICETREE or being provided by virtual/dtb.
To clarify, I’m currently testing how you add and configure peripherals. That’s why I want to add to the existing Toradex overlays I want the HDMI output to work. The example bbappend file works, but I don’t get any of the exsisting overlays.
I’m adding my test-gpio-overlay.dtbo to the boot filesystem and not replacing it right?
Your custom overlay is not supposed to replace the Toradex overlays. The HDMI overlay is missing because the list of overlays installed into the boot filesystem was likely overwritten somewhere, while the list of overlays enabled at boot still references the HDMI overlay. Please append to the existing variables instead of assigning/replacing them.
The += operator can be unpredictable in complex build environments like Toradex’s BSP. The explicit :append operator is the industry best practice for this exact scenario. It guarantees your addition is preserved, and the default Toradex overlays remain intact.
FILESEXTRAPATHS:prepend := "${THISDIR}/device-tree-overlays-ti:"
CUSTOM_OVERLAYS_SOURCE = " \
test-gpio-overlay.dts \
"
CUSTOM_OVERLAYS_BINARY = " \
test-gpio-overlay.dtbo \
"
SRC_URI:append = " \
file://test-gpio-overlay.dts \
"
# Add your overlay to the list of files to be deployed
TEZI_EXTERNAL_KERNEL_DEVICETREE:append = " \
${CUSTOM_OVERLAYS_BINARY} \
"
# Add your overlay to the list to be automatically enabled at boot
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:append = " \
${CUSTOM_OVERLAYS_BINARY} \
"
do_collect_overlays:prepend() {
for DTS in ${CUSTOM_OVERLAYS_SOURCE}; do
cp ${WORKDIR}/${DTS} ${S}
done
}
Also make sure the file uses regular ASCII quotes, not typographic quotes:
"${THISDIR}/device-tree-overlays-ti:"
not
“${THISDIR}/device-tree-overlays-ti:”
To debug where the HDMI overlay is being lost, please check the final value of the variables:
If TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT contains verdin-am62_dsi-to-hdmi_overlay.dtbo, then TEZI_EXTERNAL_KERNEL_DEVICETREE must also contain it, or the image build will fail with the error you are seeing.