[PATCH] Kconfig: Use hex values for CONFIG_{SPL,TPL}_SIZE_LIMIT
Simon Glass
sjg at chromium.org
Mon Sep 28 06:24:33 CEST 2020
Hi Ovidiu,
On Fri, 25 Sep 2020 at 12:15, Ovidiu Panait <ovidiu.panait at windriver.com> wrote:
>
> CONFIG_{SPL,TPL}_SIZE_LIMIT are defined as hex (SPL_SIZE_LIMIT was
> converted in b51882d0 ("spl: Convert CONFIG_SPL_SIZE_LIMIT to hex"), but
> there are still places that reference integer values. Change those to hex
> as well. Also, update the Makefile to check for 0x0 instead of 0.
>
> This also fixes the following build error when CONFIG_SPL_SIZE_LIMIT
> is set by menuconfig to 0x0:
> ...
> spl/u-boot-spl.bin exceeds file size limit:
> limit: 0 bytes
> actual: 0x80f0 bytes
> excess: 0x80f0 bytes
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
> ---
>
> Makefile | 4 ++--
> common/spl/Kconfig | 8 ++++----
> configs/firefly-rk3288_defconfig | 2 +-
> configs/imxrt1020-evk_defconfig | 2 +-
> configs/imxrt1050-evk_defconfig | 2 +-
> configs/tinker-s-rk3288_defconfig | 2 +-
> 6 files changed, 10 insertions(+), 10 deletions(-)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
> diff --git a/Makefile b/Makefile
> index dd98b43031..0ccbe3ed42 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -859,13 +859,13 @@ else
> BOARD_SIZE_CHECK =
> endif
>
> -ifneq ($(CONFIG_SPL_SIZE_LIMIT),0)
> +ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)
> SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit))
> else
> SPL_SIZE_CHECK =
> endif
>
> -ifneq ($(CONFIG_TPL_SIZE_LIMIT),0)
> +ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0)
> TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT))
> else
> TPL_SIZE_CHECK =
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index af8255a8d6..9367c74b54 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -37,9 +37,9 @@ config SPL_FRAMEWORK_BOARD_INIT_F
> config SPL_SIZE_LIMIT
> hex "Maximum size of SPL image"
> depends on SPL
> - default 69632 if ARCH_MX6 && !MX6_OCRAM_256KB
> - default 200704 if ARCH_MX6 && MX6_OCRAM_256KB
> - default 0
> + default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB
> + default 0x31000 if ARCH_MX6 && MX6_OCRAM_256KB
> + default 0x0
> help
> Specifies the maximum length of the U-Boot SPL image.
> If this value is zero, it is ignored.
> @@ -1334,7 +1334,7 @@ if TPL
> config TPL_SIZE_LIMIT
> hex "Maximum size of TPL image"
> depends on TPL
> - default 0
> + default 0x0
That seems a bit like obfuscation to me, but OK.
> help
> Specifies the maximum length of the U-Boot TPL image.
> If this value is zero, it is ignored.
Regards,
Simon
More information about the U-Boot
mailing list