[U-Boot] U-Boot image with multiple u-Boot dt blobs selected at low level boot

Hello,
I've got multiple ARM boards with similar but not quite the same configurations. For example different IO configurations for peripheral reset lines of hardware used in the u-boot phase.
Currently I have multiple u-Boot configurations using multiple .dts files creating multiple u-boot.img and MLO files which are stored on the devices emmc (one set on every device). The u-boot than loads the linux kernel and the device specific linux dtb from a FAT partition on the device and boots (The linux partition has one kernel and multiple .dtb, so it supports all devices).
The differences between the boards are GPIO related, but also power configuration & regulator settings.
I would prefer to have a single u-boot.img and MLO file set to load onto all my devices. When I search the docs for this issue, I find many hints pointing me to u-boot FIT images, but from my point of view FIT issues multiple LINUX kernel and dt-blobs, not dt-blobs and configuration on the u-boot level.
What would be the cleanest solution to load one uboot image, which has different behavior depending on the device it boots from?
Best regards, Olli

On Mon, Jul 10, 2017 at 2:54 PM, Oliver Westermann owestermann@gmail.com wrote:
Hello,
I've got multiple ARM boards with similar but not quite the same configurations. For example different IO configurations for peripheral reset lines of hardware used in the u-boot phase.
Currently I have multiple u-Boot configurations using multiple .dts files creating multiple u-boot.img and MLO files which are stored on the devices emmc (one set on every device). The u-boot than loads the linux kernel and the device specific linux dtb from a FAT partition on the device and boots (The linux partition has one kernel and multiple .dtb, so it supports all devices).
The differences between the boards are GPIO related, but also power configuration & regulator settings.
I would prefer to have a single u-boot.img and MLO file set to load onto all my devices. When I search the docs for this issue, I find many hints pointing me to u-boot FIT images, but from my point of view FIT issues multiple LINUX kernel and dt-blobs, not dt-blobs and configuration on the u-boot level.
What would be the cleanest solution to load one uboot image, which has different behavior depending on the device it boots from?
I would look at am335x_evm, it supports a number of different variants of am335x inc the various BeagleBones.

Hi Oliver,
On 10 July 2017 at 07:54, Oliver Westermann owestermann@gmail.com wrote:
Hello,
I've got multiple ARM boards with similar but not quite the same configurations. For example different IO configurations for peripheral reset lines of hardware used in the u-boot phase.
Currently I have multiple u-Boot configurations using multiple .dts files creating multiple u-boot.img and MLO files which are stored on the devices emmc (one set on every device). The u-boot than loads the linux kernel and the device specific linux dtb from a FAT partition on the device and boots (The linux partition has one kernel and multiple .dtb, so it supports all devices).
The differences between the boards are GPIO related, but also power configuration & regulator settings.
I would prefer to have a single u-boot.img and MLO file set to load onto all my devices. When I search the docs for this issue, I find many hints pointing me to u-boot FIT images, but from my point of view FIT issues multiple LINUX kernel and dt-blobs, not dt-blobs and configuration on the u-boot level.
What would be the cleanest solution to load one uboot image, which has different behavior depending on the device it boots from?
If you don't mind handling this in SPL you can use spl_fit for this. See board_fit_config_name_match() for where it matches the config. Then it can load U-Boot with the correct device tree file. I have not used it myself, but I believe this is what you want.
Regards, Simon
participants (3)
-
Oliver Westermann
-
Peter Robinson
-
Simon Glass