mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3 1/5] host-zstd: new package
@ 2020-07-24 15:50 Bruno Thomsen
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 2/5] host-squashfs-tools: add support for zstd contitional Bruno Thomsen
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Bruno Thomsen @ 2020-07-24 15:50 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen, bth

This package can be used by squashfs-tools.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
No changes since version 2.

Changes since version 1:
Replaced HOST_CMAKE_USR with HOST_CMAKE_OPT

 rules/host-zstd.in   |  6 ++++++
 rules/host-zstd.make | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 rules/host-zstd.in
 create mode 100644 rules/host-zstd.make

diff --git a/rules/host-zstd.in b/rules/host-zstd.in
new file mode 100644
index 000000000..18d291672
--- /dev/null
+++ b/rules/host-zstd.in
@@ -0,0 +1,6 @@
+## SECTION=hosttools_noprompt
+
+config HOST_ZSTD
+	tristate
+	select HOST_CMAKE
+	default y if ALLYES
diff --git a/rules/host-zstd.make b/rules/host-zstd.make
new file mode 100644
index 000000000..bebfb150c
--- /dev/null
+++ b/rules/host-zstd.make
@@ -0,0 +1,42 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Bruno Thomsen <bruno.thomsen@gmail.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_HOST_ZSTD) += host-zstd
+
+#
+# Paths and names
+#
+HOST_ZSTD_DIR		:= $(HOST_BUILDDIR)/$(ZSTD)
+HOST_ZSTD_SUBDIR	:= build/cmake
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_ZSTD_CONF_TOOL	:= cmake
+HOST_ZSTD_BUILD_DIR	:= $(HOST_ZSTD_DIR)-build
+HOST_ZSTD_CONF_OPT	:= \
+	$(HOST_CMAKE_OPT) \
+	-B$(HOST_ZSTD_BUILD_DIR) \
+	-DZSTD_LEGACY_SUPPORT=OFF \
+	-DZSTD_MULTITHREAD_SUPPORT=ON \
+	-DZSTD_BUILD_PROGRAMS=ON \
+	-DZSTD_BUILD_CONTRIB=OFF \
+	-DZSTD_BUILD_TESTS=OFF \
+	-DZSTD_USE_STATIC_RUNTIME=OFF \
+	-DZSTD_PROGRAMS_LINK_SHARED=ON \
+	-DZSTD_BUILD_STATIC=OFF \
+	-DZSTD_BUILD_SHARED=ON \
+	-DZSTD_ZLIB_SUPPORT=OFF \
+	-DZSTD_LZMA_SUPPORT=OFF \
+	-DZSTD_LZ4_SUPPORT=OFF
+
+# vim: syntax=make

base-commit: e37db9dbf300a5921055a47748291dcc580feca0
-- 
2.26.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ptxdist] [PATCH v3 2/5] host-squashfs-tools: add support for zstd contitional
  2020-07-24 15:50 [ptxdist] [PATCH v3 1/5] host-zstd: new package Bruno Thomsen
@ 2020-07-24 15:51 ` Bruno Thomsen
  2020-08-03  6:29   ` [ptxdist] [APPLIED] " Michael Olbrich
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 3/5] image-root-squashfs: add zstd compression option Bruno Thomsen
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bruno Thomsen @ 2020-07-24 15:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen, bth

Only enable host zstd package dependency when needed,
so it doesn't build unnecessary packages.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
Changes since version 2:
Moved from 0003 to 0002.
Added HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT config.

Changes since version 1:
Removed all /usr/local paths changes in HOST_SQUASHFS_TOOLS_MAKE_ENV.
This looks cleaner :)

 rules/host-squashfs-tools.in   | 8 ++++++++
 rules/host-squashfs-tools.make | 6 +++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/rules/host-squashfs-tools.in b/rules/host-squashfs-tools.in
index 4ac2fa1b0..04de7d1fc 100644
--- a/rules/host-squashfs-tools.in
+++ b/rules/host-squashfs-tools.in
@@ -5,4 +5,12 @@ config HOST_SQUASHFS_TOOLS
 	select HOST_ZLIB
 	select HOST_LIBLZO
 	select HOST_XZ
