kernel-build.eclass

Name

kernel-build.eclass -- Build mechanics for Distribution Kernels

Description

This eclass provides the logic to build a Distribution Kernel from source and install it. Post-install and test logic is inherited from kernel-install.eclass.

The ebuild must take care of unpacking the kernel sources, copying an appropriate .config into them (e.g. in src_prepare()) and setting correct S. The eclass takes care of respecting savedconfig, building the kernel and installing it along with its modules and subset of sources needed to build external modules.

Supported EAPIs

7 8

Transitively Provided Eclasses

  • kernel-install

Exported Phases

  • pkg_postinst

  • src_compile

  • src_test

  • src_install

  • src_configure

Functions

kernel-build_src_configure

Prepare the toolchain for building the kernel, get the default .config or restore savedconfig, and get build tree configured for modprep.

kernel-build_src_compile

Compile the kernel sources.

kernel-build_src_test

Test the built kernel via qemu. This just wraps the logic from kernel-install.eclass with the correct paths.

kernel-build_src_install

Install the built kernel along with subset of sources into /usr/src/linux-${PV}. Install the modules. Save the config.

kernel-build_pkg_postinst

Combine postinst from kernel-install and savedconfig eclasses.

kernel-build_merge_configs [distro.config...]

Merge the config files specified as arguments (if any) into the '.config' file in the current directory, then merge any user-supplied configs from ${BROOT}/etc/kernel/config.d/

.config. The '.config' file must exist already and contain the base configuration.

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/