From 7ec20455300298bb170ba50c1b22c1d9236cef00 Mon Sep 17 00:00:00 2001
From: Benedikt Spranger <b.spranger@linutronix.de>
Date: Mon, 23 Nov 2009 20:20:42 +0100
Subject: Modul basics initial

---
 .../module-basics/pres_module-basics_de.tex        | 135 +++++++++++++++++++++
 1 file changed, 135 insertions(+)
 create mode 100644 kernel-devel/module-basics/pres_module-basics_de.tex

(limited to 'kernel-devel/module-basics/pres_module-basics_de.tex')

diff --git a/kernel-devel/module-basics/pres_module-basics_de.tex b/kernel-devel/module-basics/pres_module-basics_de.tex
new file mode 100644
index 0000000..3e62220
--- /dev/null
+++ b/kernel-devel/module-basics/pres_module-basics_de.tex
@@ -0,0 +1,135 @@
+\documentclass{beamer}
+\usetheme{linutronix}
+\usepackage{german}
+\usepackage[utf8]{inputenc}
+\usepackage{pgf}
+\usepackage{graphicx}
+\usepackage{psfrag}
+\usepackage{listings}
+
+\title{Treiber Modul Grundlagen}
+\institute{Linutronix GmbH}
+
+\begin{document}
+\lstset{language=[ANSI]C}
+
+\maketitle
+
+% ----- Slide Aufbau ------------------
+\begin{frame}[fragile]
+\frametitle{Aufbau eines Treiber Moduls}
+\pause
+\begin{itemize}
+\item Header
+\pause
+\begin{scriptsize}
+\begin{lstlisting}[frame=trBL]
+#include <linux/init.h>
+#include <linux/module.h>
+\end{lstlisting}
+\end{scriptsize}
+\pause
+\item Init
+\pause
+\begin{scriptsize}
+\begin{lstlisting}[frame=trBL]
+static int __init vain_init(void)
+{
+        printk(KERN_INFO "vain_init: done\n");
+        return 0;
+}
+
+module_init(vain_init);
+\end{lstlisting}
+\end{scriptsize}
+\end{itemize}
+\end{frame}
+
+% ----- Slide Aufbau (fort.) ------------------
+\begin{frame}[fragile]
+\frametitle{Aufbau (fort.)}
+\begin{itemize}
+\item Exit
+\pause
+\begin{scriptsize}
+\begin{lstlisting}[frame=trBL]
+static void __exit vain_exit(void)
+{
+        printk(KERN_INFO "vain_exit: done\n");
+}
+
+module_exit(vain_exit);
+\end{lstlisting}
+\end{scriptsize}
+\pause
+\item Beschreibung
+\pause
+\begin{tiny}
+\begin{lstlisting}[frame=trBL]
+MODULE_AUTHOR("Benedikt Spranger <b.spranger@linutronix.de>");
+MODULE_DESCRIPTION("a more or less useless module");
+MODULE_LICENSE("GPL v2");
+\end{lstlisting}
+\end{tiny}
+\end{itemize}
+\end{frame}
+
+% ----- Slide Rumpf Treiber ------------------
+\begin{frame}[fragile]
+\frametitle{Rumpf Treiber}
+\begin{tiny}
+\lstinputlisting{vain/vain.c}
+\end{tiny}
+\end{frame}
+
+% ----- Slide Makefile ------------------
+\begin{frame}[fragile]
+\frametitle{Makefile}
+\begin{scriptsize}
+\lstinputlisting[language=make]{vain/Makefile}
+\end{scriptsize}
+\end{frame}
+
+% ----- Slide build ------------------
+\begin{frame}[fragile]
+\frametitle{Bauen, laden und entladen des Moduls}
+\begin{itemize}
+\item Bauen
+\pause
+\begin{tiny}
+\begin{verbatim}
+$ make
+make -C /lib/modules/2.6.30/build M=/path/to/vain modules
+make[1]: Entering directory `/usr/src/linux-2.6.30'
+  CC [M]  /path/to/vain/vain.o
+  Building modules, stage 2.
+  MODPOST 1 modules
+  CC      /path/to//vain/vain.mod.o
+  LD [M]  /path/to//vain/vain.ko
+make[1]: Leaving directory `/usr/src/linux-2.6.30'
+$
+\end{verbatim}
+\end{tiny}
+\pause
+\item Laden
+\pause
+\begin{tiny}
+\begin{verbatim}
+# insmod ./vain.ko
+vain_init: done
+#
+\end{verbatim}
+\end{tiny}
+\item Entladen
+\pause
+\begin{tiny}
+\begin{verbatim}
+# rmmod vain
+vain_exit: done
+#
+\end{verbatim}
+\end{tiny}
+\end{itemize}
+\end{frame}
+
+\end{document}
-- 
cgit v1.2.3

