Hi @rania !
From this, we can see that the error is pointing you to the solution: add your overlay to TEZI_EXTERNAL_KERNEL_DEVICETREE
.
Please find below an example of how I add overlays to my Yocto builds.
I start by creating the bbappend
for device tree overlays. Please note that the target for your .bbapend
depends on the module you will build for and if it will be based on upstream or downstream kernel. See below the available device-tree-overlays recipes on BSP 7:
~/yocto/oe-workdir/tdxref-bsp-7/layers $ find . -iname "*device-tree-overlays*"
./meta-toradex-bsp-common/recipes-kernel/linux/device-tree-overlays-mainline_git.bb
./meta-toradex-nxp/recipes-kernel/linux/device-tree-overlays_git.bb
./meta-toradex-ti/recipes-kernel/linux/device-tree-overlays-ti_git.bb
In your case, since you are using Apalis iMX8QM, I expect you are using downstream-based Linux Kernel, therefore you will need to create the .bbappend
for meta-toradex-nxp/recipes-kernel/linux/device-tree-overlays_git.bb
. This can be done manually or using the recipetool
command. From what I can see, you already know the drill to create the .bbappend
, so I will skip the creation details.
This is the example content of my .bbappend
:
# file: meta-grilo-experiments/recipes-kernel/linux/device-tree-overlays_git.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/device-tree-overlays:"
CUSTOM_OVERLAYS_SOURCE = " \
my-device-tree_overlay.dts \
"
CUSTOM_OVERLAYS_BINARY = " \
my-device-tree_overlay.dtbo \
"
SRC_URI += " \
file://my-device-tree_overlay.dts \
"
TEZI_EXTERNAL_KERNEL_DEVICETREE += " \
${CUSTOM_OVERLAYS_BINARY} \
"
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = " \
${CUSTOM_OVERLAYS_BINARY} \
"
do_collect_overlays:prepend() {
for DTS in ${CUSTOM_OVERLAYS_SOURCE}; do
cp ${WORKDIR}/${DTS} ${S}
done
}
And the actual device tree overlay file is located in meta-grilo-experiments/recipes-kernel/linux/device-tree-overlays/my-device-tree_overlay.dts
With this, the outcome will be: all the overlays will be available, but only my-device-tree_overlay.dtbo
will be enabled. You can use the variables TEZI_EXTERNAL_KERNEL_DEVICETREE
and TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT
according to your requirements to deploy and pre-enable the device tree overlays you need. To know what they do, please check the comments on toradex-devicetree.bbclass « classes - meta-toradex-bsp-common.git - Toradex BSP layer, recipes common to all modules.
I hope it helps.
Best regards,