[PATCH v2 02/14] spl: Correct use of CMD_BOOTI and CMD_BOOTZ

Simon Glass sjg at chromium.org
Wed Jul 24 16:39:26 CEST 2024


Hi Quentin,

On Mon, 22 Jul 2024 at 07:11, Quentin Schulz <quentin.schulz at cherry.de> wrote:
>
> Hi Simon,
>
> On 7/21/24 5:25 PM, Simon Glass wrote:
> > These should have a CONFIG_ prefix. Add it.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > Fixes: 7a0d88076b9 ("Add in the ability to load and boot an uncompr...")
> > Reviewed-by: Sean Anderson <seanga2 at gmail.com>
> > ---
> >
> > (no changes since v1)
> >
> >   common/spl/spl.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/common/spl/spl.c b/common/spl/spl.c
> > index 7794ddccade..6f4a8bfb3f4 100644
> > --- a/common/spl/spl.c
> > +++ b/common/spl/spl.c
> > @@ -322,7 +322,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
> >   #endif
> >
> >   #if CONFIG_IS_ENABLED(OS_BOOT)
> > -#if defined(CMD_BOOTI)
> > +#if defined(CONFIG_CMD_BOOTI)
>
> Maybe use IS_ENABLED(CMD_BOOTI) instead?

IS_ENABLED(CONFIG_CMD_BOOTI) I assume. Sure, but I don't think it
matters as they are equivalent.

>
> >               ulong start, size;
> >
> >               if (!booti_setup((ulong)header, &start, &size, 0)) {
> > @@ -336,7 +336,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
> >                             spl_image->load_addr, spl_image->size);
> >                       return 0;
> >               }
> > -#elif defined(CMD_BOOTZ)
> > +#elif defined(CONFIG_CMD_BOOTZ)
>
> Ditto?
>
> In any case,
>
> Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>
>
> Though.... i'm wondering why we are checking for CMD_BOOTI in SPL in the
> first place?

I suppose it is to enable a feature in SPL only if it will be used in U-Boot?

>
> >               ulong start, end;
> >
> >               if (!bootz_setup((ulong)header, &start, &end)) {

Regards,
Simon


More information about the U-Boot mailing list