mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 17:55:19 +00:00
Updated tool chain installation instructions and added a script for docker installation
This commit is contained in:
parent
2d60b48db4
commit
5e53aa4de7
25
bin/docker.sh
Normal file
25
bin/docker.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# script to install docker
|
||||||
|
# based on https://docs.docker.com/engine/install/ubuntu/
|
||||||
|
# from Kunlin Han, entered by David Harris
|
||||||
|
|
||||||
|
# Add Docker's official GPG key:
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install ca-certificates curl
|
||||||
|
sudo install -m 0755 -d /etc/apt/keyrings
|
||||||
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
|
|
||||||
|
# Add the repository to Apt sources:
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||||
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
|
||||||
|
# verify
|
||||||
|
sudo docker run hello-world
|
||||||
|
|
||||||
|
# install podman
|
||||||
|
sudo apt-get -y install podman
|
||||||
|
|
@ -46,7 +46,7 @@ sudo mkdir -p $RISCV
|
|||||||
# Update and Upgrade tools (see https://itsfoss.com/apt-update-vs-upgrade/)
|
# Update and Upgrade tools (see https://itsfoss.com/apt-update-vs-upgrade/)
|
||||||
sudo apt update -y
|
sudo apt update -y
|
||||||
sudo apt upgrade -y
|
sudo apt upgrade -y
|
||||||
sudo apt install -y git gawk make texinfo bison flex build-essential python3 libz-dev libexpat-dev autoconf device-tree-compiler ninja-build libpixman-1-dev ncurses-base ncurses-bin libncurses5-dev dialog curl wget ftp libgmp-dev libglib2.0-dev python3-pip pkg-config opam z3 zlib1g-dev automake autotools-dev libmpc-dev libmpfr-dev gperf libtool patchutils bc
|
sudo apt install -y git gawk make texinfo bison flex build-essential python3 libz-dev libexpat-dev autoconf device-tree-compiler ninja-build libpixman-1-dev ncurses-base ncurses-bin libncurses5-dev dialog curl wget ftp libgmp-dev libglib2.0-dev python3-pip pkg-config opam z3 zlib1g-dev automake autotools-dev libmpc-dev libmpfr-dev gperf libtool patchutils bc mutt
|
||||||
# Other python libraries used through the book.
|
# Other python libraries used through the book.
|
||||||
sudo pip3 install sphinx sphinx_rtd_theme matplotlib scipy scikit-learn adjustText lief markdown
|
sudo pip3 install sphinx sphinx_rtd_theme matplotlib scipy scikit-learn adjustText lief markdown
|
||||||
|
|
||||||
@ -60,12 +60,10 @@ fi
|
|||||||
# gcc cross-compiler (https://github.com/riscv-collab/riscv-gnu-toolchain)
|
# gcc cross-compiler (https://github.com/riscv-collab/riscv-gnu-toolchain)
|
||||||
# To install GCC from source can take hours to compile.
|
# To install GCC from source can take hours to compile.
|
||||||
# This configuration enables multilib to target many flavors of RISC-V.
|
# This configuration enables multilib to target many flavors of RISC-V.
|
||||||
# This book is tested with GCC 12.2 (tagged 2023.01.31), but will likely work with newer versions as well.
|
# This book is tested with GCC 13.2.0
|
||||||
# Note that GCC12.2 has binutils 2.39, which has a known performance bug that causes
|
# Versions newer than 2023-12-20 fail to compile the RISC-V arch test with an error:
|
||||||
# objdump to run 100x slower than in previous versions, causing riscof to make versy slowly.
|
# cvw/addins/riscv-arch-test/riscv-test-suite/rv32i_m/I/src/jalr-01.S:72: Error: illegal operands `la x0,5b'
|
||||||
# However GCC12.x is needed for bit manipulation instructions. There is an open issue to fix this:
|
# PR *** submitted to fix riscv-arch-test to be compatible with latest GCC by modifying test_macros.h for TEST_JALR_OP
|
||||||
# https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1188
|
|
||||||
|
|
||||||
cd $RISCV
|
cd $RISCV
|
||||||
git clone https://github.com/riscv/riscv-gnu-toolchain
|
git clone https://github.com/riscv/riscv-gnu-toolchain
|
||||||
cd riscv-gnu-toolchain
|
cd riscv-gnu-toolchain
|
||||||
@ -99,7 +97,7 @@ make install
|
|||||||
|
|
||||||
# Spike (https://github.com/riscv-software-src/riscv-isa-sim)
|
# Spike (https://github.com/riscv-software-src/riscv-isa-sim)
|
||||||
# Spike also takes a while to install and compile, but this can be done concurrently
|
# Spike also takes a while to install and compile, but this can be done concurrently
|
||||||
#with the GCC installation. After the build, we need to change two Makefiles to support atomic instructions.
|
# with the GCC installation.
|
||||||
cd $RISCV
|
cd $RISCV
|
||||||
git clone https://github.com/riscv-software-src/riscv-isa-sim
|
git clone https://github.com/riscv-software-src/riscv-isa-sim
|
||||||
mkdir -p riscv-isa-sim/build
|
mkdir -p riscv-isa-sim/build
|
||||||
@ -107,10 +105,7 @@ cd riscv-isa-sim/build
|
|||||||
../configure --prefix=$RISCV
|
../configure --prefix=$RISCV
|
||||||
make -j ${NUM_THREADS}
|
make -j ${NUM_THREADS}
|
||||||
make install
|
make install
|
||||||
cd ../arch_test_target/spike/device
|
|
||||||
# dh 2/5/24: these should be obsolete
|
|
||||||
#sed -i 's/--isa=rv32ic/--isa=rv32iac/' rv32i_m/privilege/Makefile.include
|
|
||||||
#sed -i 's/--isa=rv64ic/--isa=rv64iac/' rv64i_m/privilege/Makefile.include
|
|
||||||
|
|
||||||
# Wally needs Verilator 5.021 or later.
|
# Wally needs Verilator 5.021 or later.
|
||||||
# Verilator needs to be built from scratch to get the latest version
|
# Verilator needs to be built from scratch to get the latest version
|
||||||
|
Loading…
Reference in New Issue
Block a user