diff --git a/bin/docker.sh b/bin/docker.sh new file mode 100644 index 000000000..3b827398c --- /dev/null +++ b/bin/docker.sh @@ -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 + \ No newline at end of file diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 2dfc751e8..af3789564 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -46,7 +46,7 @@ sudo mkdir -p $RISCV # Update and Upgrade tools (see https://itsfoss.com/apt-update-vs-upgrade/) sudo apt update -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. 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) # To install GCC from source can take hours to compile. # 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. -# Note that GCC12.2 has binutils 2.39, which has a known performance bug that causes -# objdump to run 100x slower than in previous versions, causing riscof to make versy slowly. -# However GCC12.x is needed for bit manipulation instructions. There is an open issue to fix this: -# https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1188 - +# This book is tested with GCC 13.2.0 +# Versions newer than 2023-12-20 fail to compile the RISC-V arch test with an error: +# cvw/addins/riscv-arch-test/riscv-test-suite/rv32i_m/I/src/jalr-01.S:72: Error: illegal operands `la x0,5b' +# PR *** submitted to fix riscv-arch-test to be compatible with latest GCC by modifying test_macros.h for TEST_JALR_OP cd $RISCV git clone https://github.com/riscv/riscv-gnu-toolchain cd riscv-gnu-toolchain @@ -99,7 +97,7 @@ make install # 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 -#with the GCC installation. After the build, we need to change two Makefiles to support atomic instructions. +# with the GCC installation. cd $RISCV git clone https://github.com/riscv-software-src/riscv-isa-sim mkdir -p riscv-isa-sim/build @@ -107,10 +105,7 @@ cd riscv-isa-sim/build ../configure --prefix=$RISCV make -j ${NUM_THREADS} 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. # Verilator needs to be built from scratch to get the latest version