comparison scripts/setup_board.sh @ 377:a430a16d2c02 prerelease

Updated scripts so that the Bela folder on the bbb is ~/Bela. Note: BeagleRT_startup.sh is still the same (because the reference to it needs to be changed in /etc/init.d/ ....
author Giulio Moro <giuliomoro@yahoo.it>
date Sat, 11 Jun 2016 01:54:43 +0100
parents b49dc040af73
children c29f07b7350e
comparison
equal deleted inserted replaced
376:9d2ed561aac5 377:a430a16d2c02
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # This script copies the core BeagleRT files to the BeagleBone Black 3 # This script copies the core Bela files to the BeagleBone Black
4 # in preparation for building projects. It will remove any existing 4 # in preparation for building projects. It will remove any existing
5 # BeagleRT directory before copying the files over 5 # Bela directory before copying the files over
6 6
7 [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2" 7 [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2"
8 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/BeagleRT/" 8 [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/Bela/"
9 9
10 function usage 10 function usage
11 { 11 {
12 THIS_SCRIPT=`basename "$0"` 12 THIS_SCRIPT=`basename "$0"`
13 echo "Usage: $THIS_SCRIPT [-b path-on-beaglebone]" 13 echo "Usage: $THIS_SCRIPT [-b path-on-beaglebone]"
14 14
15 echo " 15 echo "
16 This script copies the core BeagleRT files to the BeagleBone, REMOVING 16 This script copies the core Bela files to the BeagleBone, REMOVING
17 any previous files found at that location. This should be done before 17 any previous files found at that location. This should be done before
18 running any of the other build scripts in this directory. The -b option 18 running any of the other build scripts in this directory. The -b option
19 changes the default path, which is otherwise $BBB_BELA_HOME." 19 changes the default path, which is otherwise $BBB_BELA_HOME."
20 } 20 }
21 21
28 h|\?) usage 28 h|\?) usage
29 exit 1 29 exit 1
30 esac 30 esac
31 done 31 done
32 32
33 echo "Copying BeagleRT core files to $BBB_BELA_HOME" 33 echo "Copying Bela core files to $BBB_BELA_HOME"
34 34
35 shift $((OPTIND-1)) 35 shift $((OPTIND-1))
36 36
37 # Find location of this script so we can locate the rest of the files 37 # Find location of this script so we can locate the rest of the files
38 SCRIPTPATH=$(readlink "$0") 38 SCRIPTPATH=$(readlink "$0")
39 SCRIPTDIR=$(dirname "$SCRIPTPATH") 39 SCRIPTDIR=$(dirname "$SCRIPTPATH")
40 40
41 read -p "Warning: this script will DELETE any existing BeagleRT files from your BeagleBone! Continue? (y/N) " -r 41 read -p "Warning: this script will DELETE any existing Bela files from your BeagleBone! Continue? (y/N) " -r
42 echo 42 echo
43 if [[ $REPLY = [yY] ]] 43 if [[ $REPLY = [yY] ]]
44 then 44 then
45 # Stop BeagleRT if running and remove all files 45 # Stop Bela if running and remove all files
46 echo "Stopping BeagleRT and removing old files." 46 echo "Stopping Bela and removing old files."
47 ssh $BBB_ADDRESS "screen -X -S BeagleRT quit &>/dev/null; pkill BeagleRT; sleep 0.5 ; rm -rf $BBB_BELA_HOME ; mkdir $BBB_BELA_HOME" 47 ssh $BBB_ADDRESS "screen -X -S Bela quit &>/dev/null; pkill Bela; sleep 0.5 ; rm -rf $BBB_BELA_HOME ; mkdir $BBB_BELA_HOME"
48 48
49 # Copy relevant files to BeagleBone Black 49 # Copy relevant files to BeagleBone Black
50 echo "Copying new files to BeagleBone..." 50 echo "Copying new files to BeagleBone..."
51 scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $SCRIPTDIR/../examples $BBB_ADDRESS:$BBB_BELA_HOME &&\ 51 scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $SCRIPTDIR/../examples $BBB_ADDRESS:$BBB_BELA_HOME &&\
52 scp $SCRIPTDIR/../libpd.so $BBB_ADDRESS:/usr/lib 52 scp $SCRIPTDIR/../libpd.so $BBB_ADDRESS:/usr/lib