summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2023-02-09 18:39:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-09 13:19:02 +0000
commit9a832b46286ae97506d095950af4a24aded0900b (patch)
treebc029b6fb286a909fb00ad8f65e33936a16af964 /scripts
parent3bfdb9bee01521fc5a7fc0770d2934e56adad4ab (diff)
downloadpoky-9a832b46286ae97506d095950af4a24aded0900b.tar.gz
wic: Fix usage of fstype=none in wic
This allows to specify partition with fstype=none in the wks file to have partition created but without following mkfs. The none fstype is in the list already but the usage is not documented. Example; part /data --ondisk mmcblk0 --fstype=none --align 4096 --fixed-size 512 will create a partition, filesystem may be created manualy on the host or target and data will be preserved if the device is reflashed using same wks. Works with bmaptool and probably does not work with dd. Use case is persistent filesystem/data between reflashing of the image. (From OE-Core rev: 9af61442c8bc2e0b447706734cb90b3f4bcb2d6b) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 351cb64da37aa43113e5192605d04436652aa3b8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/partition.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 5563f4448a..dce5d1485b 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -132,6 +132,8 @@ class Partition():
132 self.update_fstab_in_rootfs = True 132 self.update_fstab_in_rootfs = True
133 133
134 if not self.source: 134 if not self.source:
135 if self.fstype == "none":
136 return
135 if not self.size and not self.fixed_size: 137 if not self.size and not self.fixed_size:
136 raise WicError("The %s partition has a size of zero. Please " 138 raise WicError("The %s partition has a size of zero. Please "
137 "specify a non-zero --size/--fixed-size for that " 139 "specify a non-zero --size/--fixed-size for that "
@@ -404,6 +406,9 @@ class Partition():
404 (extraopts, self.fsuuid, rootfs, rootfs_dir) 406 (extraopts, self.fsuuid, rootfs, rootfs_dir)
405 exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo) 407 exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo)
406 408
409 def prepare_empty_partition_none(self, rootfs, oe_builddir, native_sysroot):
410 pass
411
407 def prepare_empty_partition_ext(self, rootfs, oe_builddir, 412 def prepare_empty_partition_ext(self, rootfs, oe_builddir,
408 native_sysroot): 413 native_sysroot):
409 """ 414 """