DIST-KERNEL-UTILS.ECLASS
Section: eclass-manpages (5)Updated: Mar 2025
Index Return to Main Contents
NAME
dist-kernel-utils.eclass - Utility functions related to Distribution KernelsDESCRIPTION
This eclass provides various utility functions related to Distribution Kernels.SUPPORTED EAPIS
7 8FUNCTIONS
- dist-kernel_get_image_path
- Get relative kernel image path specific to the current ${ARCH}.
- dist-kernel_install_kernel [<version>] [<image>] [<system.map>] [<dir>] [<installkernel-args>...]
-
Install kernel using installkernel. Takes the following arguments:
<version> -- the target kernel version (default: ${KV_FULL})
<image> -- the full path to the kernel image (default: the image as reported by dist-kernel_get_image_path() in the ${KV_DIR})
<system.map> -- the full path to the System.map (default: ${KV_DIR}/System.map})
<dir> -- the target directory to install to (default: ${EROOT}/boot)
<installkernel-args> -- extra optional arguments for installkernel see man kernel-install and man installkernel. Requires at
least version 56 of sys-kernel/installkernel.
- dist-kernel_reinstall_initramfs [<kv-dir>] [<kv-full>] [<installkernel-args>...]
-
Rebuild and install initramfs for the specified dist-kernel.
Takes the following arguments:
<kv-dir> -- the full path to the target kernel (default: ${KV_DIR})
<kv-full> -- the target kernel version (default: ${KV_FULL})
<installkernel-args> -- extra optional arguments for installkernel see man kernel-install and man installkernel. Requires at
least version 56 of sys-kernel/installkernel.
This function is to be used in pkg_postinst() of ebuilds installing kernel modules that are included in the initramfs. In order to reinstall *all* distribution kernels currently installed on the system add the --all argument (requires installkernel-56 or newer).
- dist-kernel_PV_to_KV <pv>
- Convert a Gentoo-style ebuild version to kernel "x.y.z[-rcN]" version.
- dist-kernel_get_module_suffix <kernel_config>
- Returns the suffix for kernel modules based on the CONFIG_MODULES_COMPESS_* setting in the kernel config and USE=modules-compress.
- dist-kernel_compressed_module_cleanup <path>
- Traverse path for duplicate (un)compressed modules and remove all but the newest variant.
ECLASS VARIABLES
- KERNEL_EFI_ZBOOT
- If set to a non-null value, it is assumed the kernel was built with CONFIG_EFI_ZBOOT enabled. This effects the name of the kernel image on arm64 and riscv. Mainly useful for sys-kernel/gentoo-kernel-bin.
AUTHORS
Michał Górny <mgorny@gentoo.org>MAINTAINERS
Distribution Kernel Project <dist-kernel@gentoo.org>REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
dist-kernel-utils.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/dist-kernel-utils.eclass
Index
- NAME
- DESCRIPTION
- SUPPORTED EAPIS
- FUNCTIONS
- ECLASS VARIABLES
- AUTHORS
- MAINTAINERS
- REPORTING BUGS
- FILES
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 03:27:00 GMT, March 13, 2025