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
parent 16d5831063
commit 8f22bd73ef

View file

@ -1312,10 +1312,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":