mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] optee: build common code depending on CONFIG_HAVE_OPTEE
@ 2024-03-06 19:39 Ahmad Fatoum
  2024-03-08  7:03 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-03-06 19:39 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

There's a stub for optee_set_membase(), but it's only defined when
CONFIG_HAVE_OPTEE is disabled. The out-of-line version is only linked
when there's either PBL_OPTEE or BOOTM_OPTEE, both of which select
HAVE_OPTEE.

HAVE_OPTEE can also be selected by OPTEE, which is the option for
the driver communicating with OP-TEE. This leads to a linker error
with the combination of CONFIG_OPTEE=y, CONFIG_PBL_OPTEE=n and
CONFIG_BOOTM_OPTEE=n.

Fix this by using CONFIG_HAVE_OPTEE both in header and Makefile.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index 2fc4a703c8c4..96498790b300 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -80,8 +80,7 @@ obj-$(CONFIG_BAREBOX_UPDATE_IMX_NAND_FCB) += imx-bbu-nand-fcb.o
 obj-$(CONFIG_BOOT)		+= boot.o
 obj-$(CONFIG_SERIAL_DEV_BUS)	+= serdev.o
 obj-$(CONFIG_USBGADGET_START)	+= usbgadget.o
-obj-pbl-$(CONFIG_PBL_OPTEE)	+= optee.o
-obj-$(CONFIG_BOOTM_OPTEE)	+= optee.o
+obj-pbl-$(CONFIG_HAVE_OPTEE)	+= optee.o
 obj-$(CONFIG_FASTBOOT_BASE)	+= fastboot.o
 
 ifdef CONFIG_PASSWORD
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] optee: build common code depending on CONFIG_HAVE_OPTEE
  2024-03-06 19:39 [PATCH master] optee: build common code depending on CONFIG_HAVE_OPTEE Ahmad Fatoum
@ 2024-03-08  7:03 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-03-08  7:03 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Wed, 06 Mar 2024 20:39:36 +0100, Ahmad Fatoum wrote:
> There's a stub for optee_set_membase(), but it's only defined when
> CONFIG_HAVE_OPTEE is disabled. The out-of-line version is only linked
> when there's either PBL_OPTEE or BOOTM_OPTEE, both of which select
> HAVE_OPTEE.
> 
> HAVE_OPTEE can also be selected by OPTEE, which is the option for
> the driver communicating with OP-TEE. This leads to a linker error
> with the combination of CONFIG_OPTEE=y, CONFIG_PBL_OPTEE=n and
> CONFIG_BOOTM_OPTEE=n.
> 
> [...]

Applied, thanks!

[1/1] optee: build common code depending on CONFIG_HAVE_OPTEE
      https://git.pengutronix.de/cgit/barebox/commit/?id=3f575583d798 (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-03-08  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06 19:39 [PATCH master] optee: build common code depending on CONFIG_HAVE_OPTEE Ahmad Fatoum
2024-03-08  7:03 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox