Skip to content

About

Reproducible Debian trixie riscv64 base image build for the LILYGO T-Display-K230 (Kendryte K230, LR2021)

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

T-Display-K230 — Debian riscv64 Meshtastic handheld

Working notes, documentation, source patches, device trees, and helper scripts for turning the LILYGO T-Display-K230 (Kendryte K230 RISC-V, RM69A10 AMOLED, GT9895 touch, LR2021 radio) into a self-contained Meshtastic handheld running Debian riscv64 + meshtasticd with the color device-ui (MUI). This folder is the durable record; the reference checkouts (kernel, firmware, device-ui, u-boot, bootchain, vendor SDK) are git-controlled and the exact changes are captured as patches in patches/.

Status — POC complete (2026-07-27)

A working handheld: LR2021 radio (EU_868) + color MUI in landscape + GT9895 capacitive touch, all on Debian riscv64 on the K230, booting unattended.

Subsystem State
Boot chain (U-Boot/OpenSBI/extlinux) + kernel + DTS working
LR2021 radio (SPI, EU_868) working
RM69A10 AMOLED display (canaan-drm, RGB565) working
MUI (device-ui) — landscape, config-driven rotation working
GT9895 touch (goodix_berlin) working (center spot-on, corners approximate)
WiFi (RTL8189FTV) hardware enumerates; driver port pending
GPS / battery / keypad in the detachable keyboard dock (not present on the screen unit)
device-ui 2.8.0 landscape layout reflow open — device-ui author's domain

Documentation

File Topic
BOARD.md Hardware inventory, pin map, i2c bus map (touch 0x5d + LT9611 0x3b), camera/CSI wiring, contention map
DISPLAY-BRINGUP.md The 2-hunk kernel display fix (power domain + RGB565), the per-pixel-alpha story, MUI enablement
TOUCH-BRINGUP.md GT9895 goodix_berlin backport + the touchscreen-size calibration fix
RADIO-BRINGUP.md LR2021 bring-up (DIO3 TCXO 3.0 V was the crux), config, systemd
WIFI-BRINGUP.md RTL8189FTV SDIO — hardware up, driver port pending
BUILD.md Build the boot chain + kernel + DTB (WSL cross-compile)
BUILD-MESHTASTICD.md Build riscv64 meshtasticd (native-fb) via the QEMU chroot; -lSDL2 gotcha
CI.md The reproducible base-image CI: pinned sources, what it builds, run locally, flash
BOOTTEST.md Boot/flash test procedure
WORKAROUNDS.md Assorted workarounds encountered during bring-up

Repository of changes

  • ci/ — the reproducible build: build-image.sh (clone pinned sources -> patch -> build -> debootstrap -> assemble) + the vendored K230 helpers (make-k230-firmware, sdcard.dump), extlinux.conf, and the first-boot rootfs-grow service. Driven by .github/workflows/build-image.yml. See CI.md.
  • patches/ — the source changes carried by this repo, one patch per repo (kernel, u-boot, bootchain) + the new goodix_berlin/ driver. The firmware and device-ui changes are maintained in their own upstream projects and are not published here. See patches/README.md for the index and reproduce steps.
  • dts/ — the as-deployed device trees: k230-tdisplay.dts (kernel) + display-rm69a10-568x1232.dtsi + the U-Boot iomux dtsi.
  • scripts/ — build/deploy helpers used from WSL (deploy-kernel.sh, deploy-display-dtb.sh, mt-build-fb.sh, k230-install-meshtasticd.sh, k230-build-debian-image.sh, k230-cfg-inside.sh) + build-rootfs.sh.
  • config.yaml — the deployed /etc/meshtasticd/config.yaml (LR2021 LoRa block + the enabled Display: FB landscape block + DisplayMode: COLOR).
  • k230-fpioa-fixup.c / .service — /dev/mem FPIOA writer (no kernel pinctrl).
  • out/ — build artifacts (DTB, sysimage).

Build the base image (reproducible, self-contained)

This folder is a standalone git repo. Its CI (.github/workflows/build-image.yml

  • ci/build-image.sh) downloads the kernel, U-Boot and OpenSBI at pinned commits, applies the patches here, and produces a flashable Debian trixie riscv64 image (boot chain + patched kernel + T-Display DTS + debootstrapped rootfs, no meshtasticd). See CI.md. Locally:
bash ci/build-image.sh        # -> work/sysimage-sdcard.img

meshtasticd (firmware + device-ui, maintained in their own upstream projects and PR'd at release) is layered on afterwards: apply those changes from upstream, build the native-fb env per BUILD-MESHTASTICD.md, install alongside config.yaml.

About

Reproducible Debian trixie riscv64 base image build for the LILYGO T-Display-K230 (Kendryte K230, LR2021)

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages