tools: pack: Modified pack to choose memory specific files for packing

Since partition.xml files are platform specific, we can't
give memory specific file names for packing. With this change
we can give image name corresponds to each memory/profile.
When pack script is invoked with memory, this change will
check for the image name corresponds to particular memory and
include it for packing, otherwise it will use the default filename.

For giving mem specific files:
EMMC partition.xml: Add new attribute "filename_memXXX" to partition
Other than EMMC: Add new child element with "memory" attribute

Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
Change-Id: If5f0439d124a42c1e7bc3026eae342be2323dede
This commit is contained in:
Karthick Shanmugham 2020-08-06 00:12:03 +05:30 committed by Gerrit - the friendly Code Review server
parent 24d30ab2b2
commit d8f52ee940

View file

@ -1175,6 +1175,12 @@ class Pack(object):
except KeyError, e:
continue
imgs = section.findall('img_name')
for img in imgs:
memory_attr = img.get('memory')
if memory_attr != None and memory_attr == memory_size:
filename = img.text;
else:
if diff_soc_ver_files:
try:
@ -1197,6 +1203,9 @@ class Pack(object):
print "Skipping partition '%s'" % section.attrib['label']
pass
if section != None and section.get('filename_mem' + memory_size) != None:
filename = section.get('filename_mem' + memory_size)
if filename != "":
ret = self.__gen_flash_script_image(filename, soc_version, file_exists, machid, partition, flinfo, script)
if ret == 0:
@ -1531,6 +1540,12 @@ class Pack(object):
except KeyError, e:
continue
imgs = section.findall('img_name')
for img in imgs:
memory_attr = img.get('memory')
if memory_attr != None and memory_attr == memory_size:
filename = img.text;
# system-partition specific for HK+PINE
if section_conf == "mibib" and QCN9000:
img = section.find('img_name')
@ -1561,6 +1576,9 @@ class Pack(object):
print "Skipping partition '%s'" % section.attrib['label']
pass
if section != None and section.get('filename_mem' + memory_size) != None:
filename = section.get('filename_mem' + memory_size)
if filename != "":
self.__gen_script_append_images(filename, soc_version, images, flinfo, root, section_conf, partition)
return 1