[PATCH 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti
Tom Rini
trini at konsulko.com
Fri Apr 18 16:08:44 CEST 2025
On Fri, Apr 18, 2025 at 07:46:59AM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 18 Apr 2025 at 07:33, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Fri, Apr 18, 2025 at 06:50:59AM -0600, Simon Glass wrote:
> >
> > > This series restores the original behaviour of extlinux booting linux
> > > 'Image' files, which is to ignore CONFIG_SYS_BOOTM_LEN and instead uses
> > > a limit of 10x the compressed size.
> > >
> > > It also adds RISC-V support, since it uses a similar format to ARM64.
> > >
> > > Future work should integrate the code in 'booti' into main 'bootm'
> > > logic.
> > >
> > >
> > > Simon Glass (3):
> > > boot: Add a function to check if a linux Image is supported
> > > bootm: Add RISC-V support in booti_is_supported()
> > > booti: Allow ignoring SYS_BOOTM_LEN with the booti command
> > >
> > > boot/bootm.c | 31 +++++++++++++++++++++++++------
> > > cmd/booti.c | 1 +
> > > include/bootm.h | 3 +++
> > > 3 files changed, 29 insertions(+), 6 deletions(-)
> >
> > This is like pulling teeth. We aren't ignoring SYS_BOOTM_LEN so much as
> > it was never relevant here to start with. The documentation
> > (doc/usage/cmd/booti.rst) has explained that we use 10 x
> > kernel_comp_size for the limit. The "bootm" namespace has largely been
> > about uImage (and then FIT images when not using it's own namespace)
> > images and not applied elsewhere, which is why bootz/booti handled
> > things outside that namespace. And then, still, this series doesn't
> > unify cmd/booti.c with your changes, it just introduces duplicated
> > functionality, which is generally understood to be a bad thing.
> >
> > So again, please do similar to what you did for cmd/bootz.c and that
> > report and move the existing functionality over. We can then look at
> > cleaning it up (which should look like / abstract what we do for
> > compressed FIT images) as a follow up, in order to make bisecting any
> > regressions here easier down the line. Thanks.
>
> Well, I still don't understand what you are getting at here.
>
> The existing functionality for booti is already there. Marek added it
> a few years back. Can you please be more specific as to what
> functionality you think is missing?
With:
https://patchwork.ozlabs.org/project/uboot/patch/20250409155723.431102-1-sjg@chromium.org/
You moved the functionality from cmd/bootz.c and over to boot/bootm.c
You need to do the same thing here.
> Yes, the bootm implementation is separate from the booti command at
> present. They both call booti_setup(). But the booti command uses
> kernel_comp_addr_r which we shouldn't be using in bootm. In fact I'd
> like to get rid of those vars, not proliferate them. There is
> certainly some more common code which can be teased apart, but it's
> not the subject of this bugfix. I have to stop somewhere.
>
> Perhaps you should let me do this refactoring in the way that I
> believe it should be done?
One of the big lessons learned I've had from all of the code refactors
you've done over the years is we need to do them small and bisectable
because corner cases become a nightmare to understand and resolve. So
perhaps you should do the refactoring the way I believe it needs to be
done.
--
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/20250418/d1831915/attachment.sig>
More information about the U-Boot
mailing list