From: Philip Oberfichtner <pro@denx.de>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: u-boot@lists.denx.de, Andre Przywara <andre.przywara@arm.com>,
Anshul Dalal <anshuld@ti.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Greg Malysa <malysagreg@gmail.com>,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jerome Forissier <jerome.forissier@linaro.org>,
Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
Peng Fan <peng.fan@nxp.com>, Simon Glass <sjg@chromium.org>,
Tom Rini <trini@konsulko.com>,
Trevor Woerner <twoerner@gmail.com>, Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH v3 1/5] Image size checks: Move all configs in one place
Date: Fri, 5 Sep 2025 10:13:36 +0200 [thread overview]
Message-ID: <aLqbsD6R3ZfAeN86@aristophanes> (raw)
In-Reply-To: <74fea05e-b8a1-479e-9938-a4043501c92c@mailbox.org>
On Thu, Sep 04, 2025 at 03:54:54PM +0200, Marek Vasut wrote:
> On 9/4/25 10:12 AM, Philip Oberfichtner wrote:
> > On Wed, Sep 03, 2025 at 02:50:49PM +0200, Marek Vasut wrote:
> > > On 9/3/25 12:56 PM, Philip Oberfichtner wrote:
> > > > How image size limiting works in U-Boot should be easier to grasp if we
> > > > have all related options in one place.
> > > >
> > > > Signed-off-by: Philip Oberfichtner <pro@denx.de>
> > > > ---
> > > > Kconfig | 59 ++++++++++++++++++++++++++++++++++++++++++
> > > > common/spl/Kconfig | 38 ---------------------------
> > > > common/spl/Kconfig.tpl | 7 -----
> > > > common/spl/Kconfig.vpl | 7 -----
> > > > 4 files changed, 59 insertions(+), 52 deletions(-)
> > > >
> > > > diff --git a/Kconfig b/Kconfig
> > > > index 70125c4e5a6..f1a6be299e8 100644
> > > > --- a/Kconfig
> > > > +++ b/Kconfig
> > > > @@ -535,6 +535,8 @@ config BUILD_TARGET
> > > > special image will be automatically built upon calling
> > > > make / buildman.
> > > > +menu "Image size limits"
> > > > +
> > > > config HAS_BOARD_SIZE_LIMIT
> > > > bool "Define a maximum size for the U-Boot image"
> > > > depends on !COMPILE_TEST
> > > > @@ -554,6 +556,63 @@ config BOARD_SIZE_LIMIT
> > > > include SPL nor TPL, on platforms that use that functionality, they
> > > > have separate options to restrict size.
> > > > +config VPL_SIZE_LIMIT
> > > > + depends on VPL
> > > > + hex "Maximum size of VPL image"
> > > > + default 0x0
> > > > + help
> > > > + Specifies the maximum length of the U-Boot VPL image.
> > > > + If this value is zero, it is ignored.
> > > > +
> > > > +config TPL_SIZE_LIMIT
> > > > + depends on TPL
> > > > + hex "Maximum size of TPL image"
> > > > + default 0x0
> > > > + help
> > > > + Specifies the maximum length of the U-Boot TPL image.
> > > > + If this value is zero, it is ignored.
> > > The point of separate common/spl/Kconfig.tpl and common/spl/Kconfig.vpl
> > > files is to group SPL / TPL / VPL symbols in those files .
> >
> > There is "config TPL_" definitions literally all over the place. I think
> > there might actually even be more of them outside Kconfig.tpl than
> > inside.
>
> That does not make it OK to make that situation worse.
It doesn't. Someone who stumbles over BOARD_SIZE_LIMIT might be asking
himself, if there's an analogous option for SPL, too. It'll jump right
into his eyes, after this patch of mine.
And apparently there were other contributers before me who found it
reasonable to group strongly related options together within one menu,
instead of spreading them out over many different places. Let me give
you a few examples (and this list is by far not exhaustive):
Kconfig:
config SYS_MALLOC_F
config SPL_SYS_MALLOC_F
config TPL_SYS_MALLOC_F
config VPL_SYS_MALLOC_F
arch/Kconfig
menu "Skipping low level initialization functions"
config SKIP_LOWLEVEL_INIT
config SPL_SKIP_LOWLEVEL_INIT
config TPL_SKIP_LOWLEVEL_INIT
boot/Kconfig
menuconfig FIT
config SPL_FIT
config VPL_FIT
config TPL_FIT
common/Kconfig
menu "Logging"
config LOG
config SPL_LOG
config TPL_LOG
config VPL_LOG
dts/Kconfig
menu "Device Tree Control"
config OF_CONTROL
config SPL_OF_CONTROL
config TPL_OF_CONTROL
config VPL_OF_CONTROL
lib/Kconfig
menu "Compression Support"
config LZ4
config SPL_LZ4
config TPL_LZ4
config VPL_LZ4
So how do these and many other cases differ from the SIZE_LIMIT case
discussed here? Or would it be better to tear all those menus apart?
next prev parent reply other threads:[~2025-09-05 8:13 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 10:56 [PATCH v3 0/5] Simplify image size checks Philip Oberfichtner
2025-09-03 10:56 ` [PATCH v3 1/5] Image size checks: Move all configs in one place Philip Oberfichtner
2025-09-03 12:50 ` Marek Vasut
2025-09-04 8:12 ` Philip Oberfichtner
2025-09-04 13:54 ` Marek Vasut
2025-09-05 8:13 ` Philip Oberfichtner [this message]
2025-09-05 14:22 ` Tom Rini
2025-10-10 14:19 ` Philip Oberfichtner
2025-09-03 10:56 ` [PATCH v3 2/5] Image size checks: Use HAS_SIZE_LIMIT consistently Philip Oberfichtner
2025-09-03 12:51 ` Marek Vasut
2025-09-04 8:19 ` Philip Oberfichtner
2025-09-04 13:56 ` Marek Vasut
2025-09-05 8:15 ` Philip Oberfichtner
2025-09-05 14:19 ` Tom Rini
2025-09-30 8:33 ` Philip Oberfichtner
2025-09-30 14:45 ` Tom Rini
2025-10-02 8:55 ` Philip Oberfichtner
2025-10-02 21:19 ` Tom Rini
2025-10-10 14:28 ` Philip Oberfichtner
2025-09-03 10:56 ` [PATCH v3 3/5] Image size checks: Use consistent help texts Philip Oberfichtner
2025-09-03 12:54 ` Marek Vasut
2025-09-04 8:20 ` Philip Oberfichtner
2025-09-03 10:56 ` [PATCH v3 4/5] Image size checks: Deduplicate Makefile Philip Oberfichtner
2025-09-03 13:02 ` Marek Vasut
2025-09-04 8:30 ` Philip Oberfichtner
2025-09-04 15:03 ` Marek Vasut
2025-09-05 8:22 ` Philip Oberfichtner
2025-09-03 10:56 ` [PATCH v3 5/5] Image size checks: Simplify SPL_SIZE_LIMIT logic Philip Oberfichtner
2025-09-03 12:08 ` Heinrich Schuchardt
2025-09-03 12:59 ` Marek Vasut
2025-09-04 8:23 ` Philip Oberfichtner
2025-09-04 8:30 ` Heinrich Schuchardt
2025-09-04 15:02 ` Marek Vasut
2025-09-05 8:19 ` Philip Oberfichtner
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=aLqbsD6R3ZfAeN86@aristophanes \
--to=pro@denx.de \
--cc=andre.przywara@arm.com \
--cc=anshuld@ti.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@linaro.org \
--cc=malysagreg@gmail.com \
--cc=marek.vasut@mailbox.org \
--cc=nathan.morrison@timesys.com \
--cc=peng.fan@nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=twoerner@gmail.com \
--cc=u-boot@lists.denx.de \
--cc=ye.li@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.