From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 17 Jun 2025 09:46:12 +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 1uRR1I-008CLx-1I for lore@lore.pengutronix.de; Tue, 17 Jun 2025 09:46:12 +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 1uRR1H-0002Xt-Pi; Tue, 17 Jun 2025 09:46:11 +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 1uRR1C-0002Xf-FQ; Tue, 17 Jun 2025 09:46:06 +0200 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) 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 1uRR1C-003wBU-0x; Tue, 17 Jun 2025 09:46:06 +0200 Received: from mol by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uRR1C-001NMl-0c; Tue, 17 Jun 2025 09:46:06 +0200 Date: Tue, 17 Jun 2025 09:46:06 +0200 From: Michael Olbrich To: Lars Schmidt , distrokit@pengutronix.de Message-ID: <20250617074606.GB2589455@pengutronix.de> Mail-Followup-To: Lars Schmidt , distrokit@pengutronix.de References: <20250523081049.1693633-1-l.schmidt@pengutronix.de> <20250523081049.1693633-6-l.schmidt@pengutronix.de> <20250523-oxidation-impatient-e4414c0099c8@thorsis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250523-oxidation-impatient-e4414c0099c8@thorsis.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-IRC: #ptxdist @freenode Subject: Re: [DistroKit] [PATCH 05/12] tf-a: unify handling of firmware parts for barebox X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Fri, May 23, 2025 at 10:49:04AM +0200, Alexander Dahl wrote: > Hello Lars, > > Am Fri, May 23, 2025 at 10:10:42AM +0200 schrieb Lars Schmidt: > > Technically the firmware parts are coming out of tf-a. > > This moves the handling of the extra files for barebox all to > > the same place and makes maintenance easier. > > I also think this does not belong to the firmware-imx package, but to > a separate package. I sent patches for this last year as part of a > different series, but those were dropped without further explanation. > See <20240425080303.171897-1-ada@thorsis.com> ff. for reference. > > (I did not resend the not-merged parts of that series however, maybe I > should have done that.) > > FWIW, I think this should go into an extension of the barebox package, > because it is barebox who wants to use those files, not the task of > the tf-a package to distribute it to all packages requiring this. > > We have a bsp layer on top of DistroKit building U-Boot which also > needs artifacts built by the tf-a package. Extend tf-a for U-Boot > too? I'd say no, but instead create a package extension for U-Boot so > both barebox and U-Boot can inject files from tf-a. > > Maybe I should just resend those remaining patches for better > understanding what I mean. The name of the Makefile does not really matter for this. It _only_ defines the include order. So naming it it barebox.tf-a.make (or whatever) does not help for your u-boot use-case. And all of this just modifies a variable. If barebox is disabled, then it's just not used. And there is a benefit of adding this to the tf-a package: Wen can reuse variables from that package: > > diff --git a/configs/platform-v8a/rules/tf-a.barebox.make b/configs/platform-v8a/rules/tf-a.barebox.make > > index 4c61af2..6e22cba 100644 > > --- a/configs/platform-v8a/rules/tf-a.barebox.make > > +++ b/configs/platform-v8a/rules/tf-a.barebox.make > > @@ -2,4 +2,19 @@ ifdef PTXCONF_TF_A > > ifneq ($(filter k3,$(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))),) > > BAREBOX_INJECT_FILES += k3-bl31.bin:firmware/k3-bl31.bin > > endif > > +ifneq ($(filter imx8mq,$(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))),) > > +BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin > > +endif ifneq ($(filter imx8mq,$(TF_A_PLATFORMS)),) BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin endif Or maybe even replace all of this with: BAREBOX_INJECT_FILES += $(foreach plat,$(TF_A_PLATFORMS), \ $(plat)-bl31.bin:firmware/$(plat)-bl31.bin) Michael > > +ifneq ($(filter imx8mm,$(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))),) > > +BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin > > +endif > > +ifneq ($(filter imx8mn,$(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))),) > > +BAREBOX_INJECT_FILES += imx8mn-bl31.bin:firmware/imx8mn-bl31.bin > > +endif > > +ifneq ($(filter imx8mp,$(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))),) > > +BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin > > +endif > > +ifneq ($(filter imx93,$(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))),) > > +BAREBOX_INJECT_FILES += imx93-bl31.bin:firmware/imx93-bl31.bin > > +endif > > endif > > \ No newline at end of file > > -- > > 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 |