mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 3/4] ARM: k3: am62l: Add dedicated config option for OP-TEE
Date: Tue, 02 Dec 2025 16:58:27 +0100	[thread overview]
Message-ID: <20251202-k3-deps-v1-3-68404d3b2c70@pengutronix.de> (raw)
In-Reply-To: <20251202-k3-deps-v1-0-68404d3b2c70@pengutronix.de>

Until now we compiled in the OP-TEE binary into the AM62l images when it
exists. The when-it-exists part makes it hard to add a dependeny on the
file, so add a dedicated config option for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 firmware/Kconfig   | 4 ++++
 images/Makefile.k3 | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/firmware/Kconfig b/firmware/Kconfig
index a97a1e0dd324fa2ff95a0e77d1057bc45aa1ad07..3aeba3fc35e1142b33489b52a24e5e5532684c8f 100644
--- a/firmware/Kconfig
+++ b/firmware/Kconfig
@@ -116,6 +116,10 @@ config FIRMWARE_LS1028A_ATF
 config FIRMWARE_LS1046A_ATF
 	bool
 
+config FIRMWARE_K3_AM62L_OPTEE
+	bool "install OP-TEE on K3 AM62L boards"
+	depends on MACH_AM62LX
+
 config HAVE_FIRMWARE_VERIFY_NEXT_IMAGE
 	bool
 
diff --git a/images/Makefile.k3 b/images/Makefile.k3
index e0f79f1439f1340a09c09d236b5d7470caa4ad77..caaca1fbc9a1e90921ba873d61c7627d1e8f5e19 100644
--- a/images/Makefile.k3
+++ b/images/Makefile.k3
@@ -95,10 +95,14 @@ quiet_cmd_k3_am62x_image = K3_am62x_IMG   $@
 			$(DMDATA_am625):17:16:0:43c3a800			\
 			--key "$(KEY_$(@F))" --out $@
 
+ifdef CONFIG_FIRMWARE_K3_AM62L_OPTEE
+AM62L_TIBOOT3_OPTEE = $(FIRMWARE_DIR)/am62lx-bl32.bin
+endif
+
 quiet_cmd_k3_am62lx_image = K3_am62lx_IMG   $@
       cmd_k3_am62lx_image = \
-		if [ -e "$(FIRMWARE_DIR)/am62lx-bl32.bin" ]; then		\
-			optee=$(FIRMWARE_DIR)/am62lx-bl32.bin:17:16:0:80200000;	\
+		if [ -n "$(AM62L_TIBOOT3_OPTEE)" ]; then			\
+			optee=$(AM62L_TIBOOT3_OPTEE):17:16:0:80200000;		\
 		fi;								\
 										\
 		$(srctree)/scripts/k3img					\

-- 
2.47.3




  parent reply	other threads:[~2025-12-02 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 15:58 [PATCH 0/4] ARM: k3: fix k3img dependencies Sascha Hauer
2025-12-02 15:58 ` [PATCH 1/4] ARM: K3: am62l: don't put sysfwdata into 1st stage image Sascha Hauer
2025-12-02 15:58 ` [PATCH 2/4] ARM: k3: make some firmware files SoC specific Sascha Hauer
2025-12-02 15:58 ` Sascha Hauer [this message]
2025-12-02 15:58 ` [PATCH 4/4] ARM: k3: am62l: fix dependencies on k3img input files Sascha Hauer
2025-12-03 11:56 ` [PATCH 0/4] ARM: k3: fix k3img dependencies Sascha Hauer

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=20251202-k3-deps-v1-3-68404d3b2c70@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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