author | Xindong Xu <xindong.xu@amlogic.com> | 2020-06-23 08:55:51 (GMT) |
---|---|---|
committer | Xindong Xu <xindong.xu@amlogic.com> | 2020-06-27 01:15:21 (GMT) |
commit | e83afe7ea454461a0afea7734ba98a902f1f6403 (patch) | |
tree | 0c2e8d55fe306276ea18e9392f6df3608c9a2c6f | |
parent | 071641e365caa7b226a8f4e0682d34aea79b7245 (diff) | |
download | common-e83afe7ea454461a0afea7734ba98a902f1f6403.zip common-e83afe7ea454461a0afea7734ba98a902f1f6403.tar.gz common-e83afe7ea454461a0afea7734ba98a902f1f6403.tar.bz2 |
ota: abort update when dtb changes in inc_ota [1/1]
BUG: 159290015
Problem:
inc_ota error when partition table change
Solution:
abort update when dtb changes in inc_ota
Verify:
sabrian
Change-Id: I299ce90879d4ad1cb729239205f8e1fe728acdfa
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
-rwxr-xr-x | releasetools.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/releasetools.py b/releasetools.py index 7114291..865f591 100755 --- a/releasetools.py +++ b/releasetools.py @@ -161,7 +161,7 @@ def FullOTA_Assertions(info): if OPTIONS.ota_partition_change: info.script.AppendExtra('ui_print("update bootloader.img...");') info.script.AppendExtra('write_bootloader_image(package_extract_file("bootloader.img"));') - info.script.AppendExtra('set_bootloader_env("recovery_from_flash", "defenv_resev;save;reset");') + info.script.AppendExtra('set_bootloader_env("recovery_from_flash", "defenv_reserv;save;reset");') info.script.AppendExtra('write_dtb_image(package_extract_file("dt.img"));') info.script.WriteRawImage("/recovery", "recovery.img") if OPTIONS.backup_zip: @@ -249,6 +249,11 @@ def IncrementalOTA_VerifyEnd(info): def IncrementalOTA_InstallBegin(info): LoadInfoDict_amlogic(info.info_dict, info.target_zip); + if OPTIONS.ota_zip_check: + info.script.AppendExtra('if ota_zip_check() == "1" then') + info.script.AppendExtra('abort("partition table changes, cannot update");') + info.script.AppendExtra('endif;') + platform = GetBuildProp("ro.board.platform", info.info_dict) print "ro.board.platform: %s" % (platform) if "meson3" in platform: |