Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ RUN for svc in \
avahi-ssh-publish power_monitor power_drop_monitor \
screen_calibration serial-hostname \
sound varwatch busybox-ntpd \
irsc_util leprop adsp cdsp \
irsc_util leprop adsp cdsp panda \
qrtr-ns rmtfs tqftpserv pd-mapper \
comma modemmanager bluetoothd magic \
ssh-param-watcher ncm-param-watcher dnsmasq \
Expand Down
3 changes: 3 additions & 0 deletions userspace/root/etc/sv/panda/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# Temporary solution until openpilot is running (which owns panda bringup).
sleep 5
14 changes: 14 additions & 0 deletions userspace/root/etc/sv/panda/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# Temporary solution until openpilot is running (which owns panda bringup).
exec 2>&1

while [ ! -f /run/gpio.ready ]; do sleep 0.1; done

if /usr/comma/panda/panda.sh start; then
echo "panda: started"
else
echo "panda: failed to start"
exit 1
fi

exec sleep infinity
23 changes: 23 additions & 0 deletions userspace/root/usr/comma/panda/panda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Temporary solution until openpilot is running (which owns panda bringup).
source /usr/comma/gpio_base.sh

STM_RST_N=124
STM_BOOT0=134

case "$1" in
start)
echo "Resetting panda..."
gpio $STM_RST_N 1
gpio $STM_BOOT0 0
sleep 0.01
gpio $STM_RST_N 0

touch /run/panda.ready
echo " Panda reset done"
;;
*)
echo "Specify start as first argument!"
exit 1
;;
esac
Loading