KERNEL-INSTALL.ECLASS

Section: eclass-manpages (5)
Updated: Mar 2024
Index Return to Main Contents

NAME

kernel-install.eclass - Installation mechanics for Distribution Kernels

DESCRIPTION

This eclass provides the logic needed to test and install different kinds of Distribution Kernel packages, including both kernels built from source and distributed as binaries. The eclass relies on the ebuild installing a subset of built kernel tree into /usr/src/linux-${PV} containing the kernel image in its standard location and System.map.

The eclass exports src_test, pkg_postinst and pkg_postrm. Additionally, the inherited mount-boot eclass exports pkg_pretend. It also stubs out pkg_preinst and pkg_prerm defined by mount-boot.

SUPPORTED EAPIS

8

TRANSITIVELY PROVIDED ECLASSES

dist-kernel-utils

FUNCTIONS

kernel-install_can_update_symlink
Determine whether the symlink at <target> (full path) should be updated. Returns 0 if it should, 1 to leave as-is.
kernel-install_update_symlink <target> <version>
Update the kernel source symlink at <target> (full path) with a link to <target>-<version> if it's either missing or pointing out to an older version of this package.
kernel-install_get_qemu_arch
Get appropriate qemu suffix for the current ${ARCH}.
kernel-install_create_init <filename>
Create minimal /sbin/init
kernel-install_create_qemu_image <filename>
Create minimal qemu raw image
kernel-install_test <version> <image> <modules>
Test that the kernel can successfully boot a minimal system image in qemu. <version> is the kernel version, <image> path to the image, <modules> path to module tree.
kernel-install_pkg_pretend
Check for missing optional dependencies and output warnings.
kernel-install_src_test
Boilerplate function to remind people to call the tests.
kernel-install_pkg_preinst
Verify whether the kernel has been installed correctly.
kernel-install_extract_from_uki <type> <input> <output>
Extracts kernel image or initrd from an UKI. <type> must be "linux" or "initrd".
kernel-install_install_all <ver>
Install the kernel, initramfs/uki generation is optionally handled by installkernel. This is called from pkg_postinst() and pkg_config(). <ver> is the full kernel version.
kernel-install_pkg_postinst
Build an initramfs for the kernel, install it and update the /usr/src/linux symlink.
kernel-install_pkg_prerm
Stub out mount-boot.eclass.
kernel-install_pkg_postrm
Clean up the generated initramfs from the removed kernel directory.
kernel-install_pkg_config
Rebuild the initramfs and reinstall the kernel.
kernel-install_compress_modules
Compress modules installed in ED, if USE=modules-compress is enabled.

ECLASS VARIABLES

KERNEL_IUSE_GENERIC_UKI (SET BEFORE INHERIT)
If set to a non-null value, adds IUSE=generic-uki and required logic to install a generic unified kernel image.
KV_LOCALVERSION
A string containing the kernel LOCALVERSION, e.g. '-gentoo'. Needs to be set only when installing binary kernels, kernel-build.eclass obtains it from kernel config.

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

kernel-install.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/kernel-install.eclass


Index

NAME
DESCRIPTION
SUPPORTED EAPIS
TRANSITIVELY PROVIDED ECLASSES
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, March 29, 2024