Changing default U-Boot devicetree file via OpenEmbedded

I’m building a custom OS image based off of Torizon. I’m able to successfully edit the device tree in my image by adding patches to the imx6q-apalis-eval.dtb device tree file, but ideally I’d like to base my DT on imx6q-apalis-ixora-v1.1.dtb since my product uses an Ixora carrier, and the Evaluation Board DT ties up some GPIO for hardware I don’t have.

My build creates and deploys both device trees, but the default U-Boot script always references the Evaluation DTB. What do I need to append or configure in my layer to adjust the default values for fdtfile and fdt_file U-Boot environment variables? I can manually change them to the correct DTB from the U-Boot console, but I’d prefer to have my image flash the correct values up front. I’ve also tried editing the KERNEL_DEVICETREE variable in my layer’s config to remove the Eval DTB, but that prevented my board from booting.


Greetings @tyler_

Some variables like fdtfile are set on a board by board basis. For more boards this happens in U-Boot via a board-specific header file. For the Apalis i.MX6 please see here:

In this file you can see the definition for fdt_file being set. So the most straightforward way would be to change the default value in this file and create a patch of the change.

Best Regards,

Exactly what I was looking for. I had been searching the workspace for where fdtfile was set, and didn’t think of it being in source that was pulled at build time. Thanks.

Glad I was able to assist!