@@ -269,6 +269,7 @@ choice
config KERNEL_GZIP
bool "Gzip"
depends on HAVE_KERNEL_GZIP
+ select KEXEC_DECOMPRESS_GZIP if KEXEC_FILE && EFI_ZBOOT
help
The old and tried gzip compression. It provides a good balance
between compression ratio and decompression speed.
@@ -276,6 +277,7 @@ config KERNEL_GZIP
config KERNEL_BZIP2
bool "Bzip2"
depends on HAVE_KERNEL_BZIP2
+ select KEXEC_DECOMPRESS_BZIP2 if KEXEC_FILE && EFI_ZBOOT
help
Its compression ratio and speed is intermediate.
Decompression speed is slowest among the choices. The kernel
@@ -286,6 +288,7 @@ config KERNEL_BZIP2
config KERNEL_LZMA
bool "LZMA"
depends on HAVE_KERNEL_LZMA
+ select KEXEC_DECOMPRESS_LZMA if KEXEC_FILE && EFI_ZBOOT
help
This compression algorithm's ratio is best. Decompression speed
is between gzip and bzip2. Compression is slowest.
@@ -294,6 +297,7 @@ config KERNEL_LZMA
config KERNEL_XZ
bool "XZ"
depends on HAVE_KERNEL_XZ
+ select KEXEC_DECOMPRESS_XZ if KEXEC_FILE && EFI_ZBOOT
help
XZ uses the LZMA2 algorithm and instruction set specific
BCJ filters which can improve compression ratio of executable
@@ -309,6 +313,7 @@ config KERNEL_XZ
config KERNEL_LZO
bool "LZO"
depends on HAVE_KERNEL_LZO
+ select KEXEC_DECOMPRESS_LZO if KEXEC_FILE && EFI_ZBOOT
help
Its compression ratio is the poorest among the choices. The kernel
size is about 10% bigger than gzip; however its speed
@@ -317,6 +322,7 @@ config KERNEL_LZO
config KERNEL_LZ4
bool "LZ4"
depends on HAVE_KERNEL_LZ4
+ select KEXEC_DECOMPRESS_LZ4 if KEXEC_FILE && EFI_ZBOOT
help
LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
A preliminary version of LZ4 de/compression tool is available at
@@ -329,6 +335,7 @@ config KERNEL_LZ4
config KERNEL_ZSTD
bool "ZSTD"
depends on HAVE_KERNEL_ZSTD
+ select KEXEC_DECOMPRESS_ZSTD if KEXEC_FILE && EFI_ZBOOT
help
ZSTD is a compression algorithm targeting intermediate compression
with fast decompression speed. It will compress better than GZIP and
If choosing an EFI_ZBOOT image, the corresponding decompressing method should be selected so that kexec can load that zboot image. This can be achieved when "Kernel compression mode" is determined. Signed-off-by: Pingfan Liu <kernelfans@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: kexec@lists.infradead.org To: linux-kernel@vger.kernel.org --- init/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)