Skip to contentSkip to conversation

tee: Rework Makefile logic

PATCH In review Tom Rini 2 participants 2 messages Sep 26, 2025 – Sep 29, 2025

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 tee: Rework Makefile logic

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.

---
Cc: Jens Wiklander <[email protected]>
Cc: Ilias Apalodimas <[email protected]>

---
 drivers/tee/Makefile       | 4 +---
 drivers/tee/optee/Makefile | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/tee/Makefile +1 -3
index ff844195ae12..5bc5df0d3805 100644
@@ -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/
drivers/tee/optee/Makefile +1 -1
index 068c6e7aa1bf..36ac085ef420 100644
@@ -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
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 45 lines · Tom Rini

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.

---
Cc: Jens Wiklander <[email protected]>
Cc: Ilias Apalodimas <[email protected]>

---
 drivers/tee/Makefile       | 4 +---
 drivers/tee/optee/Makefile | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/tee/Makefile +1 -3
index ff844195ae12..5bc5df0d3805 100644
@@ -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/
drivers/tee/optee/Makefile +1 -2
index 068c6e7aa1bf..36ac085ef420 100644
@@ -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
--
Quoted 2 lines

2.43.0