Revert "init/Kconfig: add option to disable kernel compression"
Subsystems (3)
H. Peter Anvin
reviewerPATCH 1/1 Revert "init/Kconfig: add option to disable kernel compression"
From: "H. Peter Anvin" <[email protected]>
This reverts commit 69f0554ec261fd686ac7fa1c598cc9eb27b83a80.
This patch breaks randconfig on at least the x86-64 architecture, and most likely on others. There is work underway to support uncompressed kernels in a generic way, but it looks like it will amount to rewriting the support from scratch; see the LKML thread in the Link:
for info.
Therefore, revert this change and wait for the fix.
--- init/Kconfig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
init/Kconfig +1 -7
@@ -118,6 +118,7 @@ config HAVE_KERNEL_LZ4 choice prompt "Kernel compression mode" default KERNEL_GZIP + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 help The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ
@@ -136,13 +137,6 @@ choice If in doubt, select 'gzip' -config KERNEL_UNCOMPRESSED - bool "No compression" - help - No compression at all. The kernel is huge but the compression and - decompression times are zero. - This is usually not what you want. - config KERNEL_GZIP bool "Gzip" depends on HAVE_KERNEL_GZIP
Signature · 1 line
1.8.3.1
PATCH 1/1 init/Kconfig: fix option to disable kernel compression
Some architectures with self-decompressing kernel images did not compile with commit 69f0554ec261fd686ac7fa1c598cc9eb27b83a80 because they don't provide a non-decompression mechanism for uncompressed kernels.
Rectify this problem by allowing uncompressed kernels only for architectures which explicitly state they support them.
--- arch/arc/Kconfig | 2 ++ init/Kconfig | 5 +++++ 2 files changed, 7 insertions(+)
arch/arc/Kconfig +2 -0
@@ -21,6 +21,8 @@ config ARC select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK select HAVE_IOREMAP_PROT + select HAVE_KERNEL_UNCOMPRESSED + select HAVE_KERNEL_GZIP select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_MEMBLOCK
init/Kconfig +5 -0
@@ -97,6 +97,9 @@ config LOCALVERSION_AUTO which is done within the script "scripts/setlocalversion".) +config HAVE_KERNEL_UNCOMPRESSED + bool + config HAVE_KERNEL_GZIP bool
@@ -118,6 +121,7 @@ config HAVE_KERNEL_LZ4 choice prompt "Kernel compression mode" default KERNEL_GZIP + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_UNCOMPRESSED help The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ
@@ -138,6 +142,7 @@ choice config KERNEL_UNCOMPRESSED bool "No compression" + depends on HAVE_KERNEL_UNCOMPRESSED help No compression at all. The kernel is huge but the compression and decompression times are zero.
Signature · 1 line
1.8.4
Re: [PATCH] [FIX] init/Kconfig: fix option to disable kernel compression
Quoted 8 lines · Christian Ruppert
Some architectures with self-decompressing kernel images did not compile with commit
69f0554ec261fd686ac7fa1c598cc9eb27b83a80because they don't provide a non-decompression mechanism for uncompressed kernels.Rectify this problem by allowing uncompressed kernels only for architectures which explicitly state they support them.
Signed-off-by Christian Ruppert <[email protected]>
Quoted 49 lines
--- arch/arc/Kconfig | 2 ++ init/Kconfig | 5 +++++ 2 files changed, 7 insertions(+)arch/arc/Kconfig +2
-0@@ -21,6 +21,8 @@ config ARC select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK select HAVE_IOREMAP_PROT + select HAVE_KERNEL_UNCOMPRESSED + select HAVE_KERNEL_GZIP select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_MEMBLOCKinit/Kconfig +5
-0@@ -97,6 +97,9 @@ config LOCALVERSION_AUTO which is done within the script "scripts/setlocalversion".) +config HAVE_KERNEL_UNCOMPRESSED + bool + config HAVE_KERNEL_GZIP bool@@ -118,6 +121,7 @@ config HAVE_KERNEL_LZ4 choice prompt "Kernel compression mode" default KERNEL_GZIP + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_UNCOMPRESSED help The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ@@ -138,6 +142,7 @@ choice config KERNEL_UNCOMPRESSED bool "No compression" + depends on HAVE_KERNEL_UNCOMPRESSED help No compression at all. The kernel is huge but the compression and decompression times are zero.
Re: [PATCH] [FIX] init/Kconfig: fix option to disable kernel compression
Quoted 10 lines · Vineet Gupta
Quoted 8 lines · Christian Ruppert
Some architectures with self-decompressing kernel images did not compile with commit
69f0554ec261fd686ac7fa1c598cc9eb27b83a80because they don't provide a non-decompression mechanism for uncompressed kernels.Rectify this problem by allowing uncompressed kernels only for architectures which explicitly state they support them.
Signed-off-by Christian Ruppert <[email protected]>Acked-by Vineet Gupta <[email protected]>
Looks like the revert was applied to main line (and not this fix). In the follow-up the complete (fixed) patch set rebased on the latest main
line: First patch for Kconfig/ARC and as requested a cleaned up second patch for x86. I could only test the second patch on one physical machine and one VM so some more testing might be required on x86.
Greetings,
Christian
PATCH 1/2 init/Kconfig: add option to disable kernel compression
Some ARC users say they can boot faster with without kernel compression. This probably depends on things like the FLASH chip they use etc.
Until now, kernel compression can only be disabled by removing "select HAVE_<compression>" lines from the architecture Kconfig. So add the Kconfig logic to permit disabling of kernel compression.
--- arch/arc/Kconfig | 2 ++ init/Kconfig | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletions(-)
arch/arc/Kconfig +2 -0
@@ -21,6 +21,8 @@ config ARC select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK select HAVE_IOREMAP_PROT + select HAVE_KERNEL_UNCOMPRESSED + select HAVE_KERNEL_GZIP select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_MEMBLOCK
init/Kconfig +12 -1
@@ -97,6 +97,9 @@ config LOCALVERSION_AUTO which is done within the script "scripts/setlocalversion".) +config HAVE_KERNEL_UNCOMPRESSED + bool + config HAVE_KERNEL_GZIP bool
@@ -118,7 +121,7 @@ config HAVE_KERNEL_LZ4 choice prompt "Kernel compression mode" default KERNEL_GZIP - depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_UNCOMPRESSED help The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ
@@ -137,6 +140,14 @@ choice If in doubt, select 'gzip' +config KERNEL_UNCOMPRESSED + bool "No compression" + depends on HAVE_KERNEL_UNCOMPRESSED + help + No compression at all. The kernel is huge but the compression and + decompression times are zero. + This is usually not what you want. + config KERNEL_GZIP bool "Gzip" depends on HAVE_KERNEL_GZIP
Signature · 1 line
1.7.1
PATCH 2/2 x86: Add support for uncompressed kernel images
In reply to Christian Ruppert--- arch/x86/Kconfig | 1 + arch/x86/boot/compressed/Makefile | 14 ++++++------ arch/x86/boot/compressed/misc.c | 4 +++ lib/decompress_copy.c | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 lib/decompress_copy.c
arch/x86/Kconfig +1 -0
@@ -62,6 +62,7 @@ config X86 select USER_STACKTRACE_SUPPORT select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_DMA_API_DEBUG + select HAVE_KERNEL_UNCOMPRESSED select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_LZMA
arch/x86/boot/compressed/Makefile +7 -7
@@ -67,16 +67,16 @@ $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE $(call if_changed,lz4) -suffix-$(CONFIG_KERNEL_GZIP) := gz -suffix-$(CONFIG_KERNEL_BZIP2) := bz2 -suffix-$(CONFIG_KERNEL_LZMA) := lzma -suffix-$(CONFIG_KERNEL_XZ) := xz -suffix-$(CONFIG_KERNEL_LZO) := lzo -suffix-$(CONFIG_KERNEL_LZ4) := lz4 +suffix-$(CONFIG_KERNEL_GZIP) := .gz +suffix-$(CONFIG_KERNEL_BZIP2) := .bz2 +suffix-$(CONFIG_KERNEL_LZMA) := .lzma +suffix-$(CONFIG_KERNEL_XZ) := .xz +suffix-$(CONFIG_KERNEL_LZO) := .lzo +suffix-$(CONFIG_KERNEL_LZ4) := .lz4 quiet_cmd_mkpiggy = MKPIGGY $@ cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false ) targets += piggy.S -$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE +$(obj)/piggy.S: $(obj)/vmlinux.bin$(suffix-y) $(obj)/mkpiggy FORCE $(call if_changed,mkpiggy)
arch/x86/boot/compressed/misc.c +4 -0
@@ -149,6 +149,10 @@ static int lines, cols;#include "../../../../lib/decompress_unlz4.c" #endif +#ifdef CONFIG_KERNEL_UNCOMPRESSED +#include "../../../../lib/decompress_copy.c" +#endif +static void scroll (void ) {int i;
lib/decompress_copy.c new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.1
Borislav Petkov
maintainerRe: [PATCH 2/2] x86: Add support for uncompressed kernel images
On Mon, Nov 18, 2013 at 10:51:51AM +0100, Christian Ruppert wrote:
How about a commit message ... somewhere around here would be nice, for example :)
Quoted 8 lines
Signed-off-by Christian Ruppert <[email protected]>--- arch/x86/Kconfig | 1 + arch/x86/boot/compressed/Makefile | 14 ++++++------ arch/x86/boot/compressed/misc.c | 4 +++ lib/decompress_copy.c | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 lib/decompress_copy.c
Signature · 5 lines
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--PATCH v2 2/2 x86: Add support for uncompressed kernel images
There seems to be some interest to enable uncompressed kernels also for x86 in addition to (embedded) ARC platforms.
Add the code to support uncompressed kernels to lib/, select the respective Kconfig options for the x86 architecture and use this code in the x86 kernel self-decompressor.
--- arch/x86/Kconfig | 1 + arch/x86/boot/compressed/Makefile | 14 ++++++------ arch/x86/boot/compressed/misc.c | 4 +++ lib/decompress_copy.c | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 lib/decompress_copy.c
arch/x86/Kconfig +1 -0
@@ -62,6 +62,7 @@ config X86 select USER_STACKTRACE_SUPPORT select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_DMA_API_DEBUG + select HAVE_KERNEL_UNCOMPRESSED select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_LZMA
arch/x86/boot/compressed/Makefile +7 -7
@@ -67,16 +67,16 @@ $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE $(call if_changed,lz4) -suffix-$(CONFIG_KERNEL_GZIP) := gz -suffix-$(CONFIG_KERNEL_BZIP2) := bz2 -suffix-$(CONFIG_KERNEL_LZMA) := lzma -suffix-$(CONFIG_KERNEL_XZ) := xz -suffix-$(CONFIG_KERNEL_LZO) := lzo -suffix-$(CONFIG_KERNEL_LZ4) := lz4 +suffix-$(CONFIG_KERNEL_GZIP) := .gz +suffix-$(CONFIG_KERNEL_BZIP2) := .bz2 +suffix-$(CONFIG_KERNEL_LZMA) := .lzma +suffix-$(CONFIG_KERNEL_XZ) := .xz +suffix-$(CONFIG_KERNEL_LZO) := .lzo +suffix-$(CONFIG_KERNEL_LZ4) := .lz4 quiet_cmd_mkpiggy = MKPIGGY $@ cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false ) targets += piggy.S -$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE +$(obj)/piggy.S: $(obj)/vmlinux.bin$(suffix-y) $(obj)/mkpiggy FORCE $(call if_changed,mkpiggy)
arch/x86/boot/compressed/misc.c +4 -0
@@ -149,6 +149,10 @@ static int lines, cols;#include "../../../../lib/decompress_unlz4.c" #endif +#ifdef CONFIG_KERNEL_UNCOMPRESSED +#include "../../../../lib/decompress_copy.c" +#endif +static void scroll (void ) {int i;
lib/decompress_copy.c new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.1
Re: [PATCH 2/2 v2] x86: Add support for uncompressed kernel images
Quoted 6 lines · Christian Ruppert
There seems to be some interest to enable uncompressed kernels also for x86 in addition to (embedded) ARC platforms.
Add the code to support uncompressed kernels to
lib/, select the respectiveKconfigoptions for the x86 architecture and use this code in the x86 kernel self-decompressor.
Any news on this? Was someone able to take a look at / test this patch? I have given it some more testing and encountered no issues so far.
Greetings,
Christian