mirror of
https://github.com/LearningOS/rust-based-os-comp2022.git
synced 2026-02-09 13:15:35 +08:00
deploy: 851a7f83a3
This commit is contained in:
@@ -463,11 +463,24 @@ qemu-riscv64 --version
|
||||
</div>
|
||||
<div class="section" id="rcore-tutorial">
|
||||
<h2>试运行 rCore-Tutorial<a class="headerlink" href="#rcore-tutorial" title="永久链接至标题">¶</a></h2>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ <span class="nb">cd</span> rust-based-os-comp2022
|
||||
$ make setupclassroom //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
<div class="section" id="github-classroom">
|
||||
<h3>基于Github Classroom 模式<a class="headerlink" href="#github-classroom" title="永久链接至标题">¶</a></h3>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ git clone <span class="sb">``</span>Github-Classroom帮你生成的某个OS实验的仓库<span class="sb">``</span>
|
||||
$ <span class="nb">cd</span> <span class="sb">``</span>刚克隆的本地某个OS实验的仓库<span class="sb">``</span>
|
||||
$ make setupclassroom_<span class="sb">``</span>实验编号<span class="sb">``</span> //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。实验编号是与某个实验匹配的编号
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>我们先运行不需要处理用户代码的裸机操作系统 <code class="docutils literal notranslate"><span class="pre">os1</span></code> :</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> os1
|
||||
<span class="nv">LOG</span><span class="o">=</span>DEBUG make run
|
||||
@@ -516,6 +529,7 @@ Panicked at src/main.rs:48 Shutdown machine!
|
||||
</div>
|
||||
<p>恭喜你完成了实验环境的配置,可以开始阅读教程的正文部分了!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="gdb">
|
||||
<h2>GDB 调试支持*<a class="headerlink" href="#gdb" title="永久链接至标题">¶</a></h2>
|
||||
<div class="admonition attention">
|
||||
@@ -595,7 +609,10 @@ Panicked at src/main.rs:48 Shutdown machine!
|
||||
<li><a class="reference internal" href="#qemu">Qemu 模拟器安装</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#rcore-tutorial">试运行 rCore-Tutorial</a></li>
|
||||
<li><a class="reference internal" href="#rcore-tutorial">试运行 rCore-Tutorial</a><ul>
|
||||
<li><a class="reference internal" href="#github-classroom">基于Github Classroom 模式</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#gdb">GDB 调试支持*</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -222,12 +222,28 @@ Qemu 模拟器安装
|
||||
试运行 rCore-Tutorial
|
||||
------------------------------------------------------------
|
||||
|
||||
基于Github Classroom 模式
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022
|
||||
$ make setupclassroom //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
$ git clone ``Github-Classroom帮你生成的某个OS实验的仓库``
|
||||
$ cd ``刚克隆的本地某个OS实验的仓库``
|
||||
$ make setupclassroom_``实验编号`` //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。实验编号是与某个实验匹配的编号
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
|
||||
我们先运行不需要处理用户代码的裸机操作系统 ``os1`` :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -61,11 +61,24 @@
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022/
|
||||
获取本章代码:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone ``gitaddr of 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-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
运行本章代码,并设置日志级别为 ``TRACE``:
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
3. 完成第二步后,你的第二个实验练习的 github repository 会被自动建立好,点击此github repository的链接,就可看到你要完成的第一个实验了。
|
||||
4. 在你的第二个实验练习的网页的中上部可以看到一个醒目的 `code` 绿色按钮,点击后,可以进一步看到 `codespace` 标签和醒目的 `create codesapce on main` 绿色按钮。请点击这个绿色按钮,就可以进入到在线的ubuntu +vscode环境中
|
||||
5. 再按照下面的环境安装提示在vscode的 `console` 中安装配置开发环境:rustc,qemu等工具。注:也可在vscode的 `console` 中执行 ``make codespaces_setenv`` 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。
|
||||
6. 在vscode的 `console` 中执行 `make setupclassroom_test2` (该命令仅执行一次)配置githubclassroom 自动评分功能。
|
||||
6. 在vscode的 `console` 中执行 `make setupclassroom_test2` (该命令仅执行一次)配置githubclassroom 自动评分功能,以后一般就不用执行了,除非 ``.github/workflows/classroom.yml`` 发生了变化。
|
||||
7. 然后就可以基于在线vscode进行开发、运行、提交等完整的实验过程了。
|
||||
|
||||
上述的3,4,5步不是必须的,你也可以线下本地开发。
|
||||
@@ -40,12 +40,25 @@
|
||||
|
||||
本章我们引入了用户程序。
|
||||
|
||||
获取本章代码:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022
|
||||
$ git clone ``gitaddr of github-classroom-build-lab0-1``
|
||||
$ cd ``github-classroom-build-lab0-1``
|
||||
$ make setupclassroom_test2 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
在 qemu 模拟器上运行本章代码:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@@ -34,12 +34,25 @@
|
||||
|
||||
注:如果是本地的ubuntu中建立开发环境,可在shell中执行 ``make ubuntu_local_setenv`` 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。
|
||||
|
||||
获取本章代码:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022/
|
||||
$ git clone ``gitaddr of github-classroom-build-lab1``
|
||||
$ cd ``github-classroom-build-lab1``
|
||||
$ make setupclassroom_test3 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
在 qemu 模拟器上运行 `lab1(os3)参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os3-ref>`_ :
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@@ -34,10 +34,20 @@
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022/
|
||||
$ git clone ``gitaddr of github-classroom-build-lab2``
|
||||
$ cd ``github-classroom-build-lab2``
|
||||
$ make setupclassroom_test4 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
在 qemu 模拟器上运行 `lab2(os4)参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os4-ref>`_ :
|
||||
|
||||
|
||||
@@ -37,22 +37,29 @@
|
||||
实践体验
|
||||
-------------------------------------------
|
||||
|
||||
获取本章代码:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022/
|
||||
$ make setupclassroom_test5 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
|
||||
|
||||
在 qemu 模拟器上运行`lab3(os5)参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os5-ref>`_ :
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone ``gitaddr of github-classroom-build-lab3``
|
||||
$ cd ``github-classroom-build-lab3``
|
||||
$ make setupclassroom_test5 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
$ cd os5-ref
|
||||
$ make run
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
待内核初始化完毕之后,将在屏幕上打印可用的应用列表并进入shell程序:
|
||||
|
||||
.. code-block::
|
||||
|
||||
@@ -27,22 +27,29 @@
|
||||
|
||||
注:如果是本地的ubuntu中建立开发环境,可在shell中执行 ``make ubuntu_local_setenv`` 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。
|
||||
|
||||
获取本章代码:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022/
|
||||
$ make setupclassroom_test6 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
|
||||
|
||||
在 qemu 模拟器上运行本章代码参考框架:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
||||
$ git clone ``gitaddr of github-classroom-build-lab4``
|
||||
$ cd ``github-classroom-build-lab4``
|
||||
$ make setupclassroom_test6 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
$ cd os6-ref
|
||||
$ make run
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
内核初始化完成之后就会进入shell程序,在这里我们运行一下本章的测例 ``ch6b_filetest_simple`` :
|
||||
|
||||
.. code-block::
|
||||
|
||||
@@ -19,6 +19,16 @@
|
||||
$ cd rust-based-os-comp2022/
|
||||
//$ make setupclassroom //注意:在本章不需要做这一步,因为这不是一个作业。(这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。)
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
在 qemu 模拟器上运行 `os7参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os7-ref>`_ :
|
||||
|
||||
|
||||
@@ -106,11 +106,21 @@
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
$ cd rust-based-os-comp2022/
|
||||
$ git clone ``gitaddr of github-classroom-build-lab5``
|
||||
$ cd ``github-classroom-build-lab5``
|
||||
$ make setupclassroom_test8 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
|
||||
.. note::
|
||||
|
||||
实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8
|
||||
|
||||
在 qemu 模拟器上运行本章代码 `lab5(os8)参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os8-ref>`_ :
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@@ -336,11 +336,26 @@ println!("Hello world!");
|
||||
</div>
|
||||
<p>本章一步步实现了支持打印字符串的简单操作系统。</p>
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022/
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab0-0<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab0-0<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test1 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>运行本章代码,并设置日志级别为 <code class="docutils literal notranslate"><span class="pre">TRACE</span></code>:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os1
|
||||
<span class="gp">$ </span>make run <span class="nv">LOG</span><span class="o">=</span>TRACE
|
||||
|
||||
@@ -313,18 +313,30 @@
|
||||
<li><p>完成第二步后,你的第二个实验练习的 github repository 会被自动建立好,点击此github repository的链接,就可看到你要完成的第一个实验了。</p></li>
|
||||
<li><p>在你的第二个实验练习的网页的中上部可以看到一个醒目的 <cite>code</cite> 绿色按钮,点击后,可以进一步看到 <cite>codespace</cite> 标签和醒目的 <cite>create codesapce on main</cite> 绿色按钮。请点击这个绿色按钮,就可以进入到在线的ubuntu +vscode环境中</p></li>
|
||||
<li><p>再按照下面的环境安装提示在vscode的 <cite>console</cite> 中安装配置开发环境:rustc,qemu等工具。注:也可在vscode的 <cite>console</cite> 中执行 <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">codespaces_setenv</span></code> 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。</p></li>
|
||||
<li><p>在vscode的 <cite>console</cite> 中执行 <cite>make setupclassroom_test2</cite> (该命令仅执行一次)配置githubclassroom 自动评分功能。</p></li>
|
||||
<li><p>在vscode的 <cite>console</cite> 中执行 <cite>make setupclassroom_test2</cite> (该命令仅执行一次)配置githubclassroom 自动评分功能,以后一般就不用执行了,除非 <code class="docutils literal notranslate"><span class="pre">.github/workflows/classroom.yml</span></code> 发生了变化。</p></li>
|
||||
<li><p>然后就可以基于在线vscode进行开发、运行、提交等完整的实验过程了。</p></li>
|
||||
</ol>
|
||||
<p>上述的3,4,5步不是必须的,你也可以线下本地开发。</p>
|
||||
<p>注:如果是本地的ubuntu中建立开发环境,可在shell中执行 <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">ubuntu_local_setenv</span></code> 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。</p>
|
||||
</div>
|
||||
<p>本章我们引入了用户程序。</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab0-1<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab0-1<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test2 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os2
|
||||
<span class="gp">$ </span>make run <span class="nv">LOG</span><span class="o">=</span>INFO
|
||||
|
||||
@@ -318,11 +318,23 @@
|
||||
<p>上述的3,4,5步不是必须的,你也可以线下本地开发。</p>
|
||||
<p>注:如果是本地的ubuntu中建立开发环境,可在shell中执行 <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">ubuntu_local_setenv</span></code> 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。</p>
|
||||
</div>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022/
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab1<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab1<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test3 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行 <a class="reference external" href="https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os3-ref">lab1(os3)参考框架:</a> :</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os3-ref
|
||||
<span class="gp">$ </span>make run
|
||||
|
||||
@@ -314,11 +314,22 @@
|
||||
</div>
|
||||
<p>本章应用运行起来效果与上一章基本一致。</p>
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022/
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab2<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab2<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test4 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行 <a class="reference external" href="https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os4-ref">lab2(os4)参考框架:</a> :</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os4-ref
|
||||
<span class="gp">$ </span>make run
|
||||
|
||||
@@ -320,17 +320,25 @@
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2>实践体验<a class="headerlink" href="#id3" title="永久链接至标题">¶</a></h2>
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022/
|
||||
<span class="gp">$ </span>make setupclassroom_test5 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行`lab3(os5)参考框架: <<a class="reference external" href="https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os5-ref">https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os5-ref</a>>`_ :</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os5-ref
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab3<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab3<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test5 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
<span class="gp">$ </span><span class="nb">cd</span> os5-ref
|
||||
<span class="gp">$ </span>make run
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>待内核初始化完毕之后,将在屏幕上打印可用的应用列表并进入shell程序:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>[rustsbi] RustSBI version 0.2.0-alpha.4
|
||||
.______ __ __ _______.___________. _______..______ __
|
||||
|
||||
@@ -312,17 +312,25 @@
|
||||
<p>上述的3,4,5步不是必须的,你也可以线下本地开发。</p>
|
||||
<p>注:如果是本地的ubuntu中建立开发环境,可在shell中执行 <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">ubuntu_local_setenv</span></code> 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。</p>
|
||||
</div>
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022/
|
||||
<span class="gp">$ </span>make setupclassroom_test6 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行本章代码参考框架:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os6-ref
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab4<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab4<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test6 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
<span class="gp">$ </span><span class="nb">cd</span> os6-ref
|
||||
<span class="gp">$ </span>make run
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>内核初始化完成之后就会进入shell程序,在这里我们运行一下本章的测例 <code class="docutils literal notranslate"><span class="pre">ch6b_filetest_simple</span></code> :</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>>> ch6b_filetest_simple
|
||||
file_test passed!
|
||||
|
||||
@@ -303,6 +303,17 @@
|
||||
<span class="go">//$ make setupclassroom //注意:在本章不需要做这一步,因为这不是一个作业。(这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行 <a class="reference external" href="https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os7-ref">os7参考框架:</a> :</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os7-ref
|
||||
<span class="gp">$ </span>make run
|
||||
|
||||
@@ -360,11 +360,22 @@
|
||||
<p>注:如果是本地的ubuntu中建立开发环境,可在shell中执行 <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">ubuntu_local_setenv</span></code> 来自动安装配置开发环境(执行``sudo``需要root权限,仅需要执行一次)。</p>
|
||||
</div>
|
||||
<p>获取本章代码:</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/LearningOS/rust-based-os-comp2022.git
|
||||
<span class="gp">$ </span><span class="nb">cd</span> rust-based-os-comp2022/
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone <span class="sb">``</span>gitaddr of github-classroom-build-lab5<span class="sb">``</span>
|
||||
<span class="gp">$ </span><span class="nb">cd</span> <span class="sb">``</span>github-classroom-build-lab5<span class="sb">``</span>
|
||||
<span class="gp">$ </span>make setupclassroom_test8 //注意:这一步很重要,是用于github classroom自动评测你的工作。这一步只需在首次克隆项目仓库时执行一次,以后一般就不用执行了,除非 .github/workflows/classroom.yml发生了变化。
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">注解</p>
|
||||
<p>实验名称 :实验编号
|
||||
- lab0-0 : test1
|
||||
- lab0-1:test2
|
||||
- lab1:test3
|
||||
- lab2:test4
|
||||
- lab3:test5
|
||||
- lab4:test6
|
||||
- lab5:test8</p>
|
||||
</div>
|
||||
<p>在 qemu 模拟器上运行本章代码 <a class="reference external" href="https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os8-ref">lab5(os8)参考框架:</a> :</p>
|
||||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">cd</span> os8-ref
|
||||
<span class="gp">$ </span>make run
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user