make commands

This commit is contained in:
Peter McGoron 2023-06-05 16:47:26 -04:00
parent 6988465183
commit 1447072d56
1 changed files with 46 additions and 26 deletions

View File

@ -1,6 +1,6 @@
.PHONY: images f4pga buildroot litex clone help attach hardware-image \ .PHONY: images f4pga buildroot litex clone help attach hardware-image \
buildroot-image litex-f4pga-image hardware-container \ buildroot-image litex-f4pga-image \
upsilon.tar.gz upsilon-opensbi.tar.gz upsilon-hardware.tar.gz upsilon-opensbi.tar.gz upsilon-buildroot.tar.gz
###### Images ###### Images
@ -20,48 +20,68 @@ opensbi-image: opensbi.tar.gz
### Hardware container ### Hardware container
hardware-container: hardware-container:
docker run -d --name upsilon-hardware-container upsilon-litex-f4pga-env /bin/sh -c 'while true; do sleep 2; done' docker run -d --name upsilon-hardware upsilon-litex-f4pga-env /bin/sh -c 'while true; do sleep 2; done'
hardware-container-copy: upsilon-hardware.tar.gz hardware-copy: upsilon-hardware.tar.gz
# XXX: this always fails if there are very high UIDs, but the # XXX: this always fails if there are very high UIDs, but the
# file is copied successfully. # file is copied successfully.
-docker cp upsilon-hardware.tar.gz upsilon-hardware-container:/home/user/upsilon-hardware.tar.gz -docker cp upsilon-hardware.tar.gz upsilon-hardware:/home/user/upsilon-hardware.tar.gz
hardware-container-shell: hardware-execute:
docker exec -ti upsilon-hardware-container /bin/bash -l docker exec -ti upsilon-hardware /bin/bash -lc ' \
hardware-container-clean: tar -xvf upsilon-hardware.tar.gz && \
-docker container stop upsilon-hardware-container cd upsilon/firmware && \
-docker container rm upsilon-hardware-container source ~/conda/xc7/conda/etc/profile.d/conda.sh && \
conda activate xc7 && \
make clean && make'
hardware-shell:
docker exec -ti upsilon-hardware /bin/bash -l
hardware-get:
docker cp upsilon-hardware:/home/user/upsilon/firmware/build/digilent_arty/gateware/digilent_arty.bit upsilon/boot/
docker cp upsilon-hardware:/home/user/upsilon/firmware/arty.dtb upsilon/boot/
hardware-clean:
-docker container stop upsilon-hardware
-docker container rm upsilon-hardware
### OpenSBI Container ### OpenSBI Container
opensbi-container: opensbi-container:
docker run -d --name upsilon-opensbi-container upsilon-opensbi-env /bin/sh -c 'while true; do sleep 2; done' docker run -d --name upsilon-opensbi upsilon-opensbi-env /bin/sh -c 'while true; do sleep 2; done'
opensbi-container-copy: upsilon-opensbi.tar.gz opensbi-copy: upsilon-opensbi.tar.gz
-docker cp upsilon-opensbi.tar.gz upsilon-opensbi-container:/home/user/upsilon-opensbi.tar.gz -docker cp upsilon-opensbi.tar.gz upsilon-opensbi:/home/user/upsilon-opensbi.tar.gz
opensbi-container-execute: opensbi-get:
docker exec -ti upsilon-opensbi-container /bin/bash -c ' \ docker cp upsilon-opensbi:/home/user/opensbi/build/platform/litex/vexriscv/firmware/fw_jump.bin upsilon/boot/
opensbi-shell:
docker exec -ti upsilon-opensbi /bin/bash -l
opensbi-execute:
docker exec -ti upsilon-opensbi /bin/bash -c ' \
tar -xvf upsilon-opensbi.tar.gz && \ tar -xvf upsilon-opensbi.tar.gz && \
cd opensbi && \ cd opensbi && \
make clean && \
make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=litex/vexriscv \ make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=litex/vexriscv \
' '
opensbi-container-clean: opensbi-clean:
-docker container stop upsilon-opensbi-container -docker container stop upsilon-opensbi
-docker container rm upsilon-opensbi-container -docker container rm upsilon-opensbi
### Buildroot Container ### Buildroot Container
buildroot-container: buildroot-container:
docker run -d --name upsilon-buildroot-container upsilon-buildroot-env /bin/sh -c 'while true; do sleep 2; done' docker run -d --name upsilon-buildroot upsilon-buildroot-env /bin/sh -c 'while true; do sleep 2; done'
buildroot-container-copy: upsilon-buildroot.tar.gz buildroot-copy: upsilon-buildroot.tar.gz
-docker cp upsilon-buildroot.tar.gz upsilon-buildroot-container:/home/user/upsilon-buildroot.tar.gz -docker cp upsilon-buildroot.tar.gz upsilon-buildroot:/home/user/upsilon-buildroot.tar.gz
buildroot-container-execute: buildroot-shell:
docker exec -ti upsilon-buildroot-container /bin/bash -c ' \ docker exec -ti upsilon-buildroot /bin/bash -l
buildroot-get:
docker cp upsilon-buildroot:/home/user/buildroot/output/images/Image upsilon/boot/
docker cp upsilon-buildroot:/home/user/buildroot/output/images/rootfs.cpio upsilon/boot/
buildroot-execute:
docker exec -ti upsilon-buildroot /bin/bash -c ' \
tar -xvf upsilon-buildroot.tar.gz && \ tar -xvf upsilon-buildroot.tar.gz && \
cd buildroot && \ cd buildroot && \
make BR2_EXTERNAL=../upsilon/buildroot litex_vexriscv_defconfig && \ make BR2_EXTERNAL=../upsilon/buildroot litex_vexriscv_defconfig && \
make ' make '
buildroot-container-clean: buildroot-clean:
-docker container stop upsilon-buildroot-container -docker container stop upsilon-buildroot
-docker container rm upsilon-buildroot-container -docker container rm upsilon-buildroot
###### External projects ###### External projects