dts: combine dtb in u-boot ELF
u-boot and dtb are seperate images. This patch combines them as
single ELF image.
Change-Id: Ib3c72c26844ffd4fd8489d0595c243a15434802e
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ed30bf5..ac1a0ff 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -283,6 +283,24 @@
$(obj)/%.dtb.S: $(obj)/%.dtb
$(call cmd,dt_S_dtb)
+# DTB_COMB
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the output of the device tree compiler
+quiet_cmd_dt_comb_S_dtb= DTB_COMB $@
+# Modified for U-Boot Combined ELF
+cmd_dt_comb_S_dtb= \
+( \
+ echo '.section .dtb.combine,"a"'; \
+ echo '.balign 16'; \
+ echo '.incbin "$<" '; \
+ echo '.balign 16'; \
+) > $@
+
+$(obj)/%_comb.dtb.S: $(obj)/%.dtb
+ $(call cmd,dt_comb_S_dtb)
+
+
quiet_cmd_dtc = DTC $@
# Modified for U-Boot
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \