All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Jonas Karlman <jonas@kwiboo.se>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Matthew Garrett <mgarrett@aurora.tech>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Sughosh Ganu <sughosh.ganu@linaro.org>
Subject: Re: [PATCH 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti
Date: Fri, 18 Apr 2025 08:08:44 -0600	[thread overview]
Message-ID: <20250418140844.GP5495@bill-the-cat> (raw)
In-Reply-To: <CAFLszTg45QDjKT=5JH=Cpoy6Efv8KSPQbQ6KnA8QE6nM_bk+xw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3298 bytes --]

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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2025-04-18 14:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 12:50 [PATCH 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti Simon Glass
2025-04-18 12:51 ` [PATCH 1/3] boot: Add a function to check if a linux Image is supported Simon Glass
2025-04-18 12:51 ` [PATCH 2/3] bootm: Add RISC-V support in booti_is_supported() Simon Glass
2025-04-18 12:51 ` [PATCH 3/3] booti: Allow ignoring SYS_BOOTM_LEN with the booti command Simon Glass
2025-04-18 13:33 ` [PATCH 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti Tom Rini
2025-04-18 13:46   ` Simon Glass
2025-04-18 14:08     ` Tom Rini [this message]
2025-05-01 13:06       ` Simon Glass
2025-05-01 14:59         ` Tom Rini
2025-05-01 15:03           ` Simon Glass
2025-05-03  9:01             ` Peter Robinson
2025-05-05 16:35         ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250418140844.GP5495@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=jonas@kwiboo.se \
    --cc=mgarrett@aurora.tech \
    --cc=mkorpershoek@baylibre.com \
    --cc=quentin.schulz@cherry.de \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.