Adding custom overlay to overlays.txt


I have added below files to layers/meta-layer/recipes-kernel/linux/;

├── device-tree-overlays_%.bbappend
└── overlays
    └── colibri-imx6_gpio-keys_overlay.dts

device-tree-overlays_%.bbappend file;

FILESEXTRAPATHS_prepend := "${THISDIR}/overlays:"
SRC_URI_append = " \
    file://colibri-imx6_gpio-keys_overlay.dts;subdir=git/overlays \

This created /boot/overlays/colibri-imx6_gpio-keys_overlay.dts

But when I want to add it to /boot/overlays.txt by adding below to conf/local.conf;

TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT_append = " colibri-imx6_gpio-keys_overlay.dtbo"

Gives the error;

DEBUG: Executing python function sstate_task_prefunc
DEBUG: Python function sstate_task_prefunc finished
DEBUG: Executing shell function do_deploy
ERROR: colibri-imx6_gpio-keys_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.
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/yocto/build/tmp/work/colibri_imx6-tdx-linux-gnueabi/device-tree-overlays/toradex_5.4-2.3.x-imx+gitAUTOINC+d5905ae8af-r0/temp/run.do_deploy.66582' failed with exit code 1

What I am doing wrong ?

Hi @huseyinkozan !

We can see from the error log your shared the tip about TEZI_EXTERNAL_KERNEL_DEVICETREE.

Please check the comments on meta-toradex-bsp-common/classes/toradex-devicetree.bbclass about both variables.

In summary:

  • TEZI_EXTERNAL_KERNEL_DEVICETREE: compiles and makes the overlay available to be used.
  • TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT: add the already compiled overlay to overlays.txt, which enables it to be used.

Therefore, the issue is that you are trying to enable a device tree overlay that was not compiled and made available.

Best regards,

Giving TEZI_EXTERNAL_KERNEL_DEVICETREE at local.conf worked, thanks.