forked from openkylin/platform_build
Merge "Add build property to enable fscompression"
This commit is contained in:
commit
bea507259c
|
@ -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)
|
||||
)
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue