Skip to content

Commit fcc3d95

Browse files
committed
Add a script to update the firmware on a running PinballOS system
1 parent f9291ae commit fcc3d95

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/program-pbos.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
if [ "$1" == "" ]; then
3+
echo "start with $0 hostname to program RPO2040 on PBOS"
4+
exit 1
5+
fi
6+
7+
sshpass -p pbos scp dmdreader.elf root@$1:/firmware
8+
sshpass -p pbos ssh -l root $1 'ps -ef | grep dmdreader | grep -v grep | awk '{print $1}' | xargs kill -KILL'
9+
sshpass -p pbos ssh -l root $1 'cd /firmware; openocd -f raspberrypi-swd-dmdreader.cfg -f target/rp2040.cfg -c "program dmdreader.elf verify reset exit"'
10+
sshpass -p pbos ssh -l root $1 'reboot'

0 commit comments

Comments
 (0)