Linux kernel module có thể được nén thành dạng gzip, xz, zstd khi biên dịch nhân Linux.
Linux kernel module được nén lại sẽ tiết kiệm được dung lượng lưu trữ, khi tải từ đĩa cứng lên RAM sẽ nhanh hơn bình thường và được tự giải nén trên RAM sẽ rất nhanh vì RAM là bộ nhớ tốc độ cao.
Module compression mode
This option allows you to choose the algorithm which will be used to
compress modules when 'make modules_install' is run. (or, you can
choose to not compress modules at all.)
External modules will also be compressed in the same way during the
installation.
For modules inside an initrd or initramfs, it's more efficient to
compress the whole initrd or initramfs instead.
This is fully compatible with signed modules.
Please note that the tool used to load modules needs to support the
corresponding algorithm. module-init-tools MAY support gzip, and kmod
MAY support gzip, xz and zstd.
Your build system needs to provide the appropriate compression tool
to compress the modules.
If in doubt, select 'None'.
Defined at kernel/module/Kconfig:270
Prompt: Module compression mode
Depends on: MODULES [=y]
Location:
-> Enable loadable module support (MODULES [=y])
-> Module compression mode (<choice> [=y])
Selected by [m]:
- MODULES [=y] && m
None
CONFIG_MODULE_COMPRESS_NONE:
Do not compress modules. The installed modules are suffixed
with .ko.
Symbol: MODULE_COMPRESS_NONE [=y]
Type : bool
Defined at kernel/module/Kconfig:294
Prompt: None
Depends on: <choice>
Location:
-> Enable loadable module support (MODULES [=y])
-> Module compression mode (<choice> [=y])
-> None (MODULE_COMPRESS_NONE [=y])
GZIP
CONFIG_MODULE_COMPRESS_GZIP:
Compress modules with GZIP. The installed modules are suffixed
with .ko.gz.
Symbol: MODULE_COMPRESS_GZIP [=n]
Type : bool
Defined at kernel/module/Kconfig:300
Prompt: GZIP
Depends on: <choice>
Location:
-> Enable loadable module support (MODULES [=y])
-> Module compression mode (<choice> [=y])
-> GZIP (MODULE_COMPRESS_GZIP [=n])
XZ
CONFIG_MODULE_COMPRESS_XZ:
Compress modules with XZ. The installed modules are suffixed
with .ko.xz.
Symbol: MODULE_COMPRESS_XZ [=n]
Type : bool
Defined at kernel/module/Kconfig:306
Prompt: XZ
Depends on: <choice>
Location:
-> Enable loadable module support (MODULES [=y])
-> Module compression mode (<choice> [=y])
-> XZ (MODULE_COMPRESS_XZ [=n])
ZSTD
CONFIG_MODULE_COMPRESS_ZSTD:
Compress modules with ZSTD. The installed modules are suffixed
with .ko.zst.
Symbol: MODULE_COMPRESS_ZSTD [=n]
Type : bool
Defined at kernel/module/Kconfig:312
Prompt: ZSTD
Depends on: <choice>
Location:
-> Enable loadable module support (MODULES [=y])
-> Module compression mode (<choice> [=y])
-> ZSTD (MODULE_COMPRESS_ZSTD [=n])