mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Cleanup
This commit is contained in:
		
							parent
							
								
									4b86f85904
								
							
						
					
					
						commit
						22d2077006
					
				@ -62,7 +62,7 @@ if [[ "$ID" == rhel || "$ID_LIKE" == *rhel* ]]; then
 | 
				
			|||||||
    export FAMILY=rhel
 | 
					    export FAMILY=rhel
 | 
				
			||||||
    if [ "$ID" != rhel ] && [ "$ID" != rocky ] && [ "$ID" != almalinux ]; then
 | 
					    if [ "$ID" != rhel ] && [ "$ID" != rocky ] && [ "$ID" != almalinux ]; then
 | 
				
			||||||
        printf "${WARNING_COLOR}%s\n${ENDC}" "For Red Hat family distros, the Wally install script has only been tested on RHEL, Rocky Linux," \
 | 
					        printf "${WARNING_COLOR}%s\n${ENDC}" "For Red Hat family distros, the Wally install script has only been tested on RHEL, Rocky Linux," \
 | 
				
			||||||
            " and AlmaLinux. Your distro is $PRETTY_NAME. The regular Red Hat install will be attempted, but there will likely be issues."
 | 
					            " and AlmaLinux. Your distro is $PRETTY_NAME. The regular Red Hat install will be attempted, but there may be issues."
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    export RHEL_VERSION="${VERSION_ID:0:1}"
 | 
					    export RHEL_VERSION="${VERSION_ID:0:1}"
 | 
				
			||||||
    if (( RHEL_VERSION < 8 )); then
 | 
					    if (( RHEL_VERSION < 8 )); then
 | 
				
			||||||
@ -77,7 +77,7 @@ elif [[ "$ID" == ubuntu || "$ID_LIKE" == *ubuntu* ]]; then
 | 
				
			|||||||
    fi
 | 
					    fi
 | 
				
			||||||
    export UBUNTU_VERSION="${VERSION_ID:0:2}"
 | 
					    export UBUNTU_VERSION="${VERSION_ID:0:2}"
 | 
				
			||||||
    if (( UBUNTU_VERSION < 20 )); then
 | 
					    if (( UBUNTU_VERSION < 20 )); then
 | 
				
			||||||
        echo "${FAIL_COLOR}The Wally install script is only compatible with versions 20.04, 22.04, and 24.04 of Ubuntu. You have version $VERSION.${ENDC}"
 | 
					        echo "${FAIL_COLOR}The Wally install script has only been tested with versions 20.04 LTS, 22.04 LTS, and 24.04 LTS of Ubuntu. You have version $VERSION.${ENDC}"
 | 
				
			||||||
        exit 1
 | 
					        exit 1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,7 @@ if [ "$FAMILY" == rhel ]; then
 | 
				
			|||||||
    QEMU_PACKAGES+=(glib2-devel libfdt-devel pixman-devel bzip2 ninja-build)
 | 
					    QEMU_PACKAGES+=(glib2-devel libfdt-devel pixman-devel bzip2 ninja-build)
 | 
				
			||||||
    SPIKE_PACKAGES+=(dtc boost-regex boost-system)
 | 
					    SPIKE_PACKAGES+=(dtc boost-regex boost-system)
 | 
				
			||||||
    VERILATOR_PACKAGES+=(help2man perl clang ccache gperftools numactl mold)
 | 
					    VERILATOR_PACKAGES+=(help2man perl clang ccache gperftools numactl mold)
 | 
				
			||||||
    BUILDROOT_PACKAGES+=(ncurses-base ncurses ncurses-libs ncurses-devel gcc-gfortran cpio)
 | 
					    BUILDROOT_PACKAGES+=(ncurses-base ncurses ncurses-libs ncurses-devel gcc-gfortran cpio) # gfortran is only needed for compiling spec benchmarks on buildroot linux
 | 
				
			||||||
    # Extra packages not availale in rhel8, nice for Verilator and needed for sail respectively
 | 
					    # Extra packages not availale in rhel8, nice for Verilator and needed for sail respectively
 | 
				
			||||||
    if (( RHEL_VERSION >= 9 )); then
 | 
					    if (( RHEL_VERSION >= 9 )); then
 | 
				
			||||||
        VERILATOR_PACKAGES+=(perl-doc)
 | 
					        VERILATOR_PACKAGES+=(perl-doc)
 | 
				
			||||||
