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@xxxxxxxxxxxxxx> --- 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