From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Fri, 21 Dec 2018 06:21:31 +0000 Subject: [U-Boot] [PATCH V2 08/10] imx: build flash.bin for i.MX8 In-Reply-To: <20181221063010.25256-1-peng.fan@nxp.com> References: <20181221063010.25256-1-peng.fan@nxp.com> Message-ID: <20181221063010.25256-9-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Build flash.bin for i.MX8 when SPL enabled. Signed-off-by: Peng Fan --- Makefile | 2 +- arch/arm/mach-imx/Makefile | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 74d4259eb6..e9a0d3ab3a 100644 --- a/Makefile +++ b/Makefile @@ -1200,7 +1200,7 @@ tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE SPL: spl/u-boot-spl.bin FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ -ifeq ($(CONFIG_ARCH_IMX8M), y) +ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y) flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ endif diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 5424848ad3..e84798b35c 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -105,6 +105,7 @@ IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%) ifeq ($(CONFIG_ARCH_IMX8), y) CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh IMAGE_TYPE := imx8image +SPL_DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o spl/u-boot-spl.cfgout $(srctree)/$(IMX_CONFIG); if [ -f spl/u-boot-spl.cfgout ]; then $(CNTR_DEPFILES) spl/u-boot-spl.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 ifeq ($(CONFIG_ARCH_IMX8M), y) IMAGE_TYPE := imx8mimage @@ -153,6 +154,18 @@ ifeq ($(DEPFILE_EXISTS),0) endif endif +ifeq ($(CONFIG_ARCH_IMX8), y) +SPL: + +MKIMAGEFLAGS_flash.bin = -n spl/u-boot-spl.cfgout -T $(IMAGE_TYPE) -e 0x100000 +flash.bin: MKIMAGEOUTPUT = flash.log + +flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE +ifeq ($(SPL_DEPFILE_EXISTS),0) + $(call if_changed,mkimage) +endif +endif + else MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ -T $(IMAGE_TYPE) -e $(CONFIG_SPL_TEXT_BASE) -- 2.14.1