2023-12-07 12:06:11 -05:00
|
|
|
FROM docker.io/library/ubuntu:23.10 as base
|
2022-09-19 09:45:48 -04:00
|
|
|
|
|
|
|
RUN apt-get -qq update -y \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
bison \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
clang \
|
2023-02-02 15:27:21 -05:00
|
|
|
clang-format \
|
2022-09-19 09:45:48 -04:00
|
|
|
cmake \
|
|
|
|
flex \
|
|
|
|
gawk \
|
|
|
|
git \
|
|
|
|
golang \
|
|
|
|
graphviz \
|
2024-03-18 06:37:15 -04:00
|
|
|
iverilog \
|
2022-09-19 09:45:48 -04:00
|
|
|
less \
|
|
|
|
libboost-dev \
|
|
|
|
libboost-filesystem-dev \
|
|
|
|
libboost-iostreams-dev \
|
|
|
|
libboost-program-options-dev \
|
|
|
|
libboost-thread-dev \
|
|
|
|
libeigen3-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libftdi-dev \
|
2022-09-29 09:24:21 -04:00
|
|
|
libglib2.0-dev \
|
2023-02-16 10:12:30 -05:00
|
|
|
libusb-1.0-0-dev \
|
2022-09-29 09:24:21 -04:00
|
|
|
libpixman-1-dev \
|
2022-09-19 09:45:48 -04:00
|
|
|
libreadline-dev \
|
|
|
|
lld \
|
|
|
|
llvm \
|
|
|
|
mercurial \
|
|
|
|
nano \
|
2022-09-29 09:24:21 -04:00
|
|
|
ninja-build \
|
2022-09-19 09:45:48 -04:00
|
|
|
pkg-config \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
tcl-dev \
|
|
|
|
verilator \
|
|
|
|
vim \
|
|
|
|
xdot \
|
2023-01-11 10:33:01 -05:00
|
|
|
sdcc \
|
2023-03-08 10:39:35 -05:00
|
|
|
cmake \
|
|
|
|
gcc-arm-none-eabi \
|
|
|
|
libnewlib-arm-none-eabi \
|
2023-03-08 11:28:58 -05:00
|
|
|
libstdc++-arm-none-eabi-newlib \
|
2022-09-19 09:45:48 -04:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2022-09-20 09:45:24 -04:00
|
|
|
|
2023-02-02 15:27:21 -05:00
|
|
|
FROM base as toolsbuilder
|
2022-09-20 09:45:24 -04:00
|
|
|
|
2023-03-02 05:06:18 -05:00
|
|
|
RUN git clone https://github.com/YosysHQ/icestorm /src
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /src
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN git checkout d20a5e9001f46262bf0cef220f1a6943946e421d \
|
2023-03-02 05:06:18 -05:00
|
|
|
&& make -j$(nproc --ignore=2) \
|
2022-09-19 09:45:48 -04:00
|
|
|
&& make install
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN git >/usr/local/repo-commit-icestorm describe --all --always --long --dirty
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /
|
|
|
|
RUN rm -rf /src
|
|
|
|
|
2022-09-20 01:28:45 -04:00
|
|
|
# Custom iceprog for the RPi 2040-based programmer (will be upstreamed).
|
2023-03-08 11:28:58 -05:00
|
|
|
RUN git clone -b interfaces --depth=1 https://github.com/tillitis/icestorm /src
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /src/iceprog
|
|
|
|
RUN make -j$(nproc --ignore=2) \
|
|
|
|
&& make PROGRAM_PREFIX=tillitis- install
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN git >/usr/local/repo-commit-tillitis--icestorm describe --all --always --long --dirty
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /
|
|
|
|
RUN rm -rf /src
|
|
|
|
|
2023-12-07 12:06:11 -05:00
|
|
|
RUN git clone -b yosys-0.36 --depth=1 https://github.com/YosysHQ/yosys /src
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /src
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN make -j$(nproc --ignore=2) \
|
2022-09-19 09:45:48 -04:00
|
|
|
&& make install
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN git >/usr/local/repo-commit-yosys describe --all --always --long --dirty
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /
|
|
|
|
RUN rm -rf /src
|
|
|
|
|
2023-12-07 12:06:11 -05:00
|
|
|
RUN git clone -b nextpnr-0.6 --depth=1 https://github.com/YosysHQ/nextpnr /src
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /src
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . \
|
2022-09-19 09:45:48 -04:00
|
|
|
&& make -j$(nproc --ignore=2) \
|
|
|
|
&& make install
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN git >/usr/local/repo-commit-nextpnr describe --all --always --long --dirty
|
2022-09-19 09:45:48 -04:00
|
|
|
WORKDIR /
|
|
|
|
RUN rm -rf /src
|
2022-09-20 08:24:59 -04:00
|
|
|
|
2023-03-08 11:28:58 -05:00
|
|
|
RUN git clone --branch 1.5.0 --depth 1 https://github.com/raspberrypi/pico-sdk.git /usr/local/pico-sdk
|
|
|
|
WORKDIR /usr/local/pico-sdk
|
|
|
|
RUN git submodule update --init
|
2023-03-02 08:17:22 -05:00
|
|
|
RUN git >/usr/local/repo-commit-picosdk describe --all --always --long --dirty
|
2023-03-08 10:39:35 -05:00
|
|
|
WORKDIR /
|
|
|
|
|
2022-09-20 08:24:59 -04:00
|
|
|
|
2022-09-20 09:45:24 -04:00
|
|
|
FROM base
|
2023-03-02 08:17:22 -05:00
|
|
|
LABEL org.opencontainers.image.description="Toolchain for building TKey FPGA bitstream, firmware, apps, programmer firmware"
|
2023-02-02 15:27:21 -05:00
|
|
|
COPY --from=toolsbuilder /usr/local/ /usr/local
|