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

Anton Leontiev scileont at gmail.com
Thu Aug 29 11:20:19 UTC 2019


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.

Indeed, I read it strictly as "if no FDT file was loaded" regardless the reason.
Thank you for clarification.

> > If FDT file cannot be retrieved and it is specified explicitly using
> > FDT keyword then the label is skipped. If it cannot be found in
> > FDTDIR then internal FDT is tried first.
>
> This makes the fdt/fdtdir keywords work differently. I don't think we
> want that.

FDT will work as always. FDTDIR will be less strict. It doesn't
specify exact file to be loaded, that's why it should not fail if
there is no such 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.

> And note that if we do change anything here, we should update the
> comment at around line 730, which describes the algorithm that's
> implemented.

Thank you, I'll update the comment.


More information about the U-Boot mailing list