Skip to content

Commit

Permalink
fs/ubi: expose BINARIES_DIR to ubinize.cfg
Browse files Browse the repository at this point in the history
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 <[email protected]>
[[email protected]:
  - add the blurb in the help text
  - rewrap commit log
]
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
alexandrebelloni authored and yann-morin-1998 committed Jun 6, 2020
1 parent 0eef19e commit 145ee99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions fs/ubi/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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).

config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE
string "Configuration file path"
depends on BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
Expand Down
2 changes: 1 addition & 1 deletion fs/ubi/ubi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
define ROOTFS_UBI_CMD
sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;;s;BINARIES_DIR;$(BINARIES_DIR);' \
$(UBI_UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
$(HOST_DIR)/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
rm $(BUILD_DIR)/ubinize.cfg
Expand Down

0 comments on commit 145ee99

Please sign in to comment.