This patch makes possible to create rootfs image using
EROFS filesystem.
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
[yann.morin.1998@free.fr:
- simplify help text of filesystem entry
- drop the compression choice, keep the single boolean
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
source "fs/cloop/Config.in"
source "fs/cpio/Config.in"
source "fs/cramfs/Config.in"
+source "fs/erofs/Config.in"
source "fs/ext2/Config.in"
source "fs/f2fs/Config.in"
source "fs/initramfs/Config.in"
--- /dev/null
+config BR2_TARGET_ROOTFS_EROFS
+ bool "erofs root filesystem"
+ select BR2_PACKAGE_HOST_EROFS_UTILS
+ help
+ Build a EROFS root filesystem.
+
+if BR2_TARGET_ROOTFS_EROFS
+
+config BR2_TARGET_ROOTFS_EROFS_LZ4HC
+ bool "lz4hc compression"
+ help
+ Use lz4 high-compression to compress data in the filesystem.
+
+endif # BR2_TARGET_ROOTFS_EROFS
--- /dev/null
+################################################################################
+#
+# Build the EROFS root filesystem image
+#
+################################################################################
+
+ROOTFS_EROFS_DEPENDENCIES = host-erofs-utils
+
+ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZ4HC),y)
+ROOTFS_EROFS_ARGS += -zlz4hc
+endif
+
+define ROOTFS_EROFS_CMD
+ $(HOST_DIR)/bin/mkfs.erofs $(ROOTFS_EROFS_ARGS) $@ $(TARGET_DIR)
+endef
+
+$(eval $(rootfs))