-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (22 loc) · 1.03 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
FROM ubuntu:22.04
# non-interactive build
ENV DEBIAN_FRONTEND=noninteractive
# riscv isa bit width
ARG BITS=64
# version
ARG QEMU_VERSION=7.1.0
RUN apt -y update && \
apt install -y autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev gawk build-essential texinfo patchutils zlib1g-dev libexpat-dev && \
apt install -y flex bison bc python3 curl wget make gcc vim git ninja-build libglib2.0-dev libpixman-1-dev pkg-config gperf libtool && \
git clone https://github.com/riscv/riscv-gnu-toolchain && \
cd riscv-gnu-toolchain && \
./configure --prefix=/riscv && make -j$(nproc) && make linux -j$(nproc) && \
echo "export PATH=/riscv/bin:$PATH" >> ~/.bashrc && \
cd .. && rm -rf riscv-gnu-toolchain && \
wget https://download.qemu.org/qemu-$QEMU_VERSION.tar.xz && \
tar xJf qemu-$QEMU_VERSION.tar.xz && \
cd qemu-$QEMU_VERSION && \
./configure --target-list=riscv$BITS-softmmu && \
make -j$(nproc) && \
make install && \
cd .. && rm -rf qemu-$QEMU_VERSION qemu-$QEMU_VERSION.tar.xz