[PATCH v3 4/5] Image size checks: Deduplicate Makefile
Marek Vasut
marek.vasut at mailbox.org
Wed Sep 3 15:02:20 CEST 2025
On 9/3/25 12:56 PM, Philip Oberfichtner wrote:
> Deduplicate some redundancies within the SIZE_CHECK code in the toplevel
> Makefile. No functional changes.
>
> Note: To make this work for the special case of SPL, spl_size_limit.c
> has to print an empty string "" instead of zero when there is no size
> limit in place.
>
> Signed-off-by: Philip Oberfichtner <pro at denx.de>
> ---
> Makefile | 45 +++++++++++-------------------------------
> tools/spl_size_limit.c | 4 ++--
> 2 files changed, 13 insertions(+), 36 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a17d8b57196..b6f01591ee9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -428,8 +428,9 @@ KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
> # Check ths size of a binary:
> # Args:
> # $1: File to check
> -# #2: Size limit in bytes (decimal or 0xhex)
> +# #2: Size limit in bytes (decimal or 0xhex), always return OK if undefined
You should be able to use the HAS_ variables to correctly test for and
handle the undefined case .
More information about the U-Boot
mailing list