public inbox for u-boot@lists.denx.de
 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>,
	"Marek Vasut" <marex@denx.de>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Bin Meng" <bmeng.cn@gmail.com>, "Stefan Roese" <sr@denx.de>,
	"Marek Behún" <marek.behun@nic.cz>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Aaron Williams" <awilliams@marvell.com>
Subject: Re: RFC: Support for U-Boot phases in Kconfig
Date: Wed, 11 Aug 2021 10:31:32 -0400	[thread overview]
Message-ID: <20210811143132.GC858@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ17eJf1z0_G2P3tN0DGtr+sdkzdzL_CRioZp7wbZS+AZA@mail.gmail.com>

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

On Wed, Aug 11, 2021 at 08:11:41AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 11 Aug 2021 at 08:02, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Wed, Aug 11, 2021 at 06:56:31AM -0600, Simon Glass wrote:
> > [snip]
> > > Having thought a bit more, perhaps we have the wrong attitude to
> > > Kconfig. The CONFIG() macro I am talking about works by building an
> > > xxx or SPL_xxx config. If we have separate autoconf.h files for each
> > > phase (autoconf_spl.h etc.) then we don't actually need this. We just
> > > need to include the correct file. Any SPL_xxx config can be written as
> > > xxx. Similarly the Makefile rules can drop the $(P) I was proposing.
> > >
> > > We can, in fact, generate separate autoconf.h files for each phase
> > > today, with no other changes. Unless I am missing something...?
> >
> > If we can spit out {spl_,tpl_,}autoconf.h files that might help a bit.
> > But would it help with the recent case of SPL has SATA+AHCI+!PCI while
> > full U-Boot has SATA+AHCI+!PCI AND SATA+AHCI+PCI ?  Today we can't
> > support the SPL case without adding the handful of SPL_xxx symbols so
> > that we can say we have SATA+AHCI without PCI.
> 
> My thought is that:
> 
> - where there is no SPL_xxx symbol, it we would have CONFIG_xxx=y in
> all autoconf.h files
> - where there is an SPL_xxx symbol, it we would only have it in
> spl_autoconf.h if the SPL_xxx symbol is enabled
> 
> So it does not reduce the power/flexibility of what we have to cover
> all cases. It is just a phase-specific way of presenting the configs
> to the build, so we can do:
> 
> obj-$(CONFIG_FOO) += foo.o
> 
> as well as
> 
> if (CONFIG(FOO))
> 
> I'm still thinking about Kconfig. To me it seems that separating the
> phases so completely is giving up quite a bit. There is no-longer a
> unified build, so dependencies between phases may become a problem. I
> think in fact our problem is the use of SPL_ and TPL_ prefixes on
> Kconfigs, which you have highlighted. Perhaps we just shouldn't do
> that. It would be nice if kconfig could support multiple interrelated
> build phases and output a separate autoconf.h for each one.

What are the dependencies we have between phases?  You've mentioned
bloblist, but to me that's like BOARD_INIT and MISC_INIT_R and all of
the other things you need to have select'd on a platform because they're
non-optional.

And I'm really not seeing now how we would support the example I gave as
for them SPL with SATA+AHCI+PCI is not desired nor possible.  I asked.
The answer was no, don't want it.  Or do you really just mean that if we
had spl_autoconf.h the only thing that would change is that we would
never test on CONFIG_SPL_xxx only CONFIG_xxx, but we would still need to
Kconfig SPL_xxx?

-- 
Tom

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

  reply	other threads:[~2021-08-11 14:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 22:23 RFC: Support for U-Boot phases in Kconfig Simon Glass
2021-08-09 19:11 ` Tom Rini
2021-08-10 14:58   ` Simon Glass
2021-08-10 19:38     ` Tom Rini
2021-08-11 12:56       ` Simon Glass
2021-08-11 13:47         ` Tom Rini
2021-08-11 14:03           ` Simon Glass
2021-08-11 14:17             ` Tom Rini
2021-08-11 14:26               ` Simon Glass
2021-08-11 15:40                 ` Tom Rini
2021-08-11 18:28                   ` Simon Glass
2021-08-11 21:19                     ` Tom Rini
2021-08-11 20:14               ` Sean Anderson
2021-08-11 20:42                 ` Tom Rini
2021-08-11 14:02         ` Tom Rini
2021-08-11 14:11           ` Simon Glass
2021-08-11 14:31             ` Tom Rini [this message]
2021-08-11 14:47               ` Simon Glass
2021-08-11 21:04                 ` Tom Rini
2021-08-11  9:57   ` Grant Likely
2021-08-11 12:58     ` Simon Glass
2021-08-11 13:47       ` Grant Likely
2021-08-11 13:52         ` Simon Glass
2021-08-09 22:31 ` Sean Anderson
2021-08-10 20:32   ` Simon Glass

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=20210811143132.GC858@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=awilliams@marvell.com \
    --cc=bmeng.cn@gmail.com \
    --cc=marek.behun@nic.cz \
    --cc=marex@denx.de \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yamada.masahiro@socionext.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox