Releases: gahingwoo/kiln
Release list
Kiln mainline NPU kernel — RK3588 / ROCK 5B (linux-7.1.3)
mainline linux-7.1.3 for Radxa ROCK 5B (RK3588) + Kiln RK3588 NPU patch (kiln DTB: vendor rockchip,rk3588-rknpu, rocket rknn_core nodes removed). bindeb-pkg. SKELETON / BRING-UP -- the NPU node is NOT validated on RK3588 hardware yet; flash it to help finish the port (issue #1, docs/RK3588.md). Install: KILN_SOC=rk3588 kiln-install.sh.
Kiln image (rock-4d) kiln-image-20260711
Kiln flashable buildroot image (rock-4d)
A ready-to-run SD-card image: flash it and boot — no curl | bash, no double
reboot, no Wi-Fi deadlock. The NPU driver, runtimes, and kiln-* tools are already
installed. You still supply your own models (kiln-convert builds vision ones on the
board; drop a *.rkllm in /opt/models for chat).
Flash
# Linux (replace /dev/sdX with your card; this ERASES it):
xz -dc kiln-rock-4d-kiln-image-20260711.img.xz | sudo dd of=/dev/sdX bs=8M status=progress conv=fsyncOr use Raspberry Pi Imager / [balenaEtcher]
(https://etcher.balena.io/) and pick the .img.xz directly.
Verify the download first:
sha256sum -c kiln-rock-4d-kiln-image-20260711.img.xz.sha256First boot
Boot the card, log in, and run kiln for a menu or kiln-doctor for a health check.
Tested hardware: Radxa ROCK 4D (RK3576) only. See the repo README.
Kiln v0.1.0 — RK3576 NPU on a mainline kernel
Kiln runs the Rockchip RK3576 NPU — LLMs (RKLLM) and vision (RKNN) — on a
mainline Linux kernel (linux-7.1.3), by building the vendor GPL rknpu
v0.9.8 driver out-of-tree and driving it with the closed librkllmrt /
librknnrt runtimes. Verified on real hardware (Radxa ROCK 4D).
What works
- LLM chat on the NPU —
kiln-chatholds a multi-turn conversation:
Qwen2.5-1.5B (~9 tok/s) or Llama-3.2-1B (~13 tok/s), switchable live with
/model. Model-aware chat template + stop tokens (Qwen ChatML / Llama-3),
readline input (cursor editing + history), and slash commands (/model,
/system,/history,/clear,/new,/context,/compact) that persist to
the config. - Vision on the NPU —
kiln-visionruns MobileNet (RKNN) at ~6 ms / ~169 fps. - OpenAI-compatible API —
kiln-serve(POST /v1/chat/completionsSSE streaming,
GET /v1/models, optionalPOST /v1/vision/classify), header-only, no Python.
Why it takes kernel patches
Several RK3576 NPU fixes are kernel code, not something the module or a DT
overlay can supply:
- The NPU is one device with two IOMMUs; mainline
rockchip-iommudrives only
the primary one, so a naive port only getstask_counter=0timeouts. Kiln enables
all four MMU banks from the driver and flushes their TLB per job. - The power domain needs a settle delay, a BIU reset, the full clock set, and a
cold-start "arm"; and the ROCK 4D board DTS drops the NPU rail (vdd_npu_s0) ~30 s
into boot — the second inference then reads a dead rail and hangs the board.
One line,regulator-always-on(kernel-patches/0010), fixes it.
It is mainline-based, not stock mainline: kernel-patches/ 0001–0010 are
required. CI publishes the kernel .deb.
Install
- Armbian — one command (installs the Kiln mainline kernel, then driver +
runtimes + tools; two phases, reboot between). SeeARMBIAN.md:curl -fsSL https://raw.githubusercontent.com/gahingwoo/kiln/main/scripts/kiln-install.sh | bash - Flashable image — buildroot br2-external:
buildroot/build-image.sh. - Kernel —
MAINLINE-KERNEL.md.
Demos
- Serial log (boot →
rknpu 0.9.8loads → 4 MMU banks → vision + chat):
https://gist.github.com/gahingwoo/545f90ed2b0e7542e2953e089c60ee01 - Live demo (
fastfetch→ dual-modelkiln-chat+/modelswitch →kiln-vision):
https://gist.github.com/gahingwoo/63f5505068de0a41f718499912ae0265
Honest caveats
- LLM quality is bounded by the small quantized models (1–1.5B w4a16); Llama-3.2 is
the more coherent of the two./compactis a best-effort application-level summary. - RK3568 (ROCK 3B) support is implemented but not yet tested on hardware (
RK3568.md). - The GPL
rknpusource and the closedlibrkllmrt/librknnrtruntimes are
fetched, not redistributed; model weights are separate.
GPL-2.0. Companion open-driver project:
linux-rk3576-npu.
Kiln mainline NPU kernel — RK3568 / ROCK 3B (linux-7.1.3)
Pure mainline linux-7.1.3 for Radxa ROCK 3B (RK3568) + Kiln RK3568 NPU patches (NPU DT node, RK3568_PD_NPU, IOMMU v2 GFP_DMA32 fix). bindeb-pkg. UNTESTED on hardware -- pending ROCK 3B validation. Install per RK3568.md / kiln-install.sh.
Kiln mainline NPU kernel (linux-7.1.3)
Pure mainline linux-7.1.3 for Radxa ROCK 4D (RK3576) + Kiln NPU patches (0001 settle-delay, 0003 iommu clocks, 0004 vendor rknpu DT node). bindeb-pkg. Install per MAINLINE-KERNEL.md / kiln-install.sh.
Kiln NPU kernel (armbian-npu-kernel-edge)
Patched Armbian edge kernel for Radxa ROCK 4D (RK3576) with the Kiln NPU pm-domain fix (kernel-patches/0001). Install on the board: sudo dpkg -i linux-image-.deb linux-dtb-.deb linux-headers-*.deb; then re-enable the NPU overlay + module and reboot (see ARMBIAN-KERNEL.md).