diff --git a/.gitattributes b/.gitattributes index d23315e909e6cd859cbd4e83a238c53b4aacfc60..946d741744356579b453de2c691253498e0ee4e2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -183,6 +183,9 @@ CEP/BB/ParmDB/test/tmakesourcedb.in_2 -text CEP/BB/Pipeline/core/Pipeline.e3p -text CEP/BB/SourceDB/bootstrap -text /CMakeLists.txt -text +Firmware/tools/flash_images.sh -text +Firmware/tools/restart_images.sh -text +Firmware/tools/view_images.sh -text JAVA/CEP/jParmFacade/nbproject/.cvsignore -text JAVA/GUI/MAC/jRSP/.cvsignore -text JAVA/GUI/MAC/jRSP/nbproject/.cvsignore -text diff --git a/Firmware/tools/flash_images.sh b/Firmware/tools/flash_images.sh new file mode 100755 index 0000000000000000000000000000000000000000..576248ee7636e6e3b8222c06d22e9af6b878032a --- /dev/null +++ b/Firmware/tools/flash_images.sh @@ -0,0 +1,31 @@ +# !/bin/bash +# version 2.2, date 05-11-2008, M.J.Norden +eval "swlevel 1" +page=15 +station=`hostname -s` +let rspboards=`sed -n 's/^\s*RS\.N_RSPBOARDS\s*=\s*\([0-9][0-9]*\).*$/\1/p' /opt/lofar/etc/RemoteStation.conf` +bphexfile=bp3b_v5_3.hex +aphexfile=ap3b_v5_3.hex + +echo "This station is "$station +echo "The number of rspboards is "$rspboards +echo "The selected image page is "$page +echo "The bp hex file is "$bphexfile +echo "The ap hex file is "$aphexfile + +for ((ind=0; ind < $rspboards; ind++)) do + MACadr=$(printf "10:FA:00:00:%02x:00" $ind) + sudo rsuctl3 -w -q -p $page -b $bphexfile -a $aphexfile -m $MACadr -F +done + + +if [ $page != 0 ] ; then + for ((ind=0; ind < $rspboards; ind++)) do + MACadr=$(printf "10:FA:00:00:%02x:00" $ind) + sudo rsuctl3_reset -m $MACadr -p $page -x -q; + done + else + echo "When the RSP flash action was sucessful please" + echo "set page to page=0 and reset the RSP boards" + echo "with ./restart_images.sh" +fi diff --git a/Firmware/tools/restart_images.sh b/Firmware/tools/restart_images.sh new file mode 100755 index 0000000000000000000000000000000000000000..4031806b5dab6ff1ed08b1c558afef9b1e7378a2 --- /dev/null +++ b/Firmware/tools/restart_images.sh @@ -0,0 +1,13 @@ +# !/bin/bash +# version 2.2, date 05-11-2008, M.J.Norden +eval "swlevel 1" +page=15 +station=`hostname -s` +let rspboards=`sed -n 's/^\s*RS\.N_RSPBOARDS\s*=\s*\([0-9][0-9]*\).*$/\1/p' /opt/lofar/etc/RemoteStation.conf` + +echo "This station is "$station + +for ((ind=0; ind < $rspboards; ind++)) do + MACadr=$(printf "10:FA:00:00:%02x:00" $ind) + sudo rsuctl3_reset -q -x -p $page -m $MACadr; +done diff --git a/Firmware/tools/view_images.sh b/Firmware/tools/view_images.sh new file mode 100755 index 0000000000000000000000000000000000000000..cb892ef7a453b663bc1343aa2841ed0285adba9d --- /dev/null +++ b/Firmware/tools/view_images.sh @@ -0,0 +1,13 @@ +# !/bin/bash +# version 2.1, date 03-11-2008, M.J.Norden +station=`hostname -s` +let rspboards=`sed -n 's/^\s*RS\.N_RSPBOARDS\s*=\s*\([0-9][0-9]*\).*$/\1/p' /opt/lofar/etc/RemoteStation.conf` + +echo "This station is "$station +echo "The number of rspboards is "$rspboards + +for ((ind=0; ind < $rspboards; ind++)) do + MACadr=$(printf "10:FA:00:00:%02x:00" $ind) + sudo rsuctl3 -q -m $MACadr -V + sudo rsuctl3 -q -m $MACadr -l +done