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

Commit b53fce86 authored by Koushik Dutta's avatar Koushik Dutta Committed by Gerrit Code Review
Browse files

Merge "add handling for BML partitions" into gingerbread

parents e2cbaa15 5a337fee
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,))