+	select HOST_ZSTD	if HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
 	default y if ALLYES
+
+if HOST_SQUASHFS_TOOLS
+
+config HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
+	bool
+
+endif
diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
index 39a6d11e1..42b48b2c5 100644
--- a/rules/host-squashfs-tools.make
+++ b/rules/host-squashfs-tools.make
@@ -21,7 +21,11 @@ HOST_SQUASHFS_TOOLS_SUBDIR	:= squashfs-tools
 # Compile
 # ----------------------------------------------------------------------------
 
-HOST_SQUASHFS_TOOLS_MAKE_OPT := LZO_SUPPORT=1 XZ_SUPPORT=1
+HOST_SQUASHFS_TOOLS_MAKE_OPT := \
+	LZO_SUPPORT=1 \
+	XZ_SUPPORT=1 \
+	ZSTD_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT,1,0)
+
 HOST_SQUASHFS_TOOLS_MAKE_ENV := $(HOST_ENV) EXTRA_LDFLAGS="-L$(PTXDIST_SYSROOT_HOST)/lib/xz"
 HOST_SQUASHFS_TOOLS_MAKE_PAR := NO
 HOST_SQUASHFS_TOOLS_INSTALL_OPT = install INSTALL_DIR="$(HOST_SQUASHFS_TOOLS_PKGDIR)/sbin"
-- 
2.26.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ptxdist] [PATCH v3 3/5] image-root-squashfs: add zstd compression option
  2020-07-24 15:50 [ptxdist] [PATCH v3 1/5] host-zstd: new package Bruno Thomsen
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 2/5] host-squashfs-tools: add support for zstd contitional Bruno Thomsen
@ 2020-07-24 15:51 ` Bruno Thomsen
  2020-08-03  6:30   ` [ptxdist] [APPLIED] " Michael Olbrich
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 4/5] host-squashfs-tools: conditional select lzo and xz dependencies Bruno Thomsen
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bruno Thomsen @ 2020-07-24 15:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen, bth

Set block size and compression level parameters for optimal
result by default.

BLOCK_SIZE="1M"
EXTRA_ARGS="-Xcompression-level 22"

It's still very	fast on	an ordinary laptop.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
Changes since version 2:
Moved from 0002 to 0003.
Select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT option.

No changes since version 1.

 platforms/image-root-squashfs.in | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/platforms/image-root-squashfs.in b/platforms/image-root-squashfs.in
index 5f9368770..98aae9c1c 100644
--- a/platforms/image-root-squashfs.in
+++ b/platforms/image-root-squashfs.in
@@ -4,6 +4,7 @@ menuconfig IMAGE_ROOT_SQUASHFS
 	tristate
 	select HOST_GENIMAGE
 	select HOST_SQUASHFS_TOOLS
+	select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
 	select IMAGE_ROOT_TGZ
 	prompt "Generate images/root.squashfs "
 	help
@@ -45,6 +46,11 @@ choice
 	help
 	  Select your preferred compression mode.
 
+	config IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
+	bool "zstd"
+	help
+	  Select your preferred compression mode.
+
 endchoice
 
 config IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE
@@ -54,10 +60,12 @@ config IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE
         default "lzo" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZO
         default "lz4" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZ4
         default "xz" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_XZ
+        default "zstd" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
 
 config IMAGE_ROOT_SQUASHFS_BLOCK_SIZE
 	string
-	default "128k"
+	default "128k" if !IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
+	default "1M" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
 	prompt "Block size"
 	help
 	  This allows the compression data block size to be selected, both "K" and "M"
@@ -65,6 +73,8 @@ config IMAGE_ROOT_SQUASHFS_BLOCK_SIZE
 
 config IMAGE_ROOT_SQUASHFS_EXTRA_ARGS
 	string
