mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Update opam installation to use /opt/riscv folder
This commit is contained in:
		
							parent
							
								
									38c9c4749e
								
							
						
					
					
						commit
						0746f8fe89
					
				@ -307,12 +307,13 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cd "$RISCV"
 | 
					 | 
				
			||||||
if [ "$FAMILY" == rhel ]; then
 | 
					if [ "$FAMILY" == rhel ]; then
 | 
				
			||||||
    # Install opam from binary disribution on rhel as it is not available from dnf
 | 
					    # Install opam from binary disribution on rhel as it is not available from dnf
 | 
				
			||||||
    # Opam is needed to install the sail compiler
 | 
					    # Opam is needed to install the sail compiler
 | 
				
			||||||
    section_header "Installing/Updating Opam"
 | 
					    section_header "Installing/Updating Opam"
 | 
				
			||||||
    STATUS="Opam"
 | 
					    STATUS="Opam"
 | 
				
			||||||
 | 
					    export OPAMROOTISOK=1 # Silence warnings about running opam as root
 | 
				
			||||||
 | 
					    cd "$RISCV"
 | 
				
			||||||
    mkdir -p opam
 | 
					    mkdir -p opam
 | 
				
			||||||
    cd opam
 | 
					    cd opam
 | 
				
			||||||
    wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
 | 
					    wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
 | 
				
			||||||
@ -332,11 +333,12 @@ fi
 | 
				
			|||||||
section_header "Installing/Updating Sail Compiler"
 | 
					section_header "Installing/Updating Sail Compiler"
 | 
				
			||||||
STATUS="Sail Compiler"
 | 
					STATUS="Sail Compiler"
 | 
				
			||||||
export OPAMROOTISOK=1 # Silence warnings about running opam as root
 | 
					export OPAMROOTISOK=1 # Silence warnings about running opam as root
 | 
				
			||||||
 | 
					export OPAMROOT="$RISCV"/opam
 | 
				
			||||||
cd "$RISCV"
 | 
					cd "$RISCV"
 | 
				
			||||||
opam init -y --disable-sandboxing
 | 
					opam init -y --disable-sandboxing --no-setup --compiler=5.1.0
 | 
				
			||||||
 | 
					eval "$(opam config env)"
 | 
				
			||||||
opam update -y
 | 
					opam update -y
 | 
				
			||||||
opam upgrade -y
 | 
					opam upgrade -y
 | 
				
			||||||
opam switch create 5.1.0 || opam switch set 5.1.0
 | 
					 | 
				
			||||||
opam install sail -y
 | 
					opam install sail -y
 | 
				
			||||||
echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated${ENDC}"
 | 
					echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated${ENDC}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -345,7 +347,6 @@ echo -e "${SUCCESS_COLOR}Sail Compiler successfully installed/updated${ENDC}"
 | 
				
			|||||||
section_header "Installing/Updating RISC-V Sail Model"
 | 
					section_header "Installing/Updating RISC-V Sail Model"
 | 
				
			||||||
STATUS="RISC-V Sail Model"
 | 
					STATUS="RISC-V Sail Model"
 | 
				
			||||||
if git_check "sail-riscv" "https://github.com/riscv/sail-riscv.git" "$RISCV/bin/riscv_sim_RV32"; then
 | 
					if git_check "sail-riscv" "https://github.com/riscv/sail-riscv.git" "$RISCV/bin/riscv_sim_RV32"; then
 | 
				
			||||||
    eval "$(opam config env)"
 | 
					 | 
				
			||||||
    cd sail-riscv
 | 
					    cd sail-riscv
 | 
				
			||||||
    git reset --hard && git clean -f && git checkout master && git pull
 | 
					    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
 | 
					    export OPAMCLI=2.0  # Sail is not compatible with opam 2.1 as of 4/16/24
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user