b287fd094e
- onroad.cc: fix screenDisplayMode reference to nvg->screenDisplayMode (baseline had a stale reference to the variable after it moved into AnnotatedCameraWidget). Restores the original conditional intent. - ui/SConscript + home.cc: drop QtWebEngine include/link entirely (no longer used by any active code). - build.py: BUILD_ONLY env var spawns the failure TextWindow fully detached (own session, /dev/null stdio) so build_only.sh exits and caller can capture stderr; spinner binary update uses temp+os.replace so a running spinner doesn't ETXTBSY the build. - build_only.sh: tee build output to /tmp/build.log and propagate build.py's exit code via PIPESTATUS. Verified: build_only.sh completes cleanly, launch_openpilot.sh boots the manager and spawns the standard process set.
41 lines
1.3 KiB
Bash
Executable File
41 lines
1.3 KiB
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"
|
|
|
|
# Fix ownership — we edit as root, openpilot builds/runs as comma
|
|
sudo chown -R comma:comma "$BASEDIR"
|
|
|
|
# Kill stale error displays and any running manager/launch/managed processes
|
|
pkill -9 -f "selfdrive/ui/text" 2>/dev/null
|
|
pkill -9 -f 'launch_openpilot.sh' 2>/dev/null
|
|
pkill -9 -f 'launch_chffrplus.sh' 2>/dev/null
|
|
pkill -9 -f 'python.*manager.py' 2>/dev/null
|
|
pkill -9 -f 'selfdrive\.' 2>/dev/null
|
|
pkill -9 -f 'system\.' 2>/dev/null
|
|
pkill -9 -f './ui' 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
|
|
|
|
# Preflight: create dirs git can't track
|
|
source "$BASEDIR/build_preflight.sh"
|
|
|
|
cd "$BASEDIR/selfdrive/manager"
|
|
rm -f "$BASEDIR/prebuilt"
|
|
|
|
# Tee output to /tmp/build.log for inspection after the script exits
|
|
BUILD_ONLY=1 ./build.py 2>&1 | tee /tmp/build.log
|
|
exit "${PIPESTATUS[0]}"
|