On Fri, Aug 08, 2025 at 03:10:58PM +0200, Marek Vasut wrote: > On 8/7/25 9:56 AM, Philip Oberfichtner wrote: > > [...] > > > +++ b/Makefile > > @@ -1715,6 +1715,7 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O > > binary \ > > --pad-to=$(CONFIG_SPL_PAD_TO) > > u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE > > $(call if_changed,pad_cat) > > + @$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT)) > > It seems other size checks are not called unconditionally, see Makefile > around line 1100 . Why is this one called unconditionally ? Won't this break > boards which default this new option to 0 ?
No. Please see the "test $$limit -gt 0" in [PATCH 1/4]. > > > ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) > > MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE) > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig > > index ab05536bd02..b5c0c60ff6b 100644 > > --- a/common/spl/Kconfig > > +++ b/common/spl/Kconfig > > @@ -36,6 +36,13 @@ 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 UBOOT_WITH_SPL_SIZE_LIMIT > > + hex "Maximum size of u-boot-with-spl.bin" > > + default 0x0 > > + help > > + Specifies the maximum length of the u-boot-with-spl.bin image. > > + If this value is zero, it is ignored. > Why not set SPL_SIZE_LIMIT and BOARD_SIZE_LIMIT ? Please refer to the commit message above, where I explained my rationale. -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Johanna Denk, Tabea Lutz HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany =====================================================================