Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker] use CI verilator build in docker instead of custom apt source #106

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand All @@ -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 \
Expand Down
Loading