summaryrefslogtreecommitdiff
path: root/sys-kernel/linux-sources-redcore-lts/files/5.10-compress-modules-zstd-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/linux-sources-redcore-lts/files/5.10-compress-modules-zstd-support.patch')
-rw-r--r--sys-kernel/linux-sources-redcore-lts/files/5.10-compress-modules-zstd-support.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/sys-kernel/linux-sources-redcore-lts/files/5.10-compress-modules-zstd-support.patch b/sys-kernel/linux-sources-redcore-lts/files/5.10-compress-modules-zstd-support.patch
new file mode 100644
index 00000000..591a4e8c
--- /dev/null
+++ b/sys-kernel/linux-sources-redcore-lts/files/5.10-compress-modules-zstd-support.patch
@@ -0,0 +1,49 @@
+diff -Naur linux-5.5.11/init/Kconfig linux-5.5.11-p/init/Kconfig
+--- linux-5.5.11/init/Kconfig 2020-03-21 08:15:56.000000000 +0100
++++ linux-5.5.11-p/init/Kconfig 2020-03-23 17:29:43.424355692 +0100
+@@ -2103,10 +2103,10 @@
+ bool "Compress modules on installation"
+ help
+
+- Compresses kernel modules when 'make modules_install' is run; gzip or
+- xz depending on "Compression algorithm" below.
++ Compresses kernel modules when 'make modules_install' is run; gzip,
++ xz or zstd depending on "Compression algorithm" below.
+
+- module-init-tools MAY support gzip, and kmod MAY support gzip and xz.
++ module-init-tools MAY support gzip, and kmod MAY support gzip, xz and zstd.
+
+ Out-of-tree kernel modules installed using Kbuild will also be
+ compressed upon installation.
+@@ -2126,7 +2126,7 @@
+ This determines which sort of compression will be used during
+ 'make modules_install'.
+
+- GZIP (default) and XZ are supported.
++ GZIP (default), XZ and ZSTD are supported.
+
+ config MODULE_COMPRESS_GZIP
+ bool "GZIP"
+@@ -2134,6 +2134,9 @@
+ config MODULE_COMPRESS_XZ
+ bool "XZ"
+
++config MODULE_COMPRESS_ZSTD
++ bool "ZSTD"
++
+ endchoice
+
+ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
+diff -Naur linux-5.5.11/Makefile linux-5.5.11-p/Makefile
+--- linux-5.5.11/Makefile 2020-03-23 17:32:31.848367600 +0100
++++ linux-5.5.11-p/Makefile 2020-03-23 17:31:57.173159400 +0100
+@@ -983,6 +983,9 @@
+ ifdef CONFIG_MODULE_COMPRESS_XZ
+ mod_compress_cmd = xz -T0 -f
+ endif # CONFIG_MODULE_COMPRESS_XZ
++ ifdef CONFIG_MODULE_COMPRESS_ZSTD
++ mod_compress_cmd = zstd -T0 -19 -q --rm -f
++ endif # CONFIG_MODULE_COMPRESS_ZSTD
+ endif # CONFIG_MODULE_COMPRESS
+ export mod_compress_cmd
+