mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-03-12 10:06:47 -04:00
Compare commits
2 Commits
508d044430
...
6c3ef3ee30
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6c3ef3ee30 | ||
![]() |
137dfd8988 |
@ -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
|
||||
|
@ -1,26 +1,45 @@
|
||||
all:
|
||||
@echo "Build targets: "
|
||||
@echo "build Build an image for building tools with Docker"
|
||||
@echo "run Run a shell using the above image with Docker"
|
||||
@echo "podman-pull Pull in the podman tkey builder"
|
||||
@echo "podman-build Build an image with podman"
|
||||
@echo "podman-run Run a shell using above image with podman"
|
||||
@echo "podman-run-make Run the above image with podman and build the FPGA bitstream"
|
||||
|
||||
build:
|
||||
docker build -t tkey-builder .
|
||||
# image produced by build-image targets
|
||||
BUILDIMAGE=tkey-builder-local
|
||||
|
||||
# default image used when running a container
|
||||
IMAGE=ghcr.io/tillitis/tkey-builder:1
|
||||
|
||||
all:
|
||||
@echo "Targets:"
|
||||
@echo "run Run a shell using image '$(IMAGE)' (Podman)"
|
||||
@echo "run-make Build the FPGA bitstream using image '$(IMAGE)' (Podman)"
|
||||
@echo "run-make-no-clean Like run-make but without cleaning first, useful for iterative firmware dev"
|
||||
@echo "run-make-clean_fw Like run-make but cleans only firmware"
|
||||
@echo "pull Pull down the image '$(IMAGE)' (Podman)"
|
||||
@echo "build-image Build a toolchain image named '$(BUILDIMAGE)' (Podman)"
|
||||
@echo " A newly built image can be used like: make IMAGE=$(BUILDIMAGE) run"
|
||||
@echo "docker-run Run a shell using image '$(IMAGE)' (Docker)"
|
||||
@echo "docker-build-image Build a toolchain image named '$(BUILDIMAGE)' (Docker)"
|
||||
|
||||
run:
|
||||
docker run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it tkey-builder /usr/bin/bash
|
||||
./podman-run $(IMAGE) / /usr/bin/bash
|
||||
|
||||
podman-pull:
|
||||
podman pull ghcr.io/tillitis/tkey-builder:1
|
||||
docker-run:
|
||||
docker run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it $(IMAGE) /usr/bin/bash
|
||||
|
||||
podman-build:
|
||||
podman build -t tkey-builder .
|
||||
run-make:
|
||||
./podman-run-make $(IMAGE) clean application_fpga.bin
|
||||
|
||||
podman-run:
|
||||
podman run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it tkey-builder /usr/bin/bash
|
||||
run-make-testfw:
|
||||
./podman-run-make $(IMAGE) clean application_fpga_testfw.bin
|
||||
|
||||
podman-run-make:
|
||||
podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it tkey-builder make
|
||||
run-make-no-clean:
|
||||
./podman-run-make $(IMAGE) application_fpga.bin
|
||||
|
||||
run-make-clean_fw:
|
||||
./podman-run-make $(IMAGE) clean_fw application_fpga.bin
|
||||
|
||||
pull:
|
||||
podman pull $(IMAGE)
|
||||
|
||||
build-image:
|
||||
podman build -t $(BUILDIMAGE) .
|
||||
|
||||
docker-build-image:
|
||||
docker build -t $(BUILDIMAGE) .
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user