This repository has been archived on 2024-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
upsilon-docker/Makefile

54 lines
1.5 KiB
Makefile

.PHONY: image f4pga buildroot litex clone help container attach
ADDED_FILES=f4pga/scripts/prepare_environment.sh litex/litex_setup.py buildroot.tar.gz
help:
@echo 'compile commands (run in order)'
@echo 'make clone: clone repositories'
@echo 'make image: build docker image'
@echo 'make container: create docker container'
@echo
@echo 'run commands'
@echo 'make attach: open docker container'
@echo
@echo 'clean commands'
@echo 'make clean-container: delete docker container'
image: ${ADDED_FILES}
docker build -t "upsilon-buildenv" .
container:
docker run --name upsilon-container --volume .:/home/user/outside -it upsilon-buildenv /bin/bash -l
clean-container:
-docker stop upsilon-container
docker rm upsilon-container
attach:
-docker start upsilon-container
docker attach upsilon-container
## Download 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
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