mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
tools: pack: Update pack script for IPQ9574
This patch adds the following changes, Machine ID check for qcn9224 V1 flashing which will help to skip this FW flashing if WIFI_FW is 1. Updated EMMC image append and flash script generation logic to skip if filename_img<x> is not given inside wififw_type_max range. Increased the start activity string length to get the full WIFI_FW image name in console during flashing. Change-Id: Ica9552caa219cd1f4be9fa25a4e9a716b789ca48 Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
This commit is contained in:
parent
144fe5efd0
commit
9e40b52661
1 changed files with 47 additions and 4 deletions
|
|
@ -381,7 +381,7 @@ class FlashScript(object):
|
|||
"""Generate code, to indicate start of an activity."""
|
||||
|
||||
self.script.append('if test "x$verbose" = "x"; then\n')
|
||||
self.echo("'%-40.40s'" % activity, nl=False)
|
||||
self.echo("'%-55.55s'" % activity, nl=False)
|
||||
self.script.append('else\n')
|
||||
self.echo("'%s %s Started'" % ("#" * 40, activity), verbose=True)
|
||||
self.script.append('fi\n')
|
||||
|
|
@ -790,6 +790,23 @@ class Pack(object):
|
|||
|
||||
def __gen_flash_script_wififw_ubi_volume_qcn9224_v1(self, entries, fw_filename, wifi_fw_type, script):
|
||||
|
||||
machid_list = []
|
||||
for section in entries:
|
||||
|
||||
wififw_type = section.find('.//wififw_type')
|
||||
if wififw_type == None:
|
||||
continue
|
||||
wififw_type = str(section.find(".//wififw_type").text)
|
||||
|
||||
if str(1) == str(wififw_type):
|
||||
continue
|
||||
|
||||
machid = int(section.find(".//machid").text, 0)
|
||||
machid = "%x" % machid
|
||||
|
||||
machid_list.append(machid)
|
||||
|
||||
script.start_if_or("machid", machid_list)
|
||||
script.append("setenv qcn9224_version 1 && detect_qcn9224", fatal=False)
|
||||
script.append('if test "$qcn9224_version" = "1"; then\n', fatal=False)
|
||||
|
||||
|
|
@ -816,6 +833,8 @@ class Pack(object):
|
|||
script.finish_activity()
|
||||
script.end_if()
|
||||
|
||||
script.end_if()
|
||||
|
||||
return 1
|
||||
|
||||
def __gen_flash_script_wififw(self, entries, partition, filename, wifi_fw_type, flinfo, script, skip_size_check):
|
||||
|
|
@ -922,7 +941,23 @@ class Pack(object):
|
|||
|
||||
def __gen_flash_script_wififw_qcn9224_v1(self, entries, partition, filename, wifi_fw_type, flinfo, script, skip_size_check):
|
||||
|
||||
img_size = self.__get_img_size(filename)
|
||||
machid_list = []
|
||||
for section in entries:
|
||||
|
||||
wififw_type = section.find('.//wififw_type')
|
||||
if wififw_type == None:
|
||||
continue
|
||||
wififw_type = str(section.find(".//wififw_type").text)
|
||||
|
||||
if str(1) == str(wififw_type):
|
||||
continue
|
||||
|
||||
machid = int(section.find(".//machid").text, 0)
|
||||
machid = "%x" % machid
|
||||
|
||||
machid_list.append(machid)
|
||||
|
||||
img_size = self.__get_img_size(filename)
|
||||
part_info = self.__get_part_info(partition)
|
||||
|
||||
section_label = partition.split(":")
|
||||
|
|
@ -976,6 +1011,7 @@ class Pack(object):
|
|||
print "Flash type is norplusemmc"
|
||||
return 1
|
||||
|
||||
script.start_if_or("machid", machid_list)
|
||||
script.append("setenv qcn9224_version 1 && detect_qcn9224", fatal=False)
|
||||
script.append('if test "$qcn9224_version" = "1"; then\n', fatal=False)
|
||||
|
||||
|
|
@ -1006,6 +1042,8 @@ class Pack(object):
|
|||
script.finish_activity()
|
||||
script.end_if()
|
||||
|
||||
script.end_if()
|
||||
|
||||
return 1
|
||||
|
||||
def __gen_flash_script_bootldr(self, entries, partition, flinfo, script):
|
||||
|
|
@ -1548,7 +1586,9 @@ class Pack(object):
|
|||
for fw_type in range(int(wifi_fw_type_min), int(wifi_fw_type_max) + 1):
|
||||
|
||||
if image_type == "all" or section.attrib['image_type'] == image_type:
|
||||
filename = section.attrib['filename_img' + str(fw_type)]
|
||||
if 'filename_img' + str(fw_type) in section.attrib:
|
||||
filename = section.attrib['filename_img' + str(fw_type)]
|
||||
|
||||
if filename == "":
|
||||
continue
|
||||
wifi_fw_type = str(fw_type)
|
||||
|
|
@ -1561,6 +1601,7 @@ class Pack(object):
|
|||
if ret == 0:
|
||||
return 0
|
||||
wifi_fw_type = ""
|
||||
filename = ""
|
||||
|
||||
wifi_fw_type_min = ""
|
||||
wifi_fw_type_max = "" # Clear for next partition
|
||||
|
|
@ -2036,7 +2077,8 @@ class Pack(object):
|
|||
|
||||
for fw_type in range(int(wifi_fw_type_min), int(wifi_fw_type_max) + 1):
|
||||
if image_type == "all" or section.attrib['image_type'] == image_type:
|
||||
filename = section.attrib['filename_img' + str(fw_type)]
|
||||
if 'filename_img' + str(fw_type) in section.attrib:
|
||||
filename = section.attrib['filename_img' + str(fw_type)]
|
||||
if filename == "":
|
||||
continue
|
||||
if 'optional' in section.attrib:
|
||||
|
|
@ -2045,6 +2087,7 @@ class Pack(object):
|
|||
wifi_fw_type = str(fw_type)
|
||||
self.__gen_script_append_images(filename, soc_version, wifi_fw_type, images, flinfo, root, section_conf, partition)
|
||||
wifi_fw_type = ""
|
||||
filename = ""
|
||||
|
||||
wifi_fw_type_min = ""
|
||||
wifi_fw_type_max = "" # Clean for next partition
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue