74a0f963ed
By default, the UBI FS target creates a ubinize configuration file on-the-fly, for a single volume. Add an option to specify a custom config file. E.g., one might want to deploy a system with a volume for the built ubifs image, a volume for a future upgrade image, and a volume for user data. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
31 lines
1.0 KiB
Makefile
31 lines
1.0 KiB
Makefile
################################################################################
|
|
#
|
|
# Embed the ubifs image into an ubi image
|
|
#
|
|
################################################################################
|
|
|
|
UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
|
|
UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE)
|
|
ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0)
|
|
UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE)
|
|
endif
|
|
|
|
UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS))
|
|
|
|
ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
|
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y)
|
|
UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE))
|
|
else
|
|
UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg
|
|
endif
|
|
|
|
define ROOTFS_UBI_CMD
|
|
$(INSTALL) -m 0644 $(UBINIZE_CONFIG_FILE_PATH) $(BUILD_DIR)/ubinize.cfg ;\
|
|
$(SED) 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' $(BUILD_DIR)/ubinize.cfg ;\
|
|
$(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg ;\
|
|
rm $(BUILD_DIR)/ubinize.cfg
|
|
endef
|
|
|
|
$(eval $(call ROOTFS_TARGET,ubi))
|