On 1/9/26 12:45 PM, Matwey V. Kornilov wrote:
With best regards,
Matwey V. Kornilov

пт, 9 янв. 2026 г., 14:33 Simon Glass <[email protected]>:

Hi Matwey,

On Wed, 7 Jan 2026 at 06:00, Matwey V. Kornilov
<[email protected]> wrote:

Hello

I have a board with SPI where U-Boot image is located along with
environment settings. The image is supplied with correct FDT, so no
additional dtb files are required to boot Linux from MMC. I.e. fdtcontrol
variable is set up by U-Boot. Then EFI is used to execute Grub2 which
handles the rest.

I've read

https://docs.u-boot.org/en/latest/usage/fdt_overlays.html#manually-loading-and-applying-overlays
but it describes mostly how to do the overlay loading manually. What I
want
to achieve is to automatically apply FDT overlay from a specific dtbo
file
located on MMC at each boot. What is the recommended way to do that? Will
rewriting the bootcmd env with pretended commands work for me?

We should really be using FIT for this. It is designed for this
purpose and is a better solution than individual files.


Ok, I see. I just want to make some experiments on the table. So, my
concern about FIT is that I would need to reflash whole bootloader for
that... and then revert back. Isn't there less destructive way?


I don't understand what makes the example not match what you want to do?

You want to apply a device tree overlay at runtime after loading it from eMMC.

The example loads the device tree overlay from a device with the `load` command which can read from supported filesystems on supported device types, see https://docs.u-boot.org/en/latest/usage/cmd/load.html for how to use the command. And then applies it to the Device Tree.

If you desire to use the exact same FDT as U-Boot proper did and apply your overlay on top, I'm assuming you will want to use fdtcontroladdr environment variable as the address in DRAM of the Device Tree Blob (DTB/FDT) U-Boot proper used for itself. I do not know how the device tree is passed from U-Boot proper to your EFI application so there could be some research to do on that side.

If the example doesn't match what you want to do, can you explain which part is confusing or not matching what you want to do, so we can try and help guide you towards the solution?

Cheers,
Quentin

Reply via email to