Skip to content

Commit

Permalink
Add gvsoc to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
lukamac committed Dec 26, 2024
1 parent d9c771c commit e80c34b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
11 changes: 11 additions & 0 deletions test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ ENV PULP_RISCV_GCC_TOOLCHAIN=${TOOLCHAIN_GNU_INSTALL_DIR}
COPY docker/get_pulp_sdk.sh ./
RUN ./get_pulp_sdk.sh

# Build gvsoc
COPY docker/clone_and_build_gvsoc.sh ./
RUN ./clone_and_build_gvsoc.sh


# Minimal image
FROM ubuntu:22.04
Expand Down Expand Up @@ -88,3 +92,10 @@ ENV PULP_RISCV_GCC_TOOLCHAIN=${TOOLCHAIN_GNU_INSTALL_DIR}

COPY --from=builder ${TOOLCHAIN_GNU_INSTALL_DIR} ${TOOLCHAIN_GNU_INSTALL_DIR}
COPY --from=builder /pulp-sdk /pulp-sdk
COPY --from=builder /gvsoc/install /gvsoc

ENV TOOLCHAIN_GNU_INSTALL_DIR=${TOOLCHAIN_GNU_INSTALL_DIR}
ENV GVSOC="/gvsoc/bin/gvsoc"

COPY docker/requirements-run-gvsoc.txt ./
RUN pip3 install --no-cache-dir -r requirements-run-gvsoc.txt
2 changes: 1 addition & 1 deletion test/docker/build_riscv_gnu_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ set -euo pipefail
mkdir -p $TOOLCHAIN_GNU_INSTALL_DIR
cd riscv-gnu-toolchain
./configure --prefix=$TOOLCHAIN_GNU_INSTALL_DIR --with-arch=rv32imfcxpulpv3 --with-abi=ilp32 --enable-multilib
make
make -j 8
9 changes: 9 additions & 0 deletions test/docker/clone_and_build_gvsoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -euo pipefail

git clone https://github.com/lukamac/gvsoc.git \
--depth=1 --branch=fix-vectorload --recurse-submodules --shallow-submodules
cd gvsoc
pip3 install --no-cache-dir -r requirements.txt -r gapy/requirements.txt -r core/requirements.txt
make all TARGETS=siracusa
3 changes: 3 additions & 0 deletions test/docker/requirements-run-gvsoc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
prettytable
rich
pexpect

0 comments on commit e80c34b

Please sign in to comment.