2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2010-12-21 18:38:07 +01:00
|
|
|
#
|
2014-01-29 05:54:00 +01:00
|
|
|
# Embed the ubifs image into an ubi image
|
2010-12-21 18:38:07 +01:00
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2010-12-21 18:38:07 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-04-24 04:29:19 +02:00
|
|
|
UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS))
|
|
|
|
|
2010-12-21 18:38:07 +01:00
|
|
|
ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
|
|
|
|
|
2014-01-29 05:54:00 +01:00
|
|
|
ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y)
|
2018-04-01 07:08:19 +02:00
|
|
|
UBI_UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE))
|
2014-01-29 05:54:00 +01:00
|
|
|
else
|
2018-04-01 07:08:19 +02:00
|
|
|
UBI_UBINIZE_CONFIG_FILE_PATH = fs/ubi/ubinize.cfg
|
2014-01-29 05:54:00 +01:00
|
|
|
endif
|
|
|
|
|
2016-11-27 00:40:27 +01:00
|
|
|
# don't use sed -i as it misbehaves on systems with SELinux enabled when this is
|
|
|
|
# executed through fakeroot (see #9386)
|
2010-12-21 18:38:07 +01:00
|
|
|
define ROOTFS_UBI_CMD
|
2016-11-27 00:40:27 +01:00
|
|
|
sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
|
2018-04-01 07:08:19 +02:00
|
|
|
$(UBI_UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
|
2017-07-05 13:14:20 +02:00
|
|
|
$(HOST_DIR)/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
|
2014-01-29 05:54:00 +01:00
|
|
|
rm $(BUILD_DIR)/ubinize.cfg
|
2010-12-21 18:38:07 +01:00
|
|
|
endef
|
|
|
|
|
2017-12-28 11:40:32 +01:00
|
|
|
$(eval $(rootfs))
|