@@ -2275,6 +2275,14 @@ config MODULE_COMPRESS_ZSTD
endchoice
+config MODULE_COMPRESS_ZSTD_LEVEL
+ int "Compression level (1-19)"
+ depends on MODULE_COMPRESS_ZSTD
+ range 1 19
+ default 3
+ help
+ Compression level used by zstd for compressing modules.
+
config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
bool "Allow loading of modules with missing namespace imports"
help
@@ -97,7 +97,7 @@ quiet_cmd_gzip = GZIP $@
quiet_cmd_xz = XZ $@
cmd_xz = $(XZ) --lzma2=dict=2MiB -f $<
quiet_cmd_zstd = ZSTD $@
- cmd_zstd = $(ZSTD) -T0 --rm -f -q $<
+ cmd_zstd = $(ZSTD) -$(CONFIG_MODULE_COMPRESS_ZSTD_LEVEL) -T0 --rm -f -q $<
$(dst)/%.ko.gz: $(dst)/%.ko FORCE
$(call cmd,gzip)