Add a tool to generate OTA from images

During build, we will need to generate an OTA for boot partition using a
16K boot image. Typically, OTA is generated from target_files.zip . To
avoid relying on target_files.zip as a dependency for 16K OTA, add a
tool to generate OTA directly from a raw image.

Test: th, ota_from_raw_img --partition_name boot --output ota.zip $OUT/boot_16k.img
Bug: 293313353
Change-Id: I2076332faf2a8dc573450597efd481e285a49545
This commit is contained in:
Kelvin Zhang
2023-08-22 08:56:30 -07:00
parent a169e4f7f6
commit c7441e5907
5 changed files with 179 additions and 25 deletions

View File

@@ -934,9 +934,9 @@ class PayloadGenerator(object):
# 4. Dump the signed payload properties.
properties_file = common.MakeTempFile(prefix="payload-properties-",
suffix=".txt")
cmd = ["brillo_update_payload", "properties",
"--payload", self.payload_file,
"--properties_file", properties_file]
cmd = ["delta_generator",
"--in_file=" + self.payload_file,
"--properties_file=" + properties_file]
self._Run(cmd)
if self.secondary: