mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Guillermo Rodriguez Garcia <guille.rodriguez@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Alejandro Vazquez <avazquez.dev@gmail.com>, ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2] tf-a: new package for ARM trusted firmware A
Date: Thu, 13 Feb 2020 16:05:03 +0100	[thread overview]
Message-ID: <CABDcavZDhO7y=+a_aRPkBJSsy83QPoZGEa31St7EnSP+s-xrXw@mail.gmail.com> (raw)
In-Reply-To: <fb284ae2-7c9b-5d2f-2097-643293aae97f@pengutronix.de>

El jue., 13 feb. 2020 a las 15:44, Ahmad Fatoum
(<a.fatoum@pengutronix.de>) escribió:
>
> On 2/13/20 3:35 PM, Guillermo Rodriguez Garcia wrote:
> > El jue., 13 feb. 2020 a las 15:32, Ahmad Fatoum
> > (<a.fatoum@pengutronix.de>) escribió:
> >>
> >> On 2/13/20 3:28 PM, Ahmad Fatoum wrote:
> >>> On 2/13/20 3:25 PM, Guillermo Rodriguez Garcia wrote:
> >>>> El jue., 13 feb. 2020 a las 14:30, Ahmad Fatoum
> >>>> (<a.fatoum@pengutronix.de>) escribió:
> >>>
> >>>>>>> +# ----------------------------------------------------------------------------
> >>>>>>> +# Install
> >>>>>>> +# ----------------------------------------------------------------------------
> >>>>>>> +
> >>>>>>> +$(STATEDIR)/tf-a.install:
> >>>>>>> +       @$(call targetinfo)
> >>>>>>> +ifeq ($(TF_A_ARTIFACTS_SRC),)
> >>>>>>> +       $(warning TF_A_ARTIFACTS is empty. nothing to install.)
> >>>>>>> +else
> >>>>>>> +       @install -m644 -D \
> >>>>>>> +               --target-directory=$(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware \
> >>>>>>
> >>>>>> This doesn't look right.
> >>>>>> Shouldn't the install stage install things to the package install
> >>>>>> directory only?
> >>>>>> And, in case you want to install something somewhere else, shouldn't
> >>>>>> the actual target directory at least be configurable?
> >>>>>> For example there is no /usr/lib/firmware in my platform.
> >>>>>
> >>>>> That's only in the sysroot for use by other rules (e.g. barebox embedding TF-A
> >>>>> on some i.MX8). It's not installed in the target rootfs.
> >>>>
> >>>> Ok but that's specific to that particular configuration, and the
> >>>> choice of directory also seems to be arbitrary.
> >>>
> >>> You got to standardize on something. If this is good, a $(PTXCONF_SYSROOT_FIRMWARE)
> >>> might be a good thing to agree on.
> >>>
> >>>> Does this belong in a generic rules file ?
> >>>
> >>> How would that look like?
> >>
> >> Ah, you mean this is too specific that it shouldn't be in tf-a.make?
> >
> > Yes.
> >
> >>
> >> Well, Some Zynqs do this as well. If you are embedding OPTEE in TF-A, you will need
> >> to save optee somewhere too. It's not a niche use case. The split between install
> >
> > For cases like this (optee) you're going to need to amend tf-a.in
> > anyway because you need to add dependencies (you mentioned this
> > yourself in a previous email)
> >
> >> and target-install is just because so many vendors have their own idea of where the TF-A
> >> comes from. If most of these can be made to work by installing the file to sysroot along
> >> with the IMAGEDIR, so why not do so?
> >
> > If it really covers "most of these" use cases, then I guess it may make sense.
>
> if it's consumed by image rules, it's in IMAGEDIR. If it's consumed by "normal" rules,
> it's in the sysroot at a fixed place. Not sure if there is another use case I am missing.
>
> >
> > Still -- shouldn't it at least be optional?
>
> Why should the .install stage be behind an option, but the .targetinstall not?
> Should there be options for enabling/disabling each one of them?
>
> And why? Just to save a few hundred kilobytes extra in the _build_ directory?
> Doesn't sound like a good enough reason to me.

OK this makes sense.

But, you should at least make sure
$(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware exists before trying to
copy anything into it.

Guillermo

>
> Cheers
> Ahmad
>
> >
> > Guillermo
> >
> >>
> >> Cheers
> >> Ahmad
> >>
> >>>
> >>>
> >>> Cheers
> >>> Ahmad
> >>>
> >>
> >>
> >> --
> >> Pengutronix e.K.                           |                             |
> >> Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
> >> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> >> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> >
> >
> >
>
>
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



-- 
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2020-02-13 15:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 16:40 Ahmad Fatoum
2020-02-13 12:59 ` Guillermo Rodriguez Garcia
2020-02-13 13:30   ` Ahmad Fatoum
2020-02-13 14:25     ` Guillermo Rodriguez Garcia
2020-02-13 14:28       ` Ahmad Fatoum
2020-02-13 14:32         ` Ahmad Fatoum
2020-02-13 14:35           ` Guillermo Rodriguez Garcia
2020-02-13 14:44             ` Ahmad Fatoum
2020-02-13 14:49               ` Ahmad Fatoum
2020-02-13 15:05               ` Guillermo Rodriguez Garcia [this message]
2020-02-13 15:08                 ` Ahmad Fatoum
2020-02-13 15:24                   ` Guillermo Rodriguez Garcia
2020-02-13 15:27                     ` Ahmad Fatoum
2020-02-13 15:33                       ` Guillermo Rodriguez Garcia
2020-02-14 10:57                         ` Alex Vazquez
2020-02-14 13:19 ` Michael Olbrich
2020-02-19 10:10   ` Ahmad Fatoum
2020-02-17 16:25 ` Michael Tretter
2020-02-17 16:33   ` Guillermo Rodriguez Garcia
2020-02-18  7:35     ` Michael Olbrich
2020-02-18  9:02       ` Guillermo Rodriguez Garcia
2020-02-19  7:48         ` Michael Tretter

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='CABDcavZDhO7y=+a_aRPkBJSsy83QPoZGEa31St7EnSP+s-xrXw@mail.gmail.com' \
    --to=guille.rodriguez@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=avazquez.dev@gmail.com \
    --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