On 10/15/25 3:23 AM, Philip Oberfichtner wrote:
Use a consistent logic for image size checks. No functional change.
Before this commit, there were two concurrent approaches of how image
size checks are disabled: Whereas BOARD_SIZE_LIMIT was gated through a
dedicated Kconfig symbol to achieve this, all the other size checks were
disabled by assigning them a limit of zero bytes.
By this commit we achieve a consistent logic for size limiting, by
introducing CONFIG_HAS_XXX_SIZE_LIMIT for all those options that don't
have it yet.
[...]
diff --git a/Makefile b/Makefile
index 2402f9313d8..e68dce2c1d5 100644
--- a/Makefile
+++ b/Makefile
@@ -1109,19 +1109,19 @@ else
BOARD_SIZE_CHECK =
endif
-ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)
+ifneq ($(CONFIG_SPL_SIZE_LIMIT),)
Why does this check not use HAS_SPL_SIZE_LIMIT introduced below ?
SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit))
else
SPL_SIZE_CHECK =
endif
-ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0)
+ifneq ($(CONFIG_TPL_SIZE_LIMIT),)
DTTO
TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT))
else
TPL_SIZE_CHECK =
endif
-ifneq ($(CONFIG_VPL_SIZE_LIMIT),0x0)
+ifneq ($(CONFIG_VPL_SIZE_LIMIT),)
DTTO
[...]
+++ b/common/spl/Kconfig
@@ -36,19 +36,33 @@ config SPL_FRAMEWORK_BOARD_INIT_F
- initialize the serial (preloader_console_init)
Unless you want to provide your own board_init_f, you should say Y.
+config HAS_SPL_SIZE_LIMIT
+ bool "Enable size limit check for the SPL image"
+ depends on !COMPILE_TEST
[...]