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
π§ xprjkts@gmail.com
π» GitHub: UsiFX