U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Oberfichtner <pro@denx.de>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: Tom Rini <trini@konsulko.com>,
	u-boot@lists.denx.de,
	Mattijs Korpershoek <mkorpershoek@kernel.org>,
	Michael Walle <michael@walle.cc>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: Re: [PATCH v2 1/3] Image size checks: Remove HAS_BOARD_SIZE_LIMIT
Date: Mon, 18 Aug 2025 11:29:57 +0200	[thread overview]
Message-ID: <aKLylfvzdfebJRWe@antares> (raw)
In-Reply-To: <aJmuxlTEFT4R7HR_@antares>

On Mon, Aug 11, 2025 at 10:50:17AM +0200, Philip Oberfichtner wrote:
> The idea of treating a size limit of zero as unlimited has been common
> practice in mainline U-Boot since 2019, where CONFIG_SPL_SIZE_LIMIT has
> been introduced. The same logic has later been applied to TPL and VPL
> size limits.
> 
> If we want to consistently stick to the HAS_*_SIZE_LIMIT approach, we'd
> have to introduce four extra Kconfig options alongside
> HAS_BOARD_SIZE_LIMIT:
> 
> 	CONFIG_HAS_UBOOT_WITH_SPL_SIZE_LIMIT
> 	CONFIG_HAS_SPL_SIZE_LIMIT
> 	CONFIG_HAS_TPL_SIZE_LIMIT
> 	CONFIG_HAS_VPL_SIZE_LIMIT
> 
> 
> Furthermore, the extra lines of code in the toplevel Makefile, which
> could otherwise be removed:
> 
> 	ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
> 	BOARD_SIZE_CHECK= @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
> 	else
> 	BOARD_SIZE_CHECK =
> 	endif
> 
> 	ifneq ($(CONFIG_HAS_UBOOT_WITH_SPL_SIZE_LIMIT),0x0)
> 	UBOOT_WITH_SPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT)
> 	else
> 	UBOOT_WITH_SPL_SIZE_CHECK =
> 	endif
> 
> 	ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)
> 	SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit))
> 	else
> 	SPL_SIZE_CHECK =
> 	endif
> 
> 	ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0)
> 	TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT))
> 	else
> 	TPL_SIZE_CHECK =
> 	endif
> 
> 	ifneq ($(CONFIG_VPL_SIZE_LIMIT),0x0)
> 	VPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_VPL_SIZE_LIMIT))
> 	else
> 	VPL_SIZE_CHECK =
> 	endif
> 
> 
> Is it really worth adding this much of extra code?

Ping @Marek: So are you in favor of this surplus of code?

  reply	other threads:[~2025-08-18  9:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 10:24 [PATCH v2 0/3] Simplify image size checks Philip Oberfichtner
2025-08-07 10:24 ` [PATCH v2 1/3] Image size checks: Remove HAS_BOARD_SIZE_LIMIT Philip Oberfichtner
2025-08-07 13:41   ` Marek Vasut
2025-08-07 16:21     ` Tom Rini
2025-08-07 19:41       ` Marek Vasut
2025-08-07 20:11         ` Tom Rini
2025-08-07 23:15           ` Marek Vasut
2025-08-07 23:24             ` Tom Rini
2025-08-11  8:50               ` Philip Oberfichtner
2025-08-18  9:29                 ` Philip Oberfichtner [this message]
2025-08-25  8:59                   ` Philip Oberfichtner
2025-08-28 21:44                 ` Marek Vasut
2025-09-01  9:38                   ` Philip Oberfichtner
2025-09-01 19:41                     ` Marek Vasut
2025-08-11  8:30     ` Philip Oberfichtner
2025-08-07 10:24 ` [PATCH v2 2/3] Image size checks: Move all configs in one place Philip Oberfichtner
2025-08-07 10:24 ` [PATCH v2 3/3] Image size checks: Simplify help text Philip Oberfichtner
2025-08-07 13:41   ` Marek Vasut
2025-08-11  8:57     ` Philip Oberfichtner
2025-08-11 10:28       ` Heinrich Schuchardt
2025-08-11 14:25       ` Marek Vasut
2025-08-12  9:51         ` 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=aKLylfvzdfebJRWe@antares \
    --to=pro@denx.de \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=marek.vasut@mailbox.org \
    --cc=michael@walle.cc \
    --cc=mkorpershoek@kernel.org \
    --cc=quentin.schulz@cherry.de \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --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