This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Kernel

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.

The kernel is the core of the operating system. Containing most of the device drives, the kernel offers interfaces for programs to access system hardware such as memory, graphic cards, and block devices.

Although Gentoo is a free operating system based on either Linux or FreeBSD and FreeBSD has its own kernel, for practical reasons, this article refers exclusively to the Linux kernel.

Installation

USE flags

To create a kernel, it is necessary to install the kernel source code first. The Gentoo recommended kernel sources for a desktop system are, of course, sys-kernel/gentoo-sources. These are maintained by the Gentoo developers, and patched to fix security vulnerabilities, functional problems, as well as to improve compatibility with rare system architectures.

USE flags for sys-kernel/gentoo-sources Full sources including the Gentoo patchset for the 6.9 kernel tree

build  !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1]
experimental Apply experimental patches; for more information, see "https://wiki.gentoo.org/wiki/Project:Kernel/Experimental".
symlink Force kernel ebuilds to automatically update the /usr/src/linux symlink

Emerge

Now install sys-kernel/gentoo-sources:

root #emerge --ask sys-kernel/gentoo-sources

Alternative kernels

The Kernel sources overview article provides details on most, if not all, of the kernel sources packages available in Gentoo.

Searching all alternatives

A full list of kernel sources with short descriptions can be found by searching with emerge:

root #emerge --search "%@^sys-kernel/.*sources"

Available articles

Configuration

Automatic configuration
genkernel is a tool used to automate the build process of the kernel and initramfs. The goal of genkernel is to help users through the kernel building process.
Manual configuration
Manual configuration enables the user, with some effort, to create a custom-fit kernel configuration.
Gentoo kernel configuration guide
Gentoo's kernel configuration guide.
Kernel security
Instructions for securing the kernel.
Kernel Seeds
Like the option above, Kernels Seeds help the user, with some effort, create a custom-fit kernel configuration using an existing .config as a base.

Upgrade

Upgrade
Steps to upgrade to a new kernel using an existing configuration.
2.4 to 2.6 Migration
Migration guide from Linux 2.4 to Linux 2.6. Since the Linux kernel codebase has significantly moved past 2.6, these migration steps are no longer relevant, but may be useful for helping administrators understand.

Removal

Removal
Steps to completely remove old kernels.

See also

External resources

  • planet.kernel.org - Blogs related to the Linux kernel.
  • kernelnewbies.org - A "community of aspiring Linux kernel developers who work to improve their Kernels and more experienced developers willing to share their knowledge".
  • kernel.org/doc/ - Official comprehensible documentation for the Linux kernel.