diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2014-10-16 09:50:12 +0200 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2015-04-14 09:08:09 +0200 |
commit | 55380b56efef3f3bb1dc9c128c3ce2be56e653a3 (patch) | |
tree | 8e36cf08e8d8fe8cd33ab19d819e9750e9817400 /arch | |
parent | c31a8b2bdb47dc8fa71c259423bd8fed840b8a25 (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.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/config.mk | 5 | ||||
-rw-r--r-- | arch/arm/imx-common/Makefile | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index c005ce4905..3f7780146d 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -128,7 +128,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 b9f1ca4da9..a5a3642833 100644 --- a/arch/arm/imx-common/Makefile +++ b/arch/arm/imx-common/Makefile @@ -44,6 +44,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) |