[PATCH v2 02/26] cmd: nvedit: check for ENV_SUPPORT

Tom Rini trini at konsulko.com
Thu Mar 9 20:36:14 CET 2023


On Thu, Mar 09, 2023 at 11:20:33AM -0800, Troy Kisky wrote:
> On Wed, Mar 1, 2023 at 7:33 AM Tom Rini <trini at konsulko.com> wrote:
> 
> > On Fri, Feb 24, 2023 at 10:10:23AM -0800, Troy Kisky wrote:
> > > Avoid error messages when SPL,TPL,VPL build don't
> > > have the environment options of the main build.
> > > This is needed when defined(CONFIG_ENV_IS_IN_xxx) is changed
> > > to CONFIG_IS_ENABLED(ENV_IS_IN_xxx).
> > >
> > > Signed-off-by: Troy Kisky <troykiskyboundary at gmail.com>
> > > Reviewed-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > >  cmd/nvedit.c | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/cmd/nvedit.c b/cmd/nvedit.c
> > > index 7cbc3fd573a..ef0fe55431c 100644
> > > --- a/cmd/nvedit.c
> > > +++ b/cmd/nvedit.c
> > > @@ -43,6 +43,7 @@
> > >
> > >  DECLARE_GLOBAL_DATA_PTR;
> > >
> > > +#if CONFIG_IS_ENABLED(ENV_SUPPORT)
> > >  #if  defined(CONFIG_ENV_IS_IN_EEPROM)        || \
> > >       defined(CONFIG_ENV_IS_IN_FLASH)         || \
> > >       defined(CONFIG_ENV_IS_IN_MMC)           || \
> > > @@ -60,10 +61,12 @@ DECLARE_GLOBAL_DATA_PTR;
> > >  #endif
> > >
> > >  #if  !defined(ENV_IS_IN_DEVICE)              && \
> > > -     !defined(CONFIG_ENV_IS_NOWHERE)
> > > +     !defined(CONFIG_ENV_IS_NOWHERE)         && \
> > > +     !defined(CONFIG_VPL_BUILD)
> > >  # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\
> > >  NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE
> > >  #endif
> > > +#endif
> >
> > This is one of the #error messes that we no longer need with Kconfig,
> > where we can ensure things happen. Maybe we can use def_bool y if ..
> > instead of default y if ..., in the ENV_IS_NOWHERE choice ?
> >
> > --
> > Tom
> >
> 
> Hi Tom
> 
> There is some weirdness here
> git grep -A1 CONFIG_ENV_IS_NOWHERE *
[snip]
> Should I force  CONFIG_ENV_IS_NOWHERE=n in these cases?

No, we support more than one env location being enabled at a time, with
nowhere being the location of last resort (at run time).

-- 
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/20230309/2c391e6e/attachment.sig>


More information about the U-Boot mailing list