diff mbox series

[v4,3/6] spl: fit: dont set U_BOOT_ITS var if not build SPL_FIT support

Message ID 20200619104550.1972307-4-heiko@sntech.de
State New
Headers show
Series rockchip: make it possible to sign the u-boot.itb | expand

Commit Message

Heiko Stuebner June 19, 2020, 10:45 a.m. UTC
From: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>

Both CONFIG_SPL_FIT_SOURCE and CONFIG_SPL_FIT_GENERATOR
depend on CONFIG_SPL_FIT, so U_BOOT_ITS should only be
defined if one of them is set.

When undefined, the
    ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
seems to evaluate to true all the time though, setting
U_BOOT_ITS to u-boot.its, even if no FIT support gets build.

This may prove cumbersome if later parts want to check against
"do we need an U_BOOT_ITS", so to fix that just wrap the whole
block in a "ifdef CONFIG_SPL_FIT" which needs to be defined
if any SPL_FIT_* options get used.

Signed-off-by: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 149f839948..1cc7e37c37 100644
--- a/Makefile
+++ b/Makefile
@@ -1320,6 +1320,7 @@  endif
 
 # Boards with more complex image requirements can provide an .its source file
 # or a generator script
+ifdef CONFIG_SPL_FIT
 ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
 U_BOOT_ITS := u-boot.its
 $(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
@@ -1338,6 +1339,7 @@  $(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
 	$(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
 endif
 endif
+endif
 
 ifdef CONFIG_SPL_LOAD_FIT
 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \