From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
U-Boot Custodians <u-boot-custodians@lists.denx.de>
Subject: Re: xPL Proposal
Date: Thu, 13 Feb 2025 09:59:12 -0600 [thread overview]
Message-ID: <20250213155912.GU1233568@bill-the-cat> (raw)
In-Reply-To: <CAFLszTib-ydH-TCE-Oi0SDGu1ASWbCbfWApTqxFFHoU3Di_nvw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5004 bytes --]
On Thu, Feb 13, 2025 at 07:33:20AM -0700, Simon Glass wrote:
> Hi Tom,
>
> On Thu, 13 Feb 2025 at 07:15, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Tue, Feb 11, 2025 at 08:03:20AM -0700, Simon Glass wrote:
> >
> > > Hi,
> > >
> > > I just wanted to send a note to (re-)introduce my ideas[1] for the
> > > next iteration of xPL.
> > >
> > > A recent series introduced 'xPL' as the name for the various
> > > pre-U-Boot phases, so now CONFIG_XPL_BUILD means that this is any xPL
> > > phase and CONFIG_SPL means this really is the SPL phase, not TPL. We
> > > still use filenames and function naming which uses 'spl', but could
> > > potentially adjust that.
> > >
> > > The major remaining problem IMO is that it is quite tricky and
> > > expensive (in terms of time) to add a new phase. We also have some
> > > medium-sized problems:
> > >
> > > a. The $(PHASE_), $(SPL_) rules in the Makefile are visually ugly and
> > > can be confusing, particularly when combined with ifdef and ifneq
> > >
> > > b. We have both CONFIG_IS_ENABLED() and IS_ENABLED() and they mean
> > > different things. For any given option, some code uses one and some
> > > the other, depending on what problems people have met along the way.
> > >
> > > c. An option like CONFIG_FOO is ambiguous, in that it could mean that
> > > the option is enabled in one or more xPL phases, or just in U-Boot
> > > proper. The only way to know is to look for $(PHASE_) etc. in the
> > > Makefiles and CONFIG_IS_ENABLED() in the code. This is very confusing
> > > and has not scaled well.
> > >
> > > d. We need to retain an important feature: options from different
> > > phases can depend on each other. As an example, we might want to
> > > enable MMC in SPL by default, if MMC is enabled in U-Boot proper. We
> > > may also want to share values between phases, such as TEXT_BASE. We
> > > can do this easily today, just by adding Kconfig rules.
> > >
> > > Proposal
> > >
> > > 1. Adjust kconf to generate separate autoconf.h files for each phase.
> > > These contain the values for each Kconfig option for that phase. For
> > > example CONFIG_TEXT_BASE in autoconf_spl.h is SPL's text base.
> > >
> > > 2. Add a file to resolve the ambiguity in (c) above, listing the
> > > Kconfig options which should not be enabled/valid in any xPL build.
> > > There are around 200 of these.
> > >
> > > 3. Introduce CONFIG_PPL as a new prefix, meaning U-Boot proper (only),
> > > useful in rare cases. This indicates that the option applies only to
> > > U-Boot proper and is not defined in any xPL build. It is analogous to
> > > CONFIG_TPL_xxx meaning 'enabled in TPL'. Only a dozen of these are
> > > needed at present, basically to allow access to the value for another
> > > phase, e.g. SPL wanting to find CONFIG_PPL_TEXT_BASE so that it knows
> > > the address to which U-Boot should be loaded.
> > >
> > > 4. There is no change to the existing defconfig files, or 'make
> > > menuconfig', which works just as today, including dependencies between
> > > options across all phases.
> > >
> > > 5. (next) Expand the Kconfig language[2] to support declaring phases
> > > (SPL, TPL, etc.) and remove the need for duplicating options (DM_MMC,
> > > SPL_DM_MMC, TPL_DM_MMC, VPL_DM_MMC), so allowing an option to be
> > > declared once for any/all phases. We can then drop the file in 2
> > > above.
> > >
> > > With this, maintaining Kconfig options, Makefiles and adding a new
> > > phase should be considerably easier.
> >
> > Here is the big problem I see with your proposal. Today our Kbuild and
> > kconfig support is very much out of date. And while my attempts to
> > resync them together haven't worked, I believe it comes down to how we
> > build *pl targets today, at least in part, because that's just not
> > a thing upstream has to do. What you're proposing here will make any
> > future resyncs even harder as more of the code will diverge from
> > upstream (as seen in your previous RFC series).
>
> Yes, that's true, but mostly in kconfig. I would be willing to resync
> kconfig with Linux, if that helps.
Yes, re-syncing scripts/kconfig to v6.13 (as a stand alone series) would
be helpful, thanks.
> For kbuild, my series doesn't do much there. I could perhaps offer a
> resync of fixdep.c ?
That's another part of the infrastructure that is out of date, yes.
> Did Linaro show any interest in taking on Kbuild? Linux just has a
> huge amount of build-code now. What problems do you have with U-Boot's
> current Kbuild?
Yes, it's somewhere on various people's "would like to do" list. And in
terms of problems:
- clang is broken for everything except sandbox I believe
- clang + LTO never worked for us
- Our dtc ignore warning flags are well out of date (and harder to sync
up with)
- All of the general fixes with the Kbuild logic post v4.20 are just
missing.
That's just off the top of my head.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-02-13 15:59 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 15:03 xPL Proposal Simon Glass
2025-02-11 21:22 ` Tom Rini
2025-02-11 22:54 ` Simon Glass
2025-02-12 16:40 ` Tom Rini
2025-02-12 17:41 ` Simon Glass
2025-02-12 18:35 ` Tom Rini
2025-02-12 20:05 ` Simon Glass
2025-02-12 22:58 ` Tom Rini
2025-02-13 12:50 ` Simon Glass
2025-02-13 18:03 ` Tom Rini
2025-02-13 21:57 ` Simon Glass
2025-02-13 22:59 ` Tom Rini
2025-02-14 0:09 ` Simon Glass
2025-02-14 14:39 ` Tom Rini
2025-02-14 19:48 ` Simon Glass
2025-02-14 21:16 ` Tom Rini
2025-02-14 22:46 ` Simon Glass
2025-02-14 23:43 ` Tom Rini
2025-02-14 23:52 ` Simon Glass
2025-02-15 1:14 ` Tom Rini
2025-02-15 1:43 ` Simon Glass
2025-02-17 13:16 ` Simon Glass
2025-02-17 14:19 ` Tom Rini
2025-02-17 15:08 ` Simon Glass
2025-02-17 15:59 ` Tom Rini
2025-02-17 18:03 ` Simon Glass
2025-02-17 19:18 ` Tom Rini
2025-02-13 15:03 ` Generic U-Boot (was: Re: xPL Proposal) Caleb Connolly
2025-02-13 15:10 ` Generic U-Boot Caleb Connolly
2025-02-13 23:42 ` Tom Rini
2025-02-13 23:42 ` Generic U-Boot (was: Re: xPL Proposal) Tom Rini
2025-02-17 18:50 ` xPL Proposal Tom Rini
2025-02-17 19:11 ` Simon Glass
2025-02-17 19:21 ` Tom Rini
2025-02-17 19:34 ` Simon Glass
2025-02-17 19:47 ` Tom Rini
2025-02-17 20:17 ` Tom Rini
2025-02-17 20:39 ` Simon Glass
2025-02-18 0:40 ` Tom Rini
2025-02-18 12:08 ` Simon Glass
2025-02-18 14:46 ` Tom Rini
2025-02-19 0:03 ` Simon Glass
2025-02-19 1:07 ` Tom Rini
2025-02-19 14:48 ` Simon Glass
2025-02-19 20:34 ` Tom Rini
2025-02-20 13:19 ` Simon Glass
2025-02-20 15:16 ` Tom Rini
2025-02-20 16:43 ` Simon Glass
2025-02-20 17:40 ` Tom Rini
2025-02-20 18:13 ` Simon Glass
2025-02-20 20:40 ` Tom Rini
2025-02-21 1:30 ` Simon Glass
2025-02-21 13:56 ` Simon Glass
2025-02-21 14:19 ` Tom Rini
2025-02-21 14:19 ` Tom Rini
2025-02-21 15:03 ` Simon Glass
2025-02-21 17:53 ` Tom Rini
2025-02-21 18:10 ` Rate of change in the project (Was: Re: xPL Proposal) Tom Rini
2025-02-23 0:00 ` Simon Glass
2025-02-24 23:23 ` Tom Rini
2025-03-04 13:13 ` Rate of innovation in the project (Was: Re: Rate of change in the project) Simon Glass
2025-03-04 15:29 ` Tom Rini
2025-03-05 14:19 ` Simon Glass
2025-03-05 16:22 ` Tom Rini
2025-03-06 16:10 ` Simon Glass
2025-03-07 14:46 ` Tom Rini
2025-03-10 15:53 ` Tom Rini
2025-03-28 23:42 ` Simon Glass
2025-03-31 15:51 ` Tom Rini
2025-04-01 15:45 ` Simon Glass
2025-04-01 17:18 ` Tom Rini
2025-04-02 9:32 ` Mattijs Korpershoek
2025-04-02 19:22 ` Simon Glass
2025-04-02 22:35 ` Tom Rini
2025-04-02 23:55 ` Simon Glass
2025-04-03 14:27 ` Tom Rini
2025-04-06 21:15 ` Simon Glass
2025-04-06 22:53 ` Tom Rini
2025-04-07 10:45 ` Simon Glass
2025-04-07 19:10 ` Tom Rini
2025-02-21 19:25 ` xPL Proposal Tom Rini
2025-02-21 22:54 ` Simon Glass
2025-02-21 23:20 ` Tom Rini
2025-02-21 23:35 ` Simon Glass
2025-02-22 0:03 ` Tom Rini
2025-02-22 0:24 ` Simon Glass
2025-02-22 1:06 ` Tom Rini
2025-02-22 2:07 ` Simon Glass
2025-02-24 16:00 ` Tom Rini
2025-02-24 23:38 ` Simon Glass
2025-02-25 14:02 ` Tom Rini
2025-02-25 21:33 ` Simon Glass
2025-02-25 21:51 ` Tom Rini
2025-02-26 2:51 ` Simon Glass
2025-02-26 14:52 ` Tom Rini
2025-02-27 16:24 ` Simon Glass
2025-02-27 17:17 ` Tom Rini
2025-02-27 19:32 ` Simon Glass
2025-02-27 20:30 ` Tom Rini
2025-03-04 15:35 ` Simon Glass
2025-03-04 16:25 ` Tom Rini
2025-03-05 14:17 ` Simon Glass
2025-03-05 15:49 ` Tom Rini
2025-03-05 16:53 ` Simon Glass
2025-02-12 1:32 ` Marek Vasut
2025-02-12 13:37 ` Simon Glass
2025-02-13 14:15 ` Tom Rini
2025-02-13 14:33 ` Simon Glass
2025-02-13 15:59 ` Tom Rini [this message]
2025-02-13 19:56 ` Jonas Karlman
2025-02-13 18:02 ` Tom Rini
2025-02-17 15:03 ` 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=20250213155912.GU1233568@bill-the-cat \
--to=trini@konsulko.com \
--cc=sjg@chromium.org \
--cc=u-boot-custodians@lists.denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox