include/make.mk: add support for ubinize-overlay.cfg

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40365
This commit is contained in:
John Crispin 2014-04-03 14:26:31 +00:00
parent 58eccdac4f
commit 08f03e959b

View file

@ -130,6 +130,19 @@ ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),)
endif endif
ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),) ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
define Image/mkfs/ubifs/generate
$(CP) ./ubinize$(1).cfg $(KDIR)
( cd $(KDIR); \
$(STAGING_DIR_HOST)/bin/ubinize \
$(if $($(PROFILE)_UBI_OPTS), \
$(shell echo $($(PROFILE)_UBI_OPTS)), \
$(shell echo $(UBI_OPTS)) \
) \
-o $(KDIR)/root$(1).ubi \
ubinize$(1).cfg \
)
endef
define Image/mkfs/ubifs define Image/mkfs/ubifs
ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),) ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),)
@ -150,16 +163,8 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
$(call Image/Build,ubifs) $(call Image/Build,ubifs)
ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),) ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),)
$(CP) ./ubinize.cfg $(KDIR) $(call Image/mkfs/ubifs/generate,)
( cd $(KDIR); \ $(if $(wildcard ./ubinize-overlay.cfg),$(call Image/mkfs/ubifs/generate,-overlay))
$(STAGING_DIR_HOST)/bin/ubinize \
$(if $($(PROFILE)_UBI_OPTS), \
$(shell echo $($(PROFILE)_UBI_OPTS)), \
$(shell echo $(UBI_OPTS)) \
) \
-o $(KDIR)/root.ubi \
ubinize.cfg \
)
endif endif
$(call Image/Build,ubi) $(call Image/Build,ubi)
endef endef