[PATCH u-boot-mvebu 01/31] tools: kwbimage: Fix compilation without CONFIG_SYS_U_BOOT_OFFS

Stefan Roese sr at denx.de
Thu Jul 15 10:32:49 CEST 2021


On 08.07.21 19:30, Marek Behún wrote:
> From: Pali Rohár <pali at kernel.org>
> 
> The CONFIG_SYS_U_BOOT_OFFS option may be defined as empty string.
> In this case it causes compilation error:
> 
>      tools/kwbimage.c: In function ‘image_headersz_v1’:
>      tools/kwbimage.c:1002:39: error: expected expression before ‘)’ token
>        if (headersz > CONFIG_SYS_U_BOOT_OFFS) {
>                                             ^
>      tools/kwbimage.c:1006:41: error: expected expression before ‘)’ token
>          (int)headersz, CONFIG_SYS_U_BOOT_OFFS);
>                                               ^
>      tools/kwbimage.c:1011:35: error: expected expression before ‘;’ token
>        headersz = CONFIG_SYS_U_BOOT_OFFS;
>                                         ^
>      make[1]: *** [scripts/Makefile.host:112: tools/kwbimage.o] Error 1
>      make: *** [Makefile:1822: tools] Error 2
> 
> Check whether the value of CONFIG_SYS_U_BOOT_OFFS is really set.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Marek Behún <marek.behun at nic.cz>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   tools/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/Makefile b/tools/Makefile
> index d020c55d66..fadf3135d6 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -155,7 +155,7 @@ ifdef CONFIG_FIT_CIPHER
>   HOST_EXTRACFLAGS	+= -DCONFIG_FIT_CIPHER
>   endif
>   
> -ifdef CONFIG_SYS_U_BOOT_OFFS
> +ifneq ($(CONFIG_SYS_U_BOOT_OFFS),)
>   HOSTCFLAGS_kwbimage.o += -DCONFIG_SYS_U_BOOT_OFFS=$(CONFIG_SYS_U_BOOT_OFFS)
>   endif
>   
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list