Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a337fee authored by Kolja Dummann's avatar Kolja Dummann
Browse files

add handling for BML partitions

Handle BML partitions in recovery.fstab since we have support
to flash them. And don't fail is there is a second device/fs specified
in the fstab. Since this is needed on some device like Samsung to
get both rfs and ext4 working in recovery.

Change-Id: I956984da5ff0b1fcd5171bf6796f626e64181062
parent 1d3cba13
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ def LoadRecoveryFSTab(zip):
    line = line.strip()
    if not line or line.startswith("#"): continue
    pieces = line.split()
    if not (3 <= len(pieces) <= 5):
    if not (3 <= len(pieces) <= 7):
      raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))

    p = Partition()
@@ -780,7 +780,7 @@ def ComputeDifferences(diffs):
PARTITION_TYPES = { "yaffs2": "MTD", "mtd": "MTD",
                    "ext2": "EMMC", "ext3": "EMMC",
                    "ext4": "EMMC", "vfat": "EMMC",
                    "emmc": "EMMC" }
                    "emmc": "EMMC", "bml" : "BML" }

def GetTypeAndDevice(mount_point, info):
  fstab = info["fstab"]
+5 −0
Original line number Diff line number Diff line
@@ -233,6 +233,11 @@ class EdifyGenerator(object):
      elif partition_type == "EMMC":
        self.script.append(
            'package_extract_file("%(fn)s", "%(device)s");' % args)
      elif partition_type == "BML":
	        self.script.append(
            ('assert(package_extract_file("%(fn)s", "/tmp/%(device)s.img"),\n'
             '       write_raw_image("/tmp/%(device)s.img", "%(device)s"),\n'
             '       delete("/tmp/%(device)s.img"));') % args)
      else:
        raise ValueError("don't know how to write \"%s\" partitions" % (p.fs_type,))