From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/8] armv8: K3: am654: Introduce FIT generator script
Date: Tue, 21 Aug 2018 20:00:54 +0530 [thread overview]
Message-ID: <20180821143055.29012-8-lokeshvutla@ti.com> (raw)
In-Reply-To: <20180821143055.29012-1-lokeshvutla@ti.com>
Add a script that is capable of generating a FIT image
source file that combines ATF, SPL(64 bit) and DT.
This combined image is used by R5 SPL and start ATF
on ARMv8 core.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
tools/k3/k3_fit_atf.sh | 98 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
create mode 100755 tools/k3/k3_fit_atf.sh
diff --git a/tools/k3/k3_fit_atf.sh b/tools/k3/k3_fit_atf.sh
new file mode 100755
index 0000000000..ef84e3d182
--- /dev/null
+++ b/tools/k3/k3_fit_atf.sh
@@ -0,0 +1,98 @@
+#!/bin/sh
+#
+# script to generate FIT image source for K3 Family boards with
+# ATF, OPTEE, SPL and multiple device trees (given on the command line).
+# Inspired from board/sunxi/mksunxi_fit_atf.sh
+#
+# usage: $0 <dt_name> [<dt_name> [<dt_name] ...]
+
+[ -z "$ATF" ] && ATF="bl31.bin"
+
+if [ ! -f $ATF ]; then
+ echo "WARNING ATF file $ATF NOT found, resulting binary is non-functional" >&2
+ ATF=/dev/null
+fi
+
+[ -z "$TEE" ] && TEE="bl32.bin"
+
+if [ ! -f $TEE ]; then
+ echo "WARNING OPTEE file $TEE NOT found, resulting might be non-functional" >&2
+ TEE=/dev/null
+fi
+
+cat << __HEADER_EOF
+/dts-v1/;
+
+/ {
+ description = "Configuration to load ATF and SPL";
+ #address-cells = <1>;
+
+ images {
+ atf {
+ description = "ARM Trusted Firmware";
+ data = /incbin/("$ATF");
+ type = "firmware";
+ arch = "arm64";
+ compression = "none";
+ os = "arm-trusted-firmware";
+ load = <0x70000000>;
+ entry = <0x70000000>;
+ };
+ tee {
+ description = "OPTEE";
+ data = /incbin/("$TEE");
+ type = "tee";
+ arch = "arm64";
+ compression = "none";
+ os = "tee";
+ load = <0x9e800000>;
+ entry = <0x9e800000>;
+ };
+ spl {
+ description = "SPL (64-bit)";
+ data = /incbin/("spl/u-boot-spl-nodtb.bin");
+ type = "standalone";
+ os = "U-Boot";
+ arch = "arm64";
+ compression = "none";
+ load = <0x80080000>;
+ entry = <0x80080000>;
+ };
+__HEADER_EOF
+
+for dtname in $*
+do
+ cat << __FDT_IMAGE_EOF
+ $(basename $dtname) {
+ description = "$(basename $dtname .dtb)";
+ data = /incbin/("$dtname");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ };
+__FDT_IMAGE_EOF
+done
+
+cat << __CONF_HEADER_EOF
+ };
+ configurations {
+ default = "$(basename $1)";
+
+__CONF_HEADER_EOF
+
+for dtname in $*
+do
+ cat << __CONF_SECTION_EOF
+ $(basename $dtname) {
+ description = "$(basename $dtname .dtb)";
+ firmware = "atf";
+ loadables = "tee", "spl";
+ fdt = "$(basename $dtname)";
+ };
+__CONF_SECTION_EOF
+done
+
+cat << __ITS_EOF
+ };
+};
+__ITS_EOF
--
2.18.0
next prev parent reply other threads:[~2018-08-21 14:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-21 14:30 [U-Boot] [PATCH 0/8] [1/3] Initial support Texas Instrument's AM654 Platform Lokesh Vutla
2018-08-21 14:30 ` [U-Boot] [PATCH 1/8] arm: K3: Add initial support for TI's K3 generation of SoCs Lokesh Vutla
2018-08-24 14:10 ` Tom Rini
2018-08-24 14:51 ` Lokesh Vutla
2018-08-24 14:55 ` Tom Rini
2018-08-24 15:14 ` Lokesh Vutla
2018-08-24 15:21 ` Tom Rini
2018-08-21 14:30 ` [U-Boot] [PATCH 2/8] arm: K3: Add support for AM654 SoC definition Lokesh Vutla
2018-08-24 14:11 ` Tom Rini
2018-08-24 14:58 ` Lokesh Vutla
2018-08-24 15:01 ` Tom Rini
2018-08-21 14:30 ` [U-Boot] [PATCH 3/8] arm: K3: Update _start instruction Lokesh Vutla
2018-08-21 14:30 ` [U-Boot] [PATCH 4/8] arm: K3: am654: Add support for boot device detection Lokesh Vutla
2018-08-24 14:11 ` Tom Rini
2018-08-24 14:58 ` Lokesh Vutla
2018-08-21 14:30 ` [U-Boot] [PATCH 5/8] arm: K3: am654: Unlock control module registers during init Lokesh Vutla
2018-08-24 14:11 ` Tom Rini
2018-08-21 14:30 ` [U-Boot] [PATCH 6/8] armv8: K3: am654: Add custom MMU support Lokesh Vutla
2018-08-24 14:11 ` Tom Rini
2018-08-21 14:30 ` Lokesh Vutla [this message]
2018-08-24 14:11 ` [U-Boot] [PATCH 7/8] armv8: K3: am654: Introduce FIT generator script Tom Rini
2018-08-24 14:59 ` Lokesh Vutla
2018-08-21 14:30 ` [U-Boot] [PATCH 8/8] armv8: K3: am654: Add support for generating build targets Lokesh Vutla
2018-08-24 14:11 ` Tom Rini
2018-08-26 6:11 ` [U-Boot] [PATCH 0/8] [1/3] Initial support Texas Instrument's AM654 Platform Alexander Graf
2018-08-27 9:31 ` Lokesh Vutla
2018-08-27 9:52 ` Alexander Graf
2018-08-27 10:07 ` Lokesh Vutla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180821143055.29012-8-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox