From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 20 Jun 2022 08:20:45 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o3AmC-007o3w-6y for lore@lore.pengutronix.de; Mon, 20 Jun 2022 08:20:45 +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 1o3AmC-0004x9-K8; Mon, 20 Jun 2022 08:20:44 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3Akv-0004QP-N2; Mon, 20 Jun 2022 08:19:25 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o3Akt-001afG-K5; Mon, 20 Jun 2022 08:19:25 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1o3Aku-006Fqx-AN; Mon, 20 Jun 2022 08:19:24 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Mon, 20 Jun 2022 08:19:24 +0200 Message-Id: <20220620061924.1490864-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220609213328.3913523-2-christian.melki@t2data.com> References: <20220609213328.3913523-2-christian.melki@t2data.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] barebox: Add option to install barebox generated dtbs. 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: Christian Melki 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 Thanks, applied as 53496a7c76a116c9b2bf05796d0b6872e5a85e7d. Michael [sent from post-receive hook] On Mon, 20 Jun 2022 08:19:24 +0200, Christian Melki wrote: > Sometimes it's useful to be able to include the barebox- > generated dtb. An example would be the FIP image target > for TF-A and stm32mp1 targets. > > Prefix the barebox-installed dtbs with "barebox-" as they can > have the same name as kernel dtbs for example. > > This can partly go away if/when barebox decides to promote > dtbs to the barebox-flash-images file. > Although one would probably still want to rename the dtbs > to avoid a name collision. > > Signed-off-by: Christian Melki > Message-Id: <20220609213328.3913523-2-christian.melki@t2data.com> > Signed-off-by: Michael Olbrich > > diff --git a/platforms/barebox.in b/platforms/barebox.in > index c8192f0c90e3..2a89df074011 100644 > --- a/platforms/barebox.in > +++ b/platforms/barebox.in > @@ -89,6 +89,14 @@ config BAREBOX_BAREBOXENV > environment. Enable this option to access the barebox environment > from the target Linux system. > > +config BAREBOX_INSTALL_DTBS > + prompt "install dtbs" > + bool > + help > + Install barebox generated dtbs into the image directory. > + These dtbs can, for example, be used when constructing a > + FIP image for TF-A boot. > + > config BAREBOX_BAREBOXCRC32 > prompt "install 'bareboxcrc32'" > bool > diff --git a/rules/barebox.make b/rules/barebox.make > index e2ad43893a0e..adab3c4fe210 100644 > --- a/rules/barebox.make > +++ b/rules/barebox.make > @@ -180,6 +180,11 @@ endif > > @$(call world/image-clean, BAREBOX) > > +ifdef PTXCONF_BAREBOX_INSTALL_DTBS > + @$(foreach dtb, $(shell find $(BAREBOX_BUILD_DIR) -name "*.dtb"), \ > + $(call ptx/image-install, BAREBOX, $(dtb), barebox-$(notdir $(dtb)))$(ptx/nl)) > +endif > + > @$(foreach image, $(shell cat $(BAREBOX_BUILD_DIR)/barebox-flash-images), \ > $(call ptx/image-install, BAREBOX, $(BAREBOX_BUILD_DIR)/$(image))$(ptx/nl) \ > if [ ! -e $(IMAGEDIR)/barebox-image ]; then \