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

Stephen Warren swarren at wwwdotorg.org
Thu Aug 29 20:35:33 UTC 2019

On 8/29/19 5:20 AM, Anton Leontiev wrote:
> 2019-08-26 at 18:59, Stephen Warren <swarren at wwwdotorg.org>:
>> On 8/23/19 8:40 AM, Anton Leontiev wrote:
>>> From: Anton Leontiev <aleontiev at elvees.com>
>>> Original commit c61d94d86035 ("pxe: implement fdtdir extlinux.conf tag")
>>> states, that if FDT file cannot be retrieved then FDT packaged in
>>> firmware should be used.
>> It's not meant to say that. I believe the part of the description you're
>> referring to is:
>>       if no FDT file was loaded, and $fdtaddr is set:
>>         # This indicates an FDT packaged with firmware
>>         use the FDT at $fdtaddr
>> That wasn't meant to say anything about "if there was an error loading
>> the FDT file", but rather is meant to mean "if no FDT file was loaded
>> because extlinux.conf contained no fdt or fdtdir statement". Nothing
>> there is intended to refer to errors loading a specified FDT file.
>> What specific problem are you trying to solve?
> 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?

More information about the U-Boot mailing list