|
3 | 3 | <head>
|
4 | 4 | <meta charset="utf-8" />
|
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
| - <title>Collaboration — Linux 系统内核文档</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> |
| 6 | + <title>合作 — Linux 系统内核文档</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> |
7 | 7 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
8 | 8 | <link rel="stylesheet" href="../_static/asciinema-player.css" type="text/css" />
|
9 | 9 | <link rel="stylesheet" href="../_static/theme_overrides.css" type="text/css" />
|
|
82 | 82 | <li class="toctree-l2"><a class="reference internal" href="lab10-networking.html">SO2 实验 10——网络</a></li>
|
83 | 83 | <li class="toctree-l2"><a class="reference internal" href="lab11-arm-kernel-development.html">SO2 实验 11——ARM 内核开发</a></li>
|
84 | 84 | <li class="toctree-l2"><a class="reference internal" href="lab12-kernel-profiling.html">SO2 实验 12——内核分析</a></li>
|
85 |
| -<li class="toctree-l2 current"><a class="current reference internal" href="#">Collaboration</a><ul> |
86 |
| -<li class="toctree-l3"><a class="reference internal" href="#use-github-gitlab">1. Use Github / Gitlab</a></li> |
87 |
| -<li class="toctree-l3"><a class="reference internal" href="#start-with-a-skeleton-for-the-assignment">2. Start with a skeleton for the assignment</a></li> |
88 |
| -<li class="toctree-l3"><a class="reference internal" href="#add-a-commit-for-each-individual-change">3. Add a commit for each individual change</a></li> |
89 |
| -<li class="toctree-l3"><a class="reference internal" href="#split-the-work-inside-the-team">4. Split the work inside the team</a></li> |
90 |
| -<li class="toctree-l3"><a class="reference internal" href="#do-reviews">5. Do reviews</a></li> |
91 |
| -<li class="toctree-l3"><a class="reference internal" href="#merge-the-work">6. Merge the work</a></li> |
| 85 | +<li class="toctree-l2 current"><a class="current reference internal" href="#">合作</a><ul> |
| 86 | +<li class="toctree-l3"><a class="reference internal" href="#github-gitlab">1. 使用 Github / Gitlab</a></li> |
| 87 | +<li class="toctree-l3"><a class="reference internal" href="#section-2">2. 从任务的骨架开始</a></li> |
| 88 | +<li class="toctree-l3"><a class="reference internal" href="#section-3">3. 为每个单独的更改添加提交</a></li> |
| 89 | +<li class="toctree-l3"><a class="reference internal" href="#section-4">4. 在团队内拆分工作</a></li> |
| 90 | +<li class="toctree-l3"><a class="reference internal" href="#section-5">5. 进行代码审查</a></li> |
| 91 | +<li class="toctree-l3"><a class="reference internal" href="#section-6">6. 合并工作</a></li> |
92 | 92 | </ul>
|
93 | 93 | </li>
|
94 | 94 | <li class="toctree-l2"><a class="reference internal" href="assign0-kernel-api.html">Assignment 0 - Kernel API</a></li>
|
|
156 | 156 | <ul class="wy-breadcrumbs">
|
157 | 157 | <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
|
158 | 158 | <li class="breadcrumb-item"><a href="index.html">操作系统 2</a></li>
|
159 |
| - <li class="breadcrumb-item active">Collaboration</li> |
| 159 | + <li class="breadcrumb-item active">合作</li> |
160 | 160 | <li class="wy-breadcrumbs-aside">
|
161 | 161 | <a href="../_sources/so2/assign-collaboration.rst.txt" rel="nofollow"> View page source</a>
|
162 | 162 | </li>
|
|
166 | 166 | <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
167 | 167 | <div itemprop="articleBody">
|
168 | 168 |
|
169 |
| - <div class="section" id="collaboration"> |
170 |
| -<h1>Collaboration<a class="headerlink" href="#collaboration" title="永久链接至标题">¶</a></h1> |
171 |
| -<p>Collaboration is essential in open source world and we encourage you |
172 |
| -to pick a team partner to work on selected assignments.</p> |
173 |
| -<p>Here is a simple guide to get you started:</p> |
174 |
| -<div class="section" id="use-github-gitlab"> |
175 |
| -<h2>1. Use Github / Gitlab<a class="headerlink" href="#use-github-gitlab" title="永久链接至标题">¶</a></h2> |
176 |
| -<p>Best way to share your work inside the team is to use a version control system (VCS) |
177 |
| -in order to track each change. Mind that you must make your repo private and only allow |
178 |
| -read/write access rights to team members.</p> |
| 169 | + <div class="section" id="section-1"> |
| 170 | +<h1>合作<a class="headerlink" href="#section-1" title="永久链接至标题">¶</a></h1> |
| 171 | +<p>在开源世界中,合作是至关重要的,我们鼓励你选择一个团队合作伙伴来共同完成选定的任务。</p> |
| 172 | +<p>以下是一个简单的指南,帮助你入门:</p> |
| 173 | +<div class="section" id="github-gitlab"> |
| 174 | +<h2>1. 使用 Github / Gitlab<a class="headerlink" href="#github-gitlab" title="永久链接至标题">¶</a></h2> |
| 175 | +<p>在团队内部共享你的工作成果的最佳方式是使用版本控制系统(VCS)来跟踪每一次更改。请注意,你必须将你的存储库设置为私有,并仅授予团队成员读/写访问权限。</p> |
179 | 176 | </div>
|
180 |
| -<div class="section" id="start-with-a-skeleton-for-the-assignment"> |
181 |
| -<h2>2. Start with a skeleton for the assignment<a class="headerlink" href="#start-with-a-skeleton-for-the-assignment" title="永久链接至标题">¶</a></h2> |
182 |
| -<p>Add <cite>init</cite>/<cite>exit</cite> functions, driver operations and global structures that you driver might need.</p> |
| 177 | +<div class="section" id="section-2"> |
| 178 | +<h2>2. 从任务的骨架开始<a class="headerlink" href="#section-2" title="永久链接至标题">¶</a></h2> |
| 179 | +<p>添加 <cite>init</cite>/<cite>exit</cite> 函数、驱动程序操作和可能需要的全局结构。</p> |
183 | 180 | <div class="highlight-c"><div class="highlight"><pre><span></span><span class="c1">// SPDX-License-Identifier: GPL-2.0</span>
|
184 | 181 | <span class="cm">/*</span>
|
185 |
| -<span class="cm"> * uart16550.c - UART16550 driver</span> |
| 182 | +<span class="cm"> * uart16550.c——UART16550 驱动程序</span> |
186 | 183 | <span class="cm"> *</span>
|
187 |
| -<span class="cm"> * Author: John Doe <john.doe@mail.com></span> |
188 |
| -<span class="cm"> * Author: Ionut Popescu <ionut.popescu@mail.com></span> |
| 184 | +<span class="cm"> * 作者:John Doe <john.doe@mail.com></span> |
| 185 | +<span class="cm"> * 作者:Ionut Popescu <ionut.popescu@mail.com></span> |
189 | 186 | <span class="cm"> */</span>
|
190 | 187 | <span class="k">struct</span> <span class="n">uart16550_dev</span> <span class="p">{</span>
|
191 | 188 | <span class="k">struct</span> <span class="n">cdev</span> <span class="n">cdev</span><span class="p">;</span>
|
@@ -254,39 +251,34 @@ <h2>2. Start with a skeleton for the assignment<a class="headerlink" href="#star
|
254 | 251 | </pre></div>
|
255 | 252 | </div>
|
256 | 253 | </div>
|
257 |
| -<div class="section" id="add-a-commit-for-each-individual-change"> |
258 |
| -<h2>3. Add a commit for each individual change<a class="headerlink" href="#add-a-commit-for-each-individual-change" title="永久链接至标题">¶</a></h2> |
259 |
| -<p>First commit must always be the skeleton file. And the rest of the code should be on top of skeleton file. |
260 |
| -Please write a good commit mesage. Explain briefly what the commit does and <em>why</em> it is necessary.</p> |
261 |
| -<p>Follow the seven rules of writing a good commit message: <a class="reference external" href="https://cbea.ms/git-commit/#seven-rules">https://cbea.ms/git-commit/#seven-rules</a></p> |
| 254 | +<div class="section" id="section-3"> |
| 255 | +<h2>3. 为每个单独的更改添加提交<a class="headerlink" href="#section-3" title="永久链接至标题">¶</a></h2> |
| 256 | +<p>首个提交必须是骨架文件。而其余的代码应该在骨架文件的基础上进行添加。请认真写提交消息。简要解释该提交的内容以及 <em>为什么</em> 它是必要的。</p> |
| 257 | +<p>遵循良好提交消息的七个规则:[点击这里](<a class="reference external" href="https://cbea.ms/git-commit/#seven-rules">https://cbea.ms/git-commit/#seven-rules</a>)</p> |
262 | 258 | <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">Commit 3c92a02cc52700d2cd7c50a20297eef8553c207a (HEAD -> tema2)</span>
|
263 | 259 | <span class="go">Author: John Doe <john.doe@mail.com></span>
|
264 | 260 | <span class="go">Date: Mon Apr 4 11:54:39 2022 +0300</span>
|
265 | 261 |
|
266 |
| -<span class="go"> uart16550: Add initial skeleton for ssignment #2</span> |
| 262 | +<span class="go"> uart16550:为任务 #2 添加初始骨架</span> |
267 | 263 |
|
268 |
| -<span class="go"> This adds simple skeleton file for uart16550 assignment. Notice</span> |
269 |
| -<span class="go"> module init/exit callbacks and file_operations dummy implementation</span> |
270 |
| -<span class="go"> for open/release/read/write/ioctl.</span> |
| 264 | +<span class="go"> 这个提交添加了 uart16550 任务的简单骨架文件。请注意模块的 init/exit 回调和 open/release/read/write/ioctl 的 file_operation 的虚拟实现。</span> |
271 | 265 |
|
272 | 266 | <span class="go"> Signed-off-by: John Doe <john.doe@mail.com></span>
|
273 | 267 | </pre></div>
|
274 | 268 | </div>
|
275 | 269 | </div>
|
276 |
| -<div class="section" id="split-the-work-inside-the-team"> |
277 |
| -<h2>4. Split the work inside the team<a class="headerlink" href="#split-the-work-inside-the-team" title="永久链接至标题">¶</a></h2> |
278 |
| -<p>Add <cite>TODOs</cite> with each team member tasks. Try to split the work evenly.</p> |
279 |
| -<p>Before starting to code, make a plan. On top of your skeleton file, add TODOs with each member tasks. Agree on global |
280 |
| -structures and the overlall driver design. Then start coding.</p> |
| 270 | +<div class="section" id="section-4"> |
| 271 | +<h2>4. 在团队内拆分工作<a class="headerlink" href="#section-4" title="永久链接至标题">¶</a></h2> |
| 272 | +<p>将每个团队成员的任务添加进 <cite>TODO</cite>。尽量平均地拆分工作。</p> |
| 273 | +<p>在开始编码之前,制定一个计划。在骨架文件的顶部,将每个成员的任务添加进 <cite>TODO</cite>。就全局结构和整体驱动程序设计达成一致。然后开始编码。</p> |
281 | 274 | </div>
|
282 |
| -<div class="section" id="do-reviews"> |
283 |
| -<h2>5. Do reviews<a class="headerlink" href="#do-reviews" title="永久链接至标题">¶</a></h2> |
284 |
| -<p>Create Pull Requests with your commits and go through review rounds with your team members. You can follow <cite>How to create a PR</cite> <a class="reference external" href="https://www.youtube.com/watch?v=YvoHJJWvn98">video</a>.</p> |
| 275 | +<div class="section" id="section-5"> |
| 276 | +<h2>5. 进行代码审查<a class="headerlink" href="#section-5" title="永久链接至标题">¶</a></h2> |
| 277 | +<p>创建包含你的提交的 PR,并与团队成员进行审查。你可以参考 <cite>创建拉取请求教程</cite> 的 <a class="reference external" href="https://www.youtube.com/watch?v=YvoHJJWvn98">视频</a>。</p> |
285 | 278 | </div>
|
286 |
| -<div class="section" id="merge-the-work"> |
287 |
| -<h2>6. Merge the work<a class="headerlink" href="#merge-the-work" title="永久链接至标题">¶</a></h2> |
288 |
| -<p>The final work is the result of merging all the pull requests. Following the commit messages |
289 |
| -one should clearly understand the progress of the code and how the work was managed inside the team.</p> |
| 279 | +<div class="section" id="section-6"> |
| 280 | +<h2>6. 合并工作<a class="headerlink" href="#section-6" title="永久链接至标题">¶</a></h2> |
| 281 | +<p>最终的工作是合并所有 PR 的结果。根据提交消息,他人应该能够清楚地了解代码的进展以及在团队内工作是如何管理的。</p> |
290 | 282 | <div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">f5118b873294 uart16550: Add uart16550_interrupt implementation</span>
|
291 | 283 | <span class="go">2115503fc3e3 uart16550: Add uart16550_ioctl implementation</span>
|
292 | 284 | <span class="go">b31a257fd8b8 uart16550: Add uart16550_write implementation</span>
|
|
0 commit comments