Compare commits

..

4 Commits

Author SHA1 Message Date
Daniel Lublin
47c7e55cba
doc: release notes
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-03-29 17:08:33 +02:00
Daniel Lublin
ff71f796e3
toolchain: use new image by default
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-03-29 17:03:53 +02:00
Daniel Lublin
508d044430
toolchain: revise Makefile for container builds
Use podman primarily. Default to using the fully qualified image from
ghcr.io

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-03-29 11:45:43 +02:00
Daniel Lublin
fae06116dd
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 <daniel@lublin.se>
2023-03-29 11:45:43 +02:00
4 changed files with 79 additions and 41 deletions

View File

@ -51,10 +51,10 @@ FROM base as toolsbuilder
RUN git clone https://github.com/YosysHQ/icestorm /src RUN git clone https://github.com/YosysHQ/icestorm /src
WORKDIR /src WORKDIR /src
RUN git checkout 45f5e5f3889afb07907bab439cf071478ee5a2a5 \ RUN git checkout d20a5e9001f46262bf0cef220f1a6943946e421d \
&& make -j$(nproc --ignore=2) \ && make -j$(nproc --ignore=2) \
&& make install && 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 / WORKDIR /
RUN rm -rf /src RUN rm -rf /src
@ -63,39 +63,34 @@ RUN git clone -b interfaces --depth=1 https://github.com/tillitis/icestorm /src
WORKDIR /src/iceprog WORKDIR /src/iceprog
RUN make -j$(nproc --ignore=2) \ RUN make -j$(nproc --ignore=2) \
&& make PROGRAM_PREFIX=tillitis- install && 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 / WORKDIR /
RUN rm -rf /src 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 WORKDIR /src
# Avoiding current issue with yosys & icebram, filed in: RUN make -j$(nproc --ignore=2) \
# https://github.com/YosysHQ/yosys/issues/3478
RUN git checkout 06ef3f264afaa3eaeab45cc0404d8006c15f02b1 \
&& make -j$(nproc --ignore=2) \
&& make install && 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 / WORKDIR /
RUN rm -rf /src 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 WORKDIR /src
# Use nextpnr-0.4. Aa few commits later we got issues, like on f4e6bbd383f6c43. RUN cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . \
RUN git checkout nextpnr-0.4 \
&& cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . \
&& make -j$(nproc --ignore=2) \ && make -j$(nproc --ignore=2) \
&& make install && 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 / WORKDIR /
RUN rm -rf /src RUN rm -rf /src
RUN git clone --branch 1.5.0 --depth 1 https://github.com/raspberrypi/pico-sdk.git /usr/local/pico-sdk 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 WORKDIR /usr/local/pico-sdk
RUN git submodule update --init 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 / WORKDIR /
FROM base 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 COPY --from=toolsbuilder /usr/local/ /usr/local

View File

@ -1,26 +1,51 @@
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: # image produced by build-image targets
docker build -t tkey-builder . BUILDIMAGE=tkey-builder-local
# default image used when running a container
IMAGE=ghcr.io/tillitis/tkey-builder:2
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: run:
docker run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it tkey-builder /usr/bin/bash podman run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it \
$(IMAGE) /usr/bin/bash
podman-pull: docker-run:
podman pull ghcr.io/tillitis/tkey-builder:1 docker run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it \
$(IMAGE) /usr/bin/bash
podman-build: run-make:
podman build -t tkey-builder . podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \
$(IMAGE) make clean application_fpga.bin
podman-run: run-make-testfw:
podman run --rm --mount type=bind,source="`pwd`/../",target=/build -w /build -it tkey-builder /usr/bin/bash podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \
$(IMAGE) make clean application_fpga_testfw.bin
podman-run-make: run-make-no-clean:
podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it tkey-builder make podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \
$(IMAGE) make application_fpga.bin
run-make-clean_fw:
podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \
$(IMAGE) make clean_fw application_fpga.bin
pull:
podman pull $(IMAGE)
build-image:
podman build -t $(BUILDIMAGE) .
docker-build-image:
docker build -t $(BUILDIMAGE) .

View File

@ -3,6 +3,27 @@
Descriptions of the tagged TKey releases. Descriptions of the tagged TKey releases.
## TK1-23.03.1
This is the official release of the "Bellatrix" version of
the Tillitis TKey device. This version is ready for general
use.
Given the OCI image `ghcr.io/tillitis/tkey-builder:2` built from
`../contrib/Dockerfile` and the generic UDS.hex and UDI.hex, a clean
build should generate the following digest:
```
sha256sum application_fpga.bin
d2970828269b3ba7f09fb73b8592b08814dfe8c8087b00b0659feb516bb00f33 application_fpga.bin
```
This bug fix release contains the following changes:
- Change the firmware protocol max frame size back to 128 bytes
- Correct a bug with the reading out of UDS
## TK1-23.03 ## TK1-23.03
This is the official release of the "Bellatrix" version of This is the official release of the "Bellatrix" version of
the Tillitis TKey device. This version is ready for general the Tillitis TKey device. This version is ready for general

View File

@ -80,7 +80,7 @@ install other versions of these tools locally, they could conflict
git clone https://github.com/YosysHQ/icestorm git clone https://github.com/YosysHQ/icestorm
cd icestorm cd icestorm
git checkout 45f5e5f3889afb07907bab439cf071478ee5a2a5 git checkout d20a5e9001f46262bf0cef220f1a6943946e421d
make -j$(nproc) make -j$(nproc)
sudo make install sudo make install
cd .. cd ..
@ -96,17 +96,14 @@ install other versions of these tools locally, they could conflict
git clone https://github.com/YosysHQ/yosys git clone https://github.com/YosysHQ/yosys
cd yosys cd yosys
# Avoiding current issue with yosys & icebram, filed in: git checkout yosys-0.26
# https://github.com/YosysHQ/yosys/issues/3478
git checkout 06ef3f264afaa3eaeab45cc0404d8006c15f02b1
make -j$(nproc) make -j$(nproc)
sudo make install sudo make install
cd .. cd ..
git clone https://github.com/YosysHQ/nextpnr git clone https://github.com/YosysHQ/nextpnr
cd nextpnr cd nextpnr
# Use nextpnr-0.4. Aa few commits later we got issues, like on f4e6bbd383f6c43. git checkout nextpnr-0.5
git checkout nextpnr-0.4
cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local .
make -j$(nproc) make -j$(nproc)
sudo make install sudo make install