compiling opensbi

This commit is contained in:
Peter McGoron 2023-06-02 16:02:45 -04:00
parent 941eaa594a
commit ed188288be
3 changed files with 17 additions and 12 deletions

View File

@ -41,12 +41,15 @@ hardware-container-clean:
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-container upsilon-opensbi-env /bin/sh -c 'while true; do sleep 2; done'
opensbi-container-copy: upsilon-opensbi.tar.gz opensbi-container-copy: upsilon-opensbi.tar.gz
-docker cp upsilon-opensbi.tar.gz upsilon-opensbi-container:/home/user/upsilon-opensbi.tgz -docker cp upsilon-opensbi.tar.gz upsilon-opensbi-container:/home/user/upsilon-opensbi.tar.gz
opensbi-container-shell: opensbi-container-execute:
docker exec -ti upsilon-opensbi-container /bin/bash -l 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; \
'
opensbi-container-clean: opensbi-container-clean:
-docker container stop upsilon-hardware-container -docker container stop upsilon-opensbi-container
-docker container rm upsilon-hardware-container -docker container rm upsilon-opensbi-container
###### External projects ###### External projects

View File

@ -6,9 +6,8 @@ ENV F4PGA_INSTALL_DIR=/home/user/conda
RUN apt-get update \ RUN apt-get update \
&& apt-get -y upgrade \ && apt-get -y upgrade \
&& apt-get install -y git wget python3 xz-utils bash verilator \ && apt-get install -y git wget python3 xz-utils bash verilator \
m4 device-tree-compiler make gcc-riscv64-unknown-elf vi \ m4 device-tree-compiler make gcc-riscv64-unknown-elf \
&& adduser --quiet --disabled-password user && adduser --quiet --disabled-password user
EXPOSE 22
USER user:user USER user:user
WORKDIR /home/user WORKDIR /home/user

View File

@ -2,15 +2,18 @@ FROM debian:bookworm
RUN apt-get update \ RUN apt-get update \
&& apt-get -y upgrade \ && apt-get -y upgrade \
&& apt-get install -y make device-tree-compiler python3 gcc-riscv64-linux-gnu \ && apt-get install -y make device-tree-compiler python3 \
adduser gcc-riscv64-linux-gnu \
&& adduser --quiet --disabled-password user && adduser --quiet --disabled-password user
#RUN apt-get update \
# && apt-get -y upgrade \
# && apt-get install -y git wget python3 xz-utils bash verilator \
# m4 device-tree-compiler make gcc-riscv64-unknown-elf \
# && adduser --quiet --disabled-password user
USER user:user USER user:user
WORKDIR /home/user WORKDIR /home/user
COPY --chown=user:user opensbi.tar.gz /home/user COPY --chown=user:user opensbi.tar.gz /home/user
COPY --chown=user:user opensbi-platform.tar.gz /home/user
RUN tar -xvf opensbi.tar.gz \ RUN tar -xvf opensbi.tar.gz \
&& cd opensbi/platforms \ && rm ~/opensbi.tar.gz
&& tar -xvf ~/opensbi-platform.tar.gz \
&& rm ~/opensbi.tar.gz ~/opensbi-platform.tar.gz