mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
# setup.sh
 | 
						|
# David_Harris@hmc.edu and kekim@hmc.edu 1 December 2021
 | 
						|
# Set up tools for cvw
 | 
						|
 | 
						|
# optionally have .bashrc or .bash_profile source this file with
 | 
						|
#if [ -f ~/cvw/setup.sh ]; then
 | 
						|
#	source ~/cvw/setup.sh
 | 
						|
#fi
 | 
						|
 | 
						|
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
 | 
						|
 | 
						|
echo "Executing Wally setup.sh"
 | 
						|
 | 
						|
# Path to RISC-V Tools
 | 
						|
if [ -d /opt/riscv ]; then
 | 
						|
    export RISCV=/opt/riscv
 | 
						|
elif [ -d ~/riscv ]; then
 | 
						|
    export RISCV=~/riscv
 | 
						|
else
 | 
						|
    # set the $RISCV directory here and remove the subsequent two lines
 | 
						|
    # export RISCV=
 | 
						|
    echo "\$RISCV directory not found. Checked /opt/riscv and ~/riscv. Edit setup.sh to point to your custom \$RISCV directory."
 | 
						|
    exit 1;
 | 
						|
fi
 | 
						|
echo \$RISCV set to "${RISCV}"
 | 
						|
 | 
						|
# Path to Wally repository
 | 
						|
WALLY=$(dirname "${BASH_SOURCE[0]:-$0}")
 | 
						|
export WALLY=$(cd "$WALLY" && pwd)
 | 
						|
echo \$WALLY set to "${WALLY}"
 | 
						|
# utility functions in Wally repository
 | 
						|
export PATH=$WALLY/bin:$PATH
 | 
						|
 | 
						|
# load site licenses and tool locations
 | 
						|
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"
 |