feat(rk3588s): package lvgl demo and display backend

This commit is contained in:
2026-05-23 17:01:44 +08:00
parent 48f64a6858
commit 2d2bd69780
3 changed files with 55 additions and 0 deletions

View File

@@ -158,6 +158,22 @@ chmod +x "$INSTALL_DIR/bin/clawd.js"
info "clawd symlinked to /usr/local/bin/clawd"
# Install RK3588S LVGL demo
DEVICE_MODEL="$(tr -d '\0' </proc/device-tree/model 2>/dev/null || true)"
if echo "$DEVICE_MODEL" | grep -qi 'RK3588S'; then
DEMO_SRC="$INSTALL_DIR/lib/resource/3588s/demo"
DEMO_DST="/usr/bin/demo"
if [ -f "$DEMO_SRC" ]; then
info "RK3588S detected, installing LVGL demo to $DEMO_DST"
if [ -f "$DEMO_DST" ] && [ ! -f "${DEMO_DST}.clawd-bak" ]; then
cp "$DEMO_DST" "${DEMO_DST}.clawd-bak"
info "Backup created: ${DEMO_DST}.clawd-bak"
fi
install -m 0755 "$DEMO_SRC" "$DEMO_DST"
else
warn "RK3588S demo binary not found: $DEMO_SRC"
fi
fi
# Write default config files
mkdir -p "$CONFIG_DIR"

View File

@@ -0,0 +1,39 @@
# RK3588S demo resource
This directory contains the LVGL demo binary deployed on RK3588S devices by `install.sh`.
## Files
- `demo` — prebuilt LVGL UI binary installed to `/usr/bin/demo` on RK3588S boards
## Source
Current binary source on the build machine:
- `/home/sts/share/小屏demo开发指南/lvgl源码/lv_port_linux_v2/lv_port_linux/build/bin/demo`
## Purpose
This demo provides the small-screen UI used on RK3588S devices, including FIFO-based control through:
- `/tmp/lvgl_cmd`
Supported commands expected by the current clawd RK3588 LVGL backend include:
- `show_text:AP`
- `show_text:Conn`
- `show_text:Err0`
- `show_text:<PIN>`
- `show_time`
## Install behavior
During `install.sh`, if `/proc/device-tree/model` matches `RK3588S`, clawd will:
1. Back up existing `/usr/bin/demo` to `/usr/bin/demo.clawd-bak` if not already backed up
2. Install this `demo` binary to `/usr/bin/demo`
## Notes
- The binary is hardware-specific and intended for RK3588S boards.
- Replacing the binary should be done together with verification of `/tmp/lvgl_cmd` behavior and screen rendering.

BIN
lib/resource/3588s/demo Executable file

Binary file not shown.