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

58 lines
1.7 KiB
Makefile
Raw Normal View History

2023-05-29 14:39:02 -04:00
.PHONY: images f4pga buildroot litex clone help container attach hardware-image buildroot-image
2023-05-26 15:00:46 -04:00
help:
2023-05-26 17:09:30 -04:00
@echo 'compile commands (run in order)'
2023-05-26 15:00:46 -04:00
@echo 'make clone: clone repositories'
2023-05-29 14:39:02 -04:00
@echo 'make images: build docker images'
2023-05-26 17:09:30 -04:00
@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'
2023-05-26 15:00:46 -04:00
2023-05-29 14:39:02 -04:00
hardware-image: f4pga/scripts/prepare_environment.sh litex/litex_setup.py
docker build -f Dockerfile.hardware -t "upsilon-hardware-env" .
buildroot-image: buildroot.tar.gz
docker build -f Dockerfile.buildroot -t "upsilon-buildroot-env" .
images: hardware-image buildroot-image
2023-05-26 15:00:46 -04:00
2023-05-26 17:09:30 -04:00
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
2023-05-26 15:00:46 -04:00
## 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