* [PATCH master] optee: fix i.MX8M link error when loading OP-TEE without CONFIG_TEE
@ 2024-12-14 8:48 Ahmad Fatoum
2024-12-16 7:17 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-12-14 8:48 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH master] optee: fix i.MX8M link error when loading OP-TEE without CONFIG_TEE
2024-12-14 8:48 [PATCH master] optee: fix i.MX8M link error when loading OP-TEE without CONFIG_TEE Ahmad Fatoum
@ 2024-12-16 7:17 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-12-16 7:17 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Sat, 14 Dec 2024 09:48:34 +0100, Ahmad Fatoum wrote:
> 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:
>
> [...]
Applied, thanks!
[1/1] optee: fix i.MX8M link error when loading OP-TEE without CONFIG_TEE
https://git.pengutronix.de/cgit/barebox/commit/?id=9c006bbd0582 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-16 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-14 8:48 [PATCH master] optee: fix i.MX8M link error when loading OP-TEE without CONFIG_TEE Ahmad Fatoum
2024-12-16 7:17 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox