forked from firesim/firesim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sourceme-manager.sh
60 lines (50 loc) · 1.36 KB
/
sourceme-manager.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# you should source this on your manager instance
# you can also source it in your bashrc, but you must cd to this directory
# first
DO_SSH_SETUP=true
function usage
{
echo "usage: source sourceme-manager.sh [OPTIONS]"
echo "options:"
echo " --skip-ssh-setup: if set, skips ssh setup checks."
}
while test $# -gt 0
do
case "$1" in
--skip-ssh-setup)
DO_SSH_SETUP=false;
;;
-h | -H | --help)
usage
exit
;;
--*) echo "ERROR: bad option $1"
usage
exit 1
;;
*) echo "ERROR: bad argument $1"
usage
exit 2
;;
esac
shift
done
unamestr=$(uname)
RDIR=$(pwd)
AWSFPGA=$RDIR/platforms/f1/aws-fpga
export CL_DIR=$AWSFPGA/hdk/cl/developer_designs/cl_firesim
# setup risc-v tools
source ./env.sh
# put the manager on the user path
export PATH=$PATH:$(pwd)/deploy
if [ "$DO_SSH_SETUP" = true ]; then
# setup ssh-agent
source deploy/ssh-setup.sh
fi
# flag for scripts to check that this has been sourced
export FIRESIM_SOURCED=1
# this is a prefix added to run farm names. change this to isolate run farms
# if you have multiple copies of firesim
export FIRESIM_RUNFARM_PREFIX=""
# put FlameGraph/other fireperf utils on the user path
export PATH=$(pwd)/utils/fireperf:$(pwd)/utils/fireperf/FlameGraph:$PATH