5624898a92
Restores the boot/launch chain customizations on top of the freshly-reset
baseline. Driving-model and per-feature changes (dashcamd, telemetry, gpsd,
bench mode, manager wiring) are deliberately left out and will be ported
piecemeal.
Brought in:
- launch_openpilot.sh: kill stale instances, run on_start.sh, background
vpn-monitor + nice-monitor, BENCH_MODE pass-through
- launch_chffrplus.sh: source build_preflight.sh, kill stale text-error UI
- build_only.sh, build_preflight.sh
- system/clearpilot/on_start.sh: SSH keys, ssh.service enable, git.hanson.xyz
Host config, WiFi radio on, run provision.sh
- system/clearpilot/provision.sh + provision_wrapper.sh: connectivity wait,
apt install (openvpn, curl, ccrypt, nodejs), Claude Code installer, git
remote fix, fast-forward origin/clearpilot, /data/quick_boot
- system/clearpilot/vpn-monitor.sh + vpn.ovpn: OpenVPN tunnel auto-connect
- system/clearpilot/nice-monitor.sh: keep claude processes at nice 19
- system/clearpilot/dev: id_ed25519.{cpt,pub.cpt}, GithubSshKeys, encrypt.sh
(DongleId-keyed instead of hardware-serial)
- system/clearpilot/tools/{decrypt,encrypt}: switch key source to DongleId
- system/clearpilot/startup_logo/{bg.jpg, generate_logo.sh, set_logo.sh}
- selfdrive/ui/qt/spinner{,.cc,.h}: new spinner with logo
Removed (baseline-only flow superseded by broken's on_start.sh+provision.sh):
- system/clearpilot/dev/on_start.sh
- system/clearpilot/dev/on_start_brian.sh.cpt
- system/clearpilot/dev/provision.sh
39 lines
1.4 KiB
Bash
Executable File
39 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
# Kill other instances of this script, launch chain, and all managed processes
|
|
for pid in $(pgrep -f 'launch_openpilot.sh' | grep -v $$); do
|
|
kill -9 "$pid" 2>/dev/null
|
|
done
|
|
for pid in $(pgrep -f 'launch_chffrplus.sh' | grep -v $$); do
|
|
kill -9 "$pid" 2>/dev/null
|
|
done
|
|
pkill -9 -f 'python.*manager.py' 2>/dev/null
|
|
# Kill all processes started by the manager (run as comma user, in openpilot tree)
|
|
pkill -9 -f 'selfdrive\.' 2>/dev/null
|
|
pkill -9 -f 'system\.' 2>/dev/null
|
|
pkill -9 -f './ui' 2>/dev/null
|
|
pkill -9 -f 'selfdrive/ui/text' 2>/dev/null
|
|
sleep 1
|
|
|
|
# CLEARPILOT: ensure params persistence dir is owned by comma:comma. Editing
|
|
# the tree as root leaves files owned by root in /data/params/d_tmp/, and
|
|
# Params writes done as comma will then EACCES on rename. Reset on every
|
|
# launch so this never silently breaks again.
|
|
sudo chown -R comma:comma /data/params
|
|
|
|
bash /data/openpilot/system/clearpilot/on_start.sh
|
|
|
|
# CLEARPILOT: start VPN monitor (kills previous instances, runs as root)
|
|
sudo bash -c 'nohup /data/openpilot/system/clearpilot/vpn-monitor.sh >> /tmp/vpn-monitor.log 2>&1 &'
|
|
|
|
# CLEARPILOT: start nice monitor (keeps claude at nice 19)
|
|
sudo bash -c 'nohup /data/openpilot/system/clearpilot/nice-monitor.sh > /dev/null 2>&1 &'
|
|
|
|
# CLEARPILOT: pass --bench flag through to manager via env var
|
|
if [ "$1" = "--bench" ]; then
|
|
export BENCH_MODE=1
|
|
fi
|
|
|
|
cd /data/openpilot
|
|
exec ./launch_chffrplus.sh
|