diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2014-10-16 09:50:12 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2017-01-11 17:44:03 +0100 |
commit | 58a95a13ea342e98aa84f79595d05e8be08214a5 (patch) | |
tree | f93559cdd09d8907adee6b9452a6b2609fc9b0be | |
parent | 17fd771bd124e3030929ee0d63609eb8658495b6 (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 and i.MX 7, this is required for
NAND boot devices. The configuration CONFIG_IMX_NAND enables this
image for a board.
[ported to v2016.11]
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | arch/arm/config.mk | 4 | ||||
-rw-r--r-- | arch/arm/imx-common/Makefile | 8 |
3 files changed, 15 insertions, 0 deletions
@@ -852,6 +852,9 @@ endif %.vyb: %.imx $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@ +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 542b897c31e..74f895ec0da 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -138,12 +138,16 @@ ifndef CONFIG_SPL_BUILD ALL-y += SPL endif else +ifeq ($(CONFIG_IMX_NAND),y) +ALL-y += u-boot-nand.imx +else ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb.imx else ALL-y += u-boot.imx endif endif +endif ifneq ($(CONFIG_VF610),) ALL-y += u-boot.vyb endif diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index 1873185fa22..aae776349e7 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -70,6 +70,14 @@ MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imxim u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE $(call if_changed,mkimage) +ifeq ($(CONFIG_IMX_NAND),y) +cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | \ + cat - $< > $@ + +u-boot-nand.imx: u-boot.imx FORCE + $(call if_changed,u-boot-nand_imx) +endif + ifeq ($(CONFIG_OF_SEPARATE),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \ -e $(CONFIG_SYS_TEXT_BASE) |