1 ################################################################################
3 # Embed the ubifs image into an ubi image
5 ################################################################################
7 UBI_UBINIZE_OPTS
:= -m
$(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE
)
8 UBI_UBINIZE_OPTS
+= -p
$(BR2_TARGET_ROOTFS_UBI_PEBSIZE
)
9 ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE
),0)
10 UBI_UBINIZE_OPTS
+= -s
$(BR2_TARGET_ROOTFS_UBI_SUBSIZE
)
13 UBI_UBINIZE_OPTS
+= $(call qstrip
,$(BR2_TARGET_ROOTFS_UBI_OPTS
))
15 ROOTFS_UBI_DEPENDENCIES
= rootfs-ubifs
17 ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
),y
)
18 UBINIZE_CONFIG_FILE_PATH
= $(call qstrip
,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE
))
20 UBINIZE_CONFIG_FILE_PATH
= fs
/ubifs
/ubinize.cfg
23 # don't use sed -i as it misbehaves on systems with SELinux enabled when this is
24 # executed through fakeroot (see #9386)
26 sed
's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
27 $(UBINIZE_CONFIG_FILE_PATH
) > $(BUILD_DIR
)/ubinize.cfg
28 $(HOST_DIR
)/usr
/sbin
/ubinize
-o
$@
$(UBI_UBINIZE_OPTS
) $(BUILD_DIR
)/ubinize.cfg
29 rm $(BUILD_DIR
)/ubinize.cfg
32 $(eval
$(call ROOTFS_TARGET
,ubi
))