diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-14 11:44:06 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-20 12:55:28 -0400 |
commit | 5a85c1667a80cc2dda9861980c64d99f8da0163e (patch) | |
tree | d1e8a9e8b4ba59e5fd346259247f114620a0652d /scripts/flash-linux.sh | |
parent | 16d2ec3a905204dd804831611aff37a4b508e0fa (diff) | |
download | kutter-5a85c1667a80cc2dda9861980c64d99f8da0163e.tar.gz kutter-5a85c1667a80cc2dda9861980c64d99f8da0163e.tar.xz kutter-5a85c1667a80cc2dda9861980c64d99f8da0163e.zip |
pru: Update installation and flash scripts
Update the scripts used to install and "flash" the pru
micro-controller code. Also, add a "flash" script for the linux
micro-controller code. This makes it easier to install Klipper on a
Beaglebone board that uses a Replicape.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts/flash-linux.sh')
-rwxr-xr-x | scripts/flash-linux.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/flash-linux.sh b/scripts/flash-linux.sh new file mode 100755 index 00000000..ea2e3070 --- /dev/null +++ b/scripts/flash-linux.sh @@ -0,0 +1,20 @@ +#!/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 mirco-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 MCU restart..." + service klipper_pru restart +fi |