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
Raw Normal View History

2023-05-26 17:09:30 -04:00
.PHONY: image f4pga buildroot litex clone help container attach
2023-05-26 15:00:46 -04:00
ADDED_FILES=f4pga/scripts/prepare_environment.sh litex/litex_setup.py buildroot.tar.gz
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-26 17:09:30 -04:00
@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'
2023-05-26 15:00:46 -04:00
image: ${ADDED_FILES}
docker build -t "upsilon-buildenv" .
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