Files
KVM-privacy/debian/kvm-rkllm/DEBIAN/postinst
T
qiuruiandClaude Opus 4.7 9bb799b26a chore: snapshot in-progress Python-to-Rust service migration
Preserves the device's working-tree progress in Gitea as the canonical
source. This is an intermediate state of an unfinished refactor, kept so
the work is not lost and the merge into KVM can build on a known point.

- Python services removed (superseded by Rust): privacy_gateway,
  rkllm_server, mem_bridge.
- Rust services added/updated: privacy-gateway-rs, info-privacy-rs,
  kvm-agent-rs (new api-server and runner crates), embed-db-rs,
  npu_daemon (new rga / rga-sys / mpp-jpeg crates), rkllm-server.
- Debian packaging restructured: per-service control / postinst /
  postrm / conffiles and systemd units.

Compiled binaries (debian/*/usr/sbin), NPU model blobs and test-image
fixtures are excluded from version control - see .gitignore.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 14:50:50 +00:00

28 lines
948 B
Bash
Executable File

#!/bin/bash
set -e
if [ "$1" = "configure" ]; then
# Ensure librkllmrt.so is discoverable by the dynamic linker
ldconfig 2>/dev/null || true
# Create model directory and link known model locations
mkdir -p /var/lib/kvm-rkllm/models
chown pi:pi /var/lib/kvm-rkllm /var/lib/kvm-rkllm/models
# Auto-link model from known locations if not already present
MODEL_NAME="Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-0.5.rkllm"
if [ ! -e "/var/lib/kvm-rkllm/models/$MODEL_NAME" ]; then
for dir in /opt/fileguard/models /home/pi/models; do
if [ -f "$dir/$MODEL_NAME" ]; then
ln -sf "$dir/$MODEL_NAME" "/var/lib/kvm-rkllm/models/$MODEL_NAME"
echo "kvm-rkllm: linked model from $dir"
break
fi
done
fi
systemctl daemon-reload
systemctl enable rkllm-server.service
systemctl start rkllm-server.service 2>/dev/null || true
fi