fix: classroom setup

Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
YdrMaster
2022-10-20 12:38:01 +08:00
parent 3a4e7e5479
commit e2eab27576
3 changed files with 20 additions and 21 deletions

View File

@@ -2,7 +2,6 @@ DOCKER_NAME ?= rust-os-camp-2022
DIR := workplace
.PHONY: docker build_docker
test: test3 test4 test5 test6 test7 test8
lab1: test3
@@ -23,7 +22,7 @@ setup:
cp -r ci-user ${DIR}
cp -r bootloader ${DIR}
cp -r reports ${DIR}
cp rust-toolchain ${DIR}
cp rust-toolchain.toml ${DIR}
# export PATH=${PATH}:${HOME}/qemu-7.0.0:${HOME}/qemu-7.0.0/riscv64-softmmu
test1: setup
@@ -65,7 +64,7 @@ clean:
docker:
docker run --rm -it -v ${PWD}:/mnt -w /mnt ${DOCKER_NAME} bash
build_docker:
build_docker:
docker build -t ${DOCKER_NAME} .
setupclassroom_test1:
@@ -164,7 +163,7 @@ setupclassroom_test8:
git commit -m"update classroom.yml .keep autograding.json for classroom CI test"
git push
# for local ubuntu with zsh shell SHELL, need root for sudo
# for local ubuntu with zsh shell SHELL, need root for sudo
ubuntu_local_setenv:
sudo apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \
gawk build-essential bison flex texinfo gperf libtool patchutils bc \
@@ -181,7 +180,7 @@ ubuntu_local_setenv:
rustc --version
# for github codespaces ubuntu with zsh SHELL, need root for sudo
codespaces_setenv:
codespaces_setenv:
sudo apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \
gawk build-essential bison flex texinfo gperf libtool patchutils bc \
zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev git tmux python3 ninja-build zsh -y
@@ -194,4 +193,4 @@ codespaces_setenv:
qemu-riscv64 --version
curl https://sh.rustup.rs -sSf | sh -s -- -y
/bin/zsh && source /home/codespace/.cargo/env
rustc --version
rustc --version

View File

@@ -40,7 +40,7 @@
.. note::
基于github classroom的开发方式
基于github classroom可方便建立开发用的git repository并可基于github的 codespace 在线版ubuntu +vscode在线开发使用。整个开发环境仅仅需要一个网络浏览器。
1. 在网络浏览器中用自己的 github id 登录 github.com
@@ -62,15 +62,15 @@
.. code-block:: console
$ git clone ``gitaddr of github-classroom-build-lab0-0``
$ cd ``github-classroom-build-lab0-0``
$ cd ``github-classroom-build-lab0-0``
$ make setupclassroom_test1 //注意这一步很重要是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次以后一般就不用执行了除非 .github/workflows/classroom.yml发生了变化。
.. note::
实验名称 :实验编号
实验名称 :实验编号
- lab0-0 : test1
- lab0-1test2
- lab0-1test2
- lab1test3
- lab2test4
- lab3test5
@@ -111,7 +111,7 @@
│   ├── logging.rs (为本项目实现了日志功能)
│   ├── main.rs (内核主函数)
│   └── sbi.rs (封装底层 SBI 实现提供的 SBI 接口)
└── rust-toolchain (整个项目的工具链版本)
└── rust-toolchain.toml (整个项目的工具链版本)
cloc os
-------------------------------------------------------------------------------
@@ -123,4 +123,4 @@
TOML 1 2 1 7
-------------------------------------------------------------------------------
SUM: 8 39 11 207
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

View File

@@ -87,7 +87,7 @@
.. note::
基于github classroom的开发方式
基于github classroom可方便建立开发用的git repository并可基于github的 codespace 在线版ubuntu +vscode在线开发使用。整个开发环境仅仅需要一个网络浏览器。
1. 在网络浏览器中用自己的 github id 登录 github.com
@@ -101,27 +101,27 @@
上述的345步不是必须的你也可以线下本地开发。
如果是本地的ubuntu中建立开发环境可在shell中执行 ``make ubuntu_local_setenv`` 来自动安装配置开发环境(执行``sudo``需要root权限仅需要执行一次
获取本章代码:
.. code-block:: console
$ git clone ``gitaddr of github-classroom-build-lab5``
$ cd ``github-classroom-build-lab5``
$ cd ``github-classroom-build-lab5``
$ make setupclassroom_test8 //注意这一步很重要是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次以后一般就不用执行了除非 .github/workflows/classroom.yml发生了变化。
.. note::
实验名称 :实验编号
实验名称 :实验编号
- lab0-0 : test1
- lab0-1test2
- lab0-1test2
- lab1test3
- lab2test4
- lab3test5
- lab4test6
- lab5test8
在 qemu 模拟器上运行本章代码 `lab5(os8)参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os8-ref>`_
.. code-block:: console
@@ -263,4 +263,4 @@
│ ├── mod.rs (修改:使用线程对应的中断上下文地址而非固定的 TRAP_CONTEXT)
│ └── trap.S
├── README.md
└── rust-toolchain
└── rust-toolchain.toml