[PATCH v8 00/13] bootstd: Convert rockchip and add various fixes and tweaks

Simon Glass sjg at chromium.org
Fri Apr 7 23:35:48 CEST 2023


Hi Tom,

On Sat, 8 Apr 2023 at 08:22, Tom Rini <trini at konsulko.com> wrote:
>
> On Sat, Apr 08, 2023 at 07:53:10AM +1200, Simon Glass wrote:
> > Hi Tom,
> >
> > On Sat, 8 Apr 2023 at 07:39, Tom Rini <trini at konsulko.com> wrote:
> > >
> > > On Fri, Apr 07, 2023 at 10:36:38PM +1200, Simon Glass wrote:
> > >
> > > > This series converts rockchip boards over to use standard boot. It also
> > > > fixes various problems which have come up recently, showing differences
> > > > between the current implementation and the distroboot scripts.
> > > >
> > > > This should get us closer to being able to turn down the scripts.
> > >
> > > Alright, so I grabbed a few parts of this series to investigate the
> > > points I'm trying to grasp better, and I think this is going the wrong
> > > track. We should start off by dropping "default y" from BOOTSTD, and
> > > then start adding "default y if" for SoCs as we convert them. The end
> > > goal should be that we get to the point where we can "default y if ARM
> > > || RISCV || X86" or perhaps "default y !(PPC || M68K || ...)" as it's
> > > just a few architectures that haven't ended up being converted. But
> > > today, there's too much churn on platforms that aren't making any use of
> > > this. And I don't think this is going to be functionally worse than all
> > > of the places we "imply DISTRO_DEFAULTS" today, as functionally we can
> > > replace that with "imply BOOTSTD" as they get migrated.
> >
> > That would really be a backward step. I'm not sure what to say at this
> > point. I've put a lot of effort in trying to get this over the line,
> > but the only way we get feedback is when it is applied.
>
> Having bootstd enabled and not functional (because boot_targets aren't
> set) isn't helping the migration happen. And the hard part of the
> migration isn't knowing it's possible, or enabling 1-2 options, it's
> testing it and also it really just being 1-2 options.

Standard boot does not need boot_targets to be set. It works fine
without it. It just goes through the boot devices in a pre-defined
order, from fastest to slowest. It matches what most boards do anyway.
The main reason we kept it is for compatibility with distro boot.

I don't think testing in advance is a feasible approach in general.
See for example the rpi series which hasn't got any comment. It likely
won't until it is applied. That's how we get feedback. We have months
to resolve issues and I believe that the code is fundamentally sound.

>
> > What churn are you seeing? Do you mean:
> >
> > disable BOOTSTD for boards with custom commands? You asked for that patch
> > disabling BOOTSTD_DEFAULTS? You asked for that patch
> > enable BOOTSTD_DEFAULTS by default? We can drop it if you like
>
> We need all 3 of those patches because without the 3rd you don't get a
> good experience when you do enable bootstd for a platform. The problem
> is that unless you have distro_bootcmd today you're getting between 63kB
> (a lot of mediatek platforms) and 5k (silk, as a semi-random example) of
> growth because bootstd is on and now is the default bootcmd, when before
> they had nothing. And probably had board docs saying "now do ... to
> boot". And that's largely setting aside the *_r5_* platforms that I know
> are just doing something else, and could disable it.

Er, I thought you wanted it to default on if the boards has no
bootcmd? If not, we can disable it for those as well. If you don't
want any increase we can disable it for boards without DISTRO_DEFAULTS
too. After all, presumably those boards are doing something custom
anyway.

>
> We want to convert everyone doing distro_bootcmd over to this, that's
> good. The problem is we don't have a symbol today that means "we want
> distro_bootcmd" and also isn't overloaded (DISTRO_DEFAULTS is overloaded
> in this sense).
>
> The wrong direction part of this series is that for platforms that
> aren't in the middle of converting we're increasing their size between
> somewhat and very very much, and we haven't tested that it'll work. And
> yes, there's some automatic guessing logic, which hasn't been tested on
> these platforms either, so we don't actually know if going from no
> bootcmd (and so drops to prompt) to attempts to autoboot something is an
> improvement.

So, the wrong direction comes from the last three patches. Is that right?

Fundamentally the problem I have is that I know where I would like
this to head, which is everything using standard boot and turning down
the scripts. But it feels like every time I touch bootstd we have to
have the EFI discussion again. You can imagine how I feel about
disabling BOOTSTD by default...it would basically kill it.

This is not really an arch-specific thing, nor an SoC-specific thing.
The underlying logic is the same for everything. The reason I think we
need to do a few cases before we enable it everywhere is that we need
to find the little tweaks needed in that logic.

How about we apply the first patches in this series, skipping the last
three, then apply the rpi series as well. That should get people
actually using it and we can iron out the problems. It also keeps
things moving. We have months before the release.

Enabling by default can come later once we decide what we want to do
about size increases, boards that don't use DISTRO_DEFAULTS and boards
that don't have a boot command.

Regards,
Simon


More information about the U-Boot mailing list