Remove the support for BRILLO_VENDOR_PARTITIONS.
It was initially introduced in commit
2e735ca34ecf70f5ebdded9e550ca47f78b5e1e6, where it packs additional
vendor images into target_files zip in order to generate OTAs. We can
acheive the same goal with INSTALLED_RADIOIMAGE_TARGET, which is the way
being actively used across all targets, including IoT (the former
Brillo) targets.
Bug: 78201540
Test: `m dist` with aosp_marlin-userdebug
Test: Code search shows no active user of BRILLO_VENDOR_PARTITIONS.
Test: `python -m unittest test_add_img_to_target_files`
Change-Id: I8803d5377b5a39304a701cceafb243f9a228347d
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index f68976e..a041157 100755
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -405,7 +405,7 @@
if os.path.exists(image_path):
continue
found = False
- for dir_name in ['IMAGES', 'RADIO', 'VENDOR_IMAGES', 'PREBUILT_IMAGES']:
+ for dir_name in ['IMAGES', 'RADIO', 'PREBUILT_IMAGES']:
alt_path = os.path.join(
OPTIONS.input_tmp, dir_name, os.path.basename(image_path))
if os.path.exists(alt_path):
@@ -488,9 +488,8 @@
def AddRadioImagesForAbOta(output_zip, ab_partitions):
"""Adds the radio images needed for A/B OTA to the output file.
- It parses the list of A/B partitions, looks for the missing ones from RADIO/
- or VENDOR_IMAGES/ dirs, and copies them to IMAGES/ of the output file (or
- dir).
+ It parses the list of A/B partitions, looks for the missing ones from RADIO/,
+ and copies them to IMAGES/ of the output file (or dir).
It also ensures that on returning from the function all the listed A/B
partitions must have their images available under IMAGES/.
@@ -518,17 +517,6 @@
shutil.copy(img_radio_path, prebuilt_path)
continue
- # Walk through VENDOR_IMAGES/ since files could be under subdirs.
- img_vendor_dir = os.path.join(OPTIONS.input_tmp, "VENDOR_IMAGES")
- for root, _, files in os.walk(img_vendor_dir):
- if img_name in files:
- if output_zip:
- common.ZipWrite(output_zip, os.path.join(root, img_name),
- "IMAGES/" + img_name)
- else:
- shutil.copy(os.path.join(root, img_name), prebuilt_path)
- break
-
# Assert that the image is present under IMAGES/ now.
if output_zip:
# Zip spec says: All slashes MUST be forward slashes.
@@ -763,9 +751,9 @@
with open(ab_partitions_txt, 'r') as f:
ab_partitions = f.readlines()
- # For devices using A/B update, copy over images from RADIO/ and/or
- # VENDOR_IMAGES/ to IMAGES/ and make sure we have all the needed
- # images ready under IMAGES/. All images should have '.img' as extension.
+ # For devices using A/B update, copy over images from RADIO/ to IMAGES/ and
+ # make sure we have all the needed images ready under IMAGES/. All images
+ # should have '.img' as extension.
AddRadioImagesForAbOta(output_zip, ab_partitions)
# Generate care_map.txt for system and vendor partitions (if present), then