Hi Simon,

We did discuss this in OSFC but perhaps you forgot.  The discussion
was based on the mail here [0].

On Tue, 5 Dec 2023 at 02:52, Simon Glass <s...@chromium.org> wrote:
>
> Hi Raymond,
>
> On Mon, 4 Dec 2023 at 12:25, Raymond Mao <raymond....@linaro.org> wrote:
> >
> > Hi Simon,
> >
> > When `OF_BOARD` is defined, the FDT should be from one of  the 
> > board-specific mechanisms:
> > 1. FDT from a bloblist via boot args
> > 2. FDT in memory
> > I don't think we need a new build option to distinguish these two, since it 
> > can be done in runtime by checking whether the boot args follow the FW 
> > Handoff spec conventions and the FDT exists in the bloblist.
>
> No, I would really like this to be deterministic, so we can fail if
> something goes wrong. The bloblist should be 'declared' as the way to
> boot, for a board.

We *are* deterministic. I am just going to repeat what we discussed in
OSFC for completeness.
OF_BLOBLIST makes little sense because we are not going to add a
Kconfig per blolblist entry.
I haven't looked at what the patch does yet but the idea was really simple.
- Under OF_BOARD (which can arguably be renamed to OF_PREVIOUS_STAGE
or something like that)  if CONFIG_BLOB is enabled we scan for a
bloblist
- If CONFIG_BLOB is enabled but no bloblist is provided we fail the boot
- If CONFIG_BLOB is not enabled we do what we did up to now, maybe
with a message that this is going to be obsoleted once enough boards
migrate to a bloblist

IOW if support for a bloblist is enabled we expect to find one from
the previous bootloader. I've lost count of how many times I repeated
this, but here it goes again
The device tree can come
- From u-boot
- From a previous stage loader *somehow* (eg. passed on a bloblist,
passed on a register, read from an EEPROM etc)

We should keep that distinction and create subcategories for the
'comes from a previous stage loader', rather than adding arbitrary
config options which only confuse people

Regards
/Ilias
>
> If in the future all boards a reusing bloblist for this feature, then
> sure, we can drop it. But we have things like rpi which do their own
> thing.
>
> > If it fulfills the above conditions, we can take the FDT from bloblist, 
> > otherwise from the predefined memory address.
> > This is fully backward compatible without adding a new build option.
>
> Again, we need to obtain the FDT from the bloblist if and only if the
> board requires it. It creates a lot of confusion to have it as an
> optional feature, when we know which way it should be.
>
> Ultimately OF_BOARD should go away. We just need to push bloblist to
> other projects and closed-source firmware as the correct way to pass a
> DT.
>
> Regards,
> Simon
> [.]

[0] 
https://lore.kernel.org/u-boot/capnjgz0sqvyj_drleqrp21zpycco3hop-ryd+nkjma0bvyp...@mail.gmail.com/

Reply via email to