All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@aol.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] fs/erofs: add support for creating EROFS rootfs image
Date: Mon, 16 Mar 2020 09:58:38 +0800	[thread overview]
Message-ID: <20200316015838.15183-2-hsiangkao@aol.com> (raw)
In-Reply-To: <20200316015838.15183-1-hsiangkao@aol.com>

This patch makes possible to create rootfs image using
EROFS filesystem.

Signed-off-by: Gao Xiang <hsiangkao@aol.com>
---
 fs/Config.in       |  1 +
 fs/erofs/Config.in | 24 ++++++++++++++++++++++++
 fs/erofs/erofs.mk  | 17 +++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 fs/erofs/Config.in
 create mode 100644 fs/erofs/erofs.mk

diff --git a/fs/Config.in b/fs/Config.in
index 527051ef54..37a2aa21f8 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -5,6 +5,7 @@ source "fs/btrfs/Config.in"
 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"
diff --git a/fs/erofs/Config.in b/fs/erofs/Config.in
new file mode 100644
index 0000000000..dad2498a15
--- /dev/null
+++ b/fs/erofs/Config.in
@@ -0,0 +1,24 @@
+config BR2_TARGET_ROOTFS_EROFS
+	bool "erofs root filesystem"
+	select BR2_PACKAGE_HOST_EROFS_UTILS
+	help
+	  Build a EROFS root filesystem. If you enable this option,
+	  you probably want to enable the erofs-utils package too.
+
+if BR2_TARGET_ROOTFS_EROFS
+
+choice
+	prompt "Compression algorithm"
+	default BR2_TARGET_ROOTFS_EROFS_LZ4HC
+	help
+	  Select the primary compression algorithm to use when
+	  generating EROFS filesystem image.
+
+config BR2_TARGET_ROOTFS_EROFS_NONE
+	bool "none"
+
+config BR2_TARGET_ROOTFS_EROFS_LZ4HC
+	bool "lz4hc"
+
+endchoice
+endif # BR2_TARGET_ROOTFS_EROFS
diff --git a/fs/erofs/erofs.mk b/fs/erofs/erofs.mk
new file mode 100644
index 0000000000..58559d4833
--- /dev/null
+++ b/fs/erofs/erofs.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# 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))
-- 
2.20.1

  reply	other threads:[~2020-03-16  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200316015838.15183-1-hsiangkao.ref@aol.com>
2020-03-16  1:58 ` [Buildroot] [PATCH v2 1/2] package/erofs-utils: new package Gao Xiang
2020-03-16  1:58   ` Gao Xiang [this message]
2020-03-19 17:49     ` [Buildroot] [PATCH v2 2/2] fs/erofs: add support for creating EROFS rootfs image Yann E. MORIN
2020-03-20  7:13       ` Gao Xiang
2020-03-20 20:20         ` Yann E. MORIN
2020-03-18 22:39   ` [Buildroot] [PATCH v2 1/2] package/erofs-utils: new package Yann E. MORIN
2020-03-19 13:25     ` Gao Xiang
2020-03-19 16:44       ` Yann E. MORIN
2020-03-20  7:05         ` Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200316015838.15183-2-hsiangkao@aol.com \
    --to=hsiangkao@aol.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.