[PATCH] tee: Rework Makefile logic

Ilias Apalodimas ilias.apalodimas at linaro.org
Mon Sep 29 14:21:28 CEST 2025


On Fri, 26 Sept 2025 at 18:31, Tom Rini <trini at konsulko.com> wrote:
>
> 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 at konsulko.com>
> ---
> Cc: Jens Wiklander <jens.wiklander at linaro.org>
> Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> ---
>  drivers/tee/Makefile       | 4 +---
>  drivers/tee/optee/Makefile | 2 +-
>  2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tee/Makefile b/drivers/tee/Makefile
> index ff844195ae12..5bc5df0d3805 100644
> --- a/drivers/tee/Makefile
> +++ b/drivers/tee/Makefile
> @@ -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/
> diff --git a/drivers/tee/optee/Makefile b/drivers/tee/optee/Makefile
> index 068c6e7aa1bf..36ac085ef420 100644
> --- a/drivers/tee/optee/Makefile
> +++ b/drivers/tee/optee/Makefile
> @@ -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
> --
> 2.43.0
>

Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list