summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/partition.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/partition.py')
-rw-r--r--scripts/lib/wic/partition.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 76d144d12d..e0b2c5bdf2 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -141,9 +141,9 @@ class Partition():
141 native_sysroot) 141 native_sysroot)
142 self.source_file = "%s/fs.%s" % (cr_workdir, self.fstype) 142 self.source_file = "%s/fs.%s" % (cr_workdir, self.fstype)
143 else: 143 else:
144 if self.fstype == 'squashfs': 144 if self.fstype in ('squashfs', 'erofs'):
145 raise WicError("It's not possible to create empty squashfs " 145 raise WicError("It's not possible to create empty %s "
146 "partition '%s'" % (self.mountpoint)) 146 "partition '%s'" % (self.fstype, self.mountpoint))
147 147
148 rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label, 148 rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label,
149 self.lineno, self.fstype) 149 self.lineno, self.fstype)
@@ -369,6 +369,16 @@ class Partition():
369 (rootfs_dir, rootfs, extraopts) 369 (rootfs_dir, rootfs, extraopts)
370 exec_native_cmd(squashfs_cmd, native_sysroot, pseudo=pseudo) 370 exec_native_cmd(squashfs_cmd, native_sysroot, pseudo=pseudo)
371 371
372 def prepare_rootfs_erofs(self, rootfs, cr_workdir, oe_builddir, rootfs_dir,
373 native_sysroot, pseudo):
374 """
375 Prepare content for a erofs rootfs partition.
376 """
377 extraopts = self.mkfs_extraopts or ''
378 erofs_cmd = "mkfs.erofs %s -U %s %s %s" % \
379 (extraopts, self.fsuuid, rootfs, rootfs_dir)
380 exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo)
381
372 def prepare_empty_partition_ext(self, rootfs, oe_builddir, 382 def prepare_empty_partition_ext(self, rootfs, oe_builddir,
373 native_sysroot): 383 native_sysroot):
374 """ 384 """