forked from openkylin/platform_build
Allow f2fs sparse mode to be disabled
Bug: 142424832 Bug: 142803849 Change-Id: Ic112128f15e3f29208332afceea4fbc3fca40b36
This commit is contained in:
parent
371e3c3b6c
commit
91238cce14
|
@ -1462,6 +1462,9 @@ endif
|
|||
ifneq (true,$(TARGET_USERIMAGES_SPARSE_SQUASHFS_DISABLED))
|
||||
INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG := -s
|
||||
endif
|
||||
ifneq (true,$(TARGET_USERIMAGES_SPARSE_F2FS_DISABLED))
|
||||
INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG := -S
|
||||
endif
|
||||
|
||||
INTERNAL_USERIMAGES_DEPS := \
|
||||
$(BUILD_IMAGE) \
|
||||
|
@ -1598,6 +1601,7 @@ $(hide) echo "ext_mkuserimg=$(notdir $(MKEXTUSERIMG))" >> $(1)
|
|||
$(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1))
|
||||
$(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1))
|
||||
$(if $(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG),$(hide) echo "squashfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG)" >> $(1))
|
||||
$(if $(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG),$(hide) echo "f2fs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG)" >> $(1))
|
||||
$(if $(BOARD_EXT4_SHARE_DUP_BLOCKS),$(hide) echo "ext4_share_dup_blocks=$(BOARD_EXT4_SHARE_DUP_BLOCKS)" >> $(1))
|
||||
$(if $(BOARD_FLASH_LOGICAL_BLOCK_SIZE), $(hide) echo "flash_logical_block_size=$(BOARD_FLASH_LOGICAL_BLOCK_SIZE)" >> $(1))
|
||||
$(if $(BOARD_FLASH_ERASE_BLOCK_SIZE), $(hide) echo "flash_erase_block_size=$(BOARD_FLASH_ERASE_BLOCK_SIZE)" >> $(1))
|
||||
|
@ -4187,6 +4191,8 @@ define dump-dynamic-partitions-info
|
|||
echo "super_$(group)_partition_list=$(BOARD_$(call to-upper,$(group))_PARTITION_LIST)" >> $(1);))
|
||||
$(if $(filter true,$(TARGET_USERIMAGES_SPARSE_EXT_DISABLED)), \
|
||||
echo "build_non_sparse_super_partition=true" >> $(1))
|
||||
$(if $(filter true,$(TARGET_USERIMAGES_SPARSE_F2FS_DISABLED)), \
|
||||
echo "build_non_sparse_super_partition=true" >> $(1))
|
||||
$(if $(filter true,$(BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE)), \
|
||||
echo "super_image_in_update_package=true" >> $(1))
|
||||
endef
|
||||
|
|
|
@ -315,6 +315,8 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
|
|||
elif fs_type.startswith("f2fs"):
|
||||
build_command = ["mkf2fsuserimg.sh"]
|
||||
build_command.extend([out_file, prop_dict["image_size"]])
|
||||
if "f2fs_sparse_flag" in prop_dict:
|
||||
build_command.extend([prop_dict["f2fs_sparse_flag"]])
|
||||
if fs_config:
|
||||
build_command.extend(["-C", fs_config])
|
||||
build_command.extend(["-f", in_dir])
|
||||
|
@ -519,6 +521,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
|||
common_props = (
|
||||
"extfs_sparse_flag",
|
||||
"squashfs_sparse_flag",
|
||||
"f2fs_sparse_flag",
|
||||
"skip_fsck",
|
||||
"ext_mkuserimg",
|
||||
"verity",
|
||||
|
|
Loading…
Reference in New Issue