From patchwork Fri Jun 19 10:45:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 242656 List-Id: U-Boot discussion From: heiko at sntech.de (Heiko Stuebner) Date: Fri, 19 Jun 2020 12:45:47 +0200 Subject: [PATCH v4 3/6] spl: fit: dont set U_BOOT_ITS var if not build SPL_FIT support In-Reply-To: <20200619104550.1972307-1-heiko@sntech.de> References: <20200619104550.1972307-1-heiko@sntech.de> Message-ID: <20200619104550.1972307-4-heiko@sntech.de> From: Heiko Stuebner 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 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) 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 \