summaryrefslogtreecommitdiff
authorXindong Xu <xindong.xu@amlogic.com>2018-10-10 05:42:20 (GMT)
committer Xindong Xu <xindong.xu@amlogic.com>2018-10-16 03:04:29 (GMT)
commitb77fb0186e43c756f6e3c5eb79809d4016899a5a (patch)
tree5a9b22289efdb86321cdbd2afd73500bb8a8dfdb
parent73f71f23db19529557e52e6fe44808b678c2aecb (diff)
downloadcommon-b77fb0186e43c756f6e3c5eb79809d4016899a5a.zip
common-b77fb0186e43c756f6e3c5eb79809d4016899a5a.tar.gz
common-b77fb0186e43c756f6e3c5eb79809d4016899a5a.tar.bz2
ota_amlogic: fix compile error [1/1]
PD# SWPL-674 Problem: make ota_amlogic has compile error userwarning: duplicate name: 'bootloader.img' Solution: fix compile error Delete duplicate bootloader.img Verify: atom Change-Id: I205db6b87244b66043ad8dd9491b1ae27cb3718f
Diffstat
-rwxr-xr-xota_amlogic.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/ota_amlogic.py b/ota_amlogic.py
index e71047f..94ac5e5 100755
--- a/ota_amlogic.py
+++ b/ota_amlogic.py
@@ -249,12 +249,14 @@ class BuildInfo(object):
def __init__(self, info_dict, oem_dicts):
"""Initializes a BuildInfo instance with the given dicts.
+ Note that it only wraps up the given dicts, without making copies.
+
Arguments:
info_dict: The build-time info dict.
oem_dicts: A list of OEM dicts (which is parsed from --oem_settings). Note
that it always uses the first dict to calculate the fingerprint or the
device name. The rest would be used for asserting OEM properties only
- (e.g. one package can be installed on one of these devices).
+ (e.g. one package can be installed on one of these devices).
"""
self.info_dict = info_dict
self.oem_dicts = oem_dicts
@@ -288,9 +290,15 @@ class BuildInfo(object):
def __getitem__(self, key):
return self.info_dict[key]
+ def __setitem__(self, key, value):
+ self.info_dict[key] = value
+
def get(self, key, default=None):
return self.info_dict.get(key, default)
+ def items(self):
+ return self.info_dict.items()
+
def GetBuildProp(self, prop):
"""Returns the inquired build property."""
try:
@@ -859,14 +867,9 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
script.ShowProgress(0.05, 5)
script.WriteRawImage("/boot", "boot.img")
- ZipOtherImage("bootloader", OPTIONS.input_tmp, output_zip)
-
script.ShowProgress(0.2, 10)
device_specific.FullOTA_InstallEnd()
- script.AppendExtra('ui_print("update bootloader.img...");')
- script.AppendExtra('write_bootloader_image(package_extract_file("bootloader.img"));')
-
if OPTIONS.extra_script is not None:
script.AppendExtra(OPTIONS.extra_script)
@@ -876,6 +879,10 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
script.ShowProgress(0.1, 10)
script.FormatPartition("/data")
+ script.FormatPartition("/data")
+ script.FormatPartition("/metadata")
+ script.AppendExtra('wipe_cache();')
+
if OPTIONS.two_step:
script.AppendExtra("""
set_stage("%(bcb_dev)s", "");