A lightweight and flexible Bash script to build Linux kernels with support for custom LLVM toolchains.
- 🔧 Default or custom Clang-based toolchain support (
--custom_tc=path
) - 📁 Custom defconfig support (
--defconfig=config_name
) - 🧹 Clean build directory (
clean
) - ⚙️ Build and compile kernel (
build
) - 🧠 Colorful CLI output and helpful messages
- 🐧 Default
ARCH
set tox86
, customizable inside script
clang
,llvm-*
tools (or custom toolchain)- GNU
make
- Optional:
ccache
for faster rebuilds
./kbuilder [options]
Command | Description |
---|---|
clean |
Cleans the kernel build directory |
build |
Starts building the kernel |
⚠️ clean
must be first, andbuild
must be last if used.
Option | Description |
---|---|
--custom_tc=PATH |
Use custom LLVM toolchain from specified directory |
--defconfig=NAME |
Use a specific defconfig file (e.g. my_defconfig ) |
-v , --version |
Show version and license |
-h , --help |
Show help message |
./kbuilder clean --custom_tc=~/toolchains/clang-r450784d build
kbuilder can also be ran without actually downloading the script:
bash <(curl -s "https://liquidprjkt.github.io/kbuilder") build
Copyright @ 2025-2026 - The Liquid Authors
This project is licensed under the GNU GPL v3
UsiFX
📧 xprjkts@gmail.com
💻 GitHub: UsiFX