interface

This commit is contained in:
Peter McGoron 2023-05-26 17:09:30 -04:00
parent 6be211bdd9
commit 06ca4bb653
2 changed files with 24 additions and 4 deletions

View File

@ -21,7 +21,7 @@ RUN sed -i 's/sudo/#sudo/g' ./prepare_environment.sh \
&& ./prepare_environment.sh \ && ./prepare_environment.sh \
&& rm ./prepare_environment.sh && rm ./prepare_environment.sh
# Install LiteX. # Install LiteX. TODO: put in litex directory.
COPY --chown=user:user litex/litex_setup.py /home/user COPY --chown=user:user litex/litex_setup.py /home/user
WORKDIR /home/user WORKDIR /home/user
RUN chmod +x litex_setup.py \ RUN chmod +x litex_setup.py \
@ -33,3 +33,5 @@ conda run -n xc7 ./litex_setup.py --init --install --user --tag=2023.04'
WORKDIR /home/user WORKDIR /home/user
COPY --chown=user:user buildroot.tar.gz /home/user COPY --chown=user:user buildroot.tar.gz /home/user
RUN tar -xvf buildroot.tar.gz && rm buildroot.tar.gz RUN tar -xvf buildroot.tar.gz && rm buildroot.tar.gz
USER root:root
RUN apt-get -y install build-essential gcc g++ sed make binutils diffutils bash patch gzip bzip2 perl tar cpio unzip rsync bc findutils wget

View File

@ -1,14 +1,32 @@
.PHONY: image f4pga buildroot litex clone help .PHONY: image f4pga buildroot litex clone help container attach
ADDED_FILES=f4pga/scripts/prepare_environment.sh litex/litex_setup.py buildroot.tar.gz ADDED_FILES=f4pga/scripts/prepare_environment.sh litex/litex_setup.py buildroot.tar.gz
help: help:
@echo 'make image: build docker image' @echo 'compile commands (run in order)'
@echo 'make open: open docker image'
@echo 'make clone: clone repositories' @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} image: ${ADDED_FILES}
docker build -t "upsilon-buildenv" . 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 ## Download external projects
clone: f4pga buildroot litex clone: f4pga buildroot litex