mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Guillermo Rodriguez Garcia <guille.rodriguez@gmail.com>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] TF-A FIP format and U-Boot
Date: Thu, 30 Sep 2021 12:55:15 +0200	[thread overview]
Message-ID: <20210930105515.GP18190@pengutronix.de> (raw)
In-Reply-To: <CABDcava0P+Due6kCja2emEX5hR+V8fHbCuJJK2dFJRJTnwoJiQ@mail.gmail.com>

Hi,

On Wed, Sep 29, 2021 at 05:57:54PM +0200, Guillermo Rodriguez Garcia wrote:
> TF-A recently introduced the FIP ("Firmware Image Package") which is a
> format for embedding other bootloader images as payloads in a single
> archive, which is then read and processed by TF-A.
> 
> In platforms such as the stm32mp1 where TF-A is used in conjunction with
> U-Boot, U-Boot is now embedded in the FIP image as part of the TF-A package
> build.
> 
> To achieve this we added a dependency in the TF-A rule files:
> 
> select U_BOOT if TF_A_FIP
> 
> The goal is to be able to build the fip command with a command similar to
> this one:
> 
> make ARM_ARCH_MAJOR=7 ARCH=aarch32 PLAT=stm32mp1 \
>           BL33=<u-boot_path>/u-boot-nodtb.bin \
>           BL33_CFG=<u-boot_path>/u-boot.dtb \
>           BL32=<tfa_path>/bl32.bin \
>           FW_CONFIG=<tfa_path>/fw-config.dtb \
>           DTB_FILE_NAME=<fdt file name>.dtb \
>           fip
> 
> The problem is that the dependency set in the tf-a.in file only ensures
> that the install target of u-boot will run before the install target of
> tf-a, but at that time the images have not yet been copied to their final
> destination (platform/images..). Which is the proper way to work around
> this?

So, the way dependencies work in ptxdist, installing files in the
targetinstall stage in one package and then using it in a build stage in
another regular package (image packages are different here) is not
possible.
This issue has come up before and I've looked for a good solution but
changing the dependencies is unfortunately not possible.

So for such a use-case, the files must be installed in the install stage.
Note, that you cannot install the files into platform/images:
'ptxdist clean root' will remove that but only cleans the targetinstall
stages, so afterwards the files will be missing.

So I suggest the files are installed to $(<PKG>_PKGDIR)/usr/lib/<something>/
The install stage will then copy the files to sysroot-target and the next
package can find the files there.

Michael

-- 
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 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


       reply	other threads:[~2021-09-30 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABDcava0P+Due6kCja2emEX5hR+V8fHbCuJJK2dFJRJTnwoJiQ@mail.gmail.com>
2021-09-30 10:55 ` Michael Olbrich [this message]
     [not found]   ` <CABDcavbjpQu9ToNOCSh7hJp3+XLjx3V4C_C=+P-dBTg9iH_EjQ@mail.gmail.com>
2021-10-01 12:27     ` Roland Hieber

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=20210930105515.GP18190@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=guille.rodriguez@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