.PHONY: images f4pga buildroot litex clone help attach hardware-image \ buildroot-image litex-f4pga-image hardware-container \ upsilon.tar.gz help: @echo 'compile commands (run in order)' @echo 'make clone: clone repositories' @echo 'make images: build docker images' ###### Images images: hardware-image buildroot-image hardware-image: docker build -f scripts/Dockerfile.litex_f4pga -t "upsilon-litex-f4pga-env" . buildroot-image: buildroot.tar.gz docker build -f scripts/Dockerfile.buildroot -t "upsilon-buildroot-env" . ###### Containers hardware-container: docker run -d --name upsilon-hardware-container upsilon-litex-f4pga-env /bin/sh -c 'while true; do sleep 2; done' hardware-container-copy: upsilon.tar.gz # XXX: this always fails if there are very high UIDs -docker cp upsilon.tar.gz upsilon-hardware-container:/home/user/upsilon.tar.gz hardware-container-shell: docker exec -ti upsilon-hardware-container /bin/bash -l hardware-container-clean: -docker container stop upsilon-hardware-container -docker container rm upsilon-hardware-container ###### External projects clone: f4pga buildroot litex f4pga: if [ ! -d 'f4pga' ]; then \ git clone https://github.com/chipsalliance/f4pga; \ fi cd f4pga && git checkout main && git pull && \ git checkout -B upsilon_stable 835a40534f9efd70770d74f56f25fef6cfc6ebc6 \ tar -czvf f4pga.tar.gz f4pga buildroot: if [ ! -d 'buildroot' ]; then \ git clone https://git.buildroot.org/buildroot; \ fi cd buildroot && git checkout master && git pull && \ git checkout -B upsilon_stable 2023.02.1 tar -czvf buildroot.tar.gz buildroot/ litex: if [ ! -d 'litex' ]; then \ git clone https://github.com/enjoy-digital/litex; \ fi cd litex && git checkout master && git pull && \ git checkout -B upsilon_stable c6ccb626e88168045edacced3743f6bd98746742 upsilon.tar.gz: tar -czvf upsilon.tar.gz upsilon/