From 1e34a970684fbbd6743d85fa57f89bb4f8d087fa Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 10 Oct 2024 15:04:26 -0700 Subject: [PATCH 01/17] Temporarily remove matplotlib --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index 462898a60..5445ac69f 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -1,7 +1,7 @@ adjustText>=1.2 lief>=0.14.1 Markdown>=3.6 -matplotlib>=3.9.0 +#matplotlib>=3.9.0 PyYAML>=5.2 riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac riscof @ git+https://github.com/riscv/riscof.git From 3084fa9c371c13eb88b4b0280594d950585322a4 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 10 Oct 2024 15:13:42 -0700 Subject: [PATCH 02/17] Temporarily remove PyYAML from requirements.txt --- bin/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index 5445ac69f..a983b8ca4 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -1,8 +1,8 @@ adjustText>=1.2 lief>=0.14.1 Markdown>=3.6 -#matplotlib>=3.9.0 -PyYAML>=5.2 +# matplotlib>=3.9.0 +# PyYAML>=5.2 riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac riscof @ git+https://github.com/riscv/riscof.git riscv-config>=3.18.3 From 0f2dae0da11adb456f42367ef52d18ae540a85a7 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 10 Oct 2024 15:19:21 -0700 Subject: [PATCH 03/17] Temporarily remove sphinx from requirements.txt --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index a983b8ca4..b4280bacc 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -9,6 +9,6 @@ riscv-config>=3.18.3 riscv-isac>=0.18.0 scikit-learn>=1.5.0 scipy>=1.13.0 -Sphinx>=7.3.7 +# Sphinx>=7.3.7 sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From 3c88bb9771666f48709951005ad7f7e4c091ebea Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Thu, 10 Oct 2024 15:23:22 -0700 Subject: [PATCH 04/17] Temporarily remove sphinx-rtd-theme from requirements.txt --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index b4280bacc..d1a102d3a 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -10,5 +10,5 @@ riscv-isac>=0.18.0 scikit-learn>=1.5.0 scipy>=1.13.0 # Sphinx>=7.3.7 -sphinx-rtd-theme>=2.0.0 +# sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From 8f3d888da5258ab2a2e19838b2315124f5fb8d11 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Fri, 11 Oct 2024 16:04:32 -0700 Subject: [PATCH 05/17] Attempt to install riscof only --- bin/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index d1a102d3a..8cfad9c70 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -3,9 +3,9 @@ lief>=0.14.1 Markdown>=3.6 # matplotlib>=3.9.0 # PyYAML>=5.2 -riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac +# riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac riscof @ git+https://github.com/riscv/riscof.git -riscv-config>=3.18.3 +# riscv-config>=3.18.3 riscv-isac>=0.18.0 scikit-learn>=1.5.0 scipy>=1.13.0 From 5580bf2fb0914dd1537c0314453920594a0cdd57 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Fri, 11 Oct 2024 16:06:58 -0700 Subject: [PATCH 06/17] Attempt clone and install riscv-isac --- bin/wally-tool-chain-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 7d4dd206d..3cc774af3 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -176,6 +176,12 @@ pip install --upgrade pip && pip install -r "$dir"/requirements.txt source "$RISCV"/riscv-python/bin/activate # reload python virtual environment echo -e "${SUCCESS_COLOR}Python environment successfully configured!${ENDC}" +# Install riscv-isac +cd $RISCV +STATUS="riscv-isac" +git clone https://github.com/riscv-non-isa/riscv-arch-test +cd riscv-arch-test/riscv-isac +pip install . # 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 From 826b3775b61db0338094a637333b3c70d10497eb Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Fri, 11 Oct 2024 21:52:44 -0700 Subject: [PATCH 07/17] Add setuptools to pip --- bin/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/requirements.txt b/bin/requirements.txt index 8cfad9c70..22afbb775 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -4,6 +4,7 @@ Markdown>=3.6 # matplotlib>=3.9.0 # PyYAML>=5.2 # riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac +setuptools riscof @ git+https://github.com/riscv/riscof.git # riscv-config>=3.18.3 riscv-isac>=0.18.0 From 5f28ee5959239829e3f9309d7e44c488b14a0ecf Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 19:22:20 -0700 Subject: [PATCH 08/17] Test forked riscv-arch-test --- bin/requirements.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index 22afbb775..f50d507cb 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -1,15 +1,15 @@ adjustText>=1.2 lief>=0.14.1 Markdown>=3.6 -# matplotlib>=3.9.0 -# PyYAML>=5.2 -# riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac +matplotlib>=3.9.0 +PyYAML>=5.2 +riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=riscv-isac setuptools riscof @ git+https://github.com/riscv/riscof.git -# riscv-config>=3.18.3 +riscv-config>=3.18.3 riscv-isac>=0.18.0 scikit-learn>=1.5.0 scipy>=1.13.0 -# Sphinx>=7.3.7 -# sphinx-rtd-theme>=2.0.0 +Sphinx>=7.3.7 +sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From 20b157de628597bc141987bc5292e51e92a83e56 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 19:39:49 -0700 Subject: [PATCH 09/17] Remove manual riscv-isac installation --- bin/wally-tool-chain-install.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 3cc774af3..437023fb8 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -171,18 +171,11 @@ source "$RISCV"/riscv-python/bin/activate # activate python virtual environment # Install python packages, including RISCOF (https://github.com/riscv-software-src/riscof.git) # RISCOF is a RISC-V compliance test framework that is used to run the RISC-V Arch Tests. STATUS="python packages" -pip install --upgrade pip && pip install -r "$dir"/requirements.txt +pip install --upgrade pip && pip install --upgrade -r "$dir"/requirements.txt source "$RISCV"/riscv-python/bin/activate # reload python virtual environment echo -e "${SUCCESS_COLOR}Python environment successfully configured!${ENDC}" -# Install riscv-isac -cd $RISCV -STATUS="riscv-isac" -git clone https://github.com/riscv-non-isa/riscv-arch-test -cd riscv-arch-test/riscv-isac -pip install . - # 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 # Newer versin of glib required for QEMU. From 1076b9c179d709ff8b904afdf50c0fc5405233ff Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 19:44:16 -0700 Subject: [PATCH 10/17] Use python 3.11 for rhel 8 --- bin/wally-package-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/wally-package-install.sh b/bin/wally-package-install.sh index 725d3b201..94631ad6a 100755 --- a/bin/wally-package-install.sh +++ b/bin/wally-package-install.sh @@ -46,7 +46,12 @@ fi # Generate list of packages to install and package manager commands based on distro # Packages are grouped by which tool requires them. If multiple tools need a package, it is included in the first tool only if [ "$FAMILY" == rhel ]; then - PYTHON_VERSION=python3.12 + if (( RHEL_VERSION == 8 )); then + PYTHON_VERSION=python3.11 + elif (( RHEL_VERSION >= 9 )); then + PYTHON_VERSION=python3.12 + VERILATOR_PACKAGES+=(perl-doc) # Not availale in rhel8, nice for Verilator + fi PACKAGE_MANAGER="dnf" UPDATE_COMMAND="sudo $PACKAGE_MANAGER update -y" GENERAL_PACKAGES+=(which rsync git make cmake "$PYTHON_VERSION" "$PYTHON_VERSION"-pip curl wget tar pkgconf-pkg-config dialog mutt ssmtp) @@ -55,10 +60,6 @@ if [ "$FAMILY" == rhel ]; then SPIKE_PACKAGES+=(dtc boost-regex boost-system) VERILATOR_PACKAGES+=(help2man perl clang ccache gperftools numactl mold) BUILDROOT_PACKAGES+=(ncurses-base ncurses ncurses-libs ncurses-devel gcc-gfortran cpio) # 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 ]; then From ab1797753bbe6778bac35f0cdd9bc5fe86f80cf4 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 19:49:30 -0700 Subject: [PATCH 11/17] Revert "Use python 3.11 for rhel 8" This reverts commit d76cda4dd7613583d41a4bc4624a1915f490a583. --- bin/wally-package-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/wally-package-install.sh b/bin/wally-package-install.sh index 94631ad6a..725d3b201 100755 --- a/bin/wally-package-install.sh +++ b/bin/wally-package-install.sh @@ -46,12 +46,7 @@ fi # Generate list of packages to install and package manager commands based on distro # Packages are grouped by which tool requires them. If multiple tools need a package, it is included in the first tool only if [ "$FAMILY" == rhel ]; then - if (( RHEL_VERSION == 8 )); then - PYTHON_VERSION=python3.11 - elif (( RHEL_VERSION >= 9 )); then - PYTHON_VERSION=python3.12 - VERILATOR_PACKAGES+=(perl-doc) # Not availale in rhel8, nice for Verilator - fi + PYTHON_VERSION=python3.12 PACKAGE_MANAGER="dnf" UPDATE_COMMAND="sudo $PACKAGE_MANAGER update -y" GENERAL_PACKAGES+=(which rsync git make cmake "$PYTHON_VERSION" "$PYTHON_VERSION"-pip curl wget tar pkgconf-pkg-config dialog mutt ssmtp) @@ -60,6 +55,10 @@ if [ "$FAMILY" == rhel ]; then SPIKE_PACKAGES+=(dtc boost-regex boost-system) VERILATOR_PACKAGES+=(help2man perl clang ccache gperftools numactl mold) BUILDROOT_PACKAGES+=(ncurses-base ncurses ncurses-libs ncurses-devel gcc-gfortran cpio) # 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 ]; then From 1cb22fbe8a17be39dc30aeba8595bac4c2555c46 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 20:35:36 -0700 Subject: [PATCH 12/17] Fix duplicate riscv-isac --- bin/requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index f50d507cb..69c22216e 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -3,13 +3,12 @@ lief>=0.14.1 Markdown>=3.6 matplotlib>=3.9.0 PyYAML>=5.2 -riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=riscv-isac -setuptools riscof @ git+https://github.com/riscv/riscof.git riscv-config>=3.18.3 -riscv-isac>=0.18.0 +riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=riscv-isac scikit-learn>=1.5.0 scipy>=1.13.0 +setuptools Sphinx>=7.3.7 sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From 0cb1ac70f64a0f68c8944ccafd318336d7c8ceee Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 21:01:15 -0700 Subject: [PATCH 13/17] Limit Sphinx version --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index 69c22216e..b29b34507 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -9,6 +9,6 @@ riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=r scikit-learn>=1.5.0 scipy>=1.13.0 setuptools -Sphinx>=7.3.7 +Sphinx>=7.3.7, ~=7 # QEMU fails to build with Sphinx 8 sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From 48ee8b0a184613fd330740e30e1721ecae2ce2c2 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 21:07:06 -0700 Subject: [PATCH 14/17] Fix sphinx version format --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index b29b34507..10466f601 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -9,6 +9,6 @@ riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=r scikit-learn>=1.5.0 scipy>=1.13.0 setuptools -Sphinx>=7.3.7, ~=7 # QEMU fails to build with Sphinx 8 +Sphinx>=7.3.7; ~=7 # QEMU fails to build with Sphinx 8 sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From 77eb250ef66effffc81b3016af342b9efd495d76 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 21:14:12 -0700 Subject: [PATCH 15/17] Fix sphinx version format --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index 10466f601..e5701f08e 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -9,6 +9,6 @@ riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=r scikit-learn>=1.5.0 scipy>=1.13.0 setuptools -Sphinx>=7.3.7; ~=7 # QEMU fails to build with Sphinx 8 +Sphinx~=7.3.7 # QEMU fails to build with Sphinx 8 sphinx-rtd-theme>=2.0.0 testresources>=2.0.1 From dc98f29ffaa90842a5495d563e53101a5e0329dd Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sun, 13 Oct 2024 23:26:51 -0700 Subject: [PATCH 16/17] Add --no-buildroot option to installation script --- bin/wally-tool-chain-install.sh | 44 ++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 437023fb8..fdb9d6e4f 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -77,11 +77,17 @@ trap error ERR # run error handler on error STATUS="setup" # keep track of what part of the installation is running for error messages # Check for clean flag -if [ "$1" == "--clean" ]; then +if [ "$1" == "--clean" ] || [ "$2" == "--clean" ]; then clean=true shift fi +# Check for clean flag +if [ "$1" == "--no-buildroot" ] || [ "$2" == "--no-buildroot" ]; then + no_buidroot=true + shift +fi + # Determine script directory to locate related scripts dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -391,23 +397,27 @@ fi # Buildroot and Linux testvectors # Buildroot is used to boot a minimal versio of Linux on Wally. # Testvectors are generated using QEMU. -section_header "Installing Buildroot and Creating Linux testvectors" -STATUS="buildroot" -if [ -z "$LD_LIBRARY_PATH" ]; then - export LD_LIBRARY_PATH=$RISCV/lib:$RISCV/lib64:$RISCV/riscv64-unknown-elf/lib:$RISCV/lib/x86_64-linux-gnu/ +if [ ! "$no_buidroot" ]; then + section_header "Installing Buildroot and Creating Linux testvectors" + STATUS="buildroot" + if [ -z "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH=$RISCV/lib:$RISCV/lib64:$RISCV/riscv64-unknown-elf/lib:$RISCV/lib/x86_64-linux-gnu/ + else + export LD_LIBRARY_PATH=$RISCV/lib:$RISCV/lib64:$LD_LIBRARY_PATH:$RISCV/riscv64-unknown-elf/lib:$RISCV/lib/x86_64-linux-gnu/ + fi + cd "$dir"/../linux + if [ ! -e "$RISCV"/buildroot ]; then + make 2>&1 | logger $STATUS; [ "${PIPESTATUS[0]}" == 0 ] + echo -e "${SUCCESS_COLOR}Buildroot successfully installed and Linux testvectors created!${ENDC}" + elif [ ! -e "$RISCV"/linux-testvectors ]; then + echo -e "${OK_COLOR}Buildroot already exists, but Linux testvectors are missing. Generating them now.${ENDC}" + make dumptvs 2>&1 | logger $STATUS; [ "${PIPESTATUS[0]}" == 0 ] + echo -e "${SUCCESS_COLOR}Linux testvectors successfully generated!${ENDC}" + else + echo -e "${OK_COLOR}Buildroot and Linux testvectors already exist.${ENDC}" + fi else - export LD_LIBRARY_PATH=$RISCV/lib:$RISCV/lib64:$LD_LIBRARY_PATH:$RISCV/riscv64-unknown-elf/lib:$RISCV/lib/x86_64-linux-gnu/ -fi -cd "$dir"/../linux -if [ ! -e "$RISCV"/buildroot ]; then - make 2>&1 | logger $STATUS; [ "${PIPESTATUS[0]}" == 0 ] - echo -e "${SUCCESS_COLOR}Buildroot successfully installed and Linux testvectors created!${ENDC}" -elif [ ! -e "$RISCV"/linux-testvectors ]; then - echo -e "${OK_COLOR}Buildroot already exists, but Linux testvectors are missing. Generating them now.${ENDC}" - make dumptvs 2>&1 | logger $STATUS; [ "${PIPESTATUS[0]}" == 0 ] - echo -e "${SUCCESS_COLOR}Linux testvectors successfully generated!${ENDC}" -else - echo -e "${OK_COLOR}Buildroot and Linux testvectors already exist.${ENDC}" + echo -e "${OK_COLOR}Skipping Buildroot and Linux testvectors.${ENDC}" fi From b8d50fd6217ea513ceae970408bb9a390ad18fa3 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Mon, 14 Oct 2024 00:42:47 -0700 Subject: [PATCH 17/17] Switch back to standard riscv-arch-test repo --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index e5701f08e..d55bf7eda 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -5,7 +5,7 @@ matplotlib>=3.9.0 PyYAML>=5.2 riscof @ git+https://github.com/riscv/riscof.git riscv-config>=3.18.3 -riscv-isac @ git+https://github.com/jordancarlin/riscv-arch-test/#subdirectory=riscv-isac +riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac scikit-learn>=1.5.0 scipy>=1.13.0 setuptools