forked from mit-pdos/xv6-riscv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (22 loc) · 1.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM ubuntu:22.04
ENV TZ="Europe/Rome"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && apt install -y --no-install-recommends \
bash pkg-config ccache wget rsync device-tree-compiler \
autoconf automake autotools-dev curl python3 python3-pip libpython3-all-dev \
python3-pyelftools libmpc-dev libmpfr-dev libgmp-dev gawk build-essential \
bison flex texinfo gperf libtool patchutils bc zlib1g-dev \
libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev
WORKDIR /tmp
RUN wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.03.01/riscv64-elf-ubuntu-22.04-gcc-nightly-2024.03.01-nightly.tar.gz
RUN tar -xzvf riscv64-elf-ubuntu-22.04-gcc-nightly-2024.03.01-nightly.tar.gz
RUN cd riscv && rsync -av . /usr/local/
RUN rm -rf riscv64-elf-ubuntu-22.04-gcc-nightly-2024.03.01-nightly.tar.gz riscv
ENV TOOLPREFIX=/usr/local/bin/riscv64-unknown-elf-
RUN git clone https://github.com/qemu/qemu && \
cd qemu && git checkout v8.2.2 && \
./configure --target-list=riscv64-softmmu && \
make -j $(nproc) && \
make install && \
cd .. && rm -rf qemu
RUN echo "add-auto-load-safe-path /root/src/" > /root/.gdbinit