[PATCH 13/14] Update u-boot.cfg to include CFG also

Simon Glass sjg at chromium.org
Wed Jun 26 10:00:41 CEST 2024


Hi Tom,

On Tue, 25 Jun 2024 at 15:14, Tom Rini <trini at konsulko.com> wrote:
>
> On Tue, Jun 25, 2024 at 01:38:04PM +0100, Simon Glass wrote:
> > Hi Tom,
> >
> > On Mon, 24 Jun 2024 at 19:29, Tom Rini <trini at konsulko.com> wrote:
> > >
> > > On Sun, Jun 23, 2024 at 02:30:32PM -0600, Simon Glass wrote:
> > >
> > > > Some configuration is now in variables with a CFG_ prefix. Add these to
> > > > the .cfg file so that we can see everything in one place. Sort the
> > > > options so they are easier to find and compare.
> > > >
> > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > > ---
> > > >
> > > > Changes in v2:
> > > > - Add new patch to update u-boot.cfg with CFG_... options
> > > >
> > > >  scripts/Makefile.autoconf | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
> > > > index b42f9b525fe..65ff11ea508 100644
> > > > --- a/scripts/Makefile.autoconf
> > > > +++ b/scripts/Makefile.autoconf
> > > > @@ -71,7 +71,7 @@ quiet_cmd_autoconf = GEN     $@
> > > >  quiet_cmd_u_boot_cfg = CFG     $@
> > > >        cmd_u_boot_cfg = \
> > > >       $(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM include/config.h > $@.tmp && { \
> > > > -             grep 'define CONFIG_' $@.tmp | \
> > > > +             egrep 'define (CONFIG_|CFG_)' $@.tmp | sort | \
> > > >                       sed '/define CONFIG_IS_ENABLED(/d;/define CONFIG_IF_ENABLED_INT(/d;/define CONFIG_VAL(/d;' > $@; \
> > > >               rm $@.tmp;                                              \
> > > >       } || {                                                          \
> > >
> > > I don't like this because whereas "CONFIG_" is enforced to be set only
> > > by Kconfig and so always all reliably set and found via a single header,
> > > CFG_ stuff is not.
> >
> > OK, so how are CFG_ options found? I hit this when trying to find the
> > SDRAM size on rockchip 3399 and I could not find any way of figuring
> > it out.
>
> It's just another define, there's no uniformity to it. For some of the
> SDRAM values really we need some build time way to grab some information
> out of the default device tree.

Can you give an example of a board that could use this? I looked at
the devicetree for chromebook_kevin and don't see a memory range in
ther.

Regards,
Simon


More information about the U-Boot mailing list