[U-Boot] [RFC PATCH v2 05/12] Makefile: Fix tests for CONFIG_SPL_LOAD_FIT and CONFIG_SPL_FIT_GENERATOR

Jean-Jacques Hiblot jjhiblot at ti.com
Wed Mar 27 15:38:54 UTC 2019


The current tests do to handle well the cases where those variables are not
defined. When CONFIG_SPL_LOAD_FIT is not defined, U_BOOT_ITS gets defined
as an empty string.
Fixing it by using intermediate variables with the quotes removed

Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
---

Changes in v2: None

 Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index c1af9307b3..26235d8933 100644
--- a/Makefile
+++ b/Makefile
@@ -1148,12 +1148,15 @@ ifndef CONFIG_SYS_UBOOT_START
 CONFIG_SYS_UBOOT_START := 0
 endif
 
+
 # Boards with more complex image requirments can provide an .its source file
 # or a generator script
-ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
-U_BOOT_ITS = $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
+SPL_FIT_SOURCE := $(subst ",,$(CONFIG_SPL_FIT_SOURCE))
+SPL_FIT_GENERATOR := $(subst ",,$(CONFIG_SPL_FIT_GENERATOR))
+ifneq ($(SPL_FIT_SOURCE),)
+U_BOOT_ITS = $(SPL_FIT_SOURCE)
 else
-ifneq ($(CONFIG_SPL_FIT_GENERATOR),"")
+ifneq ($(SPL_FIT_GENERATOR),)
 U_BOOT_ITS := u-boot.its
 ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-imx/mkimage_fit_atf.sh")
 U_BOOT_ITS_DEPS += u-boot-nodtb.bin
@@ -1162,7 +1165,7 @@ ifeq ($(CONFIG_SPL_FIT_GENERATOR),"arch/arm/mach-rockchip/make_fit_atf.py")
 U_BOOT_ITS_DEPS += u-boot
 endif
 $(U_BOOT_ITS): $(U_BOOT_ITS_DEPS) FORCE
-	$(srctree)/$(CONFIG_SPL_FIT_GENERATOR) \
+	$(srctree)/$(SPL_FIT_GENERATOR) \
 	$(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) > $@
 endif
 endif
-- 
2.17.1



More information about the U-Boot mailing list