diff --git a/.github/workflows/build-and-push-docker.yml b/.github/workflows/build-and-push-docker.yml index 34ceab5..956ba56 100644 --- a/.github/workflows/build-and-push-docker.yml +++ b/.github/workflows/build-and-push-docker.yml @@ -24,7 +24,7 @@ jobs: packages: write strategy: matrix: - image: ["arrow-rust", "arrow-sanitychecks", "arrow-stm32", "arrow-tfenv", "arrow-gis"] + image: ["arrow-rust", "arrow-sanitychecks", "arrow-stm32", "arrow-tfenv", "arrow-gis", "arrow-icestorm"] steps: - name: Checkout repository diff --git a/docker/arrow-icestorm/.env b/docker/arrow-icestorm/.env new file mode 100644 index 0000000..e581d22 --- /dev/null +++ b/docker/arrow-icestorm/.env @@ -0,0 +1 @@ +VERSION=v1.0.0 diff --git a/docker/arrow-icestorm/Dockerfile b/docker/arrow-icestorm/Dockerfile new file mode 100644 index 0000000..2e42b27 --- /dev/null +++ b/docker/arrow-icestorm/Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:3.18 + +ARG DEBIAN_FRONTEND=noninteractive +ENV TZ=UTC + +RUN apk update +RUN apk add --no-cache --update bash curl git g++ musl-dev make \ + libftdi1-dev clang bison flex-dev gperf readline-dev \ + gawk tcl-dev libffi-dev eigen-dev \ + graphviz python3 libftdi1-dev gcc-gnat \ + qt5-qtbase python3-dev boost-dev cmake + +# To use VHDL with yosys, require ghdl plugin +RUN git clone https://github.com/ghdl/ghdl.git ghdl +RUN git clone https://github.com/ghdl/ghdl-yosys-plugin ghdl-yosys-plugin + +# To use yosys with ice40, require icestorm and nextpnr with ice40 architecture +RUN git clone https://github.com/YosysHQ/yosys.git yosys +RUN git clone https://github.com/YosysHQ/icestorm.git icestorm +RUN git clone https://github.com/YosysHQ/nextpnr nextpnr + +# Install all +RUN cd yosys; make -j$(nproc); make install +RUN cd ghdl; ./configure --prefix=/usr/local; make -j$(nproc); make install +RUN cd ghdl-yosys-plugin; make -j$(nproc); make install +RUN cd icestorm; make -j$(nproc); make install +RUN cd nextpnr; \ + git submodule init && git submodule update; \ + cmake . -DARCH=ice40 -DUSE_IPO=off -DCMAKE_INSTALL_PREFIX=/usr/local; \ + make -j$(nproc); \ + make install