Best practice for large device tree modification in torizon


we have our own Carrier-Board which is based on the Ixora Carrier Board - V1.1.
For the BSP’s we have created a device-tree called: my-device.dtb
We have set the device tree in the u-boot with:

setenv fdt_file "called: my-device.dtb"
setenv vidargs 'video=mxcfb0:dev=ldb video=mxcfb1:off video=mxcfb2:ldb video=mxcfb3:off fbmem=512M'

This works great.

At the moment we try to switch to torizon.

From here we know how the boot process works in torizon.
First the boot.cmd is called wich then calls the uEnv.txt.
In the uEnv.txt we see the location for the device-trees.
We have now copied our device tree my-device.dtb to this location and have tried to set the fdt_file and the vidargs. We have also set the vidargs in the u-boot like the BSP, but our device tree never created a fb0,fb1,fb2 and fb3 like in the BSPs.

We could maybe use a overlay and create it with TorizonCore_Builder, but we have a lot of changes in our my-device.dtb (switch i2c, eth, sd-card, lvds, hdmi …)

Is it possible to set the vidargs and fdt_file in the uEnv.txt or is it best practice to create multiple overlays with the TorizonCore_Builder?

Best Regards

Hi @Alias_Alias,

Thanks for the detailed information.

Yes, the recommended way to change low-level things on TorizonCore is by the usage of the Device Tree Overlays with the TorizonCore Builder.

Is there anything else I could help you with?

Best regards,
André Curvello

Just to add on to what André has said. There may be some changes you can only do via direct device tree changes. For example with an overlay you can add properties or overwrite existing ones. However last I checked I believe there’s still no way to remove/delete a property. Therefore in such cases you would need to change the device tree source and re-compile.

Best Regards,

Hi @andrecurvello.tx ,
hi @jeremias.tx ,

we have a last question: Is it possible to compile a hole device tree like my-device.dts with the TorizonCore Builder?
We have only see how to compile overlays not the hole device tree.

We have seen that we can set a device tree in the uboot of the

setenv fdt_file "my-device.dtb"
setenv fdtfile "my-device.dtb"

At the moment we install the TorizonCore Builder and try to use it.

Thanks for the response.

Hi @Alias_Alias,

Complementing myself:
Yes, you can define new hardware and use a device-tree with it.
TorizonCore Builder can build a full device tree or applying device tree overlays, if needed, using the dt subcommand.

You can find more details on the TorizonCore Builder page.

Best regards,
André Curvello