[Buildroot] [git commit] fs/ubi: expose BINARIES_DIR to ubinize.cfg

Yann E. MORIN yann.morin.1998 at free.fr
Sat Jun 6 11:43:43 UTC 2020

commit: https://git.buildroot.net/buildroot/commit/?id=145ee99bc95f99bd6b8aa0ed4a0220173ca7ec25
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

It is often necessary to refer to other images that are present in
BINARIES_DIR from a custom ubinize configuration e.g. to include the
kernel in a UBI volume.

As we do for BR2_ROOTFS_UBIFS_PATH, replace BINARIES_DIR when copying
the file.

Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>
[yann.morin.1998 at free.fr:
  - add the blurb in the help text
  - rewrap commit log
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
 fs/ubi/Config.in | 5 +++++
 fs/ubi/ubi.mk    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/ubi/Config.in b/fs/ubi/Config.in
index 85b1c56bb0..3427ea0518 100644
--- a/fs/ubi/Config.in
+++ b/fs/ubi/Config.in
@@ -38,6 +38,11 @@ config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
 	  So the volume defined for the root filesystem can specify the
 	  image path as:  image=BR2_ROOTFS_UBIFS_PATH
+	  Buildroot also replaces the string "BINARIES_DIR" with the
+	  value of $(BINARIES_DIR), so that it is possible to reference
+	  other build artefacts (e.g. to include the kernel in a UBI
+	  volume).
 	string "Configuration file path"
diff --git a/fs/ubi/ubi.mk b/fs/ubi/ubi.mk
index d848f8b23a..54bb81ea08 100644
--- a/fs/ubi/ubi.mk
+++ b/fs/ubi/ubi.mk
@@ -23,7 +23,7 @@ endif
 # don't use sed -i as it misbehaves on systems with SELinux enabled when this is
 # executed through fakeroot (see #9386)
-	sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
 	$(HOST_DIR)/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
 	rm $(BUILD_DIR)/ubinize.cfg

More information about the buildroot mailing list