From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 09 May 2025 10:34:44 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uDJBs-003jr8-1i for lore@lore.pengutronix.de; Fri, 09 May 2025 10:34:44 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uDJBs-0000xA-6V; Fri, 09 May 2025 10:34:44 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uDJBc-0000w7-T3; Fri, 09 May 2025 10:34:28 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uDJBc-001rNj-2J; Fri, 09 May 2025 10:34:28 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uDJBc-005IG8-28; Fri, 09 May 2025 10:34:28 +0200 Date: Fri, 9 May 2025 10:34:28 +0200 From: Michael Olbrich To: Michael Grzeschik Message-ID: References: <20250430204726.1979625-1-m.grzeschik@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250430204726.1979625-1-m.grzeschik@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH v2] optee: switch optee cfg string to config file X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Wed, Apr 30, 2025 at 10:47:26PM +0200, Michael Grzeschik wrote: > 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 > > 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" If you remove the prompt, then the variable will be removed with the next oldconfig. Change the prompt and help text to tell what needs to be done. > - 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)) remove_quotes is no longer needed. > + > +ifneq ($(call remove_quotes,$(PTXCONF_OPTEE_CFG)),) > +$(OPTEE_CONFIG): This looks wrong: The error only happens if the legacy option is set and no config file is found. For the old options: Use ptx/error to print the message. If the config is really optional, then use $(if $(wildcard $(OPTEE_CONFIG)),CFG_OPTEE_CONFIG=$(OPTEE_CONFIG)) (untested) to only add the option when the file is actually there. To make it clear that it is optional. If it's always needed use 'ifdef PTXCONF_OPTEE' to guard the target for the config, like e.g. in kernel.make. Michael > + @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 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |