mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2] optee: switch optee cfg string to config file
Date: Wed, 30 Apr 2025 22:47:26 +0200	[thread overview]
Message-ID: <20250430204726.1979625-1-m.grzeschik@pengutronix.de> (raw)

The current situation of one string containing all config options in one
line is nearly impossible to handle inside of the BSPs platformconfig.
Every change in that line makes the diff heavy to parse for differences.

This patch is switching the rule to load one config file
that contains a list of set config variables instead of that
one bulky line.

Just like barebox and kernel the optee config will be located in the
platformdir and be named as optee.config as default.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

v1 -> v2:
 - made optee.config a fixed file instead of an option
 - added an warning to move the string variables to the new file format
---
 platforms/optee.in |  4 ----
 rules/optee.make   | 16 +++++++++++++++-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/platforms/optee.in b/platforms/optee.in
index 371f5b237..eaf81ce2a 100644
--- a/platforms/optee.in
+++ b/platforms/optee.in
@@ -36,9 +36,5 @@ config OPTEE_PLATFORM_FLAVOUR
 
 config OPTEE_CFG
 	string
-	prompt "OP-TEE CFG Flags"
-	help
-	  Refer to the following file for the CFG_FLAGS:
-	  https://github.com/OP-TEE/optee_os/blob/master/mk/config.mk
 
 endif
diff --git a/rules/optee.make b/rules/optee.make
index 8ddff64ec..7f624274c 100644
--- a/rules/optee.make
+++ b/rules/optee.make
@@ -26,6 +26,20 @@ OPTEE_DIR	:= $(BUILDDIR)/$(OPTEE)
 OPTEE_LICENSE	:= BSD-2-Clause AND BSD-3-Clause
 OPTEE_DEVPKG	:= NO
 
+OPTEE_CONFIG	:= $(call ptx/in-platformconfigdir, \
+			$(call remove_quotes, optee.config))
+
+ifneq ($(call remove_quotes,$(PTXCONF_OPTEE_CFG)),)
+$(OPTEE_CONFIG):
+	@echo
+	@echo "**************************************************************************************"
+	@echo "**** Please move the variables from OPTEE_CFG to optee.config file in platformdir ****"
+	@echo "**************************************************************************************"
+	@echo
+	@echo
+	@exit 1
+endif
+
 # ----------------------------------------------------------------------------
 # Prepare
 # ----------------------------------------------------------------------------
@@ -43,7 +57,7 @@ OPTEE_MAKE_ENV += \
 	CROSS_COMPILE=$(COMPILER_PREFIX) \
 	$(call ptx/ifdef,PTXCONF_ARCH_ARM64,CFG_ARM64_core=y) \
 	PLATFORM=$(OPTEE_PLATFORM)$(OPTEE_PLATFORM_FLAVOUR) \
-	$(call remove_quotes,$(PTXCONF_OPTEE_CFG))
+	CFG_OPTEE_CONFIG=$(OPTEE_CONFIG)
 
 # ----------------------------------------------------------------------------
 # Install
-- 
2.39.5




                 reply	other threads:[~2025-04-30 20:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250430204726.1979625-1-m.grzeschik@pengutronix.de \
    --to=m.grzeschik@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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