Files
clearpilot/build_only.sh
Brian Hanson 9d5c838fe3 fix fresh-install build: add preflight script, restore third_party binaries, remove WebEngine dep
- Add build_preflight.sh to create obj/ dirs that git can't track (body/board/obj, panda/board/obj)
- Wire preflight into build_only.sh and launch_chffrplus.sh
- Restore missing third_party binaries (libyuv, snpe, acados, maplibre) that were text pointers
- Remove dead Qt5WebEngineWidgets dependency from UI SConscript

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 01:26:40 +00:00

39 lines
1.2 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"
BUILD_ONLY=1 exec ./build.py