Loading core/Makefile +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1619,6 +1619,7 @@ endef # $(2) the image prop file # $(2) the image prop file define add-common-ro-flags-to-image-props define add-common-ro-flags-to-image-props $(eval _var := $(call to-upper,$(1))) $(eval _var := $(call to-upper,$(1))) $(if $(BOARD_$(_var)IMAGE_EROFS_COMPRESSOR),$(hide) echo "$(1)_erofs_compressor"$(BOARD_$(_var)IMAGE_EROFS_COMPRESSOR)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT),$(hide) echo "$(1)_extfs_inode_count=$(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT),$(hide) echo "$(1)_extfs_inode_count=$(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT),$(hide) echo "$(1)_extfs_rsv_pct=$(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT),$(hide) echo "$(1)_extfs_rsv_pct=$(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS),$(hide) echo "$(1)_f2fs_sldc_flags=$(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS),$(hide) echo "$(1)_f2fs_sldc_flags=$(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS)" >> $(2)) Loading Loading @@ -1697,6 +1698,7 @@ $(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(IN $(if $(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG),$(hide) echo "erofs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG),$(hide) echo "erofs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG),$(hide) echo "squashfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_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 $(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG),$(hide) echo "f2fs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG)" >> $(1)) $(if $(BOARD_EROFS_COMPRESSOR),$(hide) echo "erofs_default_compressor=$(BOARD_EROFS_COMPRESSOR)" >> $(1)) $(if $(BOARD_EXT4_SHARE_DUP_BLOCKS),$(hide) echo "ext4_share_dup_blocks=$(BOARD_EXT4_SHARE_DUP_BLOCKS)" >> $(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_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)) $(if $(BOARD_FLASH_ERASE_BLOCK_SIZE), $(hide) echo "flash_erase_block_size=$(BOARD_FLASH_ERASE_BLOCK_SIZE)" >> $(1)) Loading tools/releasetools/build_image.py +14 −0 Original line number Original line Diff line number Diff line Loading @@ -334,6 +334,13 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config): build_command.extend(["-T", str(prop_dict["timestamp"])]) build_command.extend(["-T", str(prop_dict["timestamp"])]) if "uuid" in prop_dict: if "uuid" in prop_dict: build_command.extend(["-U", prop_dict["uuid"]]) build_command.extend(["-U", prop_dict["uuid"]]) compressor = None if "erofs_default_compressor" in prop_dict: compressor = prop_dict["erofs_default_compressor"] if "erofs_compressor" in prop_dict: compressor = prop_dict["erofs_compressor"] if compressor: build_command.extend(["-z", compressor]) elif fs_type.startswith("squash"): elif fs_type.startswith("squash"): build_command = ["mksquashfsimage.sh"] build_command = ["mksquashfsimage.sh"] build_command.extend([in_dir, out_file]) build_command.extend([in_dir, out_file]) Loading Loading @@ -607,6 +614,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): common_props = ( common_props = ( "extfs_sparse_flag", "extfs_sparse_flag", "erofs_default_compressor", "erofs_sparse_flag", "erofs_sparse_flag", "squashfs_sparse_flag", "squashfs_sparse_flag", "system_f2fs_compress", "system_f2fs_compress", Loading @@ -626,6 +634,12 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): for p in common_props: for p in common_props: copy_prop(p, p) copy_prop(p, p) suffixed_props = ( "erofs_compressor", ) for p in suffixed_props: copy_prop("{}_{}".format(mount_point, p), p) d["mount_point"] = mount_point d["mount_point"] = mount_point if mount_point == "system": if mount_point == "system": copy_prop("avb_system_hashtree_enable", "avb_hashtree_enable") copy_prop("avb_system_hashtree_enable", "avb_hashtree_enable") Loading Loading
core/Makefile +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1619,6 +1619,7 @@ endef # $(2) the image prop file # $(2) the image prop file define add-common-ro-flags-to-image-props define add-common-ro-flags-to-image-props $(eval _var := $(call to-upper,$(1))) $(eval _var := $(call to-upper,$(1))) $(if $(BOARD_$(_var)IMAGE_EROFS_COMPRESSOR),$(hide) echo "$(1)_erofs_compressor"$(BOARD_$(_var)IMAGE_EROFS_COMPRESSOR)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT),$(hide) echo "$(1)_extfs_inode_count=$(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT),$(hide) echo "$(1)_extfs_inode_count=$(BOARD_$(_var)IMAGE_EXTFS_INODE_COUNT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT),$(hide) echo "$(1)_extfs_rsv_pct=$(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT),$(hide) echo "$(1)_extfs_rsv_pct=$(BOARD_$(_var)IMAGE_EXTFS_RSV_PCT)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS),$(hide) echo "$(1)_f2fs_sldc_flags=$(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS)" >> $(2)) $(if $(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS),$(hide) echo "$(1)_f2fs_sldc_flags=$(BOARD_$(_var)IMAGE_F2FS_SLOAD_COMPRESS_FLAGS)" >> $(2)) Loading Loading @@ -1697,6 +1698,7 @@ $(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(IN $(if $(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG),$(hide) echo "erofs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG),$(hide) echo "erofs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EROFS_FLAG)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG),$(hide) echo "squashfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_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 $(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG),$(hide) echo "f2fs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG)" >> $(1)) $(if $(BOARD_EROFS_COMPRESSOR),$(hide) echo "erofs_default_compressor=$(BOARD_EROFS_COMPRESSOR)" >> $(1)) $(if $(BOARD_EXT4_SHARE_DUP_BLOCKS),$(hide) echo "ext4_share_dup_blocks=$(BOARD_EXT4_SHARE_DUP_BLOCKS)" >> $(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_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)) $(if $(BOARD_FLASH_ERASE_BLOCK_SIZE), $(hide) echo "flash_erase_block_size=$(BOARD_FLASH_ERASE_BLOCK_SIZE)" >> $(1)) Loading
tools/releasetools/build_image.py +14 −0 Original line number Original line Diff line number Diff line Loading @@ -334,6 +334,13 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config): build_command.extend(["-T", str(prop_dict["timestamp"])]) build_command.extend(["-T", str(prop_dict["timestamp"])]) if "uuid" in prop_dict: if "uuid" in prop_dict: build_command.extend(["-U", prop_dict["uuid"]]) build_command.extend(["-U", prop_dict["uuid"]]) compressor = None if "erofs_default_compressor" in prop_dict: compressor = prop_dict["erofs_default_compressor"] if "erofs_compressor" in prop_dict: compressor = prop_dict["erofs_compressor"] if compressor: build_command.extend(["-z", compressor]) elif fs_type.startswith("squash"): elif fs_type.startswith("squash"): build_command = ["mksquashfsimage.sh"] build_command = ["mksquashfsimage.sh"] build_command.extend([in_dir, out_file]) build_command.extend([in_dir, out_file]) Loading Loading @@ -607,6 +614,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): common_props = ( common_props = ( "extfs_sparse_flag", "extfs_sparse_flag", "erofs_default_compressor", "erofs_sparse_flag", "erofs_sparse_flag", "squashfs_sparse_flag", "squashfs_sparse_flag", "system_f2fs_compress", "system_f2fs_compress", Loading @@ -626,6 +634,12 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): for p in common_props: for p in common_props: copy_prop(p, p) copy_prop(p, p) suffixed_props = ( "erofs_compressor", ) for p in suffixed_props: copy_prop("{}_{}".format(mount_point, p), p) d["mount_point"] = mount_point d["mount_point"] = mount_point if mount_point == "system": if mount_point == "system": copy_prop("avb_system_hashtree_enable", "avb_hashtree_enable") copy_prop("avb_system_hashtree_enable", "avb_hashtree_enable") Loading