imx: add rules for U-Boot DTB support
authorStefano Babic <sbabic@denx.de>
Mon, 31 Mar 2014 07:50:35 +0000 (09:50 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 2 Apr 2014 08:45:35 +0000 (10:45 +0200)
Signed-off-by: Stefano Babic <sbabic@denx.de>
Makefile
arch/arm/config.mk
arch/arm/imx-common/Makefile

index 64e829623982898a6d683e4292257fdb1bb62db5..4df6118764a0bae2b4ecdec7180c53f068151f5e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -757,6 +757,9 @@ dtbs dts/dt.dtb: checkdtc u-boot
 u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE
        $(call if_changed,cat)
 
+%.imx: %.bin
+       $(Q)$(MAKE) $(build)=arch/arm/imx-common $@
+
 quiet_cmd_copy = COPY    $@
       cmd_copy = cp $< $@
 
@@ -810,9 +813,6 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(CONFIG_SYS_FSL_PBL_RCW) \
 u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE
        $(call if_changed,mkimage)
 
-u-boot.imx: u-boot.bin
-       $(Q)$(MAKE) $(build)=arch/arm/imx-common $@
-
 u-boot.sha1:   u-boot.bin
                tools/ubsha1 u-boot.bin
 
index 17b7408835b574a08e965b12dd680a8135a4bb24..5bd39617bb90d89b41cf15a422ad254e6496b2f0 100644 (file)
@@ -119,6 +119,10 @@ ifndef CONFIG_SPL_BUILD
 ALL-y += SPL
 endif
 else
+ifeq ($(CONFIG_OF_SEPARATE),y)
+ALL-y += u-boot-dtb.imx
+else
 ALL-y += u-boot.imx
 endif
 endif
+endif
index 16809fee5fff9c3f499df53aa0d64194faba3f46..025cfed84afad67e97594b975c525ffc76f9c63f 100644 (file)
@@ -42,6 +42,14 @@ 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_OF_SEPARATE),y)
+MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $< $(PHONY),$^) -T imximage \
+       -e $(CONFIG_SYS_TEXT_BASE)
+
+u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) FORCE
+       $(call if_changed,mkimage)
+endif
+
 MKIMAGEFLAGS_SPL = -n $(filter-out $< $(PHONY),$^) -T imximage \
        -e $(CONFIG_SPL_TEXT_BASE)