[PATCH v3 14/32] bootm: Allow building when cleanup functions are missing

Tom Rini trini at konsulko.com
Thu Oct 19 16:54:10 CEST 2023


On Thu, Oct 19, 2023 at 07:59:29AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 18 Oct 2023 at 06:39, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Tue, Oct 17, 2023 at 09:31:04PM -0600, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Tue, 17 Oct 2023 at 08:02, Tom Rini <trini at konsulko.com> wrote:
> > > >
> > > > On Mon, Oct 16, 2023 at 04:28:05PM -0600, Simon Glass wrote:
> > > >
> > > > > There are two cleanup functions needed during boot which depend on
> > > > > CMD_BOOTM: bootm_disable_interrupts() and board_quiesce_devices()
> > > > >
> > > > > Provide static inline versions of these for when commands are not
> > > > > enabled.
> > > > >
> > > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > >
> > > > NAK, these functions need to be available to boot the OS, regardless of
> > > > command line existing or not.  Unwind things in the other direction
> > > > please.
> > >
> > > That won't be a successful strategy. See my other reply on this. I
> > > have had this idea since 2016 and have looked at it every now and
> > > then. With bootstd it makes more sense since we actually have a
> > > framework to boot without the command line. This series enables such
> > > work, but cannot include it.
> >
> > I don't understand.  The "cleanup" functions here are to ensure that any
> > devices that we've touched are in the state the OS needs them to be.
> > It's not "we ran a command", it's "we loaded something off of USB (or
> > network or MMC or ..)" and so we must have those called.
> 
> Right, but they are in with the bootm command code. We could pull them

I don't think that's right.  For bootm, things are split correctly.  I'm
not quite sure about booti/bootz, and I can see what bootefi needs to be
split more.  But bootm is fine.

[snip]
> At present we cannot even build without ~CMDLINE - that has regressed.
> I am trying to patch things up and make it build and add a test.

To be clear here, I prefer build failure in that case over having broken
functionality. That way leads to developers expecting something to work
that will not. Those prep functions are critical. It's also a moot point
because we can have them today with CMDLINE=n.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231019/b891885b/attachment.sig>


More information about the U-Boot mailing list