diff options
author | Pali Rohár <pali@kernel.org> | 2021-07-23 11:13:55 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-07-31 09:49:31 +0200 |
commit | 8ab9c6be690e037589a7f0305ce76b3907f9c295 (patch) | |
tree | 62335d5b990dc2862df3a0c21596eda8cc4ae558 /tools | |
parent | 15f7e0dc01d8a851fb1bfbf0e47eab5b67ed26b3 (diff) | |
download | u-boot-8ab9c6be690e037589a7f0305ce76b3907f9c295.tar.gz |
tools: kwbimage: Fix compilation without CONFIG_SYS_U_BOOT_OFFS
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@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/Makefile b/tools/Makefile index bae3f95c49..9517f203fd 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -169,7 +169,7 @@ HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0xffffffff 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 |