[U-Boot] [PATCH v2 8/8] armv8: K3: am654: Add support for generating build targets
Lokesh Vutla
lokeshvutla at ti.com
Mon Aug 27 10:27:15 UTC 2018
Update Makefile to generate
- tispl.bin: First stage bootloader on ARMv8 core
- u-boot.img: Second stage bootloader on ARMv8 core.
Reviewed-by: Tom Rini <trini at konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
arch/arm/mach-k3/config.mk | 19 +++++++++++++++++++
scripts/Makefile.spl | 9 +++++++++
2 files changed, 28 insertions(+)
create mode 100644 arch/arm/mach-k3/config.mk
diff --git a/arch/arm/mach-k3/config.mk b/arch/arm/mach-k3/config.mk
new file mode 100644
index 0000000000..9b86ddc715
--- /dev/null
+++ b/arch/arm/mach-k3/config.mk
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+# Lokesh Vutla <lokeshvutla at ti.com>
+
+ifdef CONFIG_SPL_BUILD
+
+ifdef CONFIG_ARM64
+SPL_ITS := u-boot-spl-k3.its
+$(SPL_ITS): FORCE
+ $(srctree)/tools/k3_fit_atf.sh \
+ $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(CONFIG_SPL_OF_LIST))) > $@
+
+ALL-y += tispl.bin
+endif
+
+else
+ALL-y += u-boot.img
+endif
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 252f13826d..e494d185e4 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -144,6 +144,10 @@ quiet_cmd_mkimage = MKIMAGE $@
cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
>$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT))
+quiet_cmd_mkfitimage = MKIMAGE $@
+cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(SPL_ITS) -E $@ \
+ $(if $(KBUILD_VERBOSE:1=), MKIMAGEOUTPUT)
+
MKIMAGEFLAGS_MLO = -T omapimage -a $(CONFIG_SPL_TEXT_BASE)
MKIMAGEFLAGS_MLO.byteswap = -T omapimage -n byteswap -a $(CONFIG_SPL_TEXT_BASE)
@@ -407,3 +411,8 @@ $(obj)/$(SPL_BIN).multidtb.fit.gz: $(obj)/$(SPL_BIN).multidtb.fit
$(obj)/$(SPL_BIN).multidtb.fit.lzo: $(obj)/$(SPL_BIN).multidtb.fit
@lzop -f9 $< > $@
+
+ifdef CONFIG_ARCH_K3
+tispl.bin: $(obj)/u-boot-spl-nodtb.bin $(SHRUNK_ARCH_DTB) $(SPL_ITS) FORCE
+ $(call if_changed,mkfitimage)
+endif
--
2.18.0
More information about the U-Boot
mailing list