-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (38 loc) · 2 KB
/
Dockerfile
File metadata and controls
48 lines (38 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:24.04
# Set to noninteractive mode
ARG DEBIAN_FRONTEND=noninteractive
ARG INSTALL_TOOLCHAIN=false
ARG INSTALL_EVAL_HD=false
ARG INSTALL_PROTEUS=false
ARG INSTALL_RISCV_FORMAL=false
RUN echo "Install RISC-V toolchain: ${INSTALL_TOOLCHAIN}"
RUN echo "Install EVAL-HD: ${INSTALL_EVAL_HD}"
RUN echo "Setup Proteus core: ${INSTALL_PROTEUS}"
RUN echo "Install riscv-formal: ${INSTALL_RISCV_FORMAL}"
################################################################################
# Basic dependencies
################################################################################
RUN apt-get update && apt-get -yqq install build-essential git openjdk-17-jdk verilator libz-dev python3-pip python3-venv gtkwave scons
WORKDIR /ecosystem
COPY ./benchmarks ./benchmarks
COPY ./cpu-interfaces ./cpu-interfaces
COPY ./formal-verification ./formal-verification
COPY ./functional-tests ./functional-tests
COPY ./install-scripts ./install-scripts
COPY ./newlib-bsp ./newlib-bsp
COPY ./noninterference-testing ./noninterference-testing
COPY ./simulation ./simulation
COPY ./synthesis ./synthesis
COPY ./waveform-analysis ./waveform-analysis
RUN ./install-scripts/sbt.sh
RUN ./install-scripts/python-modules.sh
WORKDIR /ecosystem
RUN if [ "${INSTALL_TOOLCHAIN}" = "true" ] ; then ./install-scripts/toolchain.sh ; else echo Skipping RISC-V toolchain, installing apt package...; apt-get -yqq install gcc-riscv64-unknown-elf ; fi
RUN if [ "${INSTALL_EVAL_HD}" = "true" ] ; then ./install-scripts/eval-hd.sh ; else echo Skipping EVAL-HD setup... ; fi
RUN if [ "${INSTALL_PROTEUS}" = "true" ] ; then ./install-scripts/proteus.sh ; else echo Skipping Proteus core setup... ; fi
RUN if [ "${INSTALL_RISCV_FORMAL}" = "true" ] ; then ./install-scripts/riscv-formal.sh ; else echo Skipping riscv-formal setup... ; fi
# add RISC-V toolchain to path if it was installed (https://stackoverflow.com/a/51264575)
ENV TOOLCHAIN_PATH=${INSTALL_TOOLCHAIN:+/opt/riscv/bin:}
ENV TOOLCHAIN_PATH=${TOOLCHAIN_PATH:-}
ENV PATH=${TOOLCHAIN_PATH}${PATH}
CMD ["/bin/bash"]