tools: pack: make rootfs_data optional

rootfs_data partition is not required with the
latest fs tools OpenWRT package as the logical volume
inside the rootfs partition will be used for overlay
and it is removed from the parttion table. So making it
as optional

Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
Change-Id: Ia5489b714833548fd7f1aa4491c61eb70efdfdfa
This commit is contained in:
Rajkumar Ayyasamy 2020-11-10 16:30:30 +05:30 committed by Gerrit - the friendly Code Review server
parent d6dd5e226b
commit 940366ed72

View file

@ -1599,10 +1599,16 @@ class Pack(object):
if (self.flash_type == "norplusemmc" and flinfo.type == "emmc") or (self.flash_type != "norplusemmc"):
if flinfo.type == "emmc":
script.start_activity("Flashing rootfs_data:")
part_info = self.partitions["rootfs_data"]
script.erase(part_info.offset, part_info.length)
script.finish_activity()
srcDir_part = SRC_DIR + "/" + ARCH_NAME + "/flash_partition/" + flinfo.type + "-partition.xml"
rpart = ET.parse(srcDir_part)
parts = rpart.findall(".//physical_partition[@ref='emmc']/partition")
for index in range(len(parts)):
section = parts[index]
if section.attrib['label'] == "rootfs_data":
script.start_activity("Flashing rootfs_data:")
part_info = self.partitions["rootfs_data"]
script.erase(part_info.offset, part_info.length)
script.finish_activity()
script.end()
if self.flash_type == "norplusemmc" and flinfo.type == "emmc":