diff options
author | Stefan Agner <stefan@agner.ch> | 2014-04-23 17:59:28 +0200 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2014-04-24 16:07:54 +0200 |
commit | f4c0dbdf79d56d9932ccb86664f4be1f4233adf1 (patch) | |
tree | e096a6de8f67d75a3f1557429c0498f4f188a5b7 | |
parent | 92f30250da3f49a948f47210e58915325e90b7a5 (diff) |
imx: add u-boot-nand.imx target
Add an additional target which prepends the u-boot.imx image with
0x400 padding bytes. On Vybrid, this is required for NAND boot
devices. The configuration CONFIG_IMX_NAND enables this image
for a board.
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | arch/arm/config.mk | 5 | ||||
-rw-r--r-- | arch/arm/imx-common/Makefile | 9 |
3 files changed, 17 insertions, 0 deletions
@@ -753,6 +753,9 @@ u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE %.imx: %.bin $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ +u-boot-nand.imx: u-boot.bin + $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ + quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 66ecc2ee4d1..5f7cd3a6101 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -125,7 +125,12 @@ else ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb.imx else +ifeq ($(CONFIG_IMX_NAND),y) +# u-boot-nand.imx builds u-boot.imx as well +ALL-y += u-boot-nand.imx +else ALL-y += u-boot.imx endif endif endif +endif diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 770054096f3..d6fdd383caa 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -43,6 +43,15 @@ MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $< $(PHONY),$^) -T imximage \ u-boot.imx: u-boot.bin $(IMX_CONFIG) FORCE $(call if_changed,mkimage) +ifeq ($(CONFIG_IMX_NAND),y) +quiet_cmd_u-boot-nand_imx = GEN $@ +cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | \ + cat - $< > $@ + +u-boot-nand.imx: u-boot.imx $(IMX_CONFIG) FORCE + $(call if_changed,u-boot-nand_imx) +endif + ifeq ($(CONFIG_OF_SEPARATE),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $< $(PHONY),$^) -T imximage \ -e $(CONFIG_SYS_TEXT_BASE) |