Public Access
cardputer-adv-debug (-DRORO_DEBUG, version +debug) adds a Debug Console: after a token line, a client gets the last 6 KB of console output, live lines (ESP-IDF logs included) and the serial commands. The socket task only queues lines; the main loop runs them. Release builds compile none of it. The token lives in ~/.config/roro9stack/debug-token, created by _docker.sh and passed into the container. All output now goes through `console`, which never waits for USB: a host that was attached but not reading stalled the main loop up to 2 s per line. New commands everywhere: info (slots with their versions from NVS, since the framework stamps its own into each image), tasks, reboot, boot other, log level, help. scripts/rdbg.py is the client; flash.sh --debug builds it; CI builds both variants. ADR 0004. Verified on the device: USB-flashed, then updated over Wi-Fi to a Debug Build that confirmed on Probation; both slots hold Debug Builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
23 lines
786 B
Bash
Executable File
23 lines
786 B
Bash
Executable File
# Shared helper: run a command inside the roro9stack build container.
|
|
IMAGE=roro9stack-build
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
docker build -q -t "$IMAGE" "$ROOT/docker" >/dev/null
|
|
|
|
# The Debug Console token (ADR 0004): made once, kept with the OTA key, never committed.
|
|
DEBUG_TOKEN_FILE="$HOME/.config/roro9stack/debug-token"
|
|
if [ ! -s "$DEBUG_TOKEN_FILE" ]; then
|
|
mkdir -p "$(dirname "$DEBUG_TOKEN_FILE")"
|
|
(umask 077 && od -An -tx1 -N16 /dev/urandom | tr -d ' \n' > "$DEBUG_TOKEN_FILE")
|
|
fi
|
|
|
|
run_in_container() {
|
|
docker run --rm \
|
|
-u "$(id -u):$(id -g)" -e HOME=/tmp \
|
|
-e RORO_DEBUG_TOKEN="$(cat "$DEBUG_TOKEN_FILE")" \
|
|
-v "$ROOT:/work" \
|
|
-v roro9stack-pio:/pio \
|
|
"${DOCKER_EXTRA[@]}" \
|
|
"$IMAGE" "$@"
|
|
}
|