From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 13 Mar 2025 15:28:42 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsjYA-00DbLG-2o for lore@lore.pengutronix.de; Thu, 13 Mar 2025 15:28:42 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tsjYA-0002H7-1U; Thu, 13 Mar 2025 15:28:42 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tsjY1-0002G1-UQ; Thu, 13 Mar 2025 15:28:33 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsjY1-005YAB-2A; Thu, 13 Mar 2025 15:28:33 +0100 Received: from mtr by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tsjY1-00BNMy-1s; Thu, 13 Mar 2025 15:28:33 +0100 Date: Thu, 13 Mar 2025 15:28:33 +0100 From: Michael Tretter To: ptxdist@pengutronix.de Message-ID: References: <20250313122150.11021-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20250313122150.11021-1-benjamin.gaignard@collabora.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] barebox: Copy TF-A binaries in to barebox firmware directory 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: Benjamin Gaignard 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Thu, 13 Mar 2025 13:21:50 +0100, Benjamin Gaignard wrote: > If ARM trusted firmware option has been selected copy the > generated bl32 binaries to barebox firmware directory so they > can be included in barebox build process. > > Signed-off-by: Benjamin Gaignard > --- > rules/barebox.make | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/rules/barebox.make b/rules/barebox.make > index c0d9c5744..15c06d685 100644 > --- a/rules/barebox.make > +++ b/rules/barebox.make > @@ -119,6 +119,16 @@ ifdef PTXCONF_BAREBOX_EXTRA_ENV > $(BAREBOX_BUILD_DIR)/.config; \ > fi > endif > + > +ifdef PTXCONF_TF_A > + mkdir -p $(BAREBOX_BUILD_DIR)/firmware/ > + @for i in `find $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/ -maxdepth 1 \ > + -type f -name *-bl31.bin -printf "%f\n"`; do \ > + cp $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/$$i $(BAREBOX_BUILD_DIR)/firmware/; \ > + cp $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/$$i $(BAREBOX_DIR)/firmware/; \ > + done > +endif > + There is already a (underdocumented) mechanism to copy binaries to the barebox firmware directory: The PTXCONF_BAREBOX_FIRMWARE option and the world/inject call. Enable PTXCONF_BAREBOX_FIRMWARE and add the filenames of the binaries that you want to install and their target location to the BAREBOX_INJECT_FILES variable. The inject mechanism copies the files from /usr/lib/firmware (BAREBOX_INJECT_PATH) to a specified location in the barebox build directory. Michael > @$(call world/compile, BAREBOX) > @$(call touch) > > -- > 2.43.0 > > >