# HG changeset patch # User Giulio Moro # Date 1465433886 -3600 # Node ID b49dc040af733952b04ceea4f65d76334ea6a235 # Parent 2ea5ed159f21bd9387477215b58bc7c074f5feb9 Updated setup_board diff -r 2ea5ed159f21 -r b49dc040af73 scripts/setup_board.sh --- a/scripts/setup_board.sh Thu Jun 09 01:57:40 2016 +0100 +++ b/scripts/setup_board.sh Thu Jun 09 01:58:06 2016 +0100 @@ -4,8 +4,8 @@ # in preparation for building projects. It will remove any existing # BeagleRT directory before copying the files over -BBB_ADDRESS="root@192.168.7.2" -BBB_PATH="~/BeagleRT" +[ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2" +[ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="~/BeagleRT/" function usage { @@ -16,21 +16,21 @@ This script copies the core BeagleRT files to the BeagleBone, REMOVING any previous files found at that location. This should be done before running any of the other build scripts in this directory. The -b option - changes the default path, which is otherwise $BBB_PATH." + changes the default path, which is otherwise $BBB_BELA_HOME." } OPTIND=1 while getopts "b:h" opt; do case $opt in - b) BBB_PATH=$OPTARG + b) BBB_BELA_HOME=$OPTARG ;; h|\?) usage exit 1 esac done -echo "Copying BeagleRT core files to $BBB_PATH" +echo "Copying BeagleRT core files to $BBB_BELA_HOME" shift $((OPTIND-1)) @@ -44,11 +44,11 @@ then # Stop BeagleRT if running and remove all files echo "Stopping BeagleRT and removing old files." - ssh $BBB_ADDRESS "screen -X -S BeagleRT quit &>/dev/null; pkill BeagleRT; sleep 0.5 ; rm -rf $BBB_PATH ; mkdir $BBB_PATH" + ssh $BBB_ADDRESS "screen -X -S BeagleRT quit &>/dev/null; pkill BeagleRT; sleep 0.5 ; rm -rf $BBB_BELA_HOME ; mkdir $BBB_BELA_HOME" # Copy relevant files to BeagleBone Black echo "Copying new files to BeagleBone..." - scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $SCRIPTDIR/../examples $BBB_ADDRESS:$BBB_PATH &&\ + scp -r $SCRIPTDIR/../core $SCRIPTDIR/../include $SCRIPTDIR/../Makefile $SCRIPTDIR/../libNE10.a $SCRIPTDIR/../libprussdrv.a $SCRIPTDIR/../examples $BBB_ADDRESS:$BBB_BELA_HOME &&\ scp $SCRIPTDIR/../libpd.so $BBB_ADDRESS:/usr/lib if [ $? -ne 0 ] then @@ -57,7 +57,7 @@ fi # Make remaining directories needed for building echo "Creating directory structure on BeagleBone..." - ssh $BBB_ADDRESS "mkdir -p $BBB_PATH/build ; mkdir -p $BBB_PATH/build/core ; mkdir -p $BBB_PATH/build/projects; mkdir -p $BBB_PATH/projects" &&\ + ssh $BBB_ADDRESS "mkdir -p $BBB_BELA_HOME/build ; mkdir -p $BBB_BELA_HOME/build/core ; mkdir -p $BBB_BELA_HOME/build/projects; mkdir -p $BBB_BELA_HOME/projects" &&\ echo "Done." else echo "Aborting..."