decoder: broadcast frames to yukart/vehicle/* from contracts' can blocks
/ crosscheck (push) Successful in 1s
Rust (L4T) / Clippy, test, build, glibc (push) Failing after 1s

Kernel-filtered read-only socket; booleans on change, numbers <= 20/s, every
live value refreshed once a second, stale after 1 s of silence. --replay runs
a candump log through the same path, --list prints the layouts. obd-poller
drops engine_rpm, now a z27ag signal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-13 21:31:52 +09:00
parent 5cfa4fbb64
commit 54171aaf27
8 changed files with 710 additions and 5 deletions
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# Build the decoder natively on the development Orin, check it against the car's
# glibc, and install it on the car Orin as the yukart-decoder service.
#
# usage: scripts/deploy-decoder.sh [host] (default: mikkeli-orin-nano)
# env: BUILD_HOST (default: mikkeli-orin-nano-2)
#
# Builds what is pushed, not the working tree: the build host pulls master of
# svc-core and contracts under ~/dev/yukart/; the signal layouts are compiled in
# from contracts' signals.json, so a registry change needs a redeploy. Native like
# orin-status, on the preferred build host (check-glibc.sh gates it either way).
set -euo pipefail
HOST="${1:-mikkeli-orin-nano}"
BUILD_HOST="${BUILD_HOST:-mikkeli-orin-nano-2}"
cd "$(dirname "$0")/.."
BIN="$(mktemp -d)/decoder"
ssh "$BUILD_HOST" 'set -e
mkdir -p ~/dev/yukart && cd ~/dev/yukart
for r in svc-core contracts; do
[ -d $r ] || git clone -q http://192.168.2.199:3005/yukart/$r.git
git -C $r pull -q --ff-only
done
cd svc-core && ~/.cargo/bin/cargo build --release --bin decoder 2>&1 | tail -1
git log --oneline -1'
scp -q "$BUILD_HOST:dev/yukart/svc-core/target/release/decoder" "$BIN"
scripts/check-glibc.sh "$BIN"
# Binary lives under ~/infra per the host repo's guidelines; /usr/local/bin gets a symlink.
ssh "$HOST" 'mkdir -p ~/infra/svc-core'
scp -q "$BIN" "$HOST:infra/svc-core/decoder.new"
scp -q deploy/yukart-decoder.service "$HOST:infra/svc-core/yukart-decoder.service"
ssh "$HOST" 'set -e
mv ~/infra/svc-core/decoder.new ~/infra/svc-core/decoder
sudo ln -sfn "$HOME/infra/svc-core/decoder" /usr/local/bin/yukart-decoder
sudo install -m 0644 ~/infra/svc-core/yukart-decoder.service /etc/systemd/system/yukart-decoder.service
sudo systemctl daemon-reload
sudo systemctl enable yukart-decoder.service >/dev/null
sudo systemctl restart yukart-decoder.service
sleep 1
systemctl --no-pager --lines=5 status yukart-decoder.service'