diff --git a/releasetools/common.py b/releasetools/common.py index 2fb3aa5..f9c0776 100644 --- a/releasetools/common.py +++ b/releasetools/common.py @@ -852,6 +852,7 @@ def worker(): # map recovery.fstab's fs_types to mount/format "partition types" PARTITION_TYPES = { "yaffs2": "MTD", "mtd": "MTD", "ext3": "EMMC", "ext4": "EMMC", "emmc": "EMMC", "vfat": "EMMC", + "f2fs": "EMMC","bml": "BML", "auto": "EMMC"} def GetTypeAndDevice(mount_point, info): diff --git a/releasetools/edify_generator.py b/releasetools/edify_generator.py index 537af1c..2a01efc 100644 --- a/releasetools/edify_generator.py +++ b/releasetools/edify_generator.py @@ -210,6 +210,11 @@ def WriteRawImage(self, mount_point, fn): 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,))