Compare commits
22 Commits
Author | SHA1 | Date |
---|---|---|
|
5a2fc39845 | 4 years ago |
|
95442bf063 | 4 years ago |
|
e4768ccb66 | 4 years ago |
|
a3bd9ad89d | 4 years ago |
|
32ce8b5803 | 4 years ago |
|
fc3d18dc21 | 4 years ago |
|
fdf9af2536 | 4 years ago |
|
305f706564 | 4 years ago |
|
3c0a08f92a | 4 years ago |
|
a2a1b22a74 | 4 years ago |
|
2d740ed6b9 | 4 years ago |
|
7ab26d9ba0 | 4 years ago |
|
0ab5e11b56 | 5 years ago |
|
0cc3cf1a36 | 5 years ago |
|
1ed9f75896 | 5 years ago |
|
37e55e947a | 5 years ago |
|
2df1dd1202 | 5 years ago |
|
ecb647c8fe | 5 years ago |
|
69c5c8fb36 | 5 years ago |
|
e10ed7a6be | 5 years ago |
|
82508e7f0e | 5 years ago |
|
fd6e93a667 | 5 years ago |
@ -0,0 +1 @@
|
||||
*/*
|
@ -1,3 +1,7 @@
|
||||
.idea/*
|
||||
os/target/*
|
||||
os/.idea/*
|
||||
os/src/link_app.S
|
||||
os/Cargo.lock
|
||||
os/last-*
|
||||
tools/
|
||||
|
@ -0,0 +1,40 @@
|
||||
FROM ubuntu:18.04
|
||||
LABEL maintainer="dinghao188" \
|
||||
version="1.1" \
|
||||
description="ubuntu 18.04 with tools for tsinghua's rCore-Tutorial-V3"
|
||||
|
||||
#install some deps
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y curl wget autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \
|
||||
gawk build-essential bison flex texinfo gperf libtool patchutils bc xz-utils \
|
||||
zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev git tmux python3
|
||||
|
||||
#install rust and qemu
|
||||
RUN set -x; \
|
||||
RUSTUP='/root/rustup.sh' \
|
||||
&& cd $HOME \
|
||||
#install rust
|
||||
&& curl https://sh.rustup.rs -sSf > $RUSTUP && chmod +x $RUSTUP \
|
||||
&& $RUSTUP -y --default-toolchain nightly --profile minimal \
|
||||
|
||||
#compile qemu
|
||||
&& wget https://ftp.osuosl.org/pub/blfs/conglomeration/qemu/qemu-5.0.0.tar.xz \
|
||||
&& tar xvJf qemu-5.0.0.tar.xz \
|
||||
&& cd qemu-5.0.0 \
|
||||
&& ./configure --target-list=riscv64-softmmu,riscv64-linux-user \
|
||||
&& make -j$(nproc) install \
|
||||
&& cd $HOME && rm -rf qemu-5.0.0 qemu-5.0.0.tar.xz
|
||||
|
||||
#for chinese network
|
||||
RUN set -x; \
|
||||
APT_CONF='/etc/apt/sources.list'; \
|
||||
CARGO_CONF='/root/.cargo/config'; \
|
||||
BASHRC='/root/.bashrc' \
|
||||
&& echo 'export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static' >> $BASHRC \
|
||||
&& echo 'export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup' >> $BASHRC \
|
||||
&& touch $CARGO_CONF \
|
||||
&& echo '[source.crates-io]' > $CARGO_CONF \
|
||||
&& echo "replace-with = 'ustc'" >> $CARGO_CONF \
|
||||
&& echo '[source.ustc]' >> $CARGO_CONF \
|
||||
&& echo 'registry = "git://mirrors.ustc.edu.cn/crates.io-index"' >> $CARGO_CONF
|
@ -0,0 +1,8 @@
|
||||
DOCKER_NAME ?= dinghao188/rcore-tutorial
|
||||
.PHONY: docker build_docker
|
||||
|
||||
docker:
|
||||
docker run --rm -it --mount type=bind,source=$(shell pwd),destination=/mnt ${DOCKER_NAME}
|
||||
|
||||
build_docker:
|
||||
docker build -t ${DOCKER_NAME} .
|
@ -1,2 +1,12 @@
|
||||
# rCore-Tutorial-v3
|
||||
rCore-Tutorial version 3.
|
||||
rCore-Tutorial version 3.x
|
||||
|
||||
## Dependency
|
||||
|
||||
### Binaries
|
||||
|
||||
* rustc 1.56.0-nightly (b03ccace5 2021-08-24)
|
||||
|
||||
* qemu: 5.0.0
|
||||
|
||||
* rustsbi: qemu[7d71bfb7] k210[563144b0]
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "os"
|
||||
version = "0.1.0"
|
@ -1 +0,0 @@
|
||||
nightly-2020-11-01
|
@ -0,0 +1,48 @@
|
||||
OUTPUT_ARCH(riscv)
|
||||
ENTRY(_start)
|
||||
BASE_ADDRESS = 0x80200000;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = BASE_ADDRESS;
|
||||
skernel = .;
|
||||
|
||||
stext = .;
|
||||
.text : {
|
||||
*(.text.entry)
|
||||
*(.text .text.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
etext = .;
|
||||
srodata = .;
|
||||
.rodata : {
|
||||
*(.rodata .rodata.*)
|
||||
*(.srodata .srodata.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
erodata = .;
|
||||
sdata = .;
|
||||
.data : {
|
||||
*(.data .data.*)
|
||||
*(.sdata .sdata.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
edata = .;
|
||||
.bss : {
|
||||
*(.bss.stack)
|
||||
sbss = .;
|
||||
*(.bss .bss.*)
|
||||
*(.sbss .sbss.*)
|
||||
}
|
||||
|
||||
. = ALIGN(4K);
|
||||
ebss = .;
|
||||
ekernel = .;
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
nightly-2021-08-25
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue