Merge "Fix build break for vendor freeze" am: f14e8caca7
Original change: https://android-review.googlesource.com/c/platform/build/+/1836120 Change-Id: I98ae1c7e2bc9c721c6acb83054a8910ea23c68ff
This commit is contained in:
@@ -1244,6 +1244,7 @@ def BuildVendorPartitions(output_zip_path):
|
|||||||
logger.info("Building vendor partitions using vendor otatools.")
|
logger.info("Building vendor partitions using vendor otatools.")
|
||||||
vendor_tempdir = common.UnzipTemp(output_zip_path, [
|
vendor_tempdir = common.UnzipTemp(output_zip_path, [
|
||||||
"META/*",
|
"META/*",
|
||||||
|
"SYSTEM/build.prop",
|
||||||
] + ["{}/*".format(p.upper()) for p in OPTIONS.vendor_partitions])
|
] + ["{}/*".format(p.upper()) for p in OPTIONS.vendor_partitions])
|
||||||
|
|
||||||
# Disable various partitions that build based on misc_info fields.
|
# Disable various partitions that build based on misc_info fields.
|
||||||
@@ -1266,9 +1267,25 @@ def BuildVendorPartitions(output_zip_path):
|
|||||||
for key in sorted(vendor_misc_info):
|
for key in sorted(vendor_misc_info):
|
||||||
output.write("{}={}\n".format(key, vendor_misc_info[key]))
|
output.write("{}={}\n".format(key, vendor_misc_info[key]))
|
||||||
|
|
||||||
|
# Disable system partition by a placeholder of IMAGES/system.img,
|
||||||
|
# instead of removing SYSTEM folder.
|
||||||
|
# Because SYSTEM/build.prop is still needed for:
|
||||||
|
# add_img_to_target_files.CreateImage ->
|
||||||
|
# common.BuildInfo ->
|
||||||
|
# common.BuildInfo.CalculateFingerprint
|
||||||
|
vendor_images_path = os.path.join(vendor_tempdir, "IMAGES")
|
||||||
|
if not os.path.exists(vendor_images_path):
|
||||||
|
os.makedirs(vendor_images_path)
|
||||||
|
with open(os.path.join(vendor_images_path, "system.img"), "w") as output:
|
||||||
|
pass
|
||||||
|
|
||||||
# Disable care_map.pb as not all ab_partitions are available when
|
# Disable care_map.pb as not all ab_partitions are available when
|
||||||
# vendor otatools regenerates vendor images.
|
# vendor otatools regenerates vendor images.
|
||||||
|
if os.path.exists(os.path.join(vendor_tempdir, "META/ab_partitions.txt")):
|
||||||
os.remove(os.path.join(vendor_tempdir, "META/ab_partitions.txt"))
|
os.remove(os.path.join(vendor_tempdir, "META/ab_partitions.txt"))
|
||||||
|
# Disable RADIO images
|
||||||
|
if os.path.exists(os.path.join(vendor_tempdir, "META/pack_radioimages.txt")):
|
||||||
|
os.remove(os.path.join(vendor_tempdir, "META/pack_radioimages.txt"))
|
||||||
|
|
||||||
# Build vendor images using vendor otatools.
|
# Build vendor images using vendor otatools.
|
||||||
vendor_otatools_dir = common.MakeTempDir(prefix="vendor_otatools_")
|
vendor_otatools_dir = common.MakeTempDir(prefix="vendor_otatools_")
|
||||||
@@ -1276,6 +1293,7 @@ def BuildVendorPartitions(output_zip_path):
|
|||||||
cmd = [
|
cmd = [
|
||||||
os.path.join(vendor_otatools_dir, "bin", "add_img_to_target_files"),
|
os.path.join(vendor_otatools_dir, "bin", "add_img_to_target_files"),
|
||||||
"--is_signing",
|
"--is_signing",
|
||||||
|
"--add_missing",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
vendor_tempdir,
|
vendor_tempdir,
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user