[v2,6/6] squashfs: add zstd support

Message ID 20180409200429.22650-6-ps.report@gmx.net
State Superseded
Headers show
Series
  • [v2,1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3
Related show

Commit Message

Peter Seiderer April 9, 2018, 8:04 p.m.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - split off target zstd support (suggested by Yann E. MORIN)
---
 package/squashfs/Config.in   | 6 ++++++
 package/squashfs/squashfs.mk | 9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

Comments

Yann E. MORIN April 11, 2018, 9:27 p.m. | #1
Peter, All,

On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[--SNIP--]
> diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> index 67025ac68a..bec867d676 100644
> --- a/package/squashfs/squashfs.mk
> +++ b/package/squashfs/squashfs.mk
> @@ -9,7 +9,7 @@ SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
>  SQUASHFS_SITE_METHOD = git
>  SQUASHFS_LICENSE = GPL-2.0+
>  SQUASHFS_LICENSE_FILES = COPYING
> -SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
> +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
>  
>  ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
>  SQUASHFS_DEPENDENCIES += lz4
> @@ -46,6 +46,13 @@ else
>  SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
>  endif
>  
> +ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
> +SQUASHFS_DEPENDENCIES += zstd
> +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
> +else
> +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
> +endif

Please, keep the gzip case last, so that it stays the default. Add the
zstd case first.

Regards,
Yann E. MORIN.

>  HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
>  
>  HOST_SQUASHFS_MAKE_ARGS = \
> -- 
> 2.16.3
>
Peter Seiderer April 12, 2018, 6:31 p.m. | #2
Hello Yann,

On Wed, 11 Apr 2018 23:27:54 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>  
> [--SNIP--]
> > diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> > index 67025ac68a..bec867d676 100644
> > --- a/package/squashfs/squashfs.mk
> > +++ b/package/squashfs/squashfs.mk
> > @@ -9,7 +9,7 @@ SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
> >  SQUASHFS_SITE_METHOD = git
> >  SQUASHFS_LICENSE = GPL-2.0+
> >  SQUASHFS_LICENSE_FILES = COPYING
> > -SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
> > +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
> >  
> >  ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
> >  SQUASHFS_DEPENDENCIES += lz4
> > @@ -46,6 +46,13 @@ else
> >  SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
> >  endif
> >  
> > +ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
> > +SQUASHFS_DEPENDENCIES += zstd
> > +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
> > +else
> > +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
> > +endif  
> 
> Please, keep the gzip case last, so that it stays the default. Add the
> zstd case first.

O.k, will fix it on the next patch iteration....

Regards,
Peter

> 
> Regards,
> Yann E. MORIN.
> 
> >  HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
> >  
> >  HOST_SQUASHFS_MAKE_ARGS = \
> > -- 
> > 2.16.3
> >   
>

Patch

diff --git a/package/squashfs/Config.in b/package/squashfs/Config.in
index 70c0fc9808..c16ebbf27f 100644
--- a/package/squashfs/Config.in
+++ b/package/squashfs/Config.in
@@ -41,6 +41,12 @@  config BR2_PACKAGE_SQUASHFS_XZ
 	help
 	  Support XZ compression algorithm
 
+config BR2_PACKAGE_SQUASHFS_ZSTD
+	bool "zstd support"
+	select BR2_PACKAGE_ZSTD
+	help
+	  Support ZSTD compression algorithm
+
 endif
 
 comment "squashfs needs a toolchain w/ threads"
diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
index 67025ac68a..bec867d676 100644
--- a/package/squashfs/squashfs.mk
+++ b/package/squashfs/squashfs.mk
@@ -9,7 +9,7 @@  SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
 SQUASHFS_SITE_METHOD = git
 SQUASHFS_LICENSE = GPL-2.0+
 SQUASHFS_LICENSE_FILES = COPYING
-SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
+SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
 
 ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
 SQUASHFS_DEPENDENCIES += lz4
@@ -46,6 +46,13 @@  else
 SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
 endif
 
+ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
+SQUASHFS_DEPENDENCIES += zstd
+SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
+else
+SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
+endif
+
 HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
 
 HOST_SQUASHFS_MAKE_ARGS = \