Re: [ptxdist] TF-A FIP format and U-Boot

2021-10-04 Thread Guillermo Rodriguez Garcia
Hi,

El vie, 1 oct 2021 a las 14:27, Roland Hieber ()
escribió:

> On Thu, Sep 30, 2021 at 02:10:15PM +0200, Guillermo Rodriguez Garcia wrote:
> > > 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
> > > $(_PKGDIR)/usr/lib//
> > > The install stage will then copy the files to sysroot-target and the
> next
> > > package can find the files there.
> > >
> >
> > Uhm, the files themselves are not needed in the target fs; they are only
> > required as intermediate files to build the FIP image.
> > Should I still copy them to sysroot-target?
>
> Yes. sysroot-target is not the contents of the image yet, but only the
> staging area where target packages install their files. This is done
> because in the install stage PTXdist uses the package's build system to
> install files, which sometimes installs many more files that you maybe
> don't want in your target. In the targetinstall stage you have to pick
> them from sysroot-target into the image explicitly with the
> $(call install_*) macros.
>

I see. Thank you for the clarification!

Guillermo
___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] TF-A FIP format and U-Boot

2021-10-01 Thread Roland Hieber
On Thu, Sep 30, 2021 at 02:10:15PM +0200, Guillermo Rodriguez Garcia wrote:
> > 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
> > $(_PKGDIR)/usr/lib//
> > The install stage will then copy the files to sysroot-target and the next
> > package can find the files there.
> >
> 
> Uhm, the files themselves are not needed in the target fs; they are only
> required as intermediate files to build the FIP image.
> Should I still copy them to sysroot-target?

Yes. sysroot-target is not the contents of the image yet, but only the
staging area where target packages install their files. This is done
because in the install stage PTXdist uses the package's build system to
install files, which sometimes installs many more files that you maybe
don't want in your target. In the targetinstall stage you have to pick
them from sysroot-target into the image explicitly with the
$(call install_*) macros.

 - Roland

-- 
Roland Hieber, Pengutronix e.K.  | r.hie...@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany| Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917- |

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


Re: [ptxdist] TF-A FIP format and U-Boot

2021-09-30 Thread Guillermo Rodriguez Garcia
Hi Michael,

El jue, 30 sept 2021 a las 12:55, Michael Olbrich ()
escribió:

> 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-nodtb.bin \
> >   BL33_CFG=/u-boot.dtb \
> >   BL32=/bl32.bin \
> >   FW_CONFIG=/fw-config.dtb \
> >   DTB_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.
>

I understand.


>
> 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
> $(_PKGDIR)/usr/lib//
> The install stage will then copy the files to sysroot-target and the next
> package can find the files there.
>

Uhm, the files themselves are not needed in the target fs; they are only
required as intermediate files to build the FIP image.
Should I still copy them to sysroot-target?

Thanks,

Guillermo
___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] TF-A FIP format and U-Boot

2021-09-30 Thread Michael Olbrich
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-nodtb.bin \
>   BL33_CFG=/u-boot.dtb \
>   BL32=/bl32.bin \
>   FW_CONFIG=/fw-config.dtb \
>   DTB_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 $(_PKGDIR)/usr/lib//
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- |

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


[ptxdist] TF-A FIP format and U-Boot

2021-09-29 Thread Guillermo Rodriguez Garcia
Hi all,

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-nodtb.bin \
  BL33_CFG=/u-boot.dtb \
  BL32=/bl32.bin \
  FW_CONFIG=/fw-config.dtb \
  DTB_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?

Thanks,
-- 
Guillermo Rodriguez Garcia
guille.rodrig...@gmail.com
___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de