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
ARCHset tox86, customizable inside script
clang,llvm-*tools (or custom toolchain)- GNU
make - Optional:
ccachefor faster rebuilds
./kbuilder [options]| Command | Description |
|---|---|
clean |
Cleans the kernel build directory |
build |
Starts building the kernel |
⚠️ cleanmust be first, andbuildmust 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 buildkbuilder can also be ran without actually downloading the script:
bash <(curl -s "https://liquidprjkt.github.io/kbuilder") buildCopyright @ 2025-2026 - The Liquid Authors
This project is licensed under the GNU GPL v3
UsiFX
📧 [email protected]
💻 GitHub: UsiFX