From 1ed889befc5e3a2dd400dfa839db3a2b95dd181b Mon Sep 17 00:00:00 2001 From: Huang Jianan Date: Fri, 19 Feb 2021 16:48:31 +0800 Subject: [PATCH] support pre-defined timestamp and uuid when bulid EROFS images Bug:180682930 Test: erofs image can be set to input timestamp and UUID Change-Id: I71e455350db51096e18ab5a03123500d56ebe252 Signed-off-by: Huang Jianan --- tools/releasetools/build_image.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index 820c128a4e..3726df6b62 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -308,6 +308,10 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config): build_command.extend(["-C", fs_config]) if "selinux_fc" in prop_dict: build_command.extend(["-c", prop_dict["selinux_fc"]]) + if "timestamp" in prop_dict: + build_command.extend(["-T", str(prop_dict["timestamp"])]) + if "uuid" in prop_dict: + build_command.extend(["-U", prop_dict["uuid"]]) elif fs_type.startswith("squash"): build_command = ["mksquashfsimage.sh"] build_command.extend([in_dir, out_file])