From 61db15ac1302f44001ee5b59f566921998f40345 Mon Sep 17 00:00:00 2001 From: klozz Date: Tue, 1 Jul 2014 01:00:32 -0500 Subject: [PATCH] Add support to f2fs a bml :) --- releasetools/common.py | 1 + releasetools/edify_generator.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/releasetools/common.py b/releasetools/common.py index 13b6d8b..a689fe7 100644 --- a/releasetools/common.py +++ b/releasetools/common.py @@ -823,6 +823,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 d1dacab..587e59d 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,))