Support journal size board config variables.
A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks) in its BoardConfig.mk. To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0". BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in similar way. Bug: 18430740 Change-Id: I0594814fe19ffc54dff41ec2464e2e3a802b9419
This commit is contained in:
parent
ea4dfb7551
commit
f3b86357e2
|
@ -714,13 +714,16 @@ INTERNAL_USERIMAGES_DEPS += $(SELINUX_FC)
|
|||
define generate-userimage-prop-dictionary
|
||||
$(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_SYSTEMIMAGE_JOURNAL_SIZE),$(hide) echo "system_journal_size=$(BOARD_SYSTEMIMAGE_JOURNAL_SIZE)" >> $(1))
|
||||
$(if $(BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "userdata_fs_type=$(BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
|
||||
$(if $(BOARD_USERDATAIMAGE_PARTITION_SIZE),$(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "cache_fs_type=$(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
|
||||
$(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "vendor_fs_type=$(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
|
||||
$(if $(BOARD_VENDORIMAGE_PARTITION_SIZE),$(hide) echo "vendor_size=$(BOARD_VENDORIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_VENDORIMAGE_JOURNAL_SIZE),$(hide) echo "vendor_journal_size=$(BOARD_VENDORIMAGE_JOURNAL_SIZE)" >> $(1))
|
||||
$(if $(BOARD_OEMIMAGE_PARTITION_SIZE),$(hide) echo "oem_size=$(BOARD_OEMIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_OEMIMAGE_JOURNAL_SIZE),$(hide) echo "oem_journal_size=$(BOARD_OEMIMAGE_JOURNAL_SIZE)" >> $(1))
|
||||
$(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1))
|
||||
$(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1))
|
||||
$(hide) echo "selinux_fc=$(SELINUX_FC)" >> $(1)
|
||||
|
|
|
@ -240,6 +240,8 @@ def BuildImage(in_dir, prop_dict, out_file,
|
|||
build_command.extend([in_dir, out_file, fs_type,
|
||||
prop_dict["mount_point"]])
|
||||
build_command.append(prop_dict["partition_size"])
|
||||
if "journal_size" in prop_dict:
|
||||
build_command.extend(["-j", prop_dict["journal_size"]])
|
||||
if "timestamp" in prop_dict:
|
||||
build_command.extend(["-T", str(prop_dict["timestamp"])])
|
||||
if fs_config is not None:
|
||||
|
@ -319,6 +321,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
|||
if mount_point == "system":
|
||||
copy_prop("fs_type", "fs_type")
|
||||
copy_prop("system_size", "partition_size")
|
||||
copy_prop("system_journal_size", "journal_size")
|
||||
copy_prop("system_verity_block_device", "verity_block_device")
|
||||
elif mount_point == "data":
|
||||
# Copy the generic fs type first, override with specific one if available.
|
||||
|
@ -331,10 +334,12 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
|||
elif mount_point == "vendor":
|
||||
copy_prop("vendor_fs_type", "fs_type")
|
||||
copy_prop("vendor_size", "partition_size")
|
||||
copy_prop("vendor_journal_size", "journal_size")
|
||||
copy_prop("vendor_verity_block_device", "verity_block_device")
|
||||
elif mount_point == "oem":
|
||||
copy_prop("fs_type", "fs_type")
|
||||
copy_prop("oem_size", "partition_size")
|
||||
copy_prop("oem_journal_size", "journal_size")
|
||||
|
||||
return d
|
||||
|
||||
|
|
Loading…
Reference in New Issue