Skip to content

Commit

Permalink
Update documentation for lab1
Browse files Browse the repository at this point in the history
* Add reference to so2-labs gitlab repo
* Change `make boot` to `make console`

Signed-off-by: Dragoș-Iulian ARGINT <[email protected]>
  • Loading branch information
dragosargint committed Mar 6, 2024
1 parent 42f075b commit 00ffad9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
5 changes: 5 additions & 0 deletions Documentation/teaching/info/vm.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.. _vm_link:

=====================
Recommended Setup
=====================
The simplest way to achieve a functional setup is to follow the steps listed in `this repo <https://gitlab.cs.pub.ro/so2/so2-labs>`__.

=====================
Virtual Machine Setup
=====================
Expand Down
13 changes: 6 additions & 7 deletions Documentation/teaching/labs/exercises-summary.hrst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. important::

To solve exercises, you need to perform these steps:
We strongly encourage you to use the setup from `this repository <https://gitlab.cs.pub.ro/so2/so2-labs>`__.

To solve exercises, you need to perform these steps:
* prepare skeletons from templates
* build modules
* copy modules to the VM
* start the VM and test the module in the VM.

The current lab name is |LAB_NAME|. See the exercises for the task name.
Expand All @@ -30,17 +30,16 @@

tools/labs $ make build

Then, copy the modules and start the VM:
Then, start the VM:

.. code-block:: shell

tools/labs $ make copy
tools/labs $ make boot
tools/labs $ make console

The modules are placed in /home/root/skels/|LAB_NAME|/<task_name>.

Alternatively, we can copy files via :command:`scp`, in order to avoid restarting the VM.
For additional details about connecting to the VM via the network, please check :ref:`vm_interaction_link`.
You DO NOT need to STOP the VM when rebuilding modules!
The local `skels` directory is shared with the VM.

Review the `Exercises`_ section for more detailed information.

Expand Down
11 changes: 4 additions & 7 deletions Documentation/teaching/labs/kernel_modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -996,17 +996,15 @@ in the Linux kernel source code:
To work with the kernel modules, we will follow the steps described
:ref:`above <exercises_summary>`.
Generate the skeleton for the task named **1-2-test-mod** then build and
copy the module to the VM, by running the following commands in
:file:`tools/labs`.
Generate the skeleton for the task named **1-2-test-mod** then build the module,
by running the following command in :file:`tools/labs`.
.. code-block:: bash
$ LABS=kernel_modules make skels
$ make build
$ make copy
These commands will build and copy all the modules in the current
These command will build all the modules in the current
lab skeleton.
.. warning::
Expand All @@ -1015,8 +1013,7 @@ lab skeleton.
:file:`skels/kernel_modules/3-error-mod/` and remove the corresponding
line from ``skels/Kbuild``.
Start the VM using :command:`make boot`, connect to the serial console
using `minicom -D serial.pts` and perform the following tasks:
Start the VM using :command:`make console`, and perform the following tasks:
* load the kernel module.
Expand Down
6 changes: 3 additions & 3 deletions Documentation/teaching/so2/lab1-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Exercises
.. include:: ../labs/exercises-summary.hrst
.. |LAB_NAME| replace:: kernel_modules

.. include:: ../labs/introduction.rst
:start-after: [EXERCISE1-BEGIN]
:end-before: [EXERCISE1-END]
.. .. include:: ../labs/introduction.rst
.. :start-after: [EXERCISE1-BEGIN]
.. :end-before: [EXERCISE1-END]
.. include:: ../labs/kernel_modules.rst
:start-after: [EXERCISE1-BEGIN]
Expand Down

0 comments on commit 00ffad9

Please sign in to comment.