ipq806x: Creates u-boot.mbn by adding mbn header
Adds support to add mbn header to u-boot.bin as mbn header is needed by
sbl of all boards with ipq806x soc. A python script at tools/mkheader.py
is included which creates u-boot.mbn from u-boot.bin.
Change-Id: I070d82d9af0ed772cd4970b8fde152a8e3068823
Signed-off-by: Gokul Sriram Palanisamy <gpalan@codeaurora.org>
diff --git a/Makefile b/Makefile
index 2d1ab2f..e2fe97d 100644
--- a/Makefile
+++ b/Makefile
@@ -771,6 +771,7 @@
ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
endif
+ALL-$(CONFIG_MBN_HEADER) += u-boot.mbn
# enable combined SPL/u-boot/dtb rules for tegra
ifneq ($(CONFIG_TEGRA),)
ifeq ($(CONFIG_SPL),y)
@@ -877,6 +878,12 @@
$(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE))
$(BOARD_SIZE_CHECK)
+quiet_cmd_mkheader = MKHEADER $@
+cmd_mkheader = $(PYTHON) tools/mkheader.py $(CONFIG_SYS_TEXT_BASE) $(CONFIG_IPQ_APPSBL_IMG_TYPE) $< $@
+
+u-boot.mbn: u-boot.bin
+ $(call if_changed,mkheader)
+
u-boot.ldr: u-boot
$(CREATE_LDR_ENV)
$(LDR) -T $(CONFIG_CPU) -c $@ $< $(LDR_FLAGS)