aboutsummaryrefslogtreecommitdiff
path: root/scripts/Makefile.spl
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2018-11-15 10:07:49 +0800
committerTom Rini <trini@konsulko.com>2018-11-28 23:04:43 -0500
commit3b975a147c3c028b95312824189d7489eea54984 (patch)
treea89bfda046eb9719411aee19fb479f1f8271b5d0 /scripts/Makefile.spl
parent67cf22cbdef8c62ffa28b4caf935825fe410c68d (diff)
downloadu-boot-3b975a147c3c028b95312824189d7489eea54984.zip
u-boot-3b975a147c3c028b95312824189d7489eea54984.tar.gz
u-boot-3b975a147c3c028b95312824189d7489eea54984.tar.bz2
tools: MediaTek: add MTK boot header generation to mkimage
This patch adds support for MTK boot image generation. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts/Makefile.spl')
-rw-r--r--scripts/Makefile.spl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 7416abe..22bd8f7 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -219,6 +219,8 @@ ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-spl.bin
ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin
ALL-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin
+ALL-$(CONFIG_ARCH_MEDIATEK) += $(obj)/u-boot-spl-mtk.bin
+
all: $(ALL-y)
quiet_cmd_cat = CAT $@
@@ -349,6 +351,15 @@ cmd_sunxi_spl_image_builder = $(objtree)/tools/sunxi-spl-image-builder \
$(obj)/sunxi-spl-with-ecc.bin: $(obj)/sunxi-spl.bin
$(call if_changed,sunxi_spl_image_builder)
+
+# MediaTek's specific SPL build
+MKIMAGEFLAGS_u-boot-spl-mtk.bin = -T mtk_image \
+ -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) \
+ -n "$(patsubst "%",%,$(CONFIG_MTK_BROM_HEADER_INFO))"
+
+$(obj)/u-boot-spl-mtk.bin: $(obj)/u-boot-spl.bin FORCE
+ $(call if_changed,mkimage)
+
# Rule to link u-boot-spl
# May be overridden by arch/$(ARCH)/config.mk
quiet_cmd_u-boot-spl ?= LD $@