Add files via upload

This commit is contained in:
Rainboooom
2023-06-15 11:27:03 +08:00
committed by GitHub
parent 7e4691248d
commit c1cf04e8f5
100 changed files with 8640 additions and 0 deletions

26
scripts/flash-linux.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# This script installs the Linux MCU code to /usr/local/bin/
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root"
exit -1
fi
set -e
# Install new micro-controller code
echo "Installing micro-controller code to /usr/local/bin/"
rm -f /usr/local/bin/klipper_mcu
cp out/klipper.elf /usr/local/bin/klipper_mcu
sync
# Restart (if system install script present)
if [ -f /etc/init.d/klipper_pru ]; then
echo "Attempting host PRU restart..."
service klipper_pru restart
fi
# Restart (if system install script present)
if [ -f /etc/init.d/klipper_mcu ]; then
echo "Attempting host MCU restart..."
service klipper_mcu restart
fi