[PATCH v3 1/2] Makefile: Add size check for u-boot-with-spl.bin

Philip Oberfichtner pro at denx.de
Tue Jun 3 11:10:04 CEST 2025


Like other images, u-boot-with-spl.bin may be subject to size
restrictions. Extend CONFIG_SPL_SIZE_LIMIT to handle this case.

Signed-off-by: Philip Oberfichtner <pro at denx.de>
---

Notes:
    Changes in v2: none
    
    Changes in v3:
    	Reuse existing SPL_SIZE_LIMIT instead of implementing a new option

 Makefile           | 1 +
 common/spl/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f88684947ee..9f3b09a60a3 100644
--- a/Makefile
+++ b/Makefile
@@ -1535,6 +1535,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)
+	$(SPL_SIZE_CHECK)
 
 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 77cf04d38ed..ff61ee91a10 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -43,7 +43,7 @@ config SPL_SIZE_LIMIT
 	default 0x30000 if ARCH_MVEBU && ARMADA_32BIT
 	default 0x0
 	help
-	  Specifies the maximum length of the U-Boot SPL image.
+	  Specifies the maximum length of U-Boot SPL images.
 	  If this value is zero, it is ignored.
 
 config SPL_SIZE_LIMIT_SUBTRACT_GD
-- 
2.39.5



More information about the U-Boot mailing list