sm6150-common: releaseteools: Rename timestamp to modem_version
Change-Id: Ieb258d37fccd1a4371183ca73d5c836d9d8d4941
This commit is contained in:
parent
514f6bb6b0
commit
2c30dfedda
@ -1,6 +1,7 @@
|
||||
#
|
||||
# Copyright (C) 2009 The Android Open Source Project
|
||||
# Copyright (C) 2019 The Mokee Open Source Project
|
||||
# Copyright (C) 2020 The LineageOS Open Source Project
|
||||
# Copyright (C) 2020-2021 The LineageOS Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -13,6 +14,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import common
|
||||
import re
|
||||
@ -54,10 +56,10 @@ def AddBasebandAssertion(info, input_zip):
|
||||
android_info = input_zip.read("OTA/android-info.txt")
|
||||
m = re.search(r'require\s+version-baseband\s*=\s*(.+)', android_info)
|
||||
if m:
|
||||
timestamp, firmware_version = m.group(1).rstrip().split(',')
|
||||
timestamps = timestamp.split('|')
|
||||
if ((len(timestamps) and '*' not in timestamps) and \
|
||||
modem_version, firmware_version = m.group(1).rstrip().split(',')
|
||||
modem_versions = modem_version.split('|')
|
||||
if ((len(modem_versions) and '*' not in modem_versions) and \
|
||||
(len(firmware_version) and '*' not in firmware_version)):
|
||||
cmd = 'assert(xiaomi.verify_baseband(' + ','.join(['"%s"' % baseband for baseband in timestamps]) + ') == "1" || abort("ERROR: This package requires firmware from MIUI {1} or newer. Please upgrade firmware and retry!"););'
|
||||
info.script.AppendExtra(cmd.format(timestamps, firmware_version))
|
||||
cmd = 'assert(xiaomi.verify_baseband(' + ','.join(['"%s"' % baseband for baseband in modem_versions]) + ') == "1" || abort("ERROR: This package requires firmware from MIUI {1} or newer. Please upgrade firmware and retry!"););'
|
||||
info.script.AppendExtra(cmd.format(modem_versions, firmware_version))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user