tee: Rework Makefile logic
authorTom Rini <trini@konsulko.com>
Fri, 26 Sep 2025 15:31:44 +0000 (09:31 -0600)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 14 Oct 2025 07:42:27 +0000 (10:42 +0300)
The intention of how this Makefile was written was to allow for sandbox
to build and test drivers still while otherwise requiring OPTEE to be
enabled. This however didn't work quite right in practice as sandbox
could enable some drivers which would then fail to link. Rework things
such that sandbox will also traverse the optee directory when
SANDBOX_TEE is enabled, but only build one of the optee-specific files
when OPTEE is enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/tee/Makefile
drivers/tee/optee/Makefile

index ff84419..5bc5df0 100644 (file)
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 obj-y += tee-uclass.o
-obj-$(CONFIG_SANDBOX) += sandbox.o
-obj-$(CONFIG_OPTEE_TA_RPC_TEST) += optee/supplicant.o
-obj-$(CONFIG_OPTEE_TA_RPC_TEST) += optee/i2c.o
+obj-$(CONFIG_SANDBOX_TEE) += sandbox.o optee/
 obj-$(CONFIG_OPTEE) += optee/
 obj-y += broadcom/
index 068c6e7..36ac085 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-obj-y += core.o
+obj-$(CONFIG_OPTEE) += core.o
 obj-y += supplicant.o
 obj-$(CONFIG_DM_I2C) += i2c.o
 obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o