sys-kernel/coreos-modules: switch to gzip/zstd compression

With the default gzip compression the 60 MB limit for the vmlinuz
bundle of kernel+initramfs was reached. The limit comes from the size
of the /boot partition which is 128 MB large and the kernel needs to
fit twice, in addition to GRUB.

Use zstd for the initramfs as it provides a similar speed but better
compression. For the kernel we can't switch yet to zstd for arm64
but for amd64 it works.
This commit is contained in:
Kai Lüke 2021-07-26 14:29:11 +02:00
parent 1b068b5186
commit 29f2903c87
2 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ KEYWORDS="amd64 arm64"
RDEPEND="=sys-kernel/coreos-modules-${PVR}"
DEPEND="${RDEPEND}
app-arch/gzip
app-arch/zstd
app-shells/bash
coreos-base/coreos-init:=
sys-apps/coreutils
@ -65,6 +66,7 @@ src_prepare() {
# Symlink to bootengine.cpio so we can stick with relative paths in .config
ln -sv "${ROOT}"/usr/share/bootengine/bootengine.cpio build/ || die
config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"'
config_update 'CONFIG_INITRAMFS_COMPRESSION_ZSTD=y'
# include all intel and amd microcode files, avoiding the signatures
local fw_dir="${ROOT}lib/firmware"

View File

@ -76,6 +76,7 @@ CONFIG_ISCSI_IBFT=y
CONFIG_ISCSI_IBFT_FIND=y
CONFIG_ITCO_VENDOR_SUPPORT=y
CONFIG_ITCO_WDT=m
CONFIG_KERNEL_ZSTD=y
CONFIG_KEXEC_FILE=y
CONFIG_KPROBES_ON_FTRACE=y
CONFIG_KVM=m