forked from M-Labs/artiq-zynq
remote_run: support loading other firmware types
This commit is contained in:
parent
67f4ec5782
commit
cdb58af5b3
@ -20,8 +20,9 @@ impure_dir="build"
|
|||||||
sshopts=""
|
sshopts=""
|
||||||
load_bitstream=1
|
load_bitstream=1
|
||||||
board_host="192.168.1.52"
|
board_host="192.168.1.52"
|
||||||
|
fw_type="runtime"
|
||||||
|
|
||||||
while getopts "h:id:o:l" opt; do
|
while getopts "h:id:o:lt:" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
\?) exit 1
|
\?) exit 1
|
||||||
;;
|
;;
|
||||||
@ -38,6 +39,8 @@ while getopts "h:id:o:l" opt; do
|
|||||||
;;
|
;;
|
||||||
b) board_host=$OPTARG
|
b) board_host=$OPTARG
|
||||||
;;
|
;;
|
||||||
|
t) fw_type=$OPTARG
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -53,12 +56,12 @@ if [ $impure -eq 1 ]; then
|
|||||||
if [ $load_bitstream -eq 1 ]; then
|
if [ $load_bitstream -eq 1 ]; then
|
||||||
load_bitstream_cmd="-g build/gateware/top.bit"
|
load_bitstream_cmd="-g build/gateware/top.bit"
|
||||||
fi
|
fi
|
||||||
firmware="build/runtime.bin"
|
firmware="build/$fw_type.bin"
|
||||||
else
|
else
|
||||||
if [ $load_bitstream -eq 1 ]; then
|
if [ $load_bitstream -eq 1 ]; then
|
||||||
load_bitstream_cmd="-g $pure_dir/top.bit"
|
load_bitstream_cmd="-g $pure_dir/top.bit"
|
||||||
fi
|
fi
|
||||||
firmware="$pure_dir/runtime.bin"
|
firmware="$pure_dir/$fw_type.bin"
|
||||||
fi
|
fi
|
||||||
echo "Programming board..."
|
echo "Programming board..."
|
||||||
ssh $sshopts $target_host "cd $target_folder; openocd -f zc706.cfg -c'load_image szl.elf; resume 0; exit'"
|
ssh $sshopts $target_host "cd $target_folder; openocd -f zc706.cfg -c'load_image szl.elf; resume 0; exit'"
|
||||||
|
Loading…
Reference in New Issue
Block a user