Device Tree Overlays and FIT Images - Are they supported together fully?

Westermann, Oliver Oliver.Westermann at
Tue Feb 1 10:50:48 CET 2022


We're supporting a device that has some hardware variants. As those variants can be of A different kinds on B different interfaces, we end up with A*B = N different hardware variations.
Currently we have N device trees in the FIT image, but we noticed that it doesn't scale anymore: Any new hardware variants B+1 causes a number of A new device trees. We decided to invest some time into FDT overlays and managed to get it to work, but not completely to our expectations.

Our current flow is to load the fit image and boot a configuration from the fit image using

bootm ${loadaddr}#${fit_config}

I followed the documentation at doc/uImage.FIT/overlay-fdt-boot.txt & a bit of hacking in my yocto later, I have a working FIT image that has the structure as described in the docs. I can manually copy out & modify dtb's and dtbo's as well as apply them, but I can't do whats described under "Configuration using overlays and feature selection":

If I do
bootm ${loadaddr}#${fit_config}#bar
with bar being a very small dtbo, U-Boot fails to apply the overlay stating "Overlayed FDT requires relocation", output by boot_get_fdt_fit() in boot/image-fit.c#L2341.

Reading around that code, it seems that what is described in the docs is not really supported: I can't find any codepath that would copy the base dtb out of the FIT image area before applying any overlays.

Is my doubt reasonable or am I missing a step somewhere?
I can provide more info (detailed load & boot steps, fit image iminfo) if needed.

- Olli

More information about the U-Boot mailing list