Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/, /, doc/
Date: Thu, 16 Jul 2020 15:03:37
Message-Id: 1594909757.80e3a6086c92e30101f772170c4b056f1ff4c81c.whissi@gentoo
1 commit: 80e3a6086c92e30101f772170c4b056f1ff4c81c
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 15 22:05:53 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 16 14:29:17 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=80e3a608
7
8 Add ZSTD compression support for initramfs
9
10 Bug: https://bugs.gentoo.org/731294
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 defaults/compression_methods.sh | 5 +++++
14 doc/genkernel.8.txt | 3 ++-
15 gen_cmdline.sh | 2 +-
16 gen_funcs.sh | 2 ++
17 4 files changed, 10 insertions(+), 2 deletions(-)
18
19 diff --git a/defaults/compression_methods.sh b/defaults/compression_methods.sh
20 index 41ee9c4..b65f057 100644
21 --- a/defaults/compression_methods.sh
22 +++ b/defaults/compression_methods.sh
23 @@ -35,3 +35,8 @@ GKICM_XZ_KOPTNAME="XZ"
24 GKICM_XZ_CMD="xz -e --check=none -z -f -9"
25 GKICM_XZ_EXT=".xz"
26 GKICM_XZ_PKG="app-arch/xz-utils"
27 +
28 +GKICM_ZSTD_KOPTNAME="ZSTD"
29 +GKICM_ZSTD_CMD="zstd -f -19 -q"
30 +GKICM_ZSTD_EXT=".zst"
31 +GKICM_ZSTD_PKG="app-arch/zstd"
32
33 diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
34 index 40c591e..5b15a02 100644
35 --- a/doc/genkernel.8.txt
36 +++ b/doc/genkernel.8.txt
37 @@ -598,7 +598,8 @@ NOTE: System.map filename and System.map symlink name must be different.
38 Deprecated alias for *--*[*no-*]*compress-initramfs*.
39
40 *--compress-initramfs-type*=<arg>::
41 - Compression type for initramfs (best, bzip2, fastest, gzip, lz4, lzma, lza, xz).
42 + Compression type for initramfs (best, bzip2, fastest, gzip, lz4, lzma,
43 + lza, xz, zstd).
44 +
45 *best* will select the algorithm providing best compression
46 from those selected in your kernel configuration.
47
48 diff --git a/gen_cmdline.sh b/gen_cmdline.sh
49 index 1daee5c..5e667bd 100755
50 --- a/gen_cmdline.sh
51 +++ b/gen_cmdline.sh
52 @@ -244,7 +244,7 @@ longusage() {
53 echo " --no-compress-initrd Deprecated alias for --no-compress-initramfs"
54 echo " --compress-initramfs-type=<arg>"
55 echo " Compression type for initramfs (best, bzip2, fastest, gzip, lz4,"
56 - echo " lzma, lza, xz)"
57 + echo " lzma, lza, xz, zstd)"
58 echo " --strip=(all|kernel|modules|none)"
59 echo " Strip debug symbols from none, all, installed kernel (obsolete) or"
60 echo " modules (default)"
61
62 diff --git a/gen_funcs.sh b/gen_funcs.sh
63 index 69e7242..a58fbbb 100755
64 --- a/gen_funcs.sh
65 +++ b/gen_funcs.sh
66 @@ -468,6 +468,7 @@ get_initramfs_compression_method_by_compression() {
67 local -a methods=()
68 methods+=( XZ )
69 methods+=( LZMA )
70 + methods+=( ZSTD )
71 methods+=( GZIP )
72 methods+=( BZIP2 )
73 methods+=( LZO )
74 @@ -479,6 +480,7 @@ get_initramfs_compression_method_by_compression() {
75 get_initramfs_compression_method_by_speed() {
76 local -a methods=()
77 methods+=( LZ4 )
78 + methods+=( ZSTD )
79 methods+=( LZO )
80 methods+=( GZIP )
81 methods+=( BZIP2 )