mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 17:55:19 +00:00
merged README
This commit is contained in:
commit
6cee6fed63
7
.github/workflows/install.yml
vendored
7
.github/workflows/install.yml
vendored
@ -73,6 +73,11 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
image: almalinux:9
|
image: almalinux:9
|
||||||
imageFamily: redhat
|
imageFamily: redhat
|
||||||
|
# SUSE Installations
|
||||||
|
- name: opensuse-15.6
|
||||||
|
os: ubuntu-latest
|
||||||
|
image: opensuse/leap:15.6
|
||||||
|
imageFamily: suse
|
||||||
# User level installation
|
# User level installation
|
||||||
- name: user-install
|
- name: user-install
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
@ -107,6 +112,8 @@ jobs:
|
|||||||
elif [ ${{ matrix.imageFamily }} == "redhat" ]; then
|
elif [ ${{ matrix.imageFamily }} == "redhat" ]; then
|
||||||
dnf install -y sudo git
|
dnf install -y sudo git
|
||||||
dnf install curl -y --allowerasing || true
|
dnf install curl -y --allowerasing || true
|
||||||
|
elif [ ${{ matrix.imageFamily }} == "suse" ]; then
|
||||||
|
zypper install -y sudo git
|
||||||
fi
|
fi
|
||||||
# Only clone submodules needed for standard tests/regression to save space
|
# Only clone submodules needed for standard tests/regression to save space
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6f5ea41584c49543e63415e37356ebb24b07d89d
|
Subproject commit c180b22ed5f4112d0ef35b2c5ac1acc45f9ebb5d
|
@ -95,6 +95,17 @@ elif [[ "$ID" == debian || "$ID_LIKE" == *debian* ]]; then
|
|||||||
printf "${FAIL_COLOR}%s\n${ENDC}" "The Wally installation script has only been tested with Debian versions 11 and 12. You have version $VERSION."
|
printf "${FAIL_COLOR}%s\n${ENDC}" "The Wally installation script has only been tested with Debian versions 11 and 12. You have version $VERSION."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
elif [[ "$ID" == opensuse-leap || "$ID" == sles || "$ID_LIKE" == *suse* ]]; then
|
||||||
|
export FAMILY=suse
|
||||||
|
if [[ "$ID" != opensuse-leap && "$ID" != sles ]]; then
|
||||||
|
printf "${WARNING_COLOR}%s%s\n${ENDC}" "For SUSE family distros, the Wally installation script has only been tested on OpenSUSE Leap and SLES. Your distro " \
|
||||||
|
"is $PRETTY_NAME. The regular SUSE install will be attempted, but there may be issues. If you are using OpenSUSE Tumbleweed, the version check will fail."
|
||||||
|
fi
|
||||||
|
export SUSE_VERSION="${VERSION_ID//.}"
|
||||||
|
if (( SUSE_VERSION < 156 )); then
|
||||||
|
printf "${FAIL_COLOR}%s\n${ENDC}" "The Wally installation script has only been tested with SUSE version 15.6. You have version $VERSION."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printf "${FAIL_COLOR}%s%s%s\n${ENDC}" "The Wally installation script is currently only compatible with Ubuntu, Debian, SUSE, and Red Hat family " \
|
printf "${FAIL_COLOR}%s%s%s\n${ENDC}" "The Wally installation script is currently only compatible with Ubuntu, Debian, SUSE, and Red Hat family " \
|
||||||
"(RHEL, Rocky Linux, or AlmaLinux) distros. Your detected distro is $PRETTY_NAME. You may try manually running the " \
|
"(RHEL, Rocky Linux, or AlmaLinux) distros. Your detected distro is $PRETTY_NAME. You may try manually running the " \
|
||||||
|
@ -45,61 +45,77 @@ fi
|
|||||||
|
|
||||||
# Packages are grouped by which tool requires them. If multiple tools need a package, it is included in the first tool only
|
# Packages are grouped by which tool requires them. If multiple tools need a package, it is included in the first tool only
|
||||||
# Packages that are constant across distros
|
# Packages that are constant across distros
|
||||||
GENERAL_PACKAGES+=(rsync git make cmake curl wget tar unzip bzip2 dialog mutt ssmtp)
|
GENERAL_PACKAGES+=(rsync git make cmake curl wget tar unzip bzip2 dialog mutt)
|
||||||
GNU_PACKAGES+=(autoconf automake gawk bison flex texinfo gperf libtool ninja-build patchutils bc gcc)
|
GNU_PACKAGES+=(autoconf automake gawk bison flex texinfo gperf libtool patchutils bc gcc)
|
||||||
VERILATOR_PACKAGES+=(help2man perl clang ccache numactl)
|
VERILATOR_PACKAGES+=(help2man perl clang ccache numactl)
|
||||||
BUILDROOT_PACKAGES+=(ncurses-base cpio)
|
BUILDROOT_PACKAGES+=(cpio)
|
||||||
|
|
||||||
# Distro specific packages and package manager
|
# Distro specific packages and package manager
|
||||||
if [ "$FAMILY" == rhel ]; then
|
case "$FAMILY" in
|
||||||
PYTHON_VERSION=python3.12
|
rhel)
|
||||||
PACKAGE_MANAGER="dnf -y"
|
|
||||||
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update"
|
|
||||||
GENERAL_PACKAGES+=(which "$PYTHON_VERSION" "$PYTHON_VERSION"-pip pkgconf-pkg-config gcc-c++)
|
|
||||||
GNU_PACKAGES+=(libmpc-devel mpfr-devel gmp-devel zlib-devel expat-devel libslirp-devel)
|
|
||||||
QEMU_PACKAGES+=(glib2-devel libfdt-devel pixman-devel)
|
|
||||||
SPIKE_PACKAGES+=(dtc boost-regex boost-system)
|
|
||||||
VVERILATOR_PACKAGES+=(gperftools mold)
|
|
||||||
BUILDROOT_PACKAGES+=(ncurses ncurses-libs ncurses-devel gcc-gfortran) # gcc-gfortran is only needed for compiling spec benchmarks on buildroot linux
|
|
||||||
# Extra packages not availale in rhel8, nice for Verilator
|
|
||||||
if (( RHEL_VERSION >= 9 )); then
|
|
||||||
VERILATOR_PACKAGES+=(perl-doc)
|
|
||||||
fi
|
|
||||||
# A newer version of gcc is required for qemu
|
|
||||||
OTHER_PACKAGES=(gcc-toolset-13)
|
|
||||||
elif [[ "$FAMILY" == ubuntu || "$FAMILY" == debian ]]; then
|
|
||||||
if (( UBUNTU_VERSION >= 24 )); then
|
|
||||||
PYTHON_VERSION=python3.12
|
PYTHON_VERSION=python3.12
|
||||||
elif (( UBUNTU_VERSION >= 22 )); then
|
PACKAGE_MANAGER="dnf -y"
|
||||||
PYTHON_VERSION=python3.11
|
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update"
|
||||||
elif (( UBUNTU_VERSION >= 20 )); then
|
GENERAL_PACKAGES+=(which "$PYTHON_VERSION" "$PYTHON_VERSION"-pip pkgconf-pkg-config gcc-c++ ssmtp)
|
||||||
PYTHON_VERSION=python3.9
|
GNU_PACKAGES+=(libmpc-devel mpfr-devel gmp-devel zlib-devel expat-devel libslirp-devel ninja-build)
|
||||||
OTHER_PACKAGES+=(gcc-10 g++-10 cpp-10) # Newer version of gcc needed for Verilator
|
QEMU_PACKAGES+=(glib2-devel libfdt-devel pixman-devel)
|
||||||
elif (( DEBIAN_VERSION >= 12 )); then
|
SPIKE_PACKAGES+=(dtc boost-regex boost-system)
|
||||||
PYTHON_VERSION=python3.11
|
VERILATOR_PACKAGES+=(gperftools mold)
|
||||||
elif (( DEBIAN_VERSION >= 11 )); then
|
BUILDROOT_PACKAGES+=(ncurses ncurses-base ncurses-libs ncurses-devel gcc-gfortran) # gcc-gfortran is only needed for compiling spec benchmarks on buildroot linux
|
||||||
PYTHON_VERSION=python3.9
|
# Extra packages not availale in rhel8, nice for Verilator
|
||||||
fi
|
if (( RHEL_VERSION >= 9 )); then
|
||||||
# Mold not available in older distros for Verilator, will download binary instead
|
VERILATOR_PACKAGES+=(perl-doc)
|
||||||
if (( UBUNTU_VERSION != 20 && DEBIAN_VERSION != 11 )); then
|
fi
|
||||||
VERILATOR_PACKAGES+=(mold)
|
# A newer version of gcc is required for qemu
|
||||||
fi
|
OTHER_PACKAGES+=(gcc-toolset-13)
|
||||||
PACKAGE_MANAGER="DEBIAN_FRONTEND=noninteractive apt-get -y"
|
;;
|
||||||
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update && sudo $PACKAGE_MANAGER upgrade --with-new-pkgs"
|
ubuntu | debian)
|
||||||
GENERAL_PACKAGES+=("$PYTHON_VERSION" python3-pip "$PYTHON_VERSION"-venv pkg-config g++)
|
if (( UBUNTU_VERSION >= 24 )); then
|
||||||
GNU_PACKAGES+=(autotools-dev libmpc-dev libmpfr-dev libgmp-dev build-essential zlib1g-dev libexpat1-dev libglib2.0-dev libslirp-dev)
|
PYTHON_VERSION=python3.12
|
||||||
QEMU_PACKAGES+=(libfdt-dev libpixman-1-dev)
|
elif (( UBUNTU_VERSION >= 22 )); then
|
||||||
SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev)
|
PYTHON_VERSION=python3.11
|
||||||
VERILATOR_PACKAGES+=(libunwind-dev libgoogle-perftools-dev perl-doc libfl2 libfl-dev zlib1g)
|
elif (( UBUNTU_VERSION >= 20 )); then
|
||||||
BUILDROOT_PACKAGES+=(ncurses-bin libncurses-dev gfortran) # gfortran is only needed for compiling spec benchmarks on buildroot linux
|
PYTHON_VERSION=python3.9
|
||||||
VIVADO_PACKAGES+=(libncurses*) # Vivado hangs on the third stage of installation without this
|
OTHER_PACKAGES+=(gcc-10 g++-10 cpp-10) # Newer version of gcc needed for Verilator
|
||||||
fi
|
elif (( DEBIAN_VERSION >= 12 )); then
|
||||||
|
PYTHON_VERSION=python3.11
|
||||||
|
elif (( DEBIAN_VERSION >= 11 )); then
|
||||||
|
PYTHON_VERSION=python3.9
|
||||||
|
fi
|
||||||
|
# Mold not available in older distros for Verilator, will download binary instead
|
||||||
|
if (( UBUNTU_VERSION != 20 && DEBIAN_VERSION != 11 )); then
|
||||||
|
VERILATOR_PACKAGES+=(mold)
|
||||||
|
fi
|
||||||
|
PACKAGE_MANAGER="DEBIAN_FRONTEND=noninteractive apt-get -y"
|
||||||
|
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update && sudo $PACKAGE_MANAGER upgrade --with-new-pkgs"
|
||||||
|
GENERAL_PACKAGES+=("$PYTHON_VERSION" python3-pip "$PYTHON_VERSION"-venv pkg-config g++ ssmtp)
|
||||||
|
GNU_PACKAGES+=(autotools-dev libmpc-dev libmpfr-dev libgmp-dev build-essential ninja-build zlib1g-dev libexpat1-dev libglib2.0-dev libslirp-dev)
|
||||||
|
QEMU_PACKAGES+=(libfdt-dev libpixman-1-dev)
|
||||||
|
SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev)
|
||||||
|
VERILATOR_PACKAGES+=(libunwind-dev libgoogle-perftools-dev perl-doc libfl2 libfl-dev zlib1g)
|
||||||
|
BUILDROOT_PACKAGES+=(ncurses-base ncurses-bin libncurses-dev gfortran) # gfortran is only needed for compiling spec benchmarks on buildroot linux
|
||||||
|
VIVADO_PACKAGES+=(libncurses*) # Vivado hangs on the third stage of installation without this
|
||||||
|
;;
|
||||||
|
suse)
|
||||||
|
PYTHON_VERSION=python3.12
|
||||||
|
PYTHON_VERSION_PACKAGE=python312
|
||||||
|
PACKAGE_MANAGER="zypper -n"
|
||||||
|
UPDATE_COMMAND="sudo $PACKAGE_MANAGER update"
|
||||||
|
GENERAL_PACKAGES+=("$PYTHON_VERSION_PACKAGE" "$PYTHON_VERSION_PACKAGE"-pip pkg-config)
|
||||||
|
GNU_PACKAGES+=(mpc-devel mpfr-devel gmp-devel zlib-devel libexpat-devel libslirp-devel ninja)
|
||||||
|
QEMU_PACKAGES+=(glib2-devel libpixman-1-0-devel) # maybe also need qemu itself?
|
||||||
|
SPIKE_PACKAGES+=(dtc libboost_regex1_75_0-devel libboost_system1_75_0-devel)
|
||||||
|
VERILATOR_PACKAGES+=(gperftools perl-doc)
|
||||||
|
BUILDROOT_PACKAGES+=(ncurses-utils ncurses-devel ncurses5-devel gcc-fortran) # gcc-fortran is only needed for compiling spec benchmarks on buildroot linux
|
||||||
|
OTHER_PACKAGES+=(gcc13 gcc13-c++ cpp13) # Newer version of gcc needed for many tools. Default is gcc7
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
# Check if required packages are installed or install/update them depending on passed flag.
|
# Check if required packages are installed or install/update them depending on passed flag.
|
||||||
if [ "${1}" == "--check" ]; then
|
if [ "${1}" == "--check" ]; then
|
||||||
section_header "Checking Dependencies from Package Manager"
|
section_header "Checking Dependencies from Package Manager"
|
||||||
if [ "$FAMILY" == rhel ]; then
|
if [[ "$FAMILY" == rhel || "$FAMILY" == suse ]]; then
|
||||||
for pack in "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"; do
|
for pack in "${GENERAL_PACKAGES[@]}" "${GNU_PACKAGES[@]}" "${QEMU_PACKAGES[@]}" "${SPIKE_PACKAGES[@]}" "${VERILATOR_PACKAGES[@]}" "${BUILDROOT_PACKAGES[@]}" "${OTHER_PACKAGES[@]}"; do
|
||||||
rpm -q "$pack" > /dev/null || (echo -e "${FAIL_COLOR}Missing packages detected (${WARNING_COLOR}$pack${FAIL_COLOR}). Run as root to auto-install or run wally-package-install.sh first.${ENDC}" && exit 1)
|
rpm -q "$pack" > /dev/null || (echo -e "${FAIL_COLOR}Missing packages detected (${WARNING_COLOR}$pack${FAIL_COLOR}). Run as root to auto-install or run wally-package-install.sh first.${ENDC}" && exit 1)
|
||||||
done
|
done
|
||||||
|
@ -191,6 +191,12 @@ fi
|
|||||||
# Enable newer version of gcc for older distros (required for QEMU/Verilator)
|
# Enable newer version of gcc for older distros (required for QEMU/Verilator)
|
||||||
if [ "$FAMILY" == rhel ]; then
|
if [ "$FAMILY" == rhel ]; then
|
||||||
source /opt/rh/gcc-toolset-13/enable
|
source /opt/rh/gcc-toolset-13/enable
|
||||||
|
elif [ "$FAMILY" == suse ]; then
|
||||||
|
mkdir -p "$RISCV"/gcc-13/bin
|
||||||
|
for f in gcc cpp g++ gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool lto-dump; do
|
||||||
|
ln -vsf /usr/bin/$f-13 "$RISCV"/gcc-13/bin/$f
|
||||||
|
done
|
||||||
|
export PATH="$RISCV"/gcc-13/bin:$PATH
|
||||||
elif (( UBUNTU_VERSION == 20 )); then
|
elif (( UBUNTU_VERSION == 20 )); then
|
||||||
mkdir -p "$RISCV"/gcc-10/bin
|
mkdir -p "$RISCV"/gcc-10/bin
|
||||||
for f in gcc cpp g++ gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool lto-dump; do
|
for f in gcc cpp g++ gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool lto-dump; do
|
||||||
@ -264,7 +270,7 @@ if (( RHEL_VERSION == 8 )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Mold needed for Verilator
|
# Mold needed for Verilator
|
||||||
if (( UBUNTU_VERSION == 20 || DEBIAN_VERSION == 11 )); then
|
if (( UBUNTU_VERSION == 20 || DEBIAN_VERSION == 11 )) || [ "$FAMILY" == suse ]; then
|
||||||
STATUS="mold"
|
STATUS="mold"
|
||||||
if [ ! -e "$RISCV"/bin/mold ]; then
|
if [ ! -e "$RISCV"/bin/mold ]; then
|
||||||
section_header "Installing mold"
|
section_header "Installing mold"
|
||||||
|
@ -77,6 +77,8 @@ fi
|
|||||||
# Use newer gcc version for older distros
|
# Use newer gcc version for older distros
|
||||||
if [ -e /opt/rh/gcc-toolset-13/enable ]; then
|
if [ -e /opt/rh/gcc-toolset-13/enable ]; then
|
||||||
source /opt/rh/gcc-toolset-13/enable # Red Hat Family
|
source /opt/rh/gcc-toolset-13/enable # Red Hat Family
|
||||||
|
elif [ -e $RISCV/gcc-13 ]; then
|
||||||
|
export PATH=$RISCV/gcc-13/bin:$PATH # SUSE Family
|
||||||
elif [ -e $RISCV/gcc-10 ]; then
|
elif [ -e $RISCV/gcc-10 ]; then
|
||||||
export PATH=$RISCV/gcc-10/bin:$PATH # Ubuntu 20.04 LTS
|
export PATH=$RISCV/gcc-10/bin:$PATH # Ubuntu 20.04 LTS
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user