Thanks, applied as 53496a7c76a116c9b2bf05796d0b6872e5a85e7d. Michael
[sent from post-receive hook] On Mon, 20 Jun 2022 08:19:24 +0200, Christian Melki <[email protected]> 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 <[email protected]> > Message-Id: <[email protected]> > Signed-off-by: Michael Olbrich <[email protected]> > > 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 \
