From: Michael Riesch <michael.riesch@wolfvision.net>
To: ptxdist@pengutronix.de
Cc: m.tretter@pengutronix.de, Michael Riesch <michael.riesch@wolfvision.net>
Subject: [ptxdist] [PATCH v6 4/5] barebox: add integration of firmware blobs
Date: Sat, 29 Jan 2022 08:03:29 +0100 [thread overview]
Message-ID: <20220129070330.2601433-5-michael.riesch@wolfvision.net> (raw)
In-Reply-To: <20220129070330.2601433-1-michael.riesch@wolfvision.net>
In some cases barebox requires firmware blobs, which may be
provided in binary form by the vendor or compiled in a
preceding step. Add the possibility to specify files (in
separate rule files) which are injected in the barebox source
directory during preparation.
The virtual symbol BAREBOX_DEPENDENCIES is introduced in this
patch to allow for the addition of dependencies on e.g.,
firmware packages.
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
Notes:
v6:
- added "barebox.firmware.in" as empty placeholder
- introduced BAREBOX_DEPENDENCIES symbol in Kconfig
platforms/barebox.firmware.in | 7 +++++++
platforms/barebox.in | 13 +++++++++++++
rules/barebox.make | 6 ++++++
3 files changed, 26 insertions(+)
create mode 100644 platforms/barebox.firmware.in
diff --git a/platforms/barebox.firmware.in b/platforms/barebox.firmware.in
new file mode 100644
index 000000000..c7275e6d3
--- /dev/null
+++ b/platforms/barebox.firmware.in
@@ -0,0 +1,7 @@
+## SECTION=barebox_firmware
+
+#
+# This file does only exist to create a defined entry in the "barebox_firmware"
+# section, so that the toplevel Kconfig can include generated/barebox_firmware.in
+# even if no package is in that category.
+#
diff --git a/platforms/barebox.in b/platforms/barebox.in
index d35d16501..245b272a3 100644
--- a/platforms/barebox.in
+++ b/platforms/barebox.in
@@ -8,7 +8,12 @@ config BAREBOX_ARCH_STRING
default "ppc" if ARCH_PPC
default "x86" if ARCH_X86
+config BAREBOX_DEPENDENCIES
+ tristate
+ select VIRTUAL
+
menuconfig BAREBOX
+ select BAREBOX_DEPENDENCIES
select BOOTLOADER
select HOST_LIBUSB if BAREBOX_NEEDS_HOST_LIBUSB
select HOST_OPENSSL if BAREBOX_NEEDS_HOST_OPENSSL
@@ -55,6 +60,14 @@ config BAREBOX_CONFIG
This entry specifies the .config file used to compile
barebox.
+menuconfig BAREBOX_FIRMWARE
+ bool
+ prompt "integrate firmware blobs "
+
+if BAREBOX_FIRMWARE
+source "generated/barebox_firmware.in"
+endif
+
config BAREBOX_EXTRA_ENV
prompt "extend the builtin barebox environment"
bool
diff --git a/rules/barebox.make b/rules/barebox.make
index bea9f3adc..1c8463e63 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -34,6 +34,8 @@ BAREBOX_CONFIG := $(call ptx/in-platformconfigdir, \
# Prepare
# ----------------------------------------------------------------------------
+BAREBOX_INJECT_PATH := ${PTXDIST_SYSROOT_TARGET}/usr/lib/firmware
+
# use host pkg-config for host tools
BAREBOX_PATH := PATH=$(HOST_PATH)
@@ -94,6 +96,10 @@ ifdef PTXCONF_BAREBOX_EXTRA_ENV
@rm -rf $(BAREBOX_BUILD_DIR)/defaultenv/barebox_default_env
endif
+ifdef PTXCONF_BAREBOX_FIRMWARE
+ @$(call world/inject, BAREBOX)
+endif
+
@$(call touch)
# ----------------------------------------------------------------------------
--
2.30.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2022-01-29 7:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-29 7:03 [ptxdist] [PATCH v6 0/5] Add support for Rockchip " Michael Riesch
2022-01-29 7:03 ` [ptxdist] [PATCH v6 1/5] platforms: add section for non-free " Michael Riesch
2022-01-30 15:49 ` [ptxdist] [APPLIED] " Michael Olbrich
2022-01-29 7:03 ` [ptxdist] [PATCH v6 2/5] add package for rockchip firmware binaries Michael Riesch
2022-01-29 7:03 ` [ptxdist] [PATCH v6 3/5] scripts: add helper to inject files into a source directory Michael Riesch
2022-01-30 15:49 ` [ptxdist] [APPLIED] " Michael Olbrich
2024-04-19 9:48 ` [ptxdist] [PATCH v6 3/5] " Alexander Dahl
2024-05-02 10:08 ` Michael Olbrich
2024-04-23 13:52 ` Alexander Dahl
2024-04-23 16:27 ` Michael Riesch
2022-01-29 7:03 ` Michael Riesch [this message]
2022-01-30 15:49 ` [ptxdist] [APPLIED] barebox: add integration of firmware blobs Michael Olbrich
2022-01-29 7:03 ` [ptxdist] [RFC PATCH v6 5/5] barebox.rockchip: add binary firmware blobs for quartz64 and rk3568-evb1 Michael Riesch
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=20220129070330.2601433-5-michael.riesch@wolfvision.net \
--to=michael.riesch@wolfvision.net \
--cc=m.tretter@pengutronix.de \
--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