#!/bin/sh
# copy new flash software to TCR510
#  $1 binary file with the new software
if [ $# -lt 1 ] ; then
  echo "Usage: flashtcr binary_file"
  exit 1
fi

# stop running lantime programm
killproc -TERM /usr/bin/lantimed
killproc -TERM /usr/sbin/ntpd

# set TCR to bootmode
send_tcr_bsl /dev/ttyS2 2

# flash new software to TCR
flash509 -c:1 -b:9600 $1

