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 <p...@denx.de>
---

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

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

diff --git a/Makefile b/Makefile
index fa9ce756083..791c00713ec 100644
--- a/Makefile
+++ b/Makefile
@@ -1545,6 +1545,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 9a17ccb2d3d..dcb25b593f1 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

Reply via email to