Add support for full radio option

Occasionally we need to include full radio image in incremental OTAs.
Adding --full_radio option to support that.

It needs matching changes in the releasetools.py in the target_files
zip, which comes from device/<vendor>/<device>/releasetools.py.

Bug: 19994922
Change-Id: Id1fb3a9cdb7e67dd9dbadd8fb6cd5fccd358820e
This commit is contained in:
Tao Bao
2015-04-21 14:32:35 -07:00
parent 5beb338793
commit 43078aa37a

View File

@@ -37,6 +37,11 @@ Usage: ota_from_target_files [flags] input_target_files output_ota_package
Generate an incremental OTA using the given target-files zip as Generate an incremental OTA using the given target-files zip as
the starting build. the starting build.
--full_radio
When generating an incremental OTA, always include a full copy of
radio image. This option is only meaningful when -i is specified,
because a full radio is always included in a full OTA if applicable.
-v (--verify) -v (--verify)
Remount and verify the checksums of the files written to the Remount and verify the checksums of the files written to the
system and vendor (if used) partitions. Incremental builds only. system and vendor (if used) partitions. Incremental builds only.
@@ -117,6 +122,7 @@ OPTIONS.block_based = False
OPTIONS.updater_binary = None OPTIONS.updater_binary = None
OPTIONS.oem_source = None OPTIONS.oem_source = None
OPTIONS.fallback_to_full = True OPTIONS.fallback_to_full = True
OPTIONS.full_radio = False
def MostPopularKey(d, default): def MostPopularKey(d, default):
"""Given a dict, return the key corresponding to the largest """Given a dict, return the key corresponding to the largest
@@ -1456,6 +1462,8 @@ def main(argv):
OPTIONS.package_key = a OPTIONS.package_key = a
elif o in ("-i", "--incremental_from"): elif o in ("-i", "--incremental_from"):
OPTIONS.incremental_source = a OPTIONS.incremental_source = a
elif o == "--full_radio":
OPTIONS.full_radio = True
elif o in ("-w", "--wipe_user_data"): elif o in ("-w", "--wipe_user_data"):
OPTIONS.wipe_user_data = True OPTIONS.wipe_user_data = True
elif o in ("-n", "--no_prereq"): elif o in ("-n", "--no_prereq"):
@@ -1497,6 +1505,7 @@ def main(argv):
"board_config=", "board_config=",
"package_key=", "package_key=",
"incremental_from=", "incremental_from=",
"full_radio",
"wipe_user_data", "wipe_user_data",
"no_prereq", "no_prereq",
"extra_script=", "extra_script=",