From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] fs/erofs: add support for creating EROFS rootfs image
Date: Thu, 19 Mar 2020 18:49:42 +0100 [thread overview]
Message-ID: <20200319174942.GF10025@scaer> (raw)
In-Reply-To: <20200316015838.15183-2-hsiangkao@aol.com>
Gao, All,
On 2020-03-16 09:58 +0800, Gao Xiang spake thusly:
> This patch makes possible to create rootfs image using
> EROFS filesystem.
>
> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
> ---
[--SNIP--]
> 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.
Since erofs is a read-only filesystem, and since erofs-utils only
provide an mkfs tool, I don't see how erofs-utils would be useful on the
target. So I've dropped that part from the help text.
> +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"
Do you envision adding other compression schemes? As far as I can see,
the erofs-utils as well as the linux driver only ever supports lz4 (and
I think you are well aware of that ;-) ).
I know the other filesystems (squashfs, jffs2...) have a choice about
the compression method, but for those ther are two or more such
possibilities, so it makes sense they have a choice. For erofs, not so
much.
As such, I have dropped the choice altogether, and just kept the single
boolean to enable compression.
Applied to master with the above changes. Thanks!
Regards,
Yann E. MORIN.
> +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
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2020-03-19 17:49 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 ` [Buildroot] [PATCH v2 2/2] fs/erofs: add support for creating EROFS rootfs image Gao Xiang
2020-03-19 17:49 ` Yann E. MORIN [this message]
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=20200319174942.GF10025@scaer \
--to=yann.morin.1998@free.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox