mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] optee: fix i.MX8M link error when loading OP-TEE without CONFIG_TEE
Date: Sat, 14 Dec 2024 09:48:34 +0100	[thread overview]
Message-ID: <20241214084834.959213-1-a.fatoum@pengutronix.de> (raw)

CONFIG_TEE is not required for barebox to load OP-TEE, just for
communicating with it.

The Kconfig option for OF_FIXUP_OPTEE, which guards a symbol that is
used by imx8_soc_imx8m_init() whenever CONFIG_PBL_OPTEE is defined is
made conditional on CONFIG_TEE though, leading to alink error whenever
CONFIG_TEE is undefined:

  ld: ./drivers/soc/imx/soc-imx8m.c:219: undefined reference to
      `of_optee_fixup'

Fix this by making the symbol not depend on CONFIG_TEE again.

Fixes: 56535d9cb0fc ("optee: make OP-TEE OF fixup ARM-specific")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/tee/Kconfig       | 4 ----
 drivers/tee/optee/Kconfig | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/tee/Kconfig b/drivers/tee/Kconfig
index 6644ebce49d5..aa15f5e9cfb7 100644
--- a/drivers/tee/Kconfig
+++ b/drivers/tee/Kconfig
@@ -10,8 +10,4 @@ menuconfig TEE
 	  secure co-processor etc. See also:
 	  https://en.wikipedia.org/wiki/Trusted_execution_environment
 
-if TEE
-
 source "drivers/tee/optee/Kconfig"
-
-endif
diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
index 179b7c2ba8f3..045be3cca4e5 100644
--- a/drivers/tee/optee/Kconfig
+++ b/drivers/tee/optee/Kconfig
@@ -1,5 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 # OP-TEE Trusted Execution Environment Configuration
+
+if TEE
+
 config OPTEE
 	tristate "OP-TEE communication"
 	select HAVE_OPTEE
@@ -28,6 +31,8 @@ config OPTEE_DEVFS
 	  but it's useful for compiling libteeclient + optee_tests for
 	  use inside barebox to verify proper operation of CONFIG_OPTEE.
 
+endif
+
 config OF_FIXUP_OPTEE
 	def_bool y
 	depends on HAVE_OPTEE && ARM
-- 
2.39.5




             reply	other threads:[~2024-12-14  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-14  8:48 Ahmad Fatoum [this message]
2024-12-16  7:17 ` 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=20241214084834.959213-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@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