buildroot container

This commit is contained in:
Peter McGoron 2023-06-02 16:16:13 -04:00
parent ed188288be
commit aa0c89ce09
2 changed files with 25 additions and 3 deletions

4
.gitignore vendored
View File

@ -7,3 +7,7 @@ upsilon/
.venv
upsilon.tar.gz
f4pga.tar.gz
opensbi.tar.gz
upsilon-opensbi.tar.gz
upsilon-hardware.tar.gz
upsilon-buildroot.tar.gz

View File

@ -44,13 +44,30 @@ opensbi-container-copy: upsilon-opensbi.tar.gz
-docker cp upsilon-opensbi.tar.gz upsilon-opensbi-container:/home/user/upsilon-opensbi.tar.gz
opensbi-container-execute:
docker exec -ti upsilon-opensbi-container /bin/bash -c ' \
tar -xvf upsilon-opensbi.tar.gz; \
cd opensbi && make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=litex/vexriscv; \
tar -xvf upsilon-opensbi.tar.gz && \
cd opensbi && \
make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=litex/vexriscv \
'
opensbi-container-clean:
-docker container stop upsilon-opensbi-container
-docker container rm upsilon-opensbi-container
### Buildroot Container
buildroot-container:
docker run -d --name upsilon-buildroot-container upsilon-buildroot-env /bin/sh -c 'while true; do sleep 2; done'
buildroot-container-copy: upsilon-buildroot.tar.gz
-docker cp upsilon-buildroot.tar.gz upsilon-buildroot-container:/home/user/upsilon-buildroot.tar.gz
buildroot-container-execute:
docker exec -ti upsilon-buildroot-container /bin/bash -c ' \
tar -xvf upsilon-buildroot.tar.gz && \
cd buildroot && \
make BR2_EXTERNAL=../upsilon/buildroot litex_vexriscv_defconfig && \
make '
buildroot-container-clean:
-docker container stop upsilon-buildroot-container
-docker container rm upsilon-buildroot-container
###### External projects
clone: f4pga buildroot litex opensbi
@ -80,7 +97,8 @@ litex:
upsilon-hardware.tar.gz:
tar -czvf upsilon-hardware.tar.gz upsilon/firmware/
upsilon-buildroot.tar.gz:
tar -czvf upsilon-buildroot.tar.gz upsilon/buildroot/
# This script only works for GNU tar. It renames the extraction directory.
upsilon-opensbi.tar.gz:
tar -czvf upsilon-opensbi.tar.gz upsilon/opensbi/ --transform 's|upsilon/opensbi|opensbi/platform|'