+	default "" if !IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
+	default "-Xcompression-level 22" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
 	prompt "extra arguments passed to mksquashfs"
 	help
 	  You can add extra arguments for mksquashfs here
-- 
2.26.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ptxdist] [PATCH v3 4/5] host-squashfs-tools: conditional select lzo and xz dependencies
  2020-07-24 15:50 [ptxdist] [PATCH v3 1/5] host-zstd: new package Bruno Thomsen
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 2/5] host-squashfs-tools: add support for zstd contitional Bruno Thomsen
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 3/5] image-root-squashfs: add zstd compression option Bruno Thomsen
@ 2020-07-24 15:51 ` Bruno Thomsen
  2020-08-03  6:30   ` [ptxdist] [APPLIED] " Michael Olbrich
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 5/5] host-squashfs-tools: fix lz4 compression option Bruno Thomsen
  2020-08-03  6:29 ` [ptxdist] [APPLIED] host-zstd: new package Michael Olbrich
  4 siblings, 1 reply; 10+ messages in thread
From: Bruno Thomsen @ 2020-07-24 15:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen, bth

Only select host lzo and host xz packages when needed to
speed up complete build time and avoid unnecessary dependencies.
Update image-root-squashfs Kconfig dependency selection.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
Changes since version 2:
Select HOST_SQUASHFS_TOOLS_LZO_SUPPORT config.
Select HOST_SQUASHFS_TOOLS_XZ_SUPPORT config.
Added HOST_SQUASHFS_TOOLS_LZO_SUPPORT config.
Added HOST_SQUASHFS_TOOLS_XZ_SUPPORT config.

No changes since version 1.

 platforms/image-root-squashfs.in |  2 ++
 rules/host-squashfs-tools.in     | 10 ++++++++--
 rules/host-squashfs-tools.make   |  4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/platforms/image-root-squashfs.in b/platforms/image-root-squashfs.in
index 98aae9c1c..a6d1d1b44 100644
--- a/platforms/image-root-squashfs.in
+++ b/platforms/image-root-squashfs.in
@@ -4,6 +4,8 @@ menuconfig IMAGE_ROOT_SQUASHFS
 	tristate
 	select HOST_GENIMAGE
 	select HOST_SQUASHFS_TOOLS
+	select HOST_SQUASHFS_TOOLS_LZO_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZO
+	select HOST_SQUASHFS_TOOLS_XZ_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_XZ
 	select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
 	select IMAGE_ROOT_TGZ
 	prompt "Generate images/root.squashfs "
diff --git a/rules/host-squashfs-tools.in b/rules/host-squashfs-tools.in
index 04de7d1fc..3ba693aaf 100644
--- a/rules/host-squashfs-tools.in
+++ b/rules/host-squashfs-tools.in
@@ -3,13 +3,19 @@
 config HOST_SQUASHFS_TOOLS
 	tristate
 	select HOST_ZLIB
-	select HOST_LIBLZO
-	select HOST_XZ
+	select HOST_LIBLZO	if HOST_SQUASHFS_TOOLS_LZO_SUPPORT
+	select HOST_XZ		if HOST_SQUASHFS_TOOLS_XZ_SUPPORT
 	select HOST_ZSTD	if HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
 	default y if ALLYES
 
 if HOST_SQUASHFS_TOOLS
 
+config HOST_SQUASHFS_TOOLS_LZO_SUPPORT
+	bool
+
+config HOST_SQUASHFS_TOOLS_XZ_SUPPORT
+	bool
+
 config HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
 	bool
 
diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
index 42b48b2c5..f34efb50f 100644
--- a/rules/host-squashfs-tools.make
+++ b/rules/host-squashfs-tools.make
@@ -22,8 +22,8 @@ HOST_SQUASHFS_TOOLS_SUBDIR	:= squashfs-tools
 # ----------------------------------------------------------------------------
 
 HOST_SQUASHFS_TOOLS_MAKE_OPT := \
-	LZO_SUPPORT=1 \
-	XZ_SUPPORT=1 \
+	LZO_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_LZO_SUPPORT,1,0) \
+	XZ_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_XZ_SUPPORT,1,0) \
 	ZSTD_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT,1,0)
 
 HOST_SQUASHFS_TOOLS_MAKE_ENV := $(HOST_ENV) EXTRA_LDFLAGS="-L$(PTXDIST_SYSROOT_HOST)/lib/xz"
-- 
2.26.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ptxdist] [PATCH v3 5/5] host-squashfs-tools: fix lz4 compression option
  2020-07-24 15:50 [ptxdist] [PATCH v3 1/5] host-zstd: new package Bruno Thomsen
                   ` (2 preceding siblings ...)
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 4/5] host-squashfs-tools: conditional select lzo and xz dependencies Bruno Thomsen
@ 2020-07-24 15:51 ` Bruno Thomsen
  2020-08-03  6:30   ` [ptxdist] [APPLIED] " Michael Olbrich
  2020-08-03  6:29 ` [ptxdist] [APPLIED] host-zstd: new package Michael Olbrich
  4 siblings, 1 reply; 10+ messages in thread
From: Bruno Thomsen @ 2020-07-24 15:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen, bth

Conditional select host-lz4 package if lz4 compressions is
used by image-root-squashfs and enable support in package.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
Changes since version 2:
Select HOST_SQUASHFS_TOOLS_LZ4_SUPPORT config.
Added HOST_SQUASHFS_TOOLS_LZ4_SUPPORT config.

No changes since version 1.

 platforms/image-root-squashfs.in | 1 +
 rules/host-squashfs-tools.in     | 4 ++++
 rules/host-squashfs-tools.make   | 1 +
 3 files changed, 6 insertions(+)

diff --git a/platforms/image-root-squashfs.in b/platforms/image-root-squashfs.in
index a6d1d1b44..4e5a75701 100644
--- a/platforms/image-root-squashfs.in
+++ b/platforms/image-root-squashfs.in
@@ -5,6 +5,7 @@ menuconfig IMAGE_ROOT_SQUASHFS
 	select HOST_GENIMAGE
 	select HOST_SQUASHFS_TOOLS
 	select HOST_SQUASHFS_TOOLS_LZO_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZO
+	select HOST_SQUASHFS_TOOLS_LZ4_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZ4
 	select HOST_SQUASHFS_TOOLS_XZ_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_XZ
 	select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
 	select IMAGE_ROOT_TGZ
diff --git a/rules/host-squashfs-tools.in b/rules/host-squashfs-tools.in
index 3ba693aaf..b6f3e8f4f 100644
--- a/rules/host-squashfs-tools.in
+++ b/rules/host-squashfs-tools.in
@@ -4,6 +4,7 @@ config HOST_SQUASHFS_TOOLS
 	tristate
 	select HOST_ZLIB
 	select HOST_LIBLZO	if HOST_SQUASHFS_TOOLS_LZO_SUPPORT
+	select HOST_LZ4		if HOST_SQUASHFS_TOOLS_LZ4_SUPPORT
 	select HOST_XZ		if HOST_SQUASHFS_TOOLS_XZ_SUPPORT
 	select HOST_ZSTD	if HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
 	default y if ALLYES
@@ -13,6 +14,9 @@ if HOST_SQUASHFS_TOOLS
 config HOST_SQUASHFS_TOOLS_LZO_SUPPORT
 	bool
 
+config HOST_SQUASHFS_TOOLS_LZ4_SUPPORT
+	bool
+
 config HOST_SQUASHFS_TOOLS_XZ_SUPPORT
 	bool
 
diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
index f34efb50f..ec04f713c 100644
--- a/rules/host-squashfs-tools.make
+++ b/rules/host-squashfs-tools.make
@@ -23,6 +23,7 @@ HOST_SQUASHFS_TOOLS_SUBDIR	:= squashfs-tools
 
 HOST_SQUASHFS_TOOLS_MAKE_OPT := \
 	LZO_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_LZO_SUPPORT,1,0) \
+	LZ4_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_LZ4_SUPPORT,1,0) \
 	XZ_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_XZ_SUPPORT,1,0) \
 	ZSTD_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT,1,0)
 
-- 
2.26.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] [APPLIED] host-zstd: new package
  2020-07-24 15:50 [ptxdist] [PATCH v3 1/5] host-zstd: new package Bruno Thomsen
                   ` (3 preceding siblings ...)
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 5/5] host-squashfs-tools: fix lz4 compression option Bruno Thomsen
@ 2020-08-03  6:29 ` Michael Olbrich
  4 siblings, 0 replies; 10+ messages in thread
From: Michael Olbrich @ 2020-08-03  6:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Thanks, applied as 76c201c5faaea8ed1abc0fd0085686641c24eb91.

Michael

[sent from post-receive hook]

On Mon, 03 Aug 2020 08:29:58 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> This package can be used by squashfs-tools.
> 
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20200724155103.6374-1-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/host-zstd.in b/rules/host-zstd.in
> new file mode 100644
> index 000000000000..18d291672609
> --- /dev/null
> +++ b/rules/host-zstd.in
> @@ -0,0 +1,6 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_ZSTD
> +	tristate
> +	select HOST_CMAKE
> +	default y if ALLYES
> diff --git a/rules/host-zstd.make b/rules/host-zstd.make
> new file mode 100644
> index 000000000000..bebfb150cec3
> --- /dev/null
> +++ b/rules/host-zstd.make
> @@ -0,0 +1,42 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2020 by Bruno Thomsen <bruno.thomsen@gmail.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_HOST_ZSTD) += host-zstd
> +
> +#
> +# Paths and names
> +#
> +HOST_ZSTD_DIR		:= $(HOST_BUILDDIR)/$(ZSTD)
> +HOST_ZSTD_SUBDIR	:= build/cmake
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +HOST_ZSTD_CONF_TOOL	:= cmake
> +HOST_ZSTD_BUILD_DIR	:= $(HOST_ZSTD_DIR)-build
> +HOST_ZSTD_CONF_OPT	:= \
> +	$(HOST_CMAKE_OPT) \
> +	-B$(HOST_ZSTD_BUILD_DIR) \
> +	-DZSTD_LEGACY_SUPPORT=OFF \
> +	-DZSTD_MULTITHREAD_SUPPORT=ON \
> +	-DZSTD_BUILD_PROGRAMS=ON \
> +	-DZSTD_BUILD_CONTRIB=OFF \
> +	-DZSTD_BUILD_TESTS=OFF \
> +	-DZSTD_USE_STATIC_RUNTIME=OFF \
> +	-DZSTD_PROGRAMS_LINK_SHARED=ON \
> +	-DZSTD_BUILD_STATIC=OFF \
> +	-DZSTD_BUILD_SHARED=ON \
> +	-DZSTD_ZLIB_SUPPORT=OFF \
> +	-DZSTD_LZMA_SUPPORT=OFF \
> +	-DZSTD_LZ4_SUPPORT=OFF
> +
> +# vim: syntax=make

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] [APPLIED] host-squashfs-tools: add support for zstd contitional
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 2/5] host-squashfs-tools: add support for zstd contitional Bruno Thomsen
@ 2020-08-03  6:29   ` Michael Olbrich
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Olbrich @ 2020-08-03  6:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Thanks, applied as 858f11d021da21819dc3a069e1b38b8cec91f0c6.

