mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-23 04:54:29 +00:00
Update setup scripts to be more verbose about errors
This commit is contained in:
parent
e30691d5e2
commit
954247af92
@ -316,7 +316,7 @@ fi
|
||||
# but a binary release of it should be available soon, removing the need to use opam.
|
||||
section_header "Installing/Updating Sail Compiler"
|
||||
STATUS="Sail Compiler"
|
||||
OPAMROOTISOK=1 # Silence warnings about running opam as root
|
||||
export OPAMROOTISOK=1 # Silence warnings about running opam as root
|
||||
cd "$RISCV"
|
||||
opam init -y --disable-sandboxing
|
||||
opam update -y
|
||||
@ -330,7 +330,7 @@ echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated${ENDC}"
|
||||
section_header "Installing/Updating RISC-V Sail Model"
|
||||
STATUS="RISC-V Sail Model"
|
||||
if [[ ((! -e sail-riscv) && ($(git clone https://github.com/riscv/sail-riscv.git) || true)) || ($(cd sail-riscv; git fetch; git rev-parse HEAD) != $(cd sail-riscv; git rev-parse origin/master)) || (! -e $RISCV/bin/riscv_sim_RV32) ]]; then
|
||||
eval $(opam config env)
|
||||
eval "$(opam config env)"
|
||||
cd sail-riscv
|
||||
git reset --hard && git clean -f && git checkout master && git pull
|
||||
export OPAMCLI=2.0 # Sail is not compatible with opam 2.1 as of 4/16/24
|
||||
@ -388,7 +388,8 @@ if [ ! -e "${RISCV}"/site-setup.sh ]; then
|
||||
fi
|
||||
echo -e "${SUCCESS_COLOR}Site setup script successfully downloaded${ENDC}"
|
||||
else
|
||||
echo -e "${OK_COLOR}Site setup script already exists. Not checking for updates to avoid overwritng modifications${ENDC}"
|
||||
echo -e "${OK_COLOR}Site setup script already exists. Not checking for updates to avoid overwritng modifications."
|
||||
echo -e "You may need to manually update it if there were changes upstream.${ENDC}"
|
||||
fi
|
||||
|
||||
echo -e "${SUCCESS_COLOR}${BOLD}\n\nINSTALLATION SUCCESSFUL\n\n${ENDC}"
|
||||
|
10
setup.csh
10
setup.csh
@ -11,9 +11,9 @@ alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2;ec
|
||||
alias prepend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 "\!:2":${\!:1};echo Added \!:2 to \!:1'
|
||||
|
||||
# Path to RISC-V Tools
|
||||
if ( -e /opt/riscv ) then
|
||||
if ( -d /opt/riscv ) then
|
||||
setenv RISCV /opt/riscv
|
||||
else if ( -e ~/riscv ) then
|
||||
else if ( -d ~/riscv ) then
|
||||
setenv RISCV ~/riscv
|
||||
else
|
||||
# set the $RISCV directory here and remove the subsequent two lines
|
||||
@ -30,6 +30,10 @@ echo '$WALLY set to ' ${WALLY}
|
||||
extend PATH $WALLY/bin
|
||||
|
||||
# load site licenses and tool locations
|
||||
source $RISCV/site-setup.csh
|
||||
if ( -e "${RISCV}"/site-setup.csh ) then
|
||||
source $RISCV/site-setup.csh
|
||||
else
|
||||
echo "site-setup.csh not found in \$RISCV directory. Rerun wally-toolchain-install.sh to automatically download it."
|
||||
fi
|
||||
|
||||
echo "setup done"
|
||||
|
10
setup.sh
10
setup.sh
@ -14,9 +14,9 @@
|
||||
echo "Executing Wally setup.sh"
|
||||
|
||||
# Path to RISC-V Tools
|
||||
if [ -e /opt/riscv ]; then
|
||||
if [ -d /opt/riscv ]; then
|
||||
export RISCV=/opt/riscv
|
||||
elif [ -e ~/riscv ]; then
|
||||
elif [ -d ~/riscv ]; then
|
||||
export RISCV=~/riscv
|
||||
else
|
||||
# set the $RISCV directory here and remove the subsequent two lines
|
||||
@ -34,6 +34,10 @@ echo \$WALLY set to "${WALLY}"
|
||||
export PATH=$WALLY/bin:$PATH
|
||||
|
||||
# load site licenses and tool locations
|
||||
source "${RISCV}"/site-setup.sh
|
||||
if [ -e "${RISCV}"/site-setup.sh ]; then
|
||||
source "${RISCV}"/site-setup.sh
|
||||
else
|
||||
echo "site-setup.sh not found in \$RISCV directory. Rerun wally-toolchain-install.sh to automatically download it."
|
||||
fi
|
||||
|
||||
echo "setup done"
|
||||
|
@ -25,7 +25,12 @@ extend LD_LIBRARY_PATH $RISCV/lib64
|
||||
extend PATH $RISCV/bin
|
||||
|
||||
# Activate riscv-python Virtual Environment
|
||||
source "$RISCV"/riscv-python/bin/activate.csh
|
||||
if ( -e "$RISCV"/riscv-python/bin/activate ) then
|
||||
source "$RISCV"/riscv-python/bin/activate.csh
|
||||
else
|
||||
echo "Python virtual environment not found. Rerun wally-toolchain-install.sh to automatically create it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# environment variables needed for RISCV-DV
|
||||
setenv RISCV_GCC `which riscv64-unknown-elf-gcc` # Copy this as it is
|
||||
|
@ -27,7 +27,14 @@ export LD_LIBRARY_PATH=$RISCV/lib:$RISCV/lib64:$LD_LIBRARY_PATH
|
||||
export PATH=$PATH:$RISCV/bin
|
||||
|
||||
# Activate riscv-python Virtual Environment
|
||||
source "$RISCV"/riscv-python/bin/activate
|
||||
|
||||
if [ -e "$RISCV"/riscv-python/bin/activate ]; then
|
||||
source "$RISCV"/riscv-python/bin/activate
|
||||
else
|
||||
echo "Python virtual environment not found. Rerun wally-toolchain-install.sh to automatically create it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# environment variables needed for RISCV-DV
|
||||
export RISCV_GCC=$(which riscv64-unknown-elf-gcc) # Copy this as it is
|
||||
|
Loading…
Reference in New Issue
Block a user