[U-Boot] [PATCH] cmd: pxe: Use internal FDT if external one cannot be retrieved

Stephen Warren swarren at wwwdotorg.org
Tue Sep 3 16:16:44 UTC 2019

On 8/31/19 1:52 PM, Anton Leontiev wrote:
> чт, 29 авг. 2019 г. в 23:35, Stephen Warren <swarren at wwwdotorg.org>:
>> On 8/29/19 5:20 AM, Anton Leontiev wrote:
>>> 2019-08-26 at 18:59, Stephen Warren <swarren at wwwdotorg.org>:
>>> We have a GNU/Linux distribution that use FDTDIR in its extlinux.conf
>>> to support several boards. But some boards have FDT embedded in U-Boot
>>> and it is't present in FDTDIR. In such configuration U-Boot fails to
>>> boot an entry, despite no exact FDT is specified in it. Distribution
>>> itself is designed to work on any board.
>> I lookead at that referenced commit description in full and the code,
>> and I believe what you want is for U-Boot to set fdt_addr to the
>> location of the in-RAM DT, and leave fdt_addr_r unset. This will
>> indicate to the pxe code that no FDT should be loaded when parsing
>> extlinux.conf, but instead to use fdt_addr directly.
>> Does that work for you, or does it break some other script/use-case on
>> this board?
> Indeed, it's a possible option. However, if fdt_addr_r is not set,
> user can't override embedded FDT using extlinux.conf. README.distro
> says about fdt_addr_r: "This is mandatory even when fdt_addr is
> provided, since extlinux.conf must always be able to provide a DTB
> which overrides any copy provided by the HW."
> So it should be considered as a workaround rather than a solution.

OK, I guess that makes sense.

I suppose it's not reasonable to ask that extlinux.conf doesn't contain 
an FDTDIR statement in the case where the specific board has a built-in 
DT, since the extlinux.conf content is supposed to be generic, and not 
tailored to the current HW.

More information about the U-Boot mailing list