[RFC PATCH v1 0/3] Simplify image size checks

Philip Oberfichtner pro at denx.de
Thu Jul 31 13:40:41 CEST 2025


This patch series intends to simplify the image size checks, which currently
exists in multiple flavours:

	CONFIG_HAS_BOARD_SIZE_LIMIT
	CONFIG_BOARD_SIZE_LIMIT
	CONFIG_SPL_SIZE_LIMIT
	CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD
	CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC
	CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK
	CONFIG_TPL_SIZE_LIMIT
	CONFIG_VPL_SIZE_LIMIT

After this series, we would have
	- Less code duplication in the toplevel Makefile (commit 1)
	- Consistent logic for all the different CONFIGS (commit 2)
	- All related options in one place               (commit 3)

Please note that I have also posted commit 1 as part of the onion board support
series:
https://patchwork.ozlabs.org/project/uboot/patch/20250730123833.249923-2-pro@denx.de/

If this proposal finds some consent in the community, I think we might still
want to improve the Kconfig help texts. Also in commit 2 I just dropped the
"depends on !COMPILE_TEST" statement. Not sure how to translate that into the
new logic.

Philip Oberfichtner (3):
  Image size checks: Simplify Makefile rules
  Image size checks: Remove HAS_BOARD_SIZE_LIMIT
  Image size checks: Move all configs in one place

 Kconfig                                       | 67 ++++++++++++++++---
 Makefile                                      | 44 +++---------
 cmd/Kconfig                                   |  2 +-
 common/spl/Kconfig                            | 38 -----------
 common/spl/Kconfig.tpl                        |  7 --
 common/spl/Kconfig.vpl                        |  7 --
 configs/bk4r1_defconfig                       |  1 -
 configs/chromebook_link_defconfig             |  1 -
 configs/colibri_vf_defconfig                  |  1 -
 configs/ea-lpc3250devkitv2_defconfig          |  1 -
 .../gardena-smart-gateway-mt7688_defconfig    |  1 -
 configs/guruplug_defconfig                    |  1 -
 configs/imx28_btt3_defconfig                  |  1 -
 configs/imx28_xea_defconfig                   |  1 -
 configs/legoev3_defconfig                     |  1 -
 configs/linkit-smart-7688_defconfig           |  1 -
 configs/lschlv2_defconfig                     |  1 -
 configs/lsxhl_defconfig                       |  1 -
 configs/lxr2_defconfig                        |  1 -
 configs/mx51evk_defconfig                     |  1 -
 configs/mx53loco_defconfig                    |  1 -
 configs/mx6sabresd_defconfig                  |  1 -
 configs/mx7ulp_com_defconfig                  |  1 -
 configs/openrd_base_defconfig                 |  1 -
 configs/openrd_client_defconfig               |  1 -
 configs/openrd_ultimate_defconfig             |  1 -
 configs/pcm052_defconfig                      |  1 -
 configs/pico-dwarf-imx6ul_defconfig           |  1 -
 configs/pico-dwarf-imx7d_defconfig            |  1 -
 configs/pico-hobbit-imx6ul_defconfig          |  1 -
 configs/pico-hobbit-imx7d_defconfig           |  1 -
 configs/pico-imx6_defconfig                   |  1 -
 configs/pico-imx6ul_defconfig                 |  1 -
 configs/pico-imx7d_bl33_defconfig             |  1 -
 configs/pico-imx7d_defconfig                  |  1 -
 configs/pico-nymph-imx7d_defconfig            |  1 -
 configs/pico-pi-imx6ul_defconfig              |  1 -
 configs/pico-pi-imx7d_defconfig               |  1 -
 configs/sheevaplug_defconfig                  |  1 -
 configs/stm32mp15_dhsom.config                |  1 -
 configs/tbs2910_defconfig                     |  1 -
 configs/turris_1x_nor_defconfig               |  1 -
 configs/turris_1x_sdcard_defconfig            |  1 -
 configs/turris_omnia_defconfig                |  1 -
 configs/udoo_neo_defconfig                    |  1 -
 configs/vf610twr_defconfig                    |  1 -
 configs/vf610twr_nand_defconfig               |  1 -
 configs/warp7_bl33_defconfig                  |  1 -
 configs/warp7_defconfig                       |  1 -
 lib/efi_loader/Kconfig                        |  6 +-
 tools/spl_size_limit.c                        |  2 +-
 51 files changed, 74 insertions(+), 142 deletions(-)

-- 
2.39.5



More information about the U-Boot mailing list