mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 11:17:21 -08:00
7787a9bacbabdee07717f2af227d037f745b77bb
For gentoo-kernel-bin we build the gpkg with module-compression
disabled because compressing the initramfs or gpkg is less efficient
if the modules are already pre-compressed.
This however does not fix that problem for custom builds of the
generic-uki where the end goal is still to have compressed modules.
In that case we want compressed modules on the root fs but not in the
generic initrd/uki we built.
Resolve this problem by unconditionally disabling the automatic
compression of 'make modules_install' and using instead the
kernel-install_compress_modules() function from kernel-install.eclass
This has the nice side-effect of slightly simplifying the eclass and
more closely aligning the code path of gentoo-kernel-bin and
gentoo-kernel. In the future when all kernel ebuilds support
USE=generic-uki we can simplify this even further.
CONFIG_MODULE_COMPRESS_ALL is one of those options that does not
actually change anything in the kernel itself, it just toggles what the
kernel build system, and specifically make modules_install does (the
same holds for CONFIG_MODULE_COMPRESS_{GZIP,XZ,ZSTD} as well).
Therefore we can safely disable this and instead call the compressor
manually later (with the same options that make modules_install would
have called it with).
We already do precisely this in sys-kernel/gentoo-kernel-bin, we build
the gpkg with support for module compression enabled
(CONFIG_MODULE_COMPRESS=y), but without actually compressing the
modules (USE=-modules-compress and therefore
(using kernel-install_compress_modules()) then compresses the modules in
the gpkg we built depending on USE=modules-compress.
Essentially this change makes sys-kernel/gentoo-kernel do the same
thing that sys-kernel/gentoo-kernel-bin is already doing.
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/45640
…
…
…
…
…
…
…
…
…
…
…
Description
No description provided
9.8 GiB
Languages
Shell
97.9%
Roff
1.4%
Emacs Lisp
0.2%
C
0.1%