Rename device tree for Verdin IMX8X using Yocto

Hi,

We are running into a problem using Yocto and the Verdin Imx8m SoM. For our custom carrier board we created a new device tree with a new name. While it compiles and is included in the /boot folder, u-boot still boots the imx8mp-verdin-wifi-dev.dtb device tree.

Looking at the u-boot-initial-env file that is generated, the following line stands out:
preboot=setenv fdtfile imx8mp-verdin-${variant}-${fdt_board}.dtb

If, after flashing and booting, I chance the fdtfile to the correct dtb file using setenv and saveenv, the correct device tree is booted.
What would be the recommended way to chance this setting in u-boot?

Best regards,

Rik

Hi @rikte,

It looks like the Mender integration patches may be missing that bit. I do see that for the colibri-imx6ull platform we are modifying the preboot setting but not for any other platforms.

I’ll try to get a patch put together but I’m traveling this week for Embedded Linux Conference so it may take some time. Do you have any specific urgency here?

Drew

Hi @drew.tx

Thanks for the quick reply. For now we fix it manually after a first boot.
If you have time to make a patch in the coming days, that would be very helpful. A link to the Colibri-imx6ull patch would be helpful, then I can have a look at that already the coming days.

And enjoy the conference!

Best regards,

Rik

You can see the existing patch here. I don’t know if all the boards follow the same source layout but they should be pretty close.

Drew

Hi @rikte !

We also have the Custom meta layers, recipes and images in Yocto Project (hello-world examples) | Toradex Developer Center article, that shows another way of customizing this on a u-boot-toradex bbappend file:

do_configure_append() {
    sed -i 's/#define FDT_FILE.*/#define FDT_FILE "my-custom-devicetree-file.dtb"/' ${S}/include/configs/colibri_imx6.h
}

Best regards,

Hi,

A small update from our side. We managed to solve it. I had to add the following to my patch:

-CONFIG_PREBOOT=“setenv fdtfile imx8mp-verdin-${variant}-${fdt_board}.dtb”
+CONFIG_PREBOOT=“setenv fdtfile ${mender_dtb_name}”

And do a full clean of u-boot.

Thanks for the help.

Best regards,

Rik

1 Like

Hi @rikte !

Thanks for the feedback, I’m glad to hear it’s working now :smiley:

Best regards,

Hi @rikte

I finally got around to testing this and possibly getting a proper fix into the meta-mender-community repository. I would appreciate any feedback you can provide over on github for this proposed change.

Drew

1 Like