Add an option to include a full bootloader in incremental OTA.
Bug: 23101469
Bug: 23999213
Change-Id: Id5ed748a5639663bb5df954f9375838fd9c295ca
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 768f4cb..ef45e63 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -37,6 +37,11 @@
Generate an incremental OTA using the given target-files zip as
the starting build.
+ --full_bootloader
+ When generating an incremental OTA, always include a full copy of
+ bootloader image. This option is only meaningful when -i is specified,
+ because a full bootloader is always included in a full OTA if applicable.
+
-v (--verify)
Remount and verify the checksums of the files written to the
system and vendor (if used) partitions. Incremental builds only.
@@ -125,6 +130,7 @@
OPTIONS.updater_binary = None
OPTIONS.oem_source = None
OPTIONS.fallback_to_full = True
+OPTIONS.full_bootloader = False
def MostPopularKey(d, default):
"""Given a dict, return the key corresponding to the largest
@@ -1420,6 +1426,8 @@
OPTIONS.package_key = a
elif o in ("-i", "--incremental_from"):
OPTIONS.incremental_source = a
+ elif o == "--full_bootloader":
+ OPTIONS.full_bootloader = True
elif o in ("-w", "--wipe_user_data"):
OPTIONS.wipe_user_data = True
elif o in ("-n", "--no_prereq"):
@@ -1460,6 +1468,7 @@
extra_long_opts=["board_config=",
"package_key=",
"incremental_from=",
+ "full_bootloader",
"wipe_user_data",
"no_prereq",
"extra_script=",