mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 18:36:09 +01:00 
			
		
		
		
	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>
		
			
				
	
	
		
			21 lines
		
	
	
		
			492 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			492 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| # This script installs the PRU firmware on a beaglebone machine.
 | |
| 
 | |
| if [ "$EUID" -ne 0 ]; then
 | |
|     echo "This script must be run as root"
 | |
|     exit -1
 | |
| fi
 | |
| set -e
 | |
| 
 | |
| # Install new firmware
 | |
| echo "Installing firmware to /lib/firmware/"
 | |
| cp out/pru0.elf /lib/firmware/am335x-pru0-fw
 | |
| cp out/pru1.elf /lib/firmware/am335x-pru1-fw
 | |
| sync
 | |
| 
 | |
| # Restart (if system install script present)
 | |
| if [ -f /etc/init.d/klipper_pru ]; then
 | |
|     echo "Attempting PRU restart..."
 | |
|     service klipper_pru restart
 | |
| fi
 |