Skip to content

Commit

Permalink
Publish lktp-lund-2018 (built from linux-kernel-labs/linux#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle CI committed May 2, 2018
1 parent 6195930 commit b3b8dae
Show file tree
Hide file tree
Showing 27 changed files with 1,067 additions and 6 deletions.
1 change: 1 addition & 0 deletions lktp-lund-2018/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ then point your browser at **Documentation/output/labs/index.html**.
lectures/interrupts.rst
lectures/smp.rst
lectures/debugging.rst
lectures/lund2018.rst
labs/vm.rst
labs/exercises.rst
labs/introduction.rst
Expand Down
236 changes: 236 additions & 0 deletions lktp-lund-2018/_sources/lectures/lund2018.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
=================================
The Linux Kernel Teaching Project
=================================

.. ifnotslides::

`View slides <lund2018-slides.html>`_

http://github.com/linux-kernel-labs

Octavian Purdila <[email protected]>

Daniel Baluta <[email protected]>


.. slideconf::
:autoslides: True
:theme: single-level


What is it?
===========

* A collection of lectures and labs about Linux kernel topics

* The lectures focus on theoretical topics and Linux kernel
internals exploration

* The labs focus on device drivers topics and they resemble "howto"
style documentation

* Content based on the `Operatings Systems 2
<http://ocw.cs.pub.ro/courses/so2>`_ course from the Computer
Science and Engineering Department, the Faculty of Automatic
Control and Computers, University POLITEHNICA of Bucharest.

What is it for?
===============

* A base for people wanting to start learning about a specific
subsystem or a particular device driver

* A base for creating operating systems internals courses based on
the Linux kernel

* A base for creating traning courses on Linux kernel


Lectures
========

* Present topics about Linux kernel internals as well as any
required OS internals concepts

* Topics: system calls, address space, SMP, interrupts, processes,
etc.

`Example: Introduction <intro.html>`_


Labs
====

The labs focus on device drivers topics and they resemble "howto"
style documentation. Each topic has two parts:

* a walk-through the topic which contains an overview, the main
abstractions, simple examples and pointers to APIs

* a hands-on part which contains a few exercises that should be
resolved by the student; to focus on the topic at hand, the
student is presented with a starting coding skeleton and with
in-depth tips on how to solve the exercises


`Example: Kernel Modules <../labs/kernel_modules.html>`_


VM
==

* Exercises are designed to run on a qemu based virtual machine

* Lectures use gdb for introspection (e.g. follow system call flow)

* The virtual machine setup uses prebuild Yocto images that it
downloads from downloads.yocyoproject.org and a kernel image that
it builds itself

* Simulates typical Linux embedded development (e.g. students
connect to the VM via serial, simulates JTAG debugging via qemu
gdb support)


VM demo
=======

|_|

.. asciicast:: syscalls-inspection.cast

Exercises
=========

* Each lab has a hands-on exercises section which will contain
in-depth, incremental clues on how to solve one or multiple
tasks.

* To focus on a particular issue most of the tasks will be
performed on existing skeleton drivers.

* Each skeleton driver has clearly marked sections that needs to be
filled in order to complete the tasks

* The skeleton drivers are generated from full source examples
located in tools/labs/templates

* Targets for building and copying modules to VM image

Exercises demo
==============

|_|

.. asciicast:: syscalls-inspection.cast


How?
====

* Integrated with the Linux kernel documentation system

* Uses a few extra sphinx plugins: hieroglyph, ditaa, ascinema

* Provides a qemu + yocto sandbox for kernel development as well as
iterative code templates


Hieroglyph
==========

* A sphinx plugin that creates HTML slides

* Same source for slides and docs

.. code-block:: none
Advocates of micro-kernels often suggest that micro-kernel are
superior because of the modular design a micro-kernel
enforces. However, monolithic kernels can also be modular and
there are several approaches that modern monolithic kernels use
toward this goal:
.. slide:: Monolithic kernels *can* be modular
:level: 2
:inline-contents: True
* Components can enabled or disabled at compile time
* Support of loadable kernel modules (at runtime)
`Docs view <https://linux-kernel-labs.github.io/master/lectures/intro.html#micro-kernels-vs-monolithic-kernels>`_
`Slides view <https://linux-kernel-labs.github.io/master/lectures/intro-slides.html#6>`_


ditaa
=====

.. code-block:: none
.. ditaa::
+---------------+ +--------------+ +---------------+ -\
| Application 1 | | Application2 | ... | Application n | |
+---------------+ +--------------+ +---------------+ |> User space
| | | |
v v v -/
+--------------------------------------------------------+ -\
| System Call Interface | |
+--------------------------------------------------------+ |
.. ditaa::

+---------------+ +--------------+ +---------------+ -\
| Application 1 | | Application2 | ... | Application n | |
+---------------+ +--------------+ +---------------+ |> User space
| | | |
v v v -/
+--------------------------------------------------------+ -\
| System Call Interface | |
+--------------------------------------------------------+ |
| | | |
v v v |> Kernel space
+--------------------------------------------------------+ |
| Kernel | |
+--------------------------------------------------------+ |
| Device drivers | |
+--------------------------------------------------------+ -/
| | | -\
v v v |> Hardware
-/

ascinema
========

.. code-block:: none
.. asciicast:: syscalls-inspection.cast
.. asciicast:: syscalls-inspection.cast


Templates
=========

* Full solution provided for exercises

* Script for generating skeletons from solution with simple
`/* TODO <task>/<lines> */` annotations in the source code

.. code-block:: c
static void timer_handler(struct timer_list *tl)
{
/* TODO 1/4: print a message */
static size_t nseconds;
nseconds += TIMER_TIMEOUT;
pr_info("[timer_handler] nseconds = %d\n", nseconds);

/* TODO 2: rechedule timer */
mod_timer(tl, jiffies + TIMER_TIMEOUT * HZ);
}
1 change: 1 addition & 0 deletions lktp-lund-2018/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<li class="toctree-l1"><a class="reference internal" href="lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="labs/vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="labs/exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="labs/introduction.html">Introduction</a></li>
Expand Down
17 changes: 17 additions & 0 deletions lktp-lund-2018/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<li class="toctree-l1"><a class="reference internal" href="lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="labs/vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="labs/exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="labs/introduction.html">Introduction</a></li>
Expand Down Expand Up @@ -321,6 +322,22 @@ <h1>Linux Kernel Teaching<a class="headerlink" href="#linux-kernel-teaching" tit
<li class="toctree-l2"><a class="reference internal" href="lectures/debugging.html#other-tools">Other tools</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lectures/lund2018.html">The Linux Kernel Teaching Project</a><ul>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#what-is-it">What is it?</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#what-is-it-for">What is it for?</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#lectures">Lectures</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#labs">Labs</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#vm">VM</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#vm-demo">VM demo</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#exercises">Exercises</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#exercises-demo">Exercises demo</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#how">How?</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#hieroglyph">Hieroglyph</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#ditaa">ditaa</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#ascinema">ascinema</a></li>
<li class="toctree-l2"><a class="reference internal" href="lectures/lund2018.html#templates">Templates</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="labs/vm.html">Virtual Machine Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="labs/vm.html#starting-the-vm">Starting the VM</a></li>
<li class="toctree-l2"><a class="reference internal" href="labs/vm.html#connecting-to-the-vm">Connecting to the VM</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/block_device_drivers.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/deferred_work.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/device_drivers.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/device_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/exercises.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/interrupts.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Introduction</a><ul>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/kernel_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/kernel_modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
1 change: 1 addition & 0 deletions lktp-lund-2018/labs/memory_mapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<li class="toctree-l1"><a class="reference internal" href="../lectures/interrupts.html">Interrupts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/smp.html">Symmetric Multi-Processing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/debugging.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lectures/lund2018.html">The Linux Kernel Teaching Project</a></li>
<li class="toctree-l1"><a class="reference internal" href="vm.html">Virtual Machine Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="exercises.html">Exercises</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
Expand Down
Loading

0 comments on commit b3b8dae

Please sign in to comment.