summarylogtreecommitdiffstats
path: root/0009-add-zstd-compressed-modules.patch
diff options
context:
space:
mode:
authorNihilisticPandemonium2019-12-19 00:08:37 -0800
committerNihilisticPandemonium2019-12-19 00:08:37 -0800
commit4c775afe4701a6896689230bac025c21dd6d00bf (patch)
tree64f7248b66d4057e899709041d7902c3a1e8f08f /0009-add-zstd-compressed-modules.patch
downloadaur-4c775afe4701a6896689230bac025c21dd6d00bf.tar.gz
linux-nc kernel containing vfio patches, valve's fsync, the zstd compressed kernel patch from the LKML in November 2018, and a patch to enable modules compressed by zstd.
Diffstat (limited to '0009-add-zstd-compressed-modules.patch')
-rw-r--r--0009-add-zstd-compressed-modules.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/0009-add-zstd-compressed-modules.patch b/0009-add-zstd-compressed-modules.patch
new file mode 100644
index 000000000000..6ca3c2cc08b1
--- /dev/null
+++ b/0009-add-zstd-compressed-modules.patch
@@ -0,0 +1,59 @@
+diff --git a/Makefile b/Makefile
+index f900c23b8291..387e83c4373e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -971,8 +971,8 @@ endif # INSTALL_MOD_STRIP
+ export mod_strip_cmd
+
+ # CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed
+-# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP
+-# or CONFIG_MODULE_COMPRESS_XZ.
++# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP,
++# CONFIG_MODULE_COMPRESS_XZ, or CONFIG_MODULE_COMPRESS_ZSTD.
+
+ mod_compress_cmd = true
+ ifdef CONFIG_MODULE_COMPRESS
+@@ -982,6 +982,9 @@ ifdef CONFIG_MODULE_COMPRESS
+ ifdef CONFIG_MODULE_COMPRESS_XZ
+ mod_compress_cmd = xz -f
+ endif # CONFIG_MODULE_COMPRESS_XZ
++ ifdef CONFIG_MODULE_COMPRESS_ZSTD
++ mod_compress_cmd = zstd -T0 -20 --ultra --rm -f
++ endif
+ endif # CONFIG_MODULE_COMPRESS
+ export mod_compress_cmd
+
+diff --git a/init/Kconfig b/init/Kconfig
+index a34064a031a5..345f068d0f62 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -2102,8 +2102,8 @@ config MODULE_COMPRESS
+ 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.
+
+@@ -2125,7 +2125,7 @@ choice
+ 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"
+@@ -2133,6 +2133,9 @@ config MODULE_COMPRESS_GZIP
+ config MODULE_COMPRESS_XZ
+ bool "XZ"
+
++config MODULE_COMPRESS_ZSTD
++ bool "ZSTD"
++
+ endchoice
+
+ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS