Product-configurable sparse ext images.
Change-Id: Ifd0ac14d7df331c9f6f1e3eee0722e07b4ab199a
diff --git a/core/Makefile b/core/Makefile
index ca7eba0..82cd784 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -579,8 +579,12 @@
endif
endif
+ifneq (true,$(TARGET_USERIMAGES_SPARSE_EXT_DISABLED))
+ INTERNAL_USERIMAGES_SPARSE_EXT_FLAG := -s
+endif
+
ifeq ($(INTERNAL_USERIMAGES_USE_EXT),true)
-INTERNAL_USERIMAGES_DEPS := $(MKEXT2USERIMG) $(MAKE_EXT4FS)
+INTERNAL_USERIMAGES_DEPS := $(MKEXTUSERIMG) $(MAKE_EXT4FS)
INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS)))
# $(1): src directory
@@ -591,7 +595,7 @@
define build-userimage-ext-target
@mkdir -p $(dir $(2))
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$(PATH) \
- $(MKEXT2USERIMG) $(1) $(2) $(4) $(3) $(5)
+ $(MKEXTUSERIMG) $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG) $(1) $(2) $(4) $(3) $(5)
endef
else
INTERNAL_USERIMAGES_DEPS := $(MKYAFFS2)