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_v2: limit the wifi fws based on profiles
This patch adds support in the pack_v2 script to limit the wifi firmwares which packed into the single images based on the profiles. Add corresponding profile entry under each RDP config in config.xml to restrict wifi fw images packed into the single image. Eg: <profiles>256</profiles> <profiles>512</profiles> <profiles>512,256</profiles> Note: No need add default profile in profiles tag. Change-Id: I06667ec7ba31a2bbcb742fbd5319f0e30be193fc Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
This commit is contained in:
parent
4568deeb3c
commit
ea1cdf6874
1 changed files with 16 additions and 8 deletions
|
|
@ -863,6 +863,13 @@ class Pack(object):
|
||||||
wifi_fw_list = []
|
wifi_fw_list = []
|
||||||
no_fw_mach_ids = []
|
no_fw_mach_ids = []
|
||||||
for segment in entries:
|
for segment in entries:
|
||||||
|
if (memory_size != "default"):
|
||||||
|
profiles = segment.find('.//profiles')
|
||||||
|
if (profiles == None):
|
||||||
|
continue
|
||||||
|
if memory_size not in profiles.text:
|
||||||
|
continue
|
||||||
|
|
||||||
wififw_type = segment.find('.//wififw_name')
|
wififw_type = segment.find('.//wififw_name')
|
||||||
if wififw_type == None:
|
if wififw_type == None:
|
||||||
machid = int(segment.find(".//machid").text, 0)
|
machid = int(segment.find(".//machid").text, 0)
|
||||||
|
|
@ -1063,6 +1070,7 @@ class Pack(object):
|
||||||
wifi_fw_type = ""
|
wifi_fw_type = ""
|
||||||
|
|
||||||
if filename != "":
|
if filename != "":
|
||||||
|
if filename not in wifi_fw_list:
|
||||||
wifi_fw_list.append(filename)
|
wifi_fw_list.append(filename)
|
||||||
filename = ""
|
filename = ""
|
||||||
continue
|
continue
|
||||||
|
|
@ -1184,7 +1192,7 @@ class Pack(object):
|
||||||
if (2 == len(possible_fw_vers)):
|
if (2 == len(possible_fw_vers)):
|
||||||
temp_name = filename
|
temp_name = filename
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][0][0], a)
|
temp_name = temp_name.replace(possible_fw_vers[0][0][0], a)
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][1][0], b)
|
temp_name = temp_name.replace(possible_fw_vers[1][0][0], b)
|
||||||
|
|
||||||
if os.path.exists(os.path.join(self.images_dname, temp_name)):
|
if os.path.exists(os.path.join(self.images_dname, temp_name)):
|
||||||
if wifi_fws_combs.get(temp_name) == None:
|
if wifi_fws_combs.get(temp_name) == None:
|
||||||
|
|
@ -1195,8 +1203,8 @@ class Pack(object):
|
||||||
if (3 == len(possible_fw_vers)):
|
if (3 == len(possible_fw_vers)):
|
||||||
temp_name = filename
|
temp_name = filename
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][0][0], a)
|
temp_name = temp_name.replace(possible_fw_vers[0][0][0], a)
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][1][0], b)
|
temp_name = temp_name.replace(possible_fw_vers[1][0][0], b)
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][2][0], c)
|
temp_name = temp_name.replace(possible_fw_vers[2][0][0], c)
|
||||||
|
|
||||||
if os.path.exists(os.path.join(self.images_dname, temp_name)):
|
if os.path.exists(os.path.join(self.images_dname, temp_name)):
|
||||||
if wifi_fws_combs.get(temp_name) == None:
|
if wifi_fws_combs.get(temp_name) == None:
|
||||||
|
|
@ -1207,9 +1215,9 @@ class Pack(object):
|
||||||
if (4 == len(possible_fw_vers)):
|
if (4 == len(possible_fw_vers)):
|
||||||
temp_name = filename
|
temp_name = filename
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][0][0], a)
|
temp_name = temp_name.replace(possible_fw_vers[0][0][0], a)
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][1][0], b)
|
temp_name = temp_name.replace(possible_fw_vers[1][0][0], b)
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][2][0], c)
|
temp_name = temp_name.replace(possible_fw_vers[2][0][0], c)
|
||||||
temp_name = temp_name.replace(possible_fw_vers[0][3][0], d)
|
temp_name = temp_name.replace(possible_fw_vers[3][0][0], d)
|
||||||
|
|
||||||
if os.path.exists(os.path.join(self.images_dname, temp_name)):
|
if os.path.exists(os.path.join(self.images_dname, temp_name)):
|
||||||
if wifi_fws_combs.get(temp_name) == None:
|
if wifi_fws_combs.get(temp_name) == None:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue