113 lines
No EOL
3.5 KiB
Docker
113 lines
No EOL
3.5 KiB
Docker
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
# See Notices.txt for copyright information
|
|
|
|
# base on node so it can be used for forgejo actions
|
|
FROM node:21-bookworm
|
|
RUN apt-get -qq update && apt-get -qq install \
|
|
bison \
|
|
build-essential \
|
|
ccache \
|
|
clang \
|
|
cmake \
|
|
curl \
|
|
cvc5 \
|
|
default-jre-headless \
|
|
flex \
|
|
g++ \
|
|
gawk \
|
|
git \
|
|
libantlr4-runtime-dev \
|
|
libboost-filesystem-dev \
|
|
libboost-iostreams-dev \
|
|
libboost-program-options-dev \
|
|
libboost-python-dev \
|
|
libboost-system-dev \
|
|
libboost-thread-dev \
|
|
libeigen3-dev \
|
|
libffi-dev \
|
|
libreadline-dev \
|
|
lld \
|
|
openfpgaloader \
|
|
pkg-config \
|
|
python3 \
|
|
python3-click \
|
|
python3-venv \
|
|
tcl-dev \
|
|
uuid-dev \
|
|
wget \
|
|
zlib1g-dev
|
|
|
|
RUN python3 -m venv /opt/fayalite-deps/venv
|
|
ENV VIRTUAL_ENV=/opt/fayalite-deps/venv PATH=/opt/fayalite-deps/venv/bin:$PATH
|
|
|
|
RUN git clone --depth=1 --recursive --branch=0.45 https://git.libre-chip.org/mirrors/yosys /build/yosys \
|
|
&& cd /build/yosys \
|
|
&& make -j"$(nproc)" \
|
|
&& make install \
|
|
&& rm -rf /build
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0 \
|
|
&& . "$HOME/.cargo/env" \
|
|
&& rustup component add rust-src
|
|
ENV PATH=/root/.cargo/bin:$PATH
|
|
|
|
RUN pip install click==8.1.3 && rm -rf ~/.cache
|
|
|
|
RUN git clone https://github.com/SymbiFlow/prjxray.git /build/prjxray \
|
|
&& cd /build/prjxray \
|
|
&& git checkout c9f02d8576042325425824647ab5555b1bc77833 \
|
|
&& git submodule update --init --recursive \
|
|
&& mkdir -p build \
|
|
&& cd build \
|
|
&& cmake .. \
|
|
&& make -j$(nproc) \
|
|
&& make install \
|
|
&& cd .. \
|
|
&& sed -i 's/-e //' requirements.txt \
|
|
&& pip install -r requirements.txt \
|
|
&& rm -rf /build ~/.cache
|
|
|
|
RUN git clone https://github.com/openXC7/prjxray-db.git /opt/fayalite-deps/prjxray-db \
|
|
&& cd /opt/fayalite-deps/prjxray-db \
|
|
&& git checkout 381966a746cb4cf4a7f854f0e53caa3bf74fbe62 \
|
|
&& rm -rf .git
|
|
|
|
RUN git clone https://github.com/chipsalliance/f4pga-xc-fasm.git /build/f4pga-xc-fasm \
|
|
&& cd /build/f4pga-xc-fasm \
|
|
&& git checkout 25dc605c9c0896204f0c3425b52a332034cf5e5c \
|
|
&& pip install . \
|
|
&& rm -rf /build ~/.cache
|
|
|
|
RUN git clone https://github.com/openXC7/nextpnr-xilinx.git /build/nextpnr-xilinx \
|
|
&& cd /build/nextpnr-xilinx \
|
|
&& git checkout 724db28b41e68568690a5ea1dd9ce5082362bb91 \
|
|
&& git submodule update --init --recursive \
|
|
&& mkdir -p build \
|
|
&& cd build \
|
|
&& cmake -DARCH=xilinx -DUSE_OPENMP=ON -DBUILD_GUI=OFF .. \
|
|
&& make -j$(nproc) \
|
|
&& make install \
|
|
&& install bbasm /usr/local/bin/ \
|
|
&& rm -rf /build
|
|
|
|
RUN mkdir -p /build \
|
|
&& cd /build \
|
|
&& wget -O firrtl.tar.gz https://github.com/llvm/circt/releases/download/firtool-1.86.0/firrtl-bin-linux-x64.tar.gz \
|
|
&& echo 'bf6f4ab18ae76f135c944efbd81e25391c31c1bd0617c58ab0592640abefee14 firrtl.tar.gz' > expected-hashes \
|
|
&& sha256sum -c expected-hashes \
|
|
&& tar -xvaf firrtl.tar.gz \
|
|
&& install firtool-1.86.0/bin/firtool /usr/local/bin/ \
|
|
&& rm -rf /build
|
|
|
|
RUN git clone --depth=1 --branch=yosys-0.45 https://git.libre-chip.org/mirrors/sby /build/sby \
|
|
&& cd /build/sby \
|
|
&& make install \
|
|
&& rm -rf /build
|
|
|
|
RUN git clone --depth=1 --recursive --branch=z3-4.13.3 https://git.libre-chip.org/mirrors/z3 /build/z3 \
|
|
&& cd /build/z3 \
|
|
&& PYTHON=python3 ./configure --prefix=/usr/local \
|
|
&& cd build \
|
|
&& make -j"$(nproc)" \
|
|
&& make install \
|
|
&& rm -rf /build |