Files
clearpilot/build_only.sh
Brian Hanson 578277ab9c session logging, build-only mode, park splash, boot logo spinner
- Per-process stderr logging to /data/log2/{session}/ with time-safe
  directory naming (boot-xxx renamed once GPS/NTP sets clock)
- Aggregate session.log with major events (start/stop, transitions)
- 30-day log rotation cleanup on manager startup
- build_only.sh: compile without starting manager, non-blocking error
  display, kills stale processes
- build.py: copies updated spinner binary after successful build
- Onroad park mode: show splash screen when car is on but in park,
  switch to camera view when shifted to drive, honor screen on/off
- Spinner: full-screen boot logo background from /usr/comma/bg.jpg
  with white progress bar overlay
- Boot logo: auto-regenerate when boot_logo.png changes, 140% scale
- launch_openpilot.sh: cd to /data/openpilot for reliable execution
- launch_chffrplus.sh: kill stale text error displays on startup
- spinner shell wrapper: prefer freshly built _spinner over prebuilt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:19:07 +00:00

30 lines
907 B
Bash
Executable File

#!/usr/bin/bash
# CLEARPILOT: build-only mode — compile without starting manager.
# On failure: shows error on screen (non-blocking) and exits nonzero with stderr output.
# On success: exits 0, does not start manager.
#
# Usage: su - comma -c "bash /data/openpilot/build_only.sh"
BASEDIR="/data/openpilot"
# Kill stale error displays and any running manager/launch processes
pkill -f "selfdrive/ui/text" 2>/dev/null
pkill -f 'launch_openpilot.sh' 2>/dev/null
pkill -f 'launch_chffrplus.sh' 2>/dev/null
pkill -f 'python.*manager.py' 2>/dev/null
sleep 1
source "$BASEDIR/launch_env.sh"
ln -sfn "$BASEDIR" /data/pythonpath
export PYTHONPATH="$BASEDIR"
# Hardware init (GPU perms)
sudo chgrp gpu /dev/adsprpc-smd /dev/ion /dev/kgsl-3d0 2>/dev/null
sudo chmod 660 /dev/adsprpc-smd /dev/ion /dev/kgsl-3d0 2>/dev/null
cd "$BASEDIR/selfdrive/manager"
rm -f "$BASEDIR/prebuilt"
BUILD_ONLY=1 exec ./build.py