A comprehensive Linux kernel build system combining:
- Curated Patch Collection: Organized patches from CachyOS, XanMod, Clear Linux, and more
- Catgirl Edition: Aggressive performance optimizations with multiple scheduler options
- CachyMod: Interactive CachyOS kernel builder with multiple scheduler variants
- TKG Integration: Frogging-Family package management for linux-tkg, nvidia-tkg, mesa-tkg, wine-tkg, and proton-tkg
This unified repository provides everything needed for building highly optimized custom Linux kernels with extensive customization options.
.
├── 6.12/ # Patches for Linux kernel 6.12
├── 6.15/ # Patches for Linux kernel 6.15
├── 6.16/ # Patches for Linux kernel 6.16
├── 6.17/ # Patches for Linux kernel 6.17
│ └── catgirl-edition/ # Catgirl edition patches
├── 6.18/ # Patches for Linux kernel 6.18
├── build/ # Build system directory
│ ├── catgirl-edition/ # Catgirl Edition PKGBUILD and configs
│ │ ├── PKGBUILD # Arch Linux package build script
│ │ ├── config # Kernel configuration
│ │ ├── patches/ # Catgirl-specific patches
│ │ └── README.md # Catgirl Edition documentation
│ ├── cachymod/ # CachyMod interactive build system
│ │ ├── confmod.sh # Interactive configuration utility
│ │ ├── uninstall.sh # Kernel removal tool
│ │ ├── defconfigs/ # Pre-made configurations
│ │ ├── sample/ # Custom modification templates
│ │ └── 6.18/ # Kernel 6.18 build directory
│ ├── configs/ # Build configurations
│ └── templates/ # Build templates
├── scripts/ # Build and configuration scripts
│ ├── cachy/ # CachyOS-specific scripts
│ ├── utils/ # Utility scripts
│ ├── compile.sh # Kernel compilation script
│ ├── config.sh # Kernel configuration script
│ ├── fetch.sh # Patch fetching script
│ ├── trim.sh # Patch trimming/processing script
│ ├── tkg-installer # TKG package installer (TUI)
│ └── install-tkg.sh # TKG installer setup script
├── docs/ # Documentation and patch lists
└── kernel-builder.sh # Main unified build interface
Use the main kernel-builder.sh script for all build operations:
# Interactive mode - shows menu with all options
./kernel-builder.sh
# Build Catgirl Edition kernel (optimized, multiple schedulers)
./kernel-builder.sh catgirl
# Build CachyMod kernels (interactive CachyOS builds)
./kernel-builder.sh cachymod
# Launch TKG installer TUI for Frogging-Family packages
./kernel-builder.sh tkg
# Browse available patches by version
./kernel-builder.sh patches 6.17
# Fetch latest patches from upstream sources
./kernel-builder.sh fetch
# Standard kernel compilation
./kernel-builder.sh compile
# Show help and available commands
./kernel-builder.sh helpThe Catgirl Edition provides aggressive performance optimizations:
# Build with interactive customization
./kernel-builder.sh catgirl
# Or directly with makepkg
cd build/catgirl-edition
makepkg -scf --cleanbuild --skipchecksumsKey Features:
- Multiple CPU schedulers: BORE (recommended), EEVDF, BMQ, RT | Benchmarks
- Clang LTO and -O3 optimizations
- TCP BBRv3 congestion control
- Modprobed-db support for minimal kernel size
- Clear Linux and CachyOS patchsets
CachyMod provides an interactive build system for CachyOS with pre-configured scheduler variants:
# Interactive configuration (requires gum)
./kernel-builder.sh cachymod
# Or use subcommands:
./kernel-builder.sh cachymod config # Configure new kernel variant
./kernel-builder.sh cachymod build 618-bore # Build specific config
./kernel-builder.sh cachymod list # List available configs
./kernel-builder.sh cachymod uninstall # Remove installed kernelsAvailable Configs:
618- Standard EEVDF scheduler618-bore- BORE scheduler (balanced)618-bmq- BMQ scheduler (minimal)618-pds- PDS scheduler618-rt- Real-time scheduler
Prerequisites:
sudo pacman -S gum # Required for interactive UISee build/cachymod/README.md for detailed documentation.
Build and manage Frogging-Family packages:
# Interactive TUI mode
./kernel-builder.sh tkg
# Direct package installation
./scripts/tkg-installer linux # Linux-TKG kernel
./scripts/tkg-installer nvidia # NVIDIA-TKG drivers
./scripts/tkg-installer mesa # Mesa-TKG graphics
./scripts/tkg-installer wine # Wine-TKG
./scripts/tkg-installer proton # Proton-TKG
# Edit package configuration
./scripts/tkg-installer linux configFor manual patch application:
# Fetch latest patches
./scripts/fetch.sh
# Apply patches to kernel source
cd /path/to/linux-source
patch -p1 < /path/to/patch-file.patch
# Or use git apply
git apply /path/to/patch-file.patch./scripts/cachy/cachy.sh
./scripts/compile.shA highly optimized kernel build system with the following features:
Performance Optimizations:
- Guess unwinder: Zero overhead alternative to ORC/frame pointer
- CPU schedulers: BORE (best for desktop), EEVDF (stock), BMQ (minimal), RT (realtime)
- TCP BBRv3: Google's advanced congestion control protocol
- -O3 optimization: Maximum compiler optimization level
- Clang LTO: Link-time optimization for better performance
- -march=native: CPU-specific optimizations
Size Reductions:
- Remove BUG() calls, coredump support, and tracing infrastructure
- Disable module decompression in kernel
- Remove 16/32-bit application support (optional)
- No printk() support to reduce kernel size
Configurability:
- Fine-grained kernel tickrates (default: 1000Hz)
- Multiple preemption levels (rt, full, lazy, voluntary, none)
- Modprobed-db integration for minimal module selection
- Per-feature toggles in PKGBUILD
See build/catgirl-edition/README.md for detailed documentation.
An interactive kernel build system designed specifically for CachyOS:
Key Features:
- Interactive Configuration: Uses
gumfor user-friendly TUI configuration - Pre-made Configs: Ready-to-use configurations in
defconfigs/directory - Multiple Scheduler Support: EEVDF (default), BORE, BMQ, PDS, RT
- Kernel Variants: Build and maintain multiple kernel versions simultaneously
- AutoFDO Support: Profile-guided optimization for performance
- Custom Modifications: Support for user scripts via
custom.sh
Build Options:
- LTO: None, Thin, Full
- AutoFDO: Optional profile-guided optimization
- Hugepage: Always, madvise
- Local module config support (modprobed-db)
- TCP BBRv3 congestion control
- Tick types: Full, idle, periodic
- HZ values: 1000, 800, 500, 300, 250, 100
- Preemption: Full, lazy, voluntary, none
Workflow:
- Configure kernel with
confmod.sh(creates configs in~/.config/cachymod/) - Build with
build.sh <config-name> - Automatic installation via pacman
- Uninstall with interactive
uninstall.shtool
See build/cachymod/README.md for detailed documentation.
Customizable source-based packages from the Frogging-Family:
- linux-tkg: Highly customizable kernel builds
- nvidia-tkg: Custom NVIDIA driver builds
- mesa-tkg: Optimized Mesa graphics drivers
- wine-tkg: Enhanced Wine compatibility layer
- proton-tkg: Optimized Proton for Steam gaming
Each package includes extensive customization options via customization.cfg files.
- CachyOS patches: Performance optimizations and scheduling improvements
- Sunlight Linux patches: System call optimizations and I/O improvements
- Zen patches: Desktop responsiveness and latency reduction
- Clear Linux patches: Intel-optimized performance improvements
- Mesa patches: GPU driver improvements
- Raspberry Pi patches: ARM-specific optimizations
- zblock allocator: Compressed memory block allocation
- PTE batching: Page table entry batching for performance
- ZRAM improvements: Enhanced swap compression
- F2FS patches: Flash-friendly filesystem optimizations
- XFS fixes: XFS filesystem bug fixes and improvements
This repository aggregates patches from the following upstream sources:
- CachyOS kernel-patches - Performance and scheduling improvements
- linux-catgirl-edition - Aggressive optimization build system
- Frogging-Family linux-tkg - Customizable TKG packages
- tkginstaller - TKG package management TUI
- sirlucjan kernel-patches - Community patches
- XanMod linux-patches - Performance-focused patches
- Clear Linux kernel - Intel optimizations
- CachyMod - CachyOS modifications
- Sunlight Linux - System call optimizations
- openSUSE kernel-source - Enterprise patches
- build-ubuntu-kernel - Ubuntu kernel builds
- kcompressd
- ECHO scheduler
- zram-ir - ZRAM improvements
- babiulep
- kernel-builder.sh: Unified build interface for all kernel build operations
- CachyMod: Interactive CachyOS kernel builder with pre-configured variants
- TKG Installer: Interactive TUI for Frogging-Family package management
- PKGBUILD System: Arch Linux package build system for catgirl edition
- patchutils - Collection of programs for manipulating patch files
- modprobed-db - Track kernel modules for minimal builds
- gum - Required for CachyMod interactive configuration
- fzf - Required for TKG installer TUI mode
- sort-modprobed-dbs: Sort and merge modprobed-db files
- zramswap: ZRAM swap configuration utility
- compile.sh: Standard kernel compilation script
- config.sh: Kernel configuration helper
- fetch.sh: Automated patch fetching
- trim.sh: Patch processing and trimming
See CONTRIBUTING.md for guidelines on contributing patches and improvements.
See LICENSE for details.
This repository combines functionality from:
- Original Linux-Kernel-Patches: Curated patch collection organized by kernel version
- linux-catgirl-edition (Ven0m0/linux-catgirl-edition): Aggressive optimization build system with PKGBUILD
- cachymod (marioroy/cachymod): Interactive CachyOS kernel builder with scheduler variants
- tkginstaller (damachine/tkginstaller): TKG package management and TUI
The merge provides a unified interface for all kernel building needs, from patch management to optimized builds.
Important: These patches and build configurations are provided as-is. Always test in a safe environment before applying to production systems. Kernel modifications can potentially cause system instability.
Catgirl Edition Warning: The aggressive optimizations in catgirl edition (especially memory zero-init disabling, stack protections removal) may introduce security risks. Only use these optimizations if you understand the tradeoffs.
CachyMod Note: CachyMod is designed for CachyOS. While it may work on other Arch-based distributions, optimal performance and compatibility are guaranteed on CachyOS. Ensure you have the required dependencies installed.
TKG Packages: Frogging-Family TKG packages are customizable and may require specific hardware or software configurations. Review customization.cfg files before building.
For issues or questions:
- General issues: Open an issue in this repository
- Catgirl Edition: See build/catgirl-edition/README.md
- CachyMod: See build/cachymod/README.md or visit marioroy/cachymod
- TKG packages: Visit Frogging-Family repositories
- Patches: Check upstream patch sources for specific documentation
- Kernel documentation: Consult the Linux kernel documentation
Each directory (6.12, 6.15, etc.) contains patches specifically tested for that kernel version. Patches may not apply cleanly to other kernel versions without modification.
Catgirl Edition: Currently configured for kernel 6.17.x (see build/catgirl-edition/PKGBUILD) CachyMod: Currently configured for kernel 6.18 (see build/cachymod/6.18/) TKG Packages: Support varies by package; check Frogging-Family repositories for details