SmartFox: launcher, Siri Remote driver, Debian image and installer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tamas Csikel
2026-10-24 09:06:06 +02:00
commit 79b03cac95
91 changed files with 15874 additions and 0 deletions

25
tools/vm/hotswap.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Rebuilds SmartFox binaries in WSL and swaps them into the running VM (no image rebuild).
# hotswap.sh sf-remote sf-launcher
set -euo pipefail
SRC=/mnt/g/source/smartfox
WORK=/root/smartfox
VM="$WORK/tools/vm"
rsync -a --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r \
--exclude /target --exclude /image/mkosi.output --exclude /image/mkosi.cache --exclude /image/stage --exclude /image/ovmf-vars.fd \
"$SRC/" "$WORK/"
cd "$WORK"
args=()
for c in "$@"; do args+=(-p "$c"); done
~/.cargo/bin/cargo build --release "${args[@]}" 2>&1 | grep -E "^(error|warning)|-->|Finished" -A6 || true
for c in "$@"; do
bash "$VM/vmcp.sh" "target/release/$c" "vm:/usr/bin/$c.new"
bash "$VM/vmssh.sh" "mv /usr/bin/$c.new /usr/bin/$c && chmod 755 /usr/bin/$c"
done
for c in "$@"; do
case "$c" in
sf-remote) bash "$VM/vmssh.sh" "systemctl restart sf-remote" ;;
sf-launcher) bash "$VM/vmssh.sh" "pkill -x sf-launcher || true; systemctl restart getty@tty1" ;;
esac
done
echo "swapped: $*"