From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] barebox: Add option to install barebox generated dtbs.
Date: Tue, 7 Jun 2022 11:03:50 +0200 [thread overview]
Message-ID: <20220607090350.346676-2-christian.melki@t2data.com> (raw)
In-Reply-To: <20220607090350.346676-1-christian.melki@t2data.com>
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 <christian.melki@t2data.com>
---
platforms/barebox.in | 8 ++++++++
rules/barebox.make | 5 +++++
2 files changed, 13 insertions(+)
diff --git a/platforms/barebox.in b/platforms/barebox.in
index c8192f0c9..2a89df074 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 581fd1ff9..7aa04f02c 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)));)
+endif
+
@$(foreach image, $(shell cat $(BAREBOX_BUILD_DIR)/barebox-flash-images), \
$(call ptx/image-install, BAREBOX, $(BAREBOX_BUILD_DIR)/$(image)); \
if [ ! -e $(IMAGEDIR)/barebox-image ]; then \
--
2.34.1
next prev parent reply other threads:[~2022-06-07 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 9:03 [ptxdist] [PATCH 1/2] barebox: Simplify/cleanup barebox image installations Christian Melki
2022-06-07 9:03 ` Christian Melki [this message]
2022-06-09 18:54 ` Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220607090350.346676-2-christian.melki@t2data.com \
--to=christian.melki@t2data.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox