aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/releasetools/edify_generator.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index f4bc8533e1..90f443de22 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -162,9 +162,13 @@ class EdifyGenerator(object):
fstab = self.info.get("fstab", None)
if fstab:
p = fstab[mount_point]
- self.script.append('mount("%s", "%s", "%s", "%s");' %
- (p.fs_type, common.PARTITION_TYPES[p.fs_type],
- p.device, p.mount_point))
+ if p.fs_type == 'f2fs':
+ self.script.append('run_program("/sbin/busybox", "mount", "%s");' %
+ (p.mount_point))
+ else:
+ self.script.append('mount("%s", "%s", "%s", "%s");' %
+ (p.fs_type, common.PARTITION_TYPES[p.fs_type],
+ p.device, p.mount_point))
self.mounts.add(p.mount_point)
def Unmount(self, mount_point):
@@ -197,9 +201,13 @@ class EdifyGenerator(object):
fstab = self.info.get("fstab", None)
if fstab:
p = fstab[partition]
- self.script.append('format("%s", "%s", "%s", "%s", "%s");' %
- (p.fs_type, common.PARTITION_TYPES[p.fs_type],
- p.device, p.length, p.mount_point))
+ if p.fs_type == 'f2fs':
+ self.script.append('run_program("/sbin/mkfs.f2fs", "%s");' %
+ (p.device))
+ else:
+ self.script.append('format("%s", "%s", "%s", "%s", "%s");' %
+ (p.fs_type, common.PARTITION_TYPES[p.fs_type],
+ p.device, p.length, p.mount_point))
def DeleteFiles(self, file_list):
"""Delete all files in file_list."""