Skip to main content

After seven months of hard work, we’re excited to announce the release of CachyOS Kernel Builder for Debian-based Distributions. This TUI utility builds the Linux Kernel with patches from CachyOS. It optimizes the build-time options to your system’s CPU architecture, helping automate the configuration, building, and creation of distributable kernel packages.

What started as a simple fork to get the original utility to build packages turned into a rewrite that introduces numerous unique aspects, such as additional configurations, more modular functions, robust error handling, and enhanced user interaction while maintaining the goal of the original. With up to 37% more LoC, our rewritten utility offers users the flexibility of selecting from the available latest stable releases of the Linux kernel and the various kernel configuration options that CachyOS offers to the FOSS community.

We want to acknowledge the original developer, Laio O. Seman, for his work, which inspired us to improve this utility.

Overview

The utility provides the following:

  • Build a Linux Kernel using patches from CachyOS.
  • Advanced configuration options, including compilation optimizations.
  • Create distributable Debian packages.

What CachyOS Kernel Builder for Debian-based Distributions is

What CachyOS Kernel Builder for Debian-based Distributions is not

  • A package manager.
    • CachyOS Kernel Builder does not manage kernels; it configures, compiles, and creates distributable packages.
  • A container, virtual machine, Live USB creator, Linux distribution, desktop environment, or “proprietary software.”
    • 🔰 Information: We don’t know why anyone would think that, but one can never know, so let’s clarify that.

Easily visualize the selected changes before continuing to build the Debian packages.

Advanced Configuration in CachyOS Kernel Builder for Debian-based Distributions

The utility includes advanced configuration options for users who want to fine-tune their kernel:

  • Linux Kernel Configuration: Choose from different configurations for the Linux Kernel from CachyOS.
    • CPU Scheduler: Choose between various schedulers from CachyOS.
  • Configure LLVM’s Link Time Optimization (LTO): Select from Thin and Full LTO for better optimization.
  • Configurable Tick Rate and Tick Types: You can configure the kernel tick rate and types according to your system’s needs.
  • Configurable NR_CPUS: Set the maximum number of CPUs/cores the kernel will support.
  • Configurable Hugepages: Enable Hugepages support or not.
  • Configurable LRU: Configure the Least Recently Used memory management mechanism.
  • Configurable Preemption Type: Kernel preemption types generally control how the Linux kernel handles tasks and interrupts, affecting system responsiveness and latency.
  • Configurable Kernel Name: Choose a name for your custom kernel.
  • Additional Optimizations: Optimizations target aspects of system performance and can provide benefits depending on the workload and system configuration.
    • Use GCC -O3 Optimizations: Aggressively optimizes compiled code for speed, possibly increasing binary size and compilation time.
    • Enable Performance Governor: This setting sets the CPU to run at maximum frequency, boosting performance but increasing power consumption and heat.
    • Enable VMA Optimizations: Enhances memory management efficiency, potentially improving application performance.
    • Enable DAMON: Monitors data access patterns to optimize memory usage and improve performance.
    • Enable NUMA: Optimizes memory allocation and access patterns on NUMA systems to reduce latency.

Installing and Using CachyOS Kernel Builder for Debian-based Distributions

To use the utility, follow these steps:

  • Clone the repository to your local machine.
  • Make the utility executable: chmod +x cachy-kernel-deb
    • Move the utility to a directory in the $PATH.
  • Run the utility: cachy-kernel-deb
    • Follow the on-screen prompts to configure the kernel and build the packages.

Examples of distributable Debian packages created by CachyOS Kernel Builder for Debian-based Distributions.

To use this utility in Nitrux, users must use a Debian-based container; see our tutorial on Distrobox. Additionally, to boot the kernel, use Kernel Boot; check our tutorial on Kernel Boot.