All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de, git@xilinx.com
Cc: Michal Simek <monstr@monstr.eu>
Subject: [PATCH 09/10] xilinx: zynqmp: Generate different u-boot.itb for MULTI_DTB_FIT
Date: Thu, 19 Aug 2021 13:19:48 +0200	[thread overview]
Message-ID: <fa92b103402a26699eaac519a4e45ed9648fe30f.1629371983.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1629371983.git.michal.simek@xilinx.com>

When MULTI_DTB_FIT is enabled fit-dtb.blob fit image is created which
contain all DTBs listed by CONFIG_OF_LIST. And with DTB_RELESELECT there is
a need to handle it as one file with DTBs in it not as separate DTBs in
u-boot.its/itb.
That's why extend mkimage_fit_atf.sh to generate u-boot.itb correctly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/mach-zynqmp/mkimage_fit_atf.sh | 47 +++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/arch/arm/mach-zynqmp/mkimage_fit_atf.sh b/arch/arm/mach-zynqmp/mkimage_fit_atf.sh
index 592be7f67066..37106909f1ee 100755
--- a/arch/arm/mach-zynqmp/mkimage_fit_atf.sh
+++ b/arch/arm/mach-zynqmp/mkimage_fit_atf.sh
@@ -111,6 +111,51 @@ cat << __TEE
 __TEE
 fi
 
+MULTI_DTB=`awk '/CONFIG_MULTI_DTB_FIT / { print $3 }' include/generated/autoconf.h`
+
+if [ $MULTI_DTB -eq 1 ]; then
+	cat << __FDT_IMAGE_EOF
+		fdt_1 {
+			description = "Multi DTB fit image";
+			data = /incbin/("fit-dtb.blob");
+			type = "flat_dt";
+			arch = "arm64";
+			compression = "none";
+			$DTB_LOAD
+			hash {
+				algo = "md5";
+			};
+		};
+	};
+	configurations {
+		default = "config_1";
+__FDT_IMAGE_EOF
+
+if [ ! -f $BL31 ]; then
+cat << __CONF_SECTION1_EOF
+		config_1 {
+			description = "Multi DTB without TF-A";
+			firmware = "uboot";
+			loadables = "fdt_1";
+		};
+__CONF_SECTION1_EOF
+else
+cat << __CONF_SECTION1_EOF
+		config_1 {
+			description = "Multi DTB with TF-A";
+			firmware = "atf";
+			loadables = "uboot", "fdt_1";
+		};
+__CONF_SECTION1_EOF
+fi
+
+cat << __ITS_EOF
+	};
+};
+__ITS_EOF
+
+else
+
 DEFAULT=1
 cnt=1
 for dtname in $DT
@@ -181,3 +226,5 @@ cat << __ITS_EOF
 	};
 };
 __ITS_EOF
+
+fi
-- 
2.32.0


  parent reply	other threads:[~2021-08-19 11:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 11:19 [PATCH 00/10] xilinx: Add support for DTB reselection Michal Simek
2021-08-19 11:19 ` [PATCH 01/10] xilinx: fru: Replace spaces with \0 in detected name Michal Simek
2021-08-19 11:19 ` [PATCH 02/10] xilinx: Use variable for passing board_name Michal Simek
2021-08-19 11:19 ` [PATCH 03/10] xilinx: common: Change board_info[] handling Michal Simek
2021-08-19 11:19 ` [PATCH 04/10] xilinx: common: Free allocated structure Michal Simek
2021-08-19 11:19 ` [PATCH 05/10] xilinx: Add support for generic board detection Michal Simek
2021-08-19 11:19 ` [PATCH 06/10] xilinx: zynqmp: Check that DT is 64bit aligned Michal Simek
2021-08-19 11:19 ` [PATCH 07/10] Makefile: Align fit-dtb.blob and u-boot.itb by 64bits for 64bit systems Michal Simek
2021-08-19 15:56   ` Andre Przywara
2021-08-19 16:01     ` Michal Simek
2021-08-19 16:18       ` Tom Rini
2021-08-19 16:31         ` Michal Simek
2021-08-19 16:44           ` Tom Rini
2021-08-19 11:19 ` [PATCH 08/10] arm64: dts: Make sure that all DTBs are 64bit aligned " Michal Simek
2021-08-19 16:10   ` Andre Przywara
2021-08-19 16:34     ` Michal Simek
2021-08-19 11:19 ` Michal Simek [this message]
2021-08-19 11:19 ` [PATCH 10/10] xilinx: common: Enabling generic function for DT reselection Michal Simek
2021-08-23  7:37 [PATCH 00/10] xilinx: Add support for DTB reselection Michal Simek
2021-08-23  7:37 ` [PATCH 09/10] xilinx: zynqmp: Generate different u-boot.itb for MULTI_DTB_FIT Michal Simek

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=fa92b103402a26699eaac519a4e45ed9648fe30f.1629371983.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=git@xilinx.com \
    --cc=monstr@monstr.eu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.