From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 30 Sep 2021 12:55:37 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mVtiz-0006Jq-8b for lore@lore.pengutronix.de; Thu, 30 Sep 2021 12:55:37 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mVtiy-0006i9-TC; Thu, 30 Sep 2021 12:55:36 +0200 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVtid-0006hm-Sa; Thu, 30 Sep 2021 12:55:15 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mVtid-0007xM-7o; Thu, 30 Sep 2021 12:55:15 +0200 Date: Thu, 30 Sep 2021 12:55:15 +0200 From: Michael Olbrich To: Guillermo Rodriguez Garcia Message-ID: <20210930105515.GP18190@pengutronix.de> Mail-Followup-To: Guillermo Rodriguez Garcia , ptxdist@pengutronix.de References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:46:35 up 224 days, 14:10, 133 users, load average: 0.17, 0.19, 0.19 User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] TF-A FIP format and U-Boot X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de