arm: imx8qxp: build u-boot-dtb.cfgout before checking files
authorPeng Fan <peng.fan@nxp.com>
Mon, 5 Nov 2018 10:01:37 +0000 (10:01 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 1 Jan 2019 13:12:18 +0000 (14:12 +0100)
Build u-boot-dtb.cfgout before checking files, otherwise
u-boot-dtb.cfgout is generated at late stage and cause final image not
generated.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/Makefile

index 53d9e5f42bc1953fa476c2b79e24cf4cdf4716cb..eb84315d9dfec1b2240921e9f85f65379bbcce46 100644 (file)
@@ -104,7 +104,7 @@ IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%)
 ifeq ($(CONFIG_ARCH_IMX8), y)
 CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh
 IMAGE_TYPE := imx8image
-DEPFILE_EXISTS := $(shell if [ -f u-boot-dtb.cfgout ]; then $(CNTR_DEPFILES) u-boot-dtb.cfgout; echo $$?; fi)
+DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o u-boot-dtb.cfgout $(srctree)/$(IMX_CONFIG); if [ -f u-boot-dtb.cfgout ]; then $(CNTR_DEPFILES) u-boot-dtb.cfgout; echo $$?; fi)
 else
 IMAGE_TYPE := imximage
 DEPFILE_EXISTS := 0