mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq807x: Modified pack script to name images based on version.
This change modifies the pack script to generate soc-version specific names for images to be packed into single image. Change-Id: Ic6406fe0fc164d8c6e7b2622c97915aac2afaac8 Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
This commit is contained in:
parent
cb09b1a3b7
commit
5a41b59a6d
1 changed files with 11 additions and 4 deletions
|
|
@ -766,6 +766,7 @@ class Pack(object):
|
|||
section_conf = "wififw_ubi"
|
||||
|
||||
if soc_version:
|
||||
section_conf = section_conf + "_v" + str(soc_version)
|
||||
script.start_if("soc_version_major", soc_version)
|
||||
|
||||
script.start_activity("Flashing %s:" % section_conf)
|
||||
|
|
@ -1017,7 +1018,7 @@ class Pack(object):
|
|||
if image_info not in images:
|
||||
images.append(image_info)
|
||||
|
||||
def __gen_script_append_images(self, filename, images, flinfo, root, section_conf, partition):
|
||||
def __gen_script_append_images(self, filename, soc_version, images, flinfo, root, section_conf, partition):
|
||||
|
||||
part_info = self.__get_part_info(partition)
|
||||
if part_info == None and self.flinfo.type != 'norplusnand':
|
||||
|
|
@ -1042,6 +1043,9 @@ class Pack(object):
|
|||
elif section_conf == "wififw" and (self.flash_type == "nand" or self.flash_type == "norplusnand"):
|
||||
section_conf = "wififw_ubi"
|
||||
|
||||
if soc_version:
|
||||
section_conf = section_conf + "_v" + str(soc_version)
|
||||
|
||||
image_info = ImageInfo(section_conf + "-" + sha1(filename),
|
||||
filename, "firmware")
|
||||
if filename.lower() != "none":
|
||||
|
|
@ -1059,6 +1063,7 @@ class Pack(object):
|
|||
global MODE
|
||||
global SRC_DIR
|
||||
|
||||
soc_version = 0
|
||||
diff_soc_ver_files = 0
|
||||
diff_files = ""
|
||||
self.__gen_flash_script(script, flinfo, root)
|
||||
|
|
@ -1195,8 +1200,10 @@ class Pack(object):
|
|||
imgs = section.findall('img_name')
|
||||
try:
|
||||
for img in imgs:
|
||||
soc_version = img.get('soc_version')
|
||||
filename = img.text
|
||||
self.__gen_script_append_images(filename, images, flinfo, root, section_conf, partition)
|
||||
self.__gen_script_append_images(filename, soc_version, images, flinfo, root, section_conf, partition)
|
||||
soc_version = 0 # Clear soc_version for next iteration
|
||||
continue
|
||||
except KeyError, e:
|
||||
continue
|
||||
|
|
@ -1210,14 +1217,14 @@ class Pack(object):
|
|||
partition = section.attrib['label']
|
||||
if filename == "":
|
||||
continue
|
||||
self.__gen_script_append_images(filename, images, flinfo, root, section_conf, partition)
|
||||
self.__gen_script_append_images(filename, version, images, flinfo, root, section_conf, partition)
|
||||
diff_soc_ver_files = 0 # Clear diff_soc_ver_files for next iteration
|
||||
continue
|
||||
except KeyError, e:
|
||||
print "Skipping partition '%s'" % section.attrib['label']
|
||||
pass
|
||||
|
||||
self.__gen_script_append_images(filename, images, flinfo, root, section_conf, partition)
|
||||
self.__gen_script_append_images(filename, soc_version, images, flinfo, root, section_conf, partition)
|
||||
|
||||
def __mkimage(self, images):
|
||||
"""Create the multi-image blob.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue