risc-v-tlm/Dockerfile

56 lines
1.6 KiB
Docker
Raw Permalink Normal View History

2019-02-03 19:05:06 +08:00
FROM ubuntu:bionic
2019-02-12 03:26:23 +08:00
LABEL maintainer="Màrius Montón"
2019-02-03 19:05:06 +08:00
ENV SYSTEMC_VERSION 2.3.3
RUN apt-get update -q && apt-get install -qy gcc-riscv64-linux-gnu
RUN apt-get update -q && apt-get install -qy --no-install-recommends \
build-essential curl \
cmake \
git \
openssh-client \
wget \
g++-8 \
2019-09-08 21:39:32 +08:00
xterm \
2021-12-08 20:00:53 +08:00
libboost-all-dev libspdlog-dev \
2019-02-18 20:57:02 +08:00
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
2019-02-03 19:05:06 +08:00
2021-12-08 20:00:53 +08:00
RUN mkdir -p /usr/src/riscv64 \
2019-02-03 19:05:06 +08:00
&& wget --no-check-certificate https://accellera.org/images/downloads/standards/systemc/systemc-$SYSTEMC_VERSION.tar.gz \
2021-12-08 20:00:53 +08:00
&& tar fzxC systemc-$SYSTEMC_VERSION.tar.gz /usr/src/riscv64 \
&& cd /usr/src/riscv64/systemc-$SYSTEMC_VERSION \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_CXX_STANDARD=17 \
2019-02-03 19:05:06 +08:00
&& make \
&& make install \
2022-09-19 20:53:22 +08:00
&& cd /
2019-02-03 19:05:06 +08:00
2022-09-19 21:02:13 +08:00
#RUN rm -r /root/.ssh
2022-09-20 04:24:16 +08:00
RUN mkdir -p /root/.ssh
2019-02-03 19:05:06 +08:00
RUN ssh-keyscan github.com > /root/.ssh/known_hosts
2021-12-08 20:00:53 +08:00
RUN git config --global http.sslBackend "openssl"
RUN cd /usr/src/riscv64 \
&& git config --global http.sslVerify false \
&& git clone https://github.com/gabime/spdlog.git \
&& cd spdlog \
&& cmake -H. -B_builds -DCMAKE_BUILD_TYPE=Release \
&& cmake --build _builds --config Release \
&& cmake -H. -B_builds -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release \
&& cmake --build _builds --target install
RUN cd /usr/src/riscv64 \
&& chmod -R a+rw . \
&& git config --global http.sslVerify false \
&& git clone https://github.com/mariusmm/RISC-V-TLM.git \
&& cd RISC-V-TLM \
&& mkdir build \
&& cd build \
&& chmod a+rw . \
&& cmake .. \
&& make
WORKDIR /usr/src/riscv64