From: Masahiro Yamada <masahiroy@kernel.org>
To: Tom Rini <trini@konsulko.com>
Cc: barebox@lists.infradead.org, Nicolas Schier <nicolas@fjasle.eu>,
Jonathan Corbet <corbet@lwn.net>,
U-Boot Custodians <u-boot-custodians@lists.denx.de>,
Simon Glass <sjg@chromium.org>,
Randy Dunlap <rdunlap@infradead.org>,
Nick Desaulniers <ndesaulniers@google.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org, Nathan Chancellor <nathan@kernel.org>,
U-Boot Mailing List <u-boot@lists.denx.de>,
linux-kbuild@vger.kernel.org
Subject: Re: [RESEND PATCH] kconfig: Proposed language extension for multiple builds
Date: Sun, 12 Mar 2023 20:05:46 +0900 [thread overview]
Message-ID: <CAK7LNARQ-PgxiCh+gm2efpfXmNBkdTp18OTk3sHtqNsk6by5-Q@mail.gmail.com> (raw)
In-Reply-To: <20230311165507.GN3041508@bill-the-cat>
On Sun, Mar 12, 2023 at 1:55 AM Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, Mar 10, 2023 at 09:39:15PM -0800, Randy Dunlap wrote:
> > Hi--
> >
> > On 3/10/23 18:37, Simon Glass wrote:
> > > (I am sending this again to get more feedback)
> > >
> > > In the case of Linux, only one build is produced so there is only a
> > > single configuration. For other projects, such as U-Boot and Zephyr, the
> > > same code is used to produce multiple builds, each with related (but
> > > different) options enabled.
> > >
> > > This can be handled with the existing kconfig language, but it is quite
> > > verbose, somewhat tedious and very error-prone, since there is a lot of
> > > duplication. The result is hard to maintain.
> > >
> > > Describe an extension to the Kconfig language to support easier handling
> > > of this use case.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> > IMO Masahiro has already answered this multiple times and I agree with his answers.
> >
> > For others, the full previous thread is at
> > https://lore.kernel.org/all/20230219145453.1.Idaaf79c3e768b85750d5a7eb732052576c5e07e5@changeid/
>
> Well, I think what was unclear, or maybe we just wanted to confirm the
> answer was "none at all", was this. As good community neighbors, we see
> a generic issue in the Kconfig language, a tool used frequently outside
> of just the Linux kernel, and would like to contribute back. Ideally
> without having first gone off, designed and implemented something, and
> then been told it's all wrong and to rewrite it first. So what level of
> interest is there in this?
Sorry, no interest.
If you want to get a clear answer, NACK.
>
> As I pointed out in that thread, I believe barebox has examples where
> some keyword like we're proposing here would help them (and yes, there's
> only a dozen or so symbols so it's also manageable without anything
> special),
Barebox keeps PBL in very limited, ad-hoc implementation.
PBL has no more than 10 user-configurable options.
Sascha Hauer designed it this way.
Linux kernel also has a small loader (a.k.a decompressor) in
arch/*/boot/decompress/.
For example, CONFIG_KERNEL_GZIP is a CONFIG option
for the decompressor instead of the main kernel.
In this sense, you could apply your theory,
"Linux kernel is also multi build-phases, so Kconfig should have this
extension to move CONFIG_KERNEL_GZIP to another build phase".
No, no. The main kernel and the decompressor are well separated
and the latter is small and simple.
Barebox is the same - the main Barebox and PBL are well separated
and PBL is really small and simple.
The problems you are suffering from do not exist in Barebox.
> and Simon believes Zephyr will be in a similar situation soon
> enough (which doesn't use the kernel's implementation of the language).
Zephyr does not share any Kconfig code with Linux.
They use Python implementation, a.k.a. Kconfiglib.
It is up to the Zephyr community, but this requires extra effort.
> Frankly, I keep going back to "tristate" is just the original example of
> what we're talking about here (CONFIG_FOO=n, CONFIG_FOO_MODULE=y), not
> that I'm suggesting we would remove the tristate word.
> So we would really like to make sure as many people and projects are
> aware, as possible.
This is on the boundary.
We can make the tristate optional if it does not make the code too ugly.
But, if you do not add CONFIG_MODULES in your Kconfig file,
users will not see 'm' in the first place.
I know some help messages still mention 'm', but is this the problem
you want to solve?
> And as Simon asked in the thread, what about code refactoring that makes
> further maintenance easier? Clearly, such patches would need to be
> against the current appropriate tree.
If such patches clean up the code, they will be appreciated.
--
Best Regards
Masahiro Yamada
prev parent reply other threads:[~2023-03-12 11:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 2:37 Simon Glass
2023-03-11 5:39 ` Randy Dunlap
2023-03-11 16:55 ` Tom Rini
2023-03-12 4:08 ` Boris Kolpackov
2023-03-12 11:05 ` Masahiro Yamada [this message]
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=CAK7LNARQ-PgxiCh+gm2efpfXmNBkdTp18OTk3sHtqNsk6by5-Q@mail.gmail.com \
--to=masahiroy@kernel.org \
--cc=barebox@lists.infradead.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=rdunlap@infradead.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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