Howto change the devicetree that's used by u-boot when starting the linux kernel

Colibri IMX6DL 512MB
Iris Carrier Board V1.1
bsp 6.0

Hi all,

Can you please provide me with an example recipe (u-boot-toradex.bbappend) which changes the devicetree that’s being used by u-boot.
The default devicetree is ‘imx6dl-colibri-eval-v3.dtb’, suppose I want to change to ‘imx6dl-colibri-iris.dtb’

Many thanks in advance.

You can do it through U_boot debug console (UART)

setenv fdtfile imx6dl-colibri-iris.dtb
saveenv

Hello Alex,

Thanks for your reaction, but this doesn’t really answer my question.

Kind Regards

Hello @Spinola ,
Maybe this topic

and this article

can help you

Best regards,
Josep

I found a solution:

Add a bbappend: recipes-bsp/u-boot/u-boot-toradex/u-boot-toradex_%.bbappend

do_configure:prepend() {
sed -i ‘s/CONFIG_PREBOOT=.*/CONFIG_PREBOOT=“setenv fdtfile imx6dl-colibri-iris.dtb”/’ ${S}/configs/colibri_imx6_defconfig
}