From 0540f25b0e5d6921f7c20b15e499a7b270825009 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sat, 20 Jul 2024 01:34:53 -0700 Subject: [PATCH] Update opam installation to use /opt/riscv folder --- bin/wally-tool-chain-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index c5accbcb4..7bf9c57ea 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -307,12 +307,13 @@ else fi -cd "$RISCV" if [ "$FAMILY" == rhel ]; then # Install opam from binary disribution on rhel as it is not available from dnf # Opam is needed to install the sail compiler section_header "Installing/Updating Opam" STATUS="Opam" + export OPAMROOTISOK=1 # Silence warnings about running opam as root + cd "$RISCV" mkdir -p opam cd opam wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh @@ -332,11 +333,12 @@ fi section_header "Installing/Updating Sail Compiler" STATUS="Sail Compiler" export OPAMROOTISOK=1 # Silence warnings about running opam as root +export OPAMROOT="$RISCV"/opam 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 upgrade -y -opam switch create 5.1.0 || opam switch set 5.1.0 opam install sail -y 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" STATUS="RISC-V Sail Model" 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 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