DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Lars Schmidt <l.schmidt@pengutronix.de>, distrokit@pengutronix.de
Subject: Re: [DistroKit] [PATCH 05/12] tf-a: unify handling of firmware parts for barebox
Date: Tue, 17 Jun 2025 09:46:06 +0200	[thread overview]
Message-ID: <20250617074606.GB2589455@pengutronix.de> (raw)
In-Reply-To: <20250523-oxidation-impatient-e4414c0099c8@thorsis.com>

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 |



  reply	other threads:[~2025-06-17  7:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23  8:10 [DistroKit] [PATCH 00/12] Add beagleplay support to DistroKit Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 01/12] v8a: barebox: bump version v2025.03.0 -> v2025.05.0 Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 02/12] beagleplay: tf-a: needs adaption for k3 boards Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 03/12] tf-a: k3 needs an additional compile argument Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 04/12] beagleplay: k3: barebox needs part of tf-a firmware Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 05/12] tf-a: unify handling of firmware parts for barebox Lars Schmidt
2025-05-23  8:49   ` Alexander Dahl
2025-06-17  7:46     ` Michael Olbrich [this message]
2025-05-23  8:10 ` [DistroKit] [PATCH 06/12] beagleplay: firmware-ti: initial package Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 07/12] beagleplay: barebox: first stage bootloader for Cortex-R5 Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 08/12] beagleplay: fipimage: add fip image for K3 Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 09/12] beagleplay: add full image including bootloaders and rootfs Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 10/12] beagleplay: add initial kernel configuration Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 11/12] beagleplay: barebox: update config for beagleplay Lars Schmidt
2025-05-23  8:10 ` [DistroKit] [PATCH 12/12] beagleplay: add initial platform config Lars Schmidt

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=20250617074606.GB2589455@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=l.schmidt@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