From: Philip Oberfichtner <pro@denx.de>
To: u-boot@lists.denx.de
Cc: Philip Oberfichtner <pro@denx.de>, Anshul Dalal <anshuld@ti.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Greg Malysa <malysagreg@gmail.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jerome Forissier <jerome.forissier@linaro.org>,
Marek Vasut <marex@denx.de>,
Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
Oliver Gaskell <Oliver.Gaskell@analog.com>,
Paul Kocialkowski <contact@paulk.fr>, Peng Fan <peng.fan@nxp.com>,
Peter Robinson <pbrobinson@gmail.com>,
Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Subject: [PATCH 1/2] spl: Add size check for u-boot-with-spl.bin
Date: Tue, 27 May 2025 13:37:50 +0200 [thread overview]
Message-ID: <20250527113751.95741-2-pro@denx.de> (raw)
In-Reply-To: <20250527113751.95741-1-pro@denx.de>
Introduce another SIZE_CHECK macro for u-boot-with-spl.bin.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
---
Makefile | 7 +++++++
common/spl/Kconfig | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/Makefile b/Makefile
index f3278e3b013..dea9f4f133f 100644
--- a/Makefile
+++ b/Makefile
@@ -951,6 +951,12 @@ else
SPL_SIZE_CHECK =
endif
+ifneq ($(CONFIG_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_TPL_SIZE_LIMIT),0x0)
TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT))
else
@@ -1535,6 +1541,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)
+ $(UBOOT_WITH_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..ace2002023a 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.
+
config SPL_SIZE_LIMIT
hex "Maximum size of SPL image"
default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB
--
2.39.5
next prev parent reply other threads:[~2025-05-27 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 11:37 [PATCH 0/2] Add Onion Omega2/2+ board support Philip Oberfichtner
2025-05-27 11:37 ` Philip Oberfichtner [this message]
2025-05-27 11:37 ` [PATCH 2/2] mips: mt7628: " 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=20250527113751.95741-2-pro@denx.de \
--to=pro@denx.de \
--cc=Oliver.Gaskell@analog.com \
--cc=anshuld@ti.com \
--cc=contact@paulk.fr \
--cc=dario.binacchi@amarulasolutions.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@linaro.org \
--cc=malysagreg@gmail.com \
--cc=marex@denx.de \
--cc=nathan.morrison@timesys.com \
--cc=pbrobinson@gmail.com \
--cc=peng.fan@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.