File tree Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Expand file tree Collapse file tree 4 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ * /*
Original file line number Diff line number Diff line change 1+ FROM ubuntu:18.04
2+ LABEL maintainer="dinghao188" \
3+ version="1.1" \
4+ description="ubuntu 18.04 with tools for tsinghua's rCore-Tutorial-V3"
5+
6+ # install some deps
7+ RUN set -x \
8+ && apt-get update \
9+ && apt-get install -y curl wget autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \
10+ gawk build-essential bison flex texinfo gperf libtool patchutils bc xz-utils \
11+ zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev git tmux python3
12+
13+ # install rust and qemu
14+ RUN set -x; \
15+ RUSTUP='/root/rustup.sh' \
16+ && cd $HOME \
17+ # install rust
18+ && curl https://sh.rustup.rs -sSf > $RUSTUP && chmod +x $RUSTUP \
19+ && $RUSTUP -y --default-toolchain nightly --profile minimal \
20+
21+ # compile qemu
22+ && wget https://ftp.osuosl.org/pub/blfs/conglomeration/qemu/qemu-5.0.0.tar.xz \
23+ && tar xvJf qemu-5.0.0.tar.xz \
24+ && cd qemu-5.0.0 \
25+ && ./configure --target-list=riscv64-softmmu,riscv64-linux-user \
26+ && make -j$(nproc) install \
27+ && cd $HOME && rm -rf qemu-5.0.0 qemu-5.0.0.tar.xz
28+
29+ # for chinese network
30+ RUN set -x; \
31+ APT_CONF='/etc/apt/sources.list' ; \
32+ CARGO_CONF='/root/.cargo/config' ; \
33+ BASHRC='/root/.bashrc' \
34+ && echo 'export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static' >> $BASHRC \
35+ && echo 'export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup' >> $BASHRC \
36+ && touch $CARGO_CONF \
37+ && echo '[source.crates-io]' > $CARGO_CONF \
38+ && echo "replace-with = 'ustc'" >> $CARGO_CONF \
39+ && echo '[source.ustc]' >> $CARGO_CONF \
40+ && echo 'registry = "git://mirrors.ustc.edu.cn/crates.io-index"' >> $CARGO_CONF
Original file line number Diff line number Diff line change 1+ DOCKER_NAME ?= dinghao188/rcore-tutorial
2+ .PHONY : docker build_docker
3+
4+ docker :
5+ docker run --rm -it --mount type=bind,source=$(shell pwd) ,destination=/mnt ${DOCKER_NAME}
6+
7+ build_docker :
8+ docker build -t ${DOCKER_NAME} .
Original file line number Diff line number Diff line change 11# rCore-Tutorial-v3
2- rCore-Tutorial version 3.
2+ rCore-Tutorial version 3.
You can’t perform that action at this time.
0 commit comments