aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/ubi.mk
blob: 51ab42d15c344b53d4c1b82d4a9b39c49c457d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#############################################################
#
# Embed the ubifs image into an ubi one
#
#############################################################

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

ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs

define ROOTFS_UBI_CMD
	cp fs/ubifs/ubinize.cfg . ;\
	echo "image=$@fs" \
		>> ./ubinize.cfg ;\
	$(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\
	rm ubinize.cfg
endef

$(eval $(call ROOTFS_TARGET,ubi))