]> git.sur5r.net Git - u-boot/commitdiff
Makefile: Build additional binaries for dtb FIT blobs appended to U-boot
authorCooper Jr., Franklin <fcooper@ti.com>
Fri, 16 Jun 2017 22:25:13 +0000 (17:25 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 10 Jul 2017 18:25:54 +0000 (14:25 -0400)
Add additional make targets and options for building embedded FIT U-boot
images.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
.gitignore
Makefile

index 7fac5b3c7479d13be1fd574a9f7c0d300c73c5c5..29757aa51e32364015a29ceff1deafab02365df3 100644 (file)
@@ -30,6 +30,7 @@
 #
 # Top-level generic files
 #
+fit-dtb.blob
 /MLO*
 /SPL*
 /System.map
index 119ad49eec3178e68555ec8a53b6b61af5d1f8d8..4c4c8d86e6d8c1d6245cb3d03d6a040fe0a47ca8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -873,7 +873,21 @@ dts/dt.dtb: checkdtc u-boot
 quiet_cmd_copy = COPY    $@
       cmd_copy = cp $< $@
 
-ifeq ($(CONFIG_OF_SEPARATE),y)
+ifeq ($(CONFIG_FIT_EMBED),y)
+
+fit-dtb.blob: dts/dt.dtb FORCE
+       $(call if_changed,mkimage)
+
+MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
+       -a 0 -e 0 -E \
+       $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null
+
+u-boot-fit-dtb.bin: u-boot-nodtb.bin fit-dtb.blob
+       $(call if_changed,cat)
+
+u-boot.bin: u-boot-fit-dtb.bin FORCE
+       $(call if_changed,copy)
+else ifeq ($(CONFIG_OF_SEPARATE),y)
 u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
        $(call if_changed,cat)
 
@@ -1473,7 +1487,7 @@ CLEAN_DIRS  += $(MODVERDIR) \
                        $(filter-out include, $(shell ls -1 $d 2>/dev/null))))
 
 CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
-              boot* u-boot* MLO* SPL System.map
+              boot* u-boot* MLO* SPL System.map fit-dtb.blob
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated spl tpl \