From 63d015f0b6c0ebd5fd03673ab17c796d869aae08 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Thu, 11 Apr 2024 15:19:23 +0100 Subject: [PATCH] [docker] use CI verilator build in docker instead of custom apt source --- container/Dockerfile | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 4c1ec208..d5a6bd40 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -22,31 +22,12 @@ LABEL description="Ibex Demo System Container." # Use bash as default shell. RUN ln -sf /bin/bash /bin/sh -# Add OBS repository to apt sources. -RUN OBS_URL="https://download.opensuse.org/repositories"; \ - OBS_PATH="/home:/phiwag:/edatools/xUbuntu_20.04"; \ - REPO_URL="${OBS_URL}${OBS_PATH}"; \ - \ - EDATOOLS_REPO_KEY="${REPO_URL}/Release.key"; \ - EDATOOLS_REPO="deb ${REPO_URL}/ /"; \ - \ - apt-get update && \ - apt-get install -y curl && \ - \ - curl -f -sL -o "$TMPDIR/obs.asc" "$EDATOOLS_REPO_KEY" || { \ - error "Failed to download repository key from ${REPO_URL}"; \ - } && \ - echo "$EDATOOLS_REPO" > "$TMPDIR/obs.list" && \ - mv "$TMPDIR/obs.asc" /etc/apt/trusted.gpg.d/obs.asc && \ - mv "$TMPDIR/obs.list" /etc/apt/sources.list.d/edatools.list - # Necessary to avoid user interaction with tzdata during install ARG DEBIAN_FRONTEND=noninteractive ENV TZ=UTC COPY container/apt-requirements.txt /tmp/apt-requirements.txt -RUN echo "verilator-${VERILATOR_VERSION}" >> /tmp/apt-requirements.txt \ - && sed -i -e '/^$/d' -e '/^#/D' -e 's/#.*//' /tmp/apt-requirements.txt \ +RUN sed -i -e '/^$/d' -e '/^#/D' -e 's/#.*//' /tmp/apt-requirements.txt \ && apt-get update \ && xargs apt-get install -y < /tmp/apt-requirements.txt \ && apt-get clean; \ @@ -58,6 +39,11 @@ RUN /tmp/get-toolchain.py -r ${RISCV_TOOLCHAIN_RELEASE_TAG} \ && rm -f /tmp/get-toolchain.py ENV PATH "/tools/riscv/bin:${PATH}" +# Install verilator prebuild binary +RUN mkdir -p /tools/verilator \ + && curl -sSfL https://storage.googleapis.com/verilator-builds/verilator-v${VERILATOR_VERSION}.tar.gz | tar -C /tools/verilator -xvzf - +ENV PATH "/tools/verilator/v${VERILATOR_VERSION}/bin:${PATH}" + # Install Verible RUN curl -f -Ls -o verible.tar.gz \ https://github.com/chipsalliance/verible/releases/download/${VERIBLE_VERSION}/verible-${VERIBLE_VERSION}-Ubuntu-18.04-bionic-x86_64.tar.gz \