@ -81,7 +81,7 @@ elif [ "$FAMILY" == ubuntu ]; then
 | 
				
			|||||||
    SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev)
 | 
					    SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev)
 | 
				
			||||||
    VERILATOR_PACKAGES+=(help2man perl g++ clang ccache libunwind-dev libgoogle-perftools-dev numactl perl-doc libfl2 libfl-dev zlib1g)
 | 
					    VERILATOR_PACKAGES+=(help2man perl g++ clang ccache libunwind-dev libgoogle-perftools-dev numactl perl-doc libfl2 libfl-dev zlib1g)
 | 
				
			||||||
    SAIL_PACKAGES+=(opam z3)
 | 
					    SAIL_PACKAGES+=(opam z3)
 | 
				
			||||||
    BUILDROOT_PACKAGES+=(ncurses-base ncurses-bin libncurses-dev gfortran cpio)
 | 
					    BUILDROOT_PACKAGES+=(ncurses-base ncurses-bin libncurses-dev gfortran cpio) # gfortran is only needed for compiling spec benchmarks on buildroot linux
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -159,7 +159,7 @@ echo -e "${SUCCESS_COLOR}Python environment successfully configured.${ENDC}"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Extra dependecies needed for older distros that don't have new enough versions available from package manager
 | 
					# Extra dependecies needed for older distros that don't have new enough versions available from package manager
 | 
				
			||||||
if (( RHEL_VERSION == 8 )) || (( UBUNTU_VERSION == 20 )); then
 | 
					if (( RHEL_VERSION == 8 )) || (( UBUNTU_VERSION == 20 )); then
 | 
				
			||||||
    # Newer versin of glib required for Qemu.
 | 
					    # Newer versin of glib required for QEMU.
 | 
				
			||||||
    # Anything newer than this won't build on red hat 8
 | 
					    # Anything newer than this won't build on red hat 8
 | 
				
			||||||
    STATUS="glib"
 | 
					    STATUS="glib"
 | 
				
			||||||
    if [ ! -e "$RISCV"/include/glib-2.0 ]; then
 | 
					    if [ ! -e "$RISCV"/include/glib-2.0 ]; then
 | 
				
			||||||
@ -211,8 +211,7 @@ cd "$RISCV"
 | 
				
			|||||||
if git_check "riscv-gnu-toolchain" "https://github.com/riscv/riscv-gnu-toolchain" "$RISCV/riscv-gnu-toolchain/stamps/build-gcc-newlib-stage2"; then
 | 
					if git_check "riscv-gnu-toolchain" "https://github.com/riscv/riscv-gnu-toolchain" "$RISCV/riscv-gnu-toolchain/stamps/build-gcc-newlib-stage2"; then
 | 
				
			||||||
    cd riscv-gnu-toolchain
 | 
					    cd riscv-gnu-toolchain
 | 
				
			||||||
    git reset --hard && git clean -f && git checkout master && git pull
 | 
					    git reset --hard && git clean -f && git checkout master && git pull
 | 
				
			||||||
    git pull
 | 
					       ./configure --prefix="${RISCV}" --with-multilib-generator="rv32e-ilp32e--;rv32i-ilp32--;rv32im-ilp32--;rv32iac-ilp32--;rv32imac-ilp32--;rv32imafc-ilp32f--;rv32imafdc-ilp32d--;rv64i-lp64--;rv64ic-lp64--;rv64iac-lp64--;rv64imac-lp64--;rv64imafdc-lp64d--;rv64im-lp64--;"
 | 
				
			||||||
    ./configure --prefix="${RISCV}" --with-multilib-generator="rv32e-ilp32e--;rv32i-ilp32--;rv32im-ilp32--;rv32iac-ilp32--;rv32imac-ilp32--;rv32imafc-ilp32f--;rv32imafdc-ilp32d--;rv64i-lp64--;rv64ic-lp64--;rv64iac-lp64--;rv64imac-lp64--;rv64imafdc-lp64d--;rv64im-lp64--;"
 | 
					 | 
				
			||||||
    make -j ${NUM_THREADS} 2>&1 | logger riscv-gnu-toolchain; [ "${PIPESTATUS[0]}" == 0 ]
 | 
					    make -j ${NUM_THREADS} 2>&1 | logger riscv-gnu-toolchain; [ "${PIPESTATUS[0]}" == 0 ]
 | 
				
			||||||
    if [ "$clean" ]; then
 | 
					    if [ "$clean" ]; then
 | 
				
			||||||
        cd "$RISCV"
 | 
					        cd "$RISCV"
 | 
				
			||||||
@ -321,10 +320,9 @@ else
 | 
				
			|||||||
    echo -e "${SUCCESS_COLOR}Verilator already up to date${ENDC}"
 | 
					    echo -e "${SUCCESS_COLOR}Verilator already up to date${ENDC}"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Install opam from binary disribution on rhel as it is not available from dnf
 | 
				
			||||||
 | 
					# Opam is needed to install the sail compiler
 | 
				
			||||||
if [ "$FAMILY" == rhel ]; then
 | 
					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"
 | 
					    section_header "Installing/Updating Opam"
 | 
				
			||||||
    STATUS="Opam"
 | 
					    STATUS="Opam"
 | 
				
			||||||
    export OPAMROOTISOK=1 # Silence warnings about running opam as root
 | 
					    export OPAMROOTISOK=1 # Silence warnings about running opam as root
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user