forked from M-Labs/nac3
remote-run: allow specifying artifact folder
This commit is contained in:
parent
e65d4e0e84
commit
d5df759341
|
@ -4,6 +4,8 @@ set -e
|
||||||
|
|
||||||
target_host="rpi-4.m-labs.hk"
|
target_host="rpi-4.m-labs.hk"
|
||||||
impure=0
|
impure=0
|
||||||
|
pure_dir="result"
|
||||||
|
impure_dir="build"
|
||||||
|
|
||||||
while getopts "h:i" opt; do
|
while getopts "h:i" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
|
@ -13,6 +15,9 @@ while getopts "h:i" opt; do
|
||||||
;;
|
;;
|
||||||
i) impure=1
|
i) impure=1
|
||||||
;;
|
;;
|
||||||
|
d) pure_dir=$OPTARG;
|
||||||
|
impure_dir=$OPTARG;
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -21,10 +26,10 @@ target_folder=/tmp/zynq-\$USER
|
||||||
ssh $target_host "mkdir -p $target_folder"
|
ssh $target_host "mkdir -p $target_folder"
|
||||||
rsync openocd/* $target_host:$target_folder
|
rsync openocd/* $target_host:$target_folder
|
||||||
if [ $impure -eq 1 ]; then
|
if [ $impure -eq 1 ]; then
|
||||||
rsync build/firmware/armv7-none-eabihf/release/szl $target_host:$target_folder/szl.elf
|
rsync $impure_dir/firmware/armv7-none-eabihf/release/szl $target_host:$target_folder/szl.elf
|
||||||
rsync build/gateware/top.bit $target_host:$target_folder
|
rsync $impure_dir/gateware/top.bit $target_host:$target_folder
|
||||||
else
|
else
|
||||||
rsync -L result/szl.elf $target_host:$target_folder
|
rsync -L $pure_dir/szl.elf $target_host:$target_folder
|
||||||
rsync -L result/top.bit $target_host:$target_folder
|
rsync -L $pure_dir/top.bit $target_host:$target_folder
|
||||||
fi
|
fi
|
||||||
ssh $target_host "cd $target_folder; openocd -f zc706.cfg -c 'pld load 0 top.bit; load_image szl.elf; resume 0; exit'"
|
ssh $target_host "cd $target_folder; openocd -f zc706.cfg -c 'pld load 0 top.bit; load_image szl.elf; resume 0; exit'"
|
||||||
|
|
Loading…
Reference in New Issue