mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] optee: build common code depending on CONFIG_HAVE_OPTEE
Date: Wed,  6 Mar 2024 20:39:36 +0100	[thread overview]
Message-ID: <20240306193936.712501-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2024-03-06 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 19:39 Ahmad Fatoum [this message]
2024-03-08  7:03 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240306193936.712501-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox