We build the module after writing it.
[cascardo/kernel/old_slides/.git] / 01.hello / 01.hello.xml
index 4c1bf5b..954422f 100644 (file)
@@ -34,6 +34,22 @@ We have prepared sample code to build in the samples/ directory. Try them.
 </para>
 </foil>
 
+<foil>
+<title>Init and Exit Functions</title>
+<para>
+We use <emphasis>module_init</emphasis> and <emphasis>module_exit</emphasis> to
+declare our init and exit functions.
+</para>
+</foil>
+
+<foil>
+<title>Init and Exit Functions</title>
+<para>
+The <emphasis>__init</emphasis> and <emphasis>__exit</emphasis> marks allow the
+kernel to remove them when they are not needed, reducing memory consumption.
+</para>
+</foil>
+
 <foil>
 <title>Building</title>
 <para>
@@ -44,4 +60,46 @@ $ make -C /lib/modules/`uname -r`/build M=$PWD modules
 </screen>
 </foil>
 
+<foil>
+<title>Module Tools</title>
+<itemizedlist>
+<listitem>
+insmod
+</listitem>
+<listitem>
+rmmod
+</listitem>
+<listitem>
+modprobe
+</listitem>
+<listitem>
+modinfo
+</listitem>
+<listitem>
+depmod
+</listitem>
+</itemizedlist>
+</foil>
+
+<foil>
+<title>Module Description Definitions</title>
+<itemizedlist>
+<listitem>
+MODULE\_AUTHOR
+</listitem>
+<listitem>
+MODULE\_DESCRIPTION
+</listitem>
+<listitem>
+MODULE\_VERSION
+</listitem>
+<listitem>
+MODULE\_LICENSE
+</listitem>
+<listitem>
+MODULE\_ALIAS
+</listitem>
+</itemizedlist>
+</foil>
+
 </slides>