summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/Makefile1
-rwxr-xr-xtools/releasetools/build_image.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/core/Makefile b/core/Makefile
index 18d901c672..d630a6a6c0 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1335,6 +1335,7 @@ $(if $(filter $(2),userdata),\
$(if $(BOARD_USERDATAIMAGE_PARTITION_SIZE),$(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(1))
$(if $(PRODUCT_FS_CASEFOLD),$(hide) echo "needs_casefold=$(PRODUCT_FS_CASEFOLD)" >> $(1))
$(if $(PRODUCT_QUOTA_PROJID),$(hide) echo "needs_projid=$(PRODUCT_QUOTA_PROJID)" >> $(1))
+ $(if $(PRODUCT_FS_COMPRESSION),$(hide) echo "needs_compress=$(PRODUCT_FS_COMPRESSION)" >> $(1))
$(hide) echo "userdata_selinux_fc=$(SELINUX_FC)" >> $(1)
$(hide) echo "building_userdata_image=$(BUILDING_USERDATA_IMAGE)" >> $(1)
)
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index 9cc072fe0f..169a11224a 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -250,6 +250,7 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
run_e2fsck = False
needs_projid = prop_dict.get("needs_projid", 0)
needs_casefold = prop_dict.get("needs_casefold", 0)
+ needs_compress = prop_dict.get("needs_compress", 0)
if fs_type.startswith("ext"):
build_command = [prop_dict["ext_mkuserimg"]]
@@ -337,6 +338,8 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
build_command.append("--prjquota")
if (needs_casefold):
build_command.append("--casefold")
+ if (needs_compress):
+ build_command.append("--compression")
else:
raise BuildImageError(
"Error: unknown filesystem type: {}".format(fs_type))
@@ -610,6 +613,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
copy_prop("userdata_selinux_fc", "selinux_fc")
copy_prop("needs_casefold", "needs_casefold")
copy_prop("needs_projid", "needs_projid")
+ copy_prop("needs_compress", "needs_compress")
elif mount_point == "cache":
copy_prop("cache_fs_type", "fs_type")
copy_prop("cache_size", "partition_size")