forked from openkylin/platform_build
Merge "Enable system partition compression"
This commit is contained in:
commit
74e57f6482
|
@ -1400,6 +1400,8 @@ $(if $(filter $(2),system),\
|
|||
$(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(INTERNAL_SYSTEM_OTHER_PARTITION_SIZE),$(hide) echo "system_other_size=$(INTERNAL_SYSTEM_OTHER_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "system_fs_type=$(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS),$(hide) echo "system_fs_compress=$(BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS),$(hide) echo "system_f2fs_sldc_flags=$(BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT),$(hide) echo "system_extfs_inode_count=$(BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_EXTFS_RSV_PCT),$(hide) echo "system_extfs_rsv_pct=$(BOARD_SYSTEMIMAGE_EXTFS_RSV_PCT)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_JOURNAL_SIZE),$(hide) echo "system_journal_size=$(BOARD_SYSTEMIMAGE_JOURNAL_SIZE)" >> $(1))
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue