Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 631342 Details for
Bug 716520
sys-kernel/gentoo-sources-5.6.2+: Add support for ZSTD-compressed kernel and initramfs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
x86: Add support for ZSTD compressed kernel
5006_ZSTD-v4-7-8-support-for-ZSTD-compressed-kernel.patch (text/plain), 3.30 KB, created by
Mike Pagano
on 2020-04-08 14:57:07 UTC
(
hide
)
Description:
x86: Add support for ZSTD compressed kernel
Filename:
MIME Type:
Creator:
Mike Pagano
Created:
2020-04-08 14:57:07 UTC
Size:
3.30 KB
patch
obsolete
>diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst >index c9c201596c3e..cedcf4d49bf0 100644 >--- a/Documentation/x86/boot.rst >+++ b/Documentation/x86/boot.rst >@@ -786,9 +786,9 @@ Protocol: 2.08+ > uncompressed data should be determined using the standard magic > numbers. The currently supported compression formats are gzip > (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA >- (magic number 5D 00), XZ (magic number FD 37), and LZ4 (magic number >- 02 21). The uncompressed payload is currently always ELF (magic >- number 7F 45 4C 46). >+ (magic number 5D 00), XZ (magic number FD 37), LZ4 (magic number >+ 02 21) and ZSTD (magic number 28 B5). The uncompressed payload is >+ currently always ELF (magic number 7F 45 4C 46). > > ============ ============== > Field name: payload_length >diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >index beea77046f9b..12d88997a3a6 100644 >--- a/arch/x86/Kconfig >+++ b/arch/x86/Kconfig >@@ -183,6 +183,7 @@ config X86 > select HAVE_KERNEL_LZMA > select HAVE_KERNEL_LZO > select HAVE_KERNEL_XZ >+ select HAVE_KERNEL_ZSTD > select HAVE_KPROBES > select HAVE_KPROBES_ON_FTRACE > select HAVE_FUNCTION_ERROR_INJECTION >diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile >index 26050ae0b27e..8233f598f15b 100644 >--- a/arch/x86/boot/compressed/Makefile >+++ b/arch/x86/boot/compressed/Makefile >@@ -24,7 +24,7 @@ OBJECT_FILES_NON_STANDARD := y > KCOV_INSTRUMENT := n > > targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ >- vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 >+ vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 vmlinux.bin.zst > > KBUILD_CFLAGS := -m$(BITS) -O2 > KBUILD_CFLAGS += -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC) >@@ -145,6 +145,8 @@ $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE > $(call if_changed,lzo) > $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE > $(call if_changed,lz4) >+$(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE >+ $(call if_changed,zstd) > > suffix-$(CONFIG_KERNEL_GZIP) := gz > suffix-$(CONFIG_KERNEL_BZIP2) := bz2 >@@ -152,6 +154,7 @@ suffix-$(CONFIG_KERNEL_LZMA) := lzma > suffix-$(CONFIG_KERNEL_XZ) := xz > suffix-$(CONFIG_KERNEL_LZO) := lzo > suffix-$(CONFIG_KERNEL_LZ4) := lz4 >+suffix-$(CONFIG_KERNEL_ZSTD) := zst > > quiet_cmd_mkpiggy = MKPIGGY $@ > cmd_mkpiggy = $(obj)/mkpiggy $< > $@ >diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c >index 9652d5c2afda..39e592d0e0b4 100644 >--- a/arch/x86/boot/compressed/misc.c >+++ b/arch/x86/boot/compressed/misc.c >@@ -77,6 +77,10 @@ static int lines, cols; > #ifdef CONFIG_KERNEL_LZ4 > #include "../../../../lib/decompress_unlz4.c" > #endif >+ >+#ifdef CONFIG_KERNEL_ZSTD >+#include "../../../../lib/decompress_unzstd.c" >+#endif > /* > * NOTE: When adding a new decompressor, please update the analysis in > * ../header.S. >diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h >index 680c320363db..d6dd43d25d9f 100644 >--- a/arch/x86/include/asm/boot.h >+++ b/arch/x86/include/asm/boot.h >@@ -24,9 +24,11 @@ > # error "Invalid value for CONFIG_PHYSICAL_ALIGN" > #endif > >-#ifdef CONFIG_KERNEL_BZIP2 >+#if defined(CONFIG_KERNEL_BZIP2) > # define BOOT_HEAP_SIZE 0x400000 >-#else /* !CONFIG_KERNEL_BZIP2 */ >+#elif defined(CONFIG_KERNEL_ZSTD) >+# define BOOT_HEAP_SIZE 0x30000 >+#else > # define BOOT_HEAP_SIZE 0x10000 > #endif >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 716520
:
630946
|
631330
|
631332
|
631334
|
631336
|
631338
|
631340
| 631342 |
631344
|
631346
|
632454