summaryrefslogtreecommitdiffstats
path: root/meta
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 /meta
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 'meta')
-rw-r--r--meta/classes/image_types.bbclass9
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/recipes-devtools/erofs-utils/erofs-utils_1.2.1.bb21
3 files changed, 31 insertions, 0 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 8028691405..2a45d45c71 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -108,6 +108,11 @@ IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME
108IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo" 108IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
109IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4" 109IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4"
110 110
111IMAGE_CMD_erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.erofs ${IMAGE_ROOTFS}"
112IMAGE_CMD_erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.erofs-lz4 ${IMAGE_ROOTFS}"
113IMAGE_CMD_erofs-lz4hc = "mkfs.erofs -zlz4hc ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.erofs-lz4hc ${IMAGE_ROOTFS}"
114
115
111IMAGE_CMD_TAR ?= "tar" 116IMAGE_CMD_TAR ?= "tar"
112# ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs 117# ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
113IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --format=posix --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]" 118IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --format=posix --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
@@ -243,6 +248,9 @@ do_image_ubi[depends] += "mtd-utils-native:do_populate_sysroot"
243do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot" 248do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot"
244do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot" 249do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot"
245do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot" 250do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot"
251do_image_erofs[depends] += "erofs-utils-native:do_populate_sysroot"
252do_image_erofs_lz4[depends] += "erofs-utils-native:do_populate_sysroot"
253do_image_erofs_lz4hc[depends] += "erofs-utils-native:do_populate_sysroot"
246 254
247# This variable is available to request which values are suitable for IMAGE_FSTYPES 255# This variable is available to request which values are suitable for IMAGE_FSTYPES
248IMAGE_TYPES = " \ 256IMAGE_TYPES = " \
@@ -261,6 +269,7 @@ IMAGE_TYPES = " \
261 wic wic.gz wic.bz2 wic.lzma wic.zst \ 269 wic wic.gz wic.bz2 wic.lzma wic.zst \
262 container \ 270 container \
263 f2fs \ 271 f2fs \
272 erofs erofs-lz4 erofs-lz4hc \
264" 273"
265 274
266# Compression is a special case of conversion. The old variable 275# Compression is a special case of conversion. The old variable
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 25d727a010..fa7eb9da0a 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -169,6 +169,7 @@ RECIPE_MAINTAINER_pn-ell = "Zang Ruochen <zangrc.fnst@fujitsu.com>"
169RECIPE_MAINTAINER_pn-enchant2 = "Anuj Mittal <anuj.mittal@intel.com>" 169RECIPE_MAINTAINER_pn-enchant2 = "Anuj Mittal <anuj.mittal@intel.com>"
170RECIPE_MAINTAINER_pn-encodings = "Armin Kuster <akuster808@gmail.com>" 170RECIPE_MAINTAINER_pn-encodings = "Armin Kuster <akuster808@gmail.com>"
171RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alex.kanavin@gmail.com>" 171RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alex.kanavin@gmail.com>"
172RECIPE_MAINTAINER_pn-erofs-utils = "Richard Weinberger <richard@nod.at>"
172RECIPE_MAINTAINER_pn-ethtool = "Changhyeok Bae <changhyeok.bae@gmail.com>" 173RECIPE_MAINTAINER_pn-ethtool = "Changhyeok Bae <changhyeok.bae@gmail.com>"
173RECIPE_MAINTAINER_pn-eudev = "Anuj Mittal <anuj.mittal@intel.com>" 174RECIPE_MAINTAINER_pn-eudev = "Anuj Mittal <anuj.mittal@intel.com>"
174RECIPE_MAINTAINER_pn-expat = "Yi Zhao <yi.zhao@windriver.com>" 175RECIPE_MAINTAINER_pn-expat = "Yi Zhao <yi.zhao@windriver.com>"
diff --git a/meta/recipes-devtools/erofs-utils/erofs-utils_1.2.1.bb b/meta/recipes-devtools/erofs-utils/erofs-utils_1.2.1.bb
new file mode 100644
index 0000000000..6435fea68c
--- /dev/null
+++ b/meta/recipes-devtools/erofs-utils/erofs-utils_1.2.1.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Tools for erofs filesystems"
2LICENSE = "GPLv2+"
3SECTION = "base"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94fa01670a2a8f2d3ab2de15004e0848"
5HOMEPAGE = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/README"
6
7SRCREV = "d1f4953edfcf4f51c71ba91586e21fc6ce9f6db9"
8SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git"
9
10S = "${WORKDIR}/git"
11
12DEPENDS = "util-linux-libuuid"
13
14inherit pkgconfig autotools
15
16PACKAGECONFIG ??= "lz4"
17PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
18
19EXTRA_OECONF = "${PACKAGECONFIG_CONFARGS} --disable-fuse"
20
21BBCLASSEXTEND = "native nativesdk"