On 9/3/25 12:56 PM, Philip Oberfichtner wrote:
How image size limiting works in U-Boot should be easier to grasp if we
have all related options in one place.

Signed-off-by: Philip Oberfichtner <[email protected]>
---
  Kconfig                | 59 ++++++++++++++++++++++++++++++++++++++++++
  common/spl/Kconfig     | 38 ---------------------------
  common/spl/Kconfig.tpl |  7 -----
  common/spl/Kconfig.vpl |  7 -----
  4 files changed, 59 insertions(+), 52 deletions(-)

diff --git a/Kconfig b/Kconfig
index 70125c4e5a6..f1a6be299e8 100644
--- a/Kconfig
+++ b/Kconfig
@@ -535,6 +535,8 @@ config BUILD_TARGET
          special image will be automatically built upon calling
          make / buildman.
+menu "Image size limits"
+
  config HAS_BOARD_SIZE_LIMIT
        bool "Define a maximum size for the U-Boot image"
        depends on !COMPILE_TEST
@@ -554,6 +556,63 @@ config BOARD_SIZE_LIMIT
          include SPL nor TPL, on platforms that use that functionality, they
          have separate options to restrict size.
+config VPL_SIZE_LIMIT
+       depends on VPL
+       hex "Maximum size of VPL image"
+       default 0x0
+       help
+         Specifies the maximum length of the U-Boot VPL image.
+         If this value is zero, it is ignored.
+
+config TPL_SIZE_LIMIT
+       depends on TPL
+       hex "Maximum size of TPL image"
+       default 0x0
+       help
+         Specifies the maximum length of the U-Boot TPL image.
+         If this value is zero, it is ignored.
The point of separate common/spl/Kconfig.tpl and common/spl/Kconfig.vpl files is to group SPL / TPL / VPL symbols in those files .

Reply via email to