Michael

[sent from post-receive hook]

On Mon, 03 Aug 2020 08:29:59 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Only enable host zstd package dependency when needed,
> so it doesn't build unnecessary packages.
> 
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20200724155103.6374-2-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/host-squashfs-tools.in b/rules/host-squashfs-tools.in
> index 4ac2fa1b0cbf..04de7d1fcf05 100644
> --- a/rules/host-squashfs-tools.in
> +++ b/rules/host-squashfs-tools.in
> @@ -5,4 +5,12 @@ config HOST_SQUASHFS_TOOLS
>  	select HOST_ZLIB
>  	select HOST_LIBLZO
>  	select HOST_XZ
> +	select HOST_ZSTD	if HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
>  	default y if ALLYES
> +
> +if HOST_SQUASHFS_TOOLS
> +
> +config HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
> +	bool
> +
> +endif
> diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
> index 39a6d11e18a9..42b48b2c5273 100644
> --- a/rules/host-squashfs-tools.make
> +++ b/rules/host-squashfs-tools.make
> @@ -21,7 +21,11 @@ HOST_SQUASHFS_TOOLS_SUBDIR	:= squashfs-tools
>  # Compile
>  # ----------------------------------------------------------------------------
>  
> -HOST_SQUASHFS_TOOLS_MAKE_OPT := LZO_SUPPORT=1 XZ_SUPPORT=1
> +HOST_SQUASHFS_TOOLS_MAKE_OPT := \
> +	LZO_SUPPORT=1 \
> +	XZ_SUPPORT=1 \
> +	ZSTD_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT,1,0)
> +
>  HOST_SQUASHFS_TOOLS_MAKE_ENV := $(HOST_ENV) EXTRA_LDFLAGS="-L$(PTXDIST_SYSROOT_HOST)/lib/xz"
>  HOST_SQUASHFS_TOOLS_MAKE_PAR := NO
>  HOST_SQUASHFS_TOOLS_INSTALL_OPT = install INSTALL_DIR="$(HOST_SQUASHFS_TOOLS_PKGDIR)/sbin"

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] [APPLIED] host-squashfs-tools: conditional select lzo and xz dependencies
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 4/5] host-squashfs-tools: conditional select lzo and xz dependencies Bruno Thomsen
@ 2020-08-03  6:30   ` Michael Olbrich
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Olbrich @ 2020-08-03  6:30 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Thanks, applied as c6aae0220ea911420adc14bd6feb406e69790f5c.

Michael

[sent from post-receive hook]

On Mon, 03 Aug 2020 08:30:00 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Only select host lzo and host xz packages when needed to
> speed up complete build time and avoid unnecessary dependencies.
> Update image-root-squashfs Kconfig dependency selection.
> 
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20200724155103.6374-4-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/platforms/image-root-squashfs.in b/platforms/image-root-squashfs.in
> index 98aae9c1c089..a6d1d1b445e9 100644
> --- a/platforms/image-root-squashfs.in
> +++ b/platforms/image-root-squashfs.in
> @@ -4,6 +4,8 @@ menuconfig IMAGE_ROOT_SQUASHFS
>  	tristate
>  	select HOST_GENIMAGE
>  	select HOST_SQUASHFS_TOOLS
> +	select HOST_SQUASHFS_TOOLS_LZO_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZO
> +	select HOST_SQUASHFS_TOOLS_XZ_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_XZ
>  	select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
>  	select IMAGE_ROOT_TGZ
>  	prompt "Generate images/root.squashfs "
> diff --git a/rules/host-squashfs-tools.in b/rules/host-squashfs-tools.in
> index 04de7d1fcf05..3ba693aaf7a4 100644
> --- a/rules/host-squashfs-tools.in
> +++ b/rules/host-squashfs-tools.in
> @@ -3,13 +3,19 @@
>  config HOST_SQUASHFS_TOOLS
>  	tristate
>  	select HOST_ZLIB
> -	select HOST_LIBLZO
> -	select HOST_XZ
> +	select HOST_LIBLZO	if HOST_SQUASHFS_TOOLS_LZO_SUPPORT
> +	select HOST_XZ		if HOST_SQUASHFS_TOOLS_XZ_SUPPORT
>  	select HOST_ZSTD	if HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
>  	default y if ALLYES
>  
>  if HOST_SQUASHFS_TOOLS
>  
> +config HOST_SQUASHFS_TOOLS_LZO_SUPPORT
> +	bool
> +
> +config HOST_SQUASHFS_TOOLS_XZ_SUPPORT
> +	bool
> +
>  config HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
>  	bool
>  
> diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
> index 42b48b2c5273..f34efb50f65e 100644
> --- a/rules/host-squashfs-tools.make
> +++ b/rules/host-squashfs-tools.make
> @@ -22,8 +22,8 @@ HOST_SQUASHFS_TOOLS_SUBDIR	:= squashfs-tools
>  # ----------------------------------------------------------------------------
>  
>  HOST_SQUASHFS_TOOLS_MAKE_OPT := \
> -	LZO_SUPPORT=1 \
> -	XZ_SUPPORT=1 \
> +	LZO_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_LZO_SUPPORT,1,0) \
> +	XZ_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_XZ_SUPPORT,1,0) \
>  	ZSTD_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT,1,0)
>  
>  HOST_SQUASHFS_TOOLS_MAKE_ENV := $(HOST_ENV) EXTRA_LDFLAGS="-L$(PTXDIST_SYSROOT_HOST)/lib/xz"

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] [APPLIED] image-root-squashfs: add zstd compression option
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 3/5] image-root-squashfs: add zstd compression option Bruno Thomsen
@ 2020-08-03  6:30   ` Michael Olbrich
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Olbrich @ 2020-08-03  6:30 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Thanks, applied as 32df99ca6d0b839a825c15319af4c010f93f265d.

Michael

[sent from post-receive hook]

On Mon, 03 Aug 2020 08:30:00 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Set block size and compression level parameters for optimal
> result by default.
> 
> BLOCK_SIZE="1M"
> EXTRA_ARGS="-Xcompression-level 22"
> 
> It's still very	fast on	an ordinary laptop.
> 
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20200724155103.6374-3-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/platforms/image-root-squashfs.in b/platforms/image-root-squashfs.in
> index 5f9368770ad0..98aae9c1c089 100644
> --- a/platforms/image-root-squashfs.in
> +++ b/platforms/image-root-squashfs.in
> @@ -4,6 +4,7 @@ menuconfig IMAGE_ROOT_SQUASHFS
>  	tristate
>  	select HOST_GENIMAGE
>  	select HOST_SQUASHFS_TOOLS
> +	select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
>  	select IMAGE_ROOT_TGZ
>  	prompt "Generate images/root.squashfs "
>  	help
> @@ -45,6 +46,11 @@ choice
>  	help
>  	  Select your preferred compression mode.
>  
> +	config IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
> +	bool "zstd"
> +	help
> +	  Select your preferred compression mode.
> +
>  endchoice
>  
>  config IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE
> @@ -54,10 +60,12 @@ config IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE
>          default "lzo" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZO
>          default "lz4" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZ4
>          default "xz" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_XZ
> +        default "zstd" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
>  
>  config IMAGE_ROOT_SQUASHFS_BLOCK_SIZE
>  	string
> -	default "128k"
> +	default "128k" if !IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
> +	default "1M" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
>  	prompt "Block size"
>  	help
>  	  This allows the compression data block size to be selected, both "K" and "M"
> @@ -65,6 +73,8 @@ config IMAGE_ROOT_SQUASHFS_BLOCK_SIZE
>  
>  config IMAGE_ROOT_SQUASHFS_EXTRA_ARGS
>  	string
> +	default "" if !IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
> +	default "-Xcompression-level 22" if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
>  	prompt "extra arguments passed to mksquashfs"
>  	help
>  	  You can add extra arguments for mksquashfs here

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] [APPLIED] host-squashfs-tools: fix lz4 compression option
  2020-07-24 15:51 ` [ptxdist] [PATCH v3 5/5] host-squashfs-tools: fix lz4 compression option Bruno Thomsen
@ 2020-08-03  6:30   ` Michael Olbrich
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Olbrich @ 2020-08-03  6:30 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Thanks, applied as 69b9062765aa71af6828e2db7a810bdd9571bd06.

Michael

[sent from post-receive hook]

On Mon, 03 Aug 2020 08:30:01 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Conditional select host-lz4 package if lz4 compressions is
> used by image-root-squashfs and enable support in package.
> 
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20200724155103.6374-5-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/platforms/image-root-squashfs.in b/platforms/image-root-squashfs.in
> index a6d1d1b445e9..4e5a75701b01 100644
> --- a/platforms/image-root-squashfs.in
> +++ b/platforms/image-root-squashfs.in
> @@ -5,6 +5,7 @@ menuconfig IMAGE_ROOT_SQUASHFS
>  	select HOST_GENIMAGE
>  	select HOST_SQUASHFS_TOOLS
>  	select HOST_SQUASHFS_TOOLS_LZO_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZO
> +	select HOST_SQUASHFS_TOOLS_LZ4_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_LZ4
>  	select HOST_SQUASHFS_TOOLS_XZ_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_XZ
>  	select HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT	if IMAGE_ROOT_SQUASHFS_COMPRESSION_MODE_ZSTD
>  	select IMAGE_ROOT_TGZ
> diff --git a/rules/host-squashfs-tools.in b/rules/host-squashfs-tools.in
> index 3ba693aaf7a4..b6f3e8f4f6ba 100644
> --- a/rules/host-squashfs-tools.in
> +++ b/rules/host-squashfs-tools.in
> @@ -4,6 +4,7 @@ config HOST_SQUASHFS_TOOLS
>  	tristate
>  	select HOST_ZLIB
>  	select HOST_LIBLZO	if HOST_SQUASHFS_TOOLS_LZO_SUPPORT
> +	select HOST_LZ4		if HOST_SQUASHFS_TOOLS_LZ4_SUPPORT
>  	select HOST_XZ		if HOST_SQUASHFS_TOOLS_XZ_SUPPORT
>  	select HOST_ZSTD	if HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT
>  	default y if ALLYES
> @@ -13,6 +14,9 @@ if HOST_SQUASHFS_TOOLS
>  config HOST_SQUASHFS_TOOLS_LZO_SUPPORT
>  	bool
>  
> +config HOST_SQUASHFS_TOOLS_LZ4_SUPPORT
> +	bool
> +
>  config HOST_SQUASHFS_TOOLS_XZ_SUPPORT
>  	bool
>  
> diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
> index f34efb50f65e..ec04f713c9e2 100644
> --- a/rules/host-squashfs-tools.make
> +++ b/rules/host-squashfs-tools.make
> @@ -23,6 +23,7 @@ HOST_SQUASHFS_TOOLS_SUBDIR	:= squashfs-tools
>  
>  HOST_SQUASHFS_TOOLS_MAKE_OPT := \
>  	LZO_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_LZO_SUPPORT,1,0) \
> +	LZ4_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_LZ4_SUPPORT,1,0) \
>  	XZ_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_XZ_SUPPORT,1,0) \
>  	ZSTD_SUPPORT=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_ZSTD_SUPPORT,1,0)
>  

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-03  6:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 15:50 [ptxdist] [PATCH v3 1/5] host-zstd: new package Bruno Thomsen
2020-07-24 15:51 ` [ptxdist] [PATCH v3 2/5] host-squashfs-tools: add support for zstd contitional Bruno Thomsen
2020-08-03  6:29   ` [ptxdist] [APPLIED] " Michael Olbrich
2020-07-24 15:51 ` [ptxdist] [PATCH v3 3/5] image-root-squashfs: add zstd compression option Bruno Thomsen
2020-08-03  6:30   ` [ptxdist] [APPLIED] " Michael Olbrich
2020-07-24 15:51 ` [ptxdist] [PATCH v3 4/5] host-squashfs-tools: conditional select lzo and xz dependencies Bruno Thomsen
2020-08-03  6:30   ` [ptxdist] [APPLIED] " Michael Olbrich
2020-07-24 15:51 ` [ptxdist] [PATCH v3 5/5] host-squashfs-tools: fix lz4 compression option Bruno Thomsen
2020-08-03  6:30   ` [ptxdist] [APPLIED] " Michael Olbrich
2020-08-03  6:29 ` [ptxdist] [APPLIED] host-zstd: new package Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox