summaryrefslogtreecommitdiffstats
path: root/tools/releasetools
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-11-18 18:03:13 -0800
committerYing Wang <wangying@google.com>2014-11-18 18:19:43 -0800
commitf3b86357e20a31ef0febe254f1f08706006f57fa (patch)
treeb4ae52704cf1a99b3924a6eaae0e292fa839fad5 /tools/releasetools
parentea4dfb7551e680f7496e1d35c05bdad10ca58b4a (diff)
downloadbuild-f3b86357e20a31ef0febe254f1f08706006f57fa.zip
build-f3b86357e20a31ef0febe254f1f08706006f57fa.tar.gz
build-f3b86357e20a31ef0febe254f1f08706006f57fa.tar.bz2
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
Diffstat (limited to 'tools/releasetools')
-rwxr-xr-xtools/releasetools/build_image.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index 93b31e8..302aa0c 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -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