Skip to content

Commit

Permalink
spike-dasm: Add to Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Sep 29, 2023
1 parent 246f142 commit 8923047
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
[submodule "sw/deps/riscv-isa-sim"]
path = sw/deps/riscv-isa-sim
url = https://github.com/pulp-platform/riscv-isa-sim.git
branch = GiannaP-snitch
branch = snitch
6 changes: 2 additions & 4 deletions docs/ug/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git clone https://github.com/pulp-platform/{{ repo }}.git --recurse-submodules

If you had already cloned the repository without the `--recurse-submodules` flag, clone its submodules:
```shell
git submodule init --recursive
git submodule update --init --recursive
```

## Tools and environment
Expand Down Expand Up @@ -57,16 +57,14 @@ export LLVM_BINROOT="/usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin"
# As a temporary workaround (until correct tool versions are installed system-wide):
export PATH=/usr/scratch/dachstein/colluca/opt/verible/bin:$PATH

# Install spike for spike-dasm (submodule of the repository)
# Install spike-dasm
cd sw/deps/riscv-isa-sim
autoconf
mkdir build
cd build
../configure
make
export PATH=$(pwd):$PATH
# or use temporary:
# export PATH=/home/colluca/snitch/bin:$PATH
```

Add these commands to your shell startup file (e.g. `~/.bashrc` if you use bash as the default shell) to ensure that the environment is set up correctly every time you open a new shell.
Expand Down
13 changes: 12 additions & 1 deletion util/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN apt-get update && \
software-properties-common \
unzip \
wget \
zlib1g-dev
zlib1g-dev \
autoconf

# Build Rust tools
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Expand Down Expand Up @@ -51,6 +52,14 @@ RUN rustup override set 1.63.0
RUN git clone https://github.com/pulp-platform/banshee.git /tmp/banshee --recurse-submodules
RUN cargo install --path /tmp/banshee

# Install `spike-dasm`
RUN git clone https://github.com/pulp-platform/riscv-isa-sim.git
WORKDIR /tools/riscv-isa-sim
RUN git checkout snitch
RUN autoconf
RUN mkdir build
RUN cd build && ../configure && make

# 2. Stage
FROM ubuntu:18.04 AS snitch_cluster
ARG SNITCH_LLVM_VERSION=latest
Expand Down Expand Up @@ -119,6 +128,8 @@ RUN apt-get update && apt-get install software-properties-common -y && \
# Copy artifacts from stage 1.
COPY --from=builder /root/.cargo/bin/bender bin/
COPY --from=builder /root/.cargo/bin/banshee bin/
COPY --from=builder /root/.cargo/bin/banshee bin/
COPY --from=builder /tools/riscv-isa-sim/build/spike-dasm bin/

# Set locale to UTF-8, required because Python 3.6 defaults on ASCII encoding.
# See https://click.palletsprojects.com/en/8.1.x/unicode-support/
Expand Down

0 comments on commit 8923047

Please sign in to comment.