Change the condition for building super_empty.img.
This CL changes the condition for building super_empty.img from PRODUCT_BUILD_SUPER_PARTITION to PRODUCT_USE_DYNAMIC_PARTITIONS, as a follow-up to the change in [1]. With the CL in [1], it skips building super.img and super_empty.img both when turning off PRODUCT_BUILD_SUPER_PARTITION. However, the latter should be mandatory whenever dynamic partitions is enabled. Because fastboot relies on this file to properly flash dynamic partitions. Plus, the cost for building super_empty.img is much lower than the one for super.img. As part of the change, it'll write group info into target_files when building with PRODUCT_BUILD_SUPER_PARTITION == false. It's the work for target_files merging script to determine the values to be picked up. The current logic in merge_target_files.py always uses the one from vendor target_files. This CL adds a testcase to ensure the behavior. [1] https://android-review.googlesource.com/c/platform/build/+/928756 Bug: 135752763 Test: `m dist` with a target that sets PRODUCT_BUILD_SUPER_PARTITION to false. Check the built artifacts contain super_empty.img. Verify that the build can be flashed properly. Change-Id: I277f087eab45663a6c3b33333d16e9e576c1c25c
This commit is contained in:
@@ -888,10 +888,11 @@ def AddImagesToTargetFiles(filename):
|
||||
banner("vbmeta")
|
||||
AddVBMeta(output_zip, partitions, "vbmeta", vbmeta_partitions)
|
||||
|
||||
if OPTIONS.info_dict.get("build_super_partition") == "true":
|
||||
if OPTIONS.info_dict.get("use_dynamic_partitions") == "true":
|
||||
banner("super_empty")
|
||||
AddSuperEmpty(output_zip)
|
||||
|
||||
if OPTIONS.info_dict.get("build_super_partition") == "true":
|
||||
if OPTIONS.info_dict.get(
|
||||
"build_retrofit_dynamic_partitions_ota_package") == "true":
|
||||
banner("super split images")
|
||||
|
Reference in New Issue
Block a user