diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2023-02-09 18:39:03 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-15 10:21:34 +0000 |
commit | 7f6a17a19c169d091f6ca35490df61491cc1e52f (patch) | |
tree | 6a9ed062a2809b357d27edec4bb029fd4b4fe662 /scripts/lib | |
parent | 87f82469fc8f57196a7776db61c4564525b1887e (diff) | |
download | poky-7f6a17a19c169d091f6ca35490df61491cc1e52f.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: 351cb64da37aa43113e5192605d04436652aa3b8)
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>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/partition.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 2a916e077c..382afa44bc 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -133,6 +133,8 @@ class Partition(): | |||
133 | self.update_fstab_in_rootfs = True | 133 | self.update_fstab_in_rootfs = True |
134 | 134 | ||
135 | if not self.source: | 135 | if not self.source: |
136 | if self.fstype == "none": | ||
137 | return | ||
136 | if not self.size and not self.fixed_size: | 138 | if not self.size and not self.fixed_size: |
137 | raise WicError("The %s partition has a size of zero. Please " | 139 | raise WicError("The %s partition has a size of zero. Please " |
138 | "specify a non-zero --size/--fixed-size for that " | 140 | "specify a non-zero --size/--fixed-size for that " |
@@ -405,6 +407,9 @@ class Partition(): | |||
405 | (extraopts, self.fsuuid, rootfs, rootfs_dir) | 407 | (extraopts, self.fsuuid, rootfs, rootfs_dir) |
406 | exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo) | 408 | exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo) |
407 | 409 | ||
410 | def prepare_empty_partition_none(self, rootfs, oe_builddir, native_sysroot): | ||
411 | pass | ||
412 | |||
408 | def prepare_empty_partition_ext(self, rootfs, oe_builddir, | 413 | def prepare_empty_partition_ext(self, rootfs, oe_builddir, |
409 | native_sysroot): | 414 | native_sysroot): |
410 | """ | 415 | """ |