diff options
author | Alistair Delva <adelva@google.com> | 2019-12-02 21:54:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-12-02 21:54:20 +0000 |
commit | 1cfe41269f27e33e32410dfee0ee0102b6b99b74 (patch) | |
tree | 890ebaa8cc298fc9d268ecc524590dd868feadfe | |
parent | 05c8db112a86218b8061a1dd2336567c6cee4be5 (diff) | |
parent | 91238cce14dc9f1e0bdfb25f3e37e536f8d8b998 (diff) | |
download | build-1cfe41269f27e33e32410dfee0ee0102b6b99b74.tar.gz |
Merge "Allow f2fs sparse mode to be disabled"
-rw-r--r-- | core/Makefile | 6 | ||||
-rwxr-xr-x | tools/releasetools/build_image.py | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/Makefile b/core/Makefile index 2879ab0a83..830416349f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1483,6 +1483,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) \ @@ -1619,6 +1622,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)) @@ -4109,6 +4113,8 @@ define dump-dynamic-partitions-info echo "super_$(group)_partition_list=$(call filter-out-missing-vendor, $(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)) $(if $(BOARD_SUPER_PARTITION_SIZE), \ diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index af508fe514..317a6d9151 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -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", |