Merge "Enable system partition compression"

This commit is contained in:
Jaegeuk Kim
2020-12-10 00:41:04 +00:00
committed by Gerrit Code Review
2 changed files with 14 additions and 1 deletions

View File

@@ -350,8 +350,17 @@ 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):
if (needs_compress or prop_dict.get("system_fs_compress") == "true"):
build_command.append("--compression")
if (prop_dict.get("system_fs_compress") == "true"):
build_command.append("--sldc")
if (prop_dict.get("system_f2fs_sldc_flags") == None):
build_command.append(str(0))
else:
sldc_flags_str = prop_dict.get("system_f2fs_sldc_flags")
sldc_flags = sldc_flags_str.split()
build_command.append(str(len(sldc_flags)))
build_command.extend(sldc_flags)
else:
raise BuildImageError(
"Error: unknown filesystem type: {}".format(fs_type))
@@ -555,6 +564,8 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
"extfs_sparse_flag",
"erofs_sparse_flag",
"squashfs_sparse_flag",
"system_fs_compress",
"system_f2fs_sldc_flags",
"f2fs_sparse_flag",
"skip_fsck",
"ext_mkuserimg",