summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/ksparser.py
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2021-05-25 13:29:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-31 14:31:01 +0100
commit63b3c44d273d03fe3ac98d6f7c8e8475b468b44e (patch)
treec5146ab07d46bd7958ebf3790ba115ed948614be /scripts/lib/wic/ksparser.py
parent40d3366bea8d2417e89a37c6f2d38e1542160342 (diff)
downloadpoky-63b3c44d273d03fe3ac98d6f7c8e8475b468b44e.tar.gz
Add support for erofs filesystems
Since Linux 5.4 a new read-only filesystem is available, erofs. Compared to squashfs it offers much better read performance with and without compression enabled. It suppports two optional compressors, lz4 and lz4hc. >From the mkfs.erofs man page: EROFS is a new enhanced lightweight linux read-only filesystem with modern designs (eg. no buffer head, reduced metadata, inline xattrs/data, etc.) for scenarios which need high-performance read-only requirements, e.g. Android OS for smartphones and LIVECDs. It also provides fixed-sized output compression support, which improves storage density, keeps relatively higher compression ratios, which is more useful to achieve high performance for embedded devices with limited memory since it has unnoticable memory overhead and page cache thrashing. This commit adds support for three new filesystem targets: erofs: erofs without compression erofs-lz4: erofs with lz4 compresssion enabled erofs-lz4hc: erofs with lz4hc compression enabled (From OE-Core rev: 41dead1ff8ccc49e6cd6e6f5d41a59d164693e0d) Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/ksparser.py')
-rw-r--r--scripts/lib/wic/ksparser.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 3eb669da39..7a4cc83af5 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -157,7 +157,8 @@ class KickStart():
157 part.add_argument('--fsoptions', dest='fsopts') 157 part.add_argument('--fsoptions', dest='fsopts')
158 part.add_argument('--fstype', default='vfat', 158 part.add_argument('--fstype', default='vfat',
159 choices=('ext2', 'ext3', 'ext4', 'btrfs', 159 choices=('ext2', 'ext3', 'ext4', 'btrfs',
160 'squashfs', 'vfat', 'msdos', 'swap')) 160 'squashfs', 'vfat', 'msdos', 'erofs',
161 'swap'))
161 part.add_argument('--mkfs-extraopts', default='') 162 part.add_argument('--mkfs-extraopts', default='')
162 part.add_argument('--label') 163 part.add_argument('--label')
163 part.add_argument('--use-label', action='store_true') 164 part.add_argument('--use-label', action='store_true')
@@ -229,6 +230,10 @@ class KickStart():
229 err = "%s:%d: SquashFS does not support LABEL" \ 230 err = "%s:%d: SquashFS does not support LABEL" \
230 % (confpath, lineno) 231 % (confpath, lineno)
231 raise KickStartError(err) 232 raise KickStartError(err)
233 # erofs does not support filesystem labels
234 if parsed.fstype == 'erofs' and parsed.label:
235 err = "%s:%d: erofs does not support LABEL" % (confpath, lineno)
236 raise KickStartError(err)
232 if parsed.fstype == 'msdos' or parsed.fstype == 'vfat': 237 if parsed.fstype == 'msdos' or parsed.fstype == 'vfat':
233 if parsed.fsuuid: 238 if parsed.fsuuid:
234 if parsed.fsuuid.upper().startswith('0X'): 239 if parsed.fsuuid.upper().startswith('0X'):