Files
gowin-toolchain/Dockerfile

52 lines
1.2 KiB
Docker

FROM debian:bookworm-slim
# Install dependencies
RUN apt update
RUN apt install -y \
wget \
tar \
bash \
libgl1 \
libnss3 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libxtst6 \
libfreetype6 \
libfontconfig1 \
libxkbcommon0 \
libdbus-1-3 \
libasound2 \
libgssapi-krb5-2 \
libglib2.0-0 \
zip \
kmod \
libhidapi-libusb0 \
libftdi1-2
# Install Gowin IDE
RUN wget "https://cdn.gowinsemi.com.cn/Gowin_V1.9.11.03_Education_Linux.tar.gz" -O gowin.tar.gz
RUN tar -xvzf gowin.tar.gz
RUN rm -f IDE/lib/libfreetype.so.6
RUN rm -f gowin.tar.gz
# Install sv2vv
RUN wget "https://github.com/zachjs/sv2v/releases/download/v0.0.13/sv2v-Linux.zip" -O sv2v.zip
RUN unzip sv2v.zip
RUN mv sv2v-Linux/sv2v /usr/bin
RUN rm sv2v.zip
# Install openFPGALoader
RUN wget "https://github.com/trabucayre/openFPGALoader/releases/download/v1.1.1/ubtuntu22.04-openFPGALoader.tgz" -O loader.tar.gz
RUN tar -xvzf loader.tar.gz -C /
# Setup path for IDE, and QT_QPA_PLATFORM fix
RUN echo "export QT_QPA_PLATFORM=offscreen" >> ~/.bashrc
RUN echo "export PATH=/IDE/bin:$PATH" >> ~/.bashrc
# Workdir
RUN mkdir work
WORKDIR /work
ENTRYPOINT ["/bin/bash", "-l", "-c"]