From fae06116dd94e50b4b847863bf273f640366b635 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Thu, 2 Mar 2023 14:17:22 +0100 Subject: [PATCH] toolchain: pin yosys to latest tag, icestorm to recent commit, use newer nextpnr The icebram and nextpnr issues have been resolved. Signed-off-by: Daniel Lublin --- contrib/Dockerfile | 27 +++++++++++---------------- doc/toolchain_setup.md | 9 +++------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/contrib/Dockerfile b/contrib/Dockerfile index dcd19ad..1b479eb 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -51,10 +51,10 @@ FROM base as toolsbuilder RUN git clone https://github.com/YosysHQ/icestorm /src WORKDIR /src -RUN git checkout 45f5e5f3889afb07907bab439cf071478ee5a2a5 \ +RUN git checkout d20a5e9001f46262bf0cef220f1a6943946e421d \ && make -j$(nproc --ignore=2) \ && make install -RUN git >/usr/local/repo-commit-icestorm describe --tags --always --dirty +RUN git >/usr/local/repo-commit-icestorm describe --all --always --long --dirty WORKDIR / RUN rm -rf /src @@ -63,39 +63,34 @@ RUN git clone -b interfaces --depth=1 https://github.com/tillitis/icestorm /src WORKDIR /src/iceprog RUN make -j$(nproc --ignore=2) \ && make PROGRAM_PREFIX=tillitis- install -RUN git >/usr/local/repo-commit-tillitis--icestorm describe --tags --always --dirty +RUN git >/usr/local/repo-commit-tillitis--icestorm describe --all --always --long --dirty WORKDIR / RUN rm -rf /src -RUN git clone https://github.com/YosysHQ/yosys /src +RUN git clone -b yosys-0.26 --depth=1 https://github.com/YosysHQ/yosys /src WORKDIR /src -# Avoiding current issue with yosys & icebram, filed in: -# https://github.com/YosysHQ/yosys/issues/3478 -RUN git checkout 06ef3f264afaa3eaeab45cc0404d8006c15f02b1 \ - && make -j$(nproc --ignore=2) \ +RUN make -j$(nproc --ignore=2) \ && make install -RUN git >/usr/local/repo-commit-yosys describe --tags --always --dirty +RUN git >/usr/local/repo-commit-yosys describe --all --always --long --dirty WORKDIR / RUN rm -rf /src -RUN git clone https://github.com/YosysHQ/nextpnr /src +RUN git clone -b nextpnr-0.5 --depth=1 https://github.com/YosysHQ/nextpnr /src WORKDIR /src -# Use nextpnr-0.4. Aa few commits later we got issues, like on f4e6bbd383f6c43. -RUN git checkout nextpnr-0.4 \ - && cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . \ +RUN cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . \ && make -j$(nproc --ignore=2) \ && make install -RUN git >/usr/local/repo-commit-nextpnr describe --tags --always --dirty +RUN git >/usr/local/repo-commit-nextpnr describe --all --always --long --dirty WORKDIR / RUN rm -rf /src 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 -RUN git >/usr/local/repo-commit-picosdk describe --tags --always --dirty +RUN git >/usr/local/repo-commit-picosdk describe --all --always --long --dirty WORKDIR / FROM base -LABEL org.opencontainers.image.description="Toolchain for building TKey FPGA bitstream, firmware, apps" +LABEL org.opencontainers.image.description="Toolchain for building TKey FPGA bitstream, firmware, apps, programmer firmware" COPY --from=toolsbuilder /usr/local/ /usr/local diff --git a/doc/toolchain_setup.md b/doc/toolchain_setup.md index 1755d5d..8c6d4bb 100644 --- a/doc/toolchain_setup.md +++ b/doc/toolchain_setup.md @@ -80,7 +80,7 @@ install other versions of these tools locally, they could conflict git clone https://github.com/YosysHQ/icestorm cd icestorm - git checkout 45f5e5f3889afb07907bab439cf071478ee5a2a5 + git checkout d20a5e9001f46262bf0cef220f1a6943946e421d make -j$(nproc) sudo make install cd .. @@ -96,17 +96,14 @@ install other versions of these tools locally, they could conflict git clone https://github.com/YosysHQ/yosys cd yosys - # Avoiding current issue with yosys & icebram, filed in: - # https://github.com/YosysHQ/yosys/issues/3478 - git checkout 06ef3f264afaa3eaeab45cc0404d8006c15f02b1 + git checkout yosys-0.26 make -j$(nproc) sudo make install cd .. git clone https://github.com/YosysHQ/nextpnr cd nextpnr - # Use nextpnr-0.4. Aa few commits later we got issues, like on f4e6bbd383f6c43. - git checkout nextpnr-0.4 + git checkout nextpnr-0.5 cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . make -j$(nproc) sudo make install