From: Jeremy Linton <[email protected]>

[redhat] configs: Compress UEFI/PE kernels with zstd

Zstd compressed kernels consume less disk space and decompress faster
than gziped ones. For example, kernel 6.12rc3 aarch64's on disk size
is ~22% smaller and boots ~16% faster on a RPi4. Since this was
already on for some x86 flavors, lets propagate the setting to all
appropriate UEFI architectures (x86, aarch64, riscv) and kernel
flavors for those architectures. PPC and S390 should not be affected
except to remove a ppc UNCOMPRESSED vs GZIPed conflict that was being
corrected by the kconfig process.

Signed-off-by: Jeremy Linton <[email protected]>

diff --git a/redhat/configs/common/generic/CONFIG_KERNEL_GZIP 
b/redhat/configs/common/generic/CONFIG_KERNEL_GZIP
index blahblah..blahblah 100644
--- a/redhat/configs/common/generic/CONFIG_KERNEL_GZIP
+++ b/redhat/configs/common/generic/CONFIG_KERNEL_GZIP
@@ -1 +1 @@
-CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_GZIP is not set
diff --git a/redhat/configs/common/generic/CONFIG_KERNEL_ZSTD 
b/redhat/configs/common/generic/CONFIG_KERNEL_ZSTD
index blahblah..blahblah 100644
--- a/redhat/configs/common/generic/CONFIG_KERNEL_ZSTD
+++ b/redhat/configs/common/generic/CONFIG_KERNEL_ZSTD
@@ -1 +1 @@
-# CONFIG_KERNEL_ZSTD is not set
+CONFIG_KERNEL_ZSTD=y
diff --git a/redhat/configs/common/generic/powerpc/CONFIG_KERNEL_GZIP 
b/redhat/configs/common/generic/powerpc/CONFIG_KERNEL_GZIP
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/powerpc/CONFIG_KERNEL_GZIP
@@ -0,0 +1 @@
+CONFIG_KERNEL_GZIP=y
diff --git a/redhat/configs/common/generic/powerpc/CONFIG_KERNEL_ZSTD 
b/redhat/configs/common/generic/powerpc/CONFIG_KERNEL_ZSTD
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/powerpc/CONFIG_KERNEL_ZSTD
@@ -0,0 +1 @@
+# CONFIG_KERNEL_ZSTD is not set
diff --git a/redhat/configs/common/generic/s390x/CONFIG_KERNEL_GZIP 
b/redhat/configs/common/generic/s390x/CONFIG_KERNEL_GZIP
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/s390x/CONFIG_KERNEL_GZIP
@@ -0,0 +1 @@
+CONFIG_KERNEL_GZIP=y
diff --git a/redhat/configs/fedora/generic/CONFIG_KERNEL_UNCOMPRESSED 
b/redhat/configs/common/generic/s390x/CONFIG_KERNEL_UNCOMPRESSED
rename from redhat/configs/fedora/generic/CONFIG_KERNEL_UNCOMPRESSED
rename to redhat/configs/common/generic/s390x/CONFIG_KERNEL_UNCOMPRESSED
index blahblah..blahblah 100644
--- a/redhat/configs/fedora/generic/CONFIG_KERNEL_UNCOMPRESSED
+++ b/redhat/configs/common/generic/s390x/CONFIG_KERNEL_UNCOMPRESSED
diff --git a/redhat/configs/common/generic/s390x/CONFIG_KERNEL_ZSTD 
b/redhat/configs/common/generic/s390x/CONFIG_KERNEL_ZSTD
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/s390x/CONFIG_KERNEL_ZSTD
@@ -0,0 +1 @@
+# CONFIG_KERNEL_ZSTD is not set
diff --git a/redhat/configs/fedora/generic/x86/CONFIG_KERNEL_GZIP 
b/redhat/configs/fedora/generic/x86/CONFIG_KERNEL_GZIP
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/fedora/generic/x86/CONFIG_KERNEL_GZIP
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_KERNEL_GZIP is not set
diff --git a/redhat/configs/fedora/generic/x86/CONFIG_KERNEL_ZSTD 
b/redhat/configs/fedora/generic/x86/CONFIG_KERNEL_ZSTD
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/fedora/generic/x86/CONFIG_KERNEL_ZSTD
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_KERNEL_ZSTD=y
diff --git a/redhat/configs/rhel/generic/s390x/CONFIG_KERNEL_UNCOMPRESSED 
b/redhat/configs/rhel/generic/s390x/CONFIG_KERNEL_UNCOMPRESSED
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/rhel/generic/s390x/CONFIG_KERNEL_UNCOMPRESSED
+++ /dev/null
@@ -1 +0,0 @@
-# CONFIG_KERNEL_UNCOMPRESSED is not set
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -711,6 +711,10 @@ Provides: installonlypkg(kernel)
 #
 BuildRequires: kmod, bash, coreutils, tar, git-core, which
 BuildRequires: bzip2, xz, findutils, m4, perl-interpreter, perl-Carp, 
perl-devel, perl-generators, make, diffutils, gawk, %compression
+# Kernel EFI/Compression set by CONFIG_KERNEL_ZSTD
+%ifarch x86_64 aarch64 riscv64
+BuildRequires: zstd
+%endif
 BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++
 %if 0%{?fedora}
 BuildRequires: rust, rust-src, bindgen, rustfmt

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3460

-- 
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to