Skip to content
Snippets Groups Projects
Commit 2de2de0d authored by Arno Schoenmakers's avatar Arno Schoenmakers
Browse files

Bug 1276: Added password to tbbctl --writeimage and added function to kill running RSPDriver

parent 5816ddef
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,18 @@ SyntaxError()
exit 1
}
killRSPDriver()
{
# Find all RSPDriver processes and kill these with sudo kill
RSP_pid=( $(ps -ea | grep RSPDriver | awk '{print $1}') )
if [ ${#RSP_pid[*]} > 0 ]; then
for pid in ${RSP_pid[*]}; do
echo "RSPDriver (process ${pid}) will be killed"
sudo kill $pid
done
fi
}
page=-1
m_file=""
t_file=""
......@@ -61,10 +73,14 @@ read -p "Is this ok [y/n]" answer
if [[ "$answer" =~ "([yY])" ]]; then
if [ -e $m_file -a -e $t_file ]; then
killRSPDriver
for ((ind=0; ind < $tbboards; ind++)) do
tbbctl --writeimage=$ind,$page,3.2,$t_file,$m_file
tbbctl --eraseimage=$ind,$page
tbbctl --writeimage=$ind,$page,3.2,$t_file,$m_file,0
done
tbbctl --config=$page
echo
else
echo "Could not find one of the hex files"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment