[FE training-materials-updates] Added lab instructions in LaTeX

Michael Opdenacker michael.opdenacker at free-electrons.com
Tue Feb 7 11:21:28 CET 2012


Resent after issues with e-mail delivery (investigating)

- Log -----------------------------------------------------------------
http://git.free-electrons.com/training-materials/commit/?id=b22233b44117071af0a60066cb039287a42e0b5b

commit b22233b44117071af0a60066cb039287a42e0b5b
Author: Michael Opdenacker <michael at free-electrons.com>
Date:   Tue Feb 7 10:45:53 2012 +0100

    Added lab instructions in LaTeX

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c8a0742
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,186 @@
+
+# Needed tools
+INKSCAPE = inkscape
+PDFLATEX = pdflatex
+DIA      = dia
+EPSTOPDF = epstopdf
+
+# List of labs for the different courses
+SYSDEV_LABS   = setup \
+		sysdev-toolchain \
+		sysdev-u-boot \
+		sysdev-kernel-fetch-and-patch \
+		sysdev-kernel-cross-compiling \
+		sysdev-tinysystem \
+		sysdev-block-filesystems \
+		sysdev-flash-filesystems \
+		sysdev-thirdparty \
+		sysdev-buildroot \
+		sysdev-application-development \
+		sysdev-application-debugging \
+		sysdev-real-time \
+		sysdev-mdev \
+		backup
+KERNEL_LABS   = setup \
+		kernel-sources \
+		kernel-module-environment \
+		kernel-module-simple \
+		kernel-serial-iomem \
+		kernel-serial-output \
+		kernel-serial-interrupt \
+		kernel-locking \
+		kernel-debugging \
+		kernel-serial-driver \
+		kernel-power-management \
+		kernel-git \
+		backup
+
+# Output directory
+OUTDIR   = $(PWD)/out
+
+# Environment for pdflatex, which allows it to find the stylesheet in the
+# common/ directory.
+PDFLATEX_ENV = TEXINPUTS=.:$(PWD)/common:
+
+# Arguments passed to pdflatex
+PDFLATEX_OPT = -shell-escape -file-line-error -halt-on-error
+
+# The common slide stylesheet
+STYLESHEET = common/beamerthemeFreeElectrons.sty
+
+#
+# === Picture lookup ===
+#
+
+# Function that computes the list of pictures of the extension given
+# in $(2) from the directories in $(1), and transforms the filenames
+# in .pdf in the output directory. This is used to compute the list of
+# .pdf files that need to be generated from .dia or .svg files.
+PICTURES_WITH_TRANSFORMATION = \
+	$(patsubst %.$(2),$(OUTDIR)/%.pdf,$(foreach s,$(1),$(wildcard $(s)/*.$(2))))
+
+# Function that computes the list of pictures of the extension given
+# in $(2) from the directories in $(1). This is used for pictures that
+# to not need any transformation, such as bitmap files in the .png or
+# .jpg formats.
+PICTURES_NO_TRANSFORMATION = \
+	$(patsubst %,$(OUTDIR)/%,$(foreach s,$(1),$(wildcard $(s)/*.$(2))))
+
+# Function that computes the list of pictures from the directories in
+# $(1) and returns output filenames in the output directory.
+PICTURES = \
+	$(call PICTURES_WITH_TRANSFORMATION,$(1),svg) \
+	$(call PICTURES_WITH_TRANSFORMATION,$(1),dia) \
+	$(call PICTURES_NO_TRANSFORMATION,$(1),png)   \
+	$(call PICTURES_NO_TRANSFORMATION,$(1),jpg)
+
+# List of common pictures
+COMMON_PICTURES   = $(call PICTURES,common)
+
+default: help
+
+#
+# === Compilation of labs ===
+#
+
+ifdef LABS
+# Compute the set of chapters to build depending on the name of the
+# PDF file that was requested.
+ifeq ($(LABS),full-kernel)
+LABS_VARSFILE      = common/kernel-labs-vars.tex
+LABS_CHAPTERS      = $(KERNEL_LABS)
+else ifeq ($(LABS),full-sysdev)
+LABS_VARSFILE      = common/sysdev-labs-vars.tex
+LABS_CHAPTERS      = $(SYSDEV_LABS)
+else
+LABS_VARSFILE      = common/single-labs-vars.tex
+LABS_CHAPTERS      = $(LABS)
+endif
+
+# Compute the set of corresponding .tex files and pictures
+LABS_TEX      = \
+	$(LABS_VARSFILE) \
+	common/labs-header.tex \
+	$(foreach s,$(LABS_CHAPTERS),$(wildcard labs/$(s)/$(s).tex)) \
+	common/labs-footer.tex
+LABS_PICTURES = $(call PICTURES,$(foreach s,$(LABS_CHAPTERS),labs/$(s))) $(COMMON_PICTURES)
+
+%-labs.pdf: common/labs.sty $(LABS_TEX) $(LABS_PICTURES)
+	@mkdir -p $(OUTDIR)
+# We generate a .tex file with \input{} directives (instead of just
+# concatenating all files) so that when there is an error, we are
+# pointed at the right original file and the right line in that file.
+	rm -f $(OUTDIR)/$(basename $@).tex
+	for f in $(filter %.tex,$^) ; do \
+		echo -n "\input{../"          >> $(OUTDIR)/$(basename $@).tex ; \
+		echo -n $$f | sed 's%\.tex%%' >> $(OUTDIR)/$(basename $@).tex ; \
+		echo "}"                      >> $(OUTDIR)/$(basename $@).tex ; \
+	done
+	(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(basename $@).tex)
+# The second call to pdflatex is to be sure that we have a correct table of
+# content and index
+	(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(basename $@).tex > /dev/null 2>&1)
+# We use cat to overwrite the final destination file instead of mv, so
+# that evince notices that the file has changed and automatically
+# reloads it (which doesn't happen if we use mv here). This is called
+# 'Maxime's feature'.
+	cat out/$@ > $@
+else
+FORCE:
+%-labs.pdf: FORCE
+	@$(MAKE) $@ LABS=$*
+endif
+
+#
+# === Picture generation ===
+#
+
+.PRECIOUS: $(OUTDIR)/%.pdf
+
+$(OUTDIR)/%.pdf: %.svg
+	@printf "%-15s%-20s->%20s\n" INKSCAPE $(notdir $^) $(notdir $@)
+	@mkdir -p $(dir $@)
+ifeq ($(V),)
+	$(INKSCAPE) -D -A $@ $< > /dev/null 2>&1
+else
+	$(INKSCAPE) -D -A $@ $<
+endif
+
+$(OUTDIR)/%.pdf: $(OUTDIR)/%.eps
+	@printf "%-15s%-20s->%20s\n" EPSTOPDF $(notdir $^) $(notdir $@)
+	@mkdir -p $(dir $@)
+	$(EPSTOPDF) --outfile=$@ $^
+
+.PRECIOUS: $(OUTDIR)/%.eps
+
+$(OUTDIR)/%.eps: %.dia
+	@printf "%-15s%-20s->%20s\n" DIA $(notdir $^) $(notdir $@)
+	@mkdir -p $(dir $@)
+	$(DIA) -e $@ -t eps $^
+
+.PRECIOUS: $(OUTDIR)/%.png
+
+$(OUTDIR)/%.png: %.png
+	@mkdir -p $(dir $@)
+	@cp $^ $@
+
+.PRECIOUS: $(OUTDIR)/%.jpg
+
+$(OUTDIR)/%.jpg: %.jpg
+	mkdir -p $(dir $@)
+	@cp $^ $@
+
+#
+# === Misc targets ===
+#
+
+clean:
+	$(RM) -rf $(OUTDIR) *.pdf
+
+help:
+	@echo "Available targets:"
+	@echo
+	@echo " full-sysdev-labs.pdf		Complete labs for the 'sysdev' training"
+	@echo " full-kernel-labs.pdf		Complete labs for the 'kernel' training"
+	@echo " <some-chapter>-labs.pdf		Labs for a particular chapter in labs/"
+	@echo
diff --git a/common/android-labs-vars.tex b/common/android-labs-vars.tex
new file mode 100644
index 0000000..e46986e
--- /dev/null
+++ b/common/android-labs-vars.tex
@@ -0,0 +1,2 @@
+\def\labbooktitle{Android Training}
+\def\labbookurl{http://free-electrons.com/doc/training/android/}
diff --git a/common/android-title.tex b/common/android-title.tex
new file mode 100644
index 0000000..566e5c8
--- /dev/null
+++ b/common/android-title.tex
@@ -0,0 +1,5 @@
+\authors{Maxime Ripard}
+\title{Android System Development}
+\trainingurl{http://free-electrons.com/docs/android}
+
+\chapterframe{Android System Development}
diff --git a/common/beamerthemeFreeElectrons.sty b/common/beamerthemeFreeElectrons.sty
new file mode 100644
index 0000000..f93584b
--- /dev/null
+++ b/common/beamerthemeFreeElectrons.sty
@@ -0,0 +1,176 @@
+% Beamer theme for Free-Electrons presentations
+% Copyright (C) 2010 Maxime Petazzoni <maxime.petazzoni at bulix.org>
+% Creative Commons CC-by-sa 3.0
+
+\usepackage[absolute,verbose,overlay]{textpos}
+\usepackage{fancyvrb}
+\setlength{\TPHorizModule}{\paperwidth}
+\setlength{\TPVertModule}{\paperheight}
+
+\usetheme{default}
+\useinnertheme{default}
+\useoutertheme{default}
+\usecolortheme{seahorse}
+
+% Define the "Free-Electrons blue" color
+\definecolor{feblue}{rgb}{0.5976,0.5976,0.7968}
+\setbeamercolor*{palette primary}{bg=feblue}
+
+\definecolor{fecode}{rgb}{0.5,0.5,0.5}
+\setbeamercolor{code}{fg=fecode}
+
+\definecolor{fecodebg}{rgb}{0.7,0.7,0.7}
+\setbeamercolor{block body}{bg=fecodebg}
+
+\setbeamertemplate{blocks}[rounded][shadow=true]
+
+% Custom free-electrons commands
+\newcommand{\klink}[1]{\href{http://lxr.linux.no/?=#1}{\usebeamercolor[fg]{code} {\tt #1}}}
+\newcommand{\code}[1]{{\usebeamercolor[fg]{code} \path{#1}}}
+
+\usepackage{listings}
+\usepackage{environ}
+\usepackage{minted}
+
+\lstloadlanguages{C}
+\lstset{%
+  basicstyle=\tiny \ttfamily,
+  emphstyle=\color{blue}\bfseries\ttfamily,
+}
+
+\lstnewenvironment{codeblock}
+ {\begin{block}{}}
+ {\end{block}}
+
+
+
+
+%% Mode presentation
+\mode<presentation>
+
+% Remove navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+\defbeamertemplate*{frametitle}{fetheme}
+{
+  \vskip-2pt
+  \hbox{%
+    \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.5ex]{frametitle}%
+      \usebeamerfont{frametitle}
+      \begin{textblock}{.2}[0.5,0.5](0.12,0.07)
+       \includegraphics[width=1cm]{common/logo-penguins.pdf} 
+      \end{textblock} 
+      \hspace{1.25cm}
+      \insertframetitle
+    \end{beamercolorbox}
+  }
+}
+
+% Footer
+\defbeamertemplate*{footline}{fetheme}
+{
+  \hbox{%
+    \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,leftskip=0.5em]{palette primary}%
+      \Tiny
+      \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} lr}
+        Free Electrons. Kernel, drivers and embedded Linux development,
+        consulting, training and support.
+        ~{\tt http://free-electrons.com} & \insertframenumber{}
+      \end{tabular*}
+    \end{beamercolorbox}
+  }
+  \vskip0pt
+}
+
+\newcommand\tinyv{\@setfontsize\tinyv{4pt}{6}}
+
+\newcommand{\@authors}{}
+\newcommand{\authors}[1]
+{
+  \renewcommand{\@authors}{#1}
+}
+
+\newcommand{\@trainingurl}{}
+\newcommand{\trainingurl}[1]
+{
+  \renewcommand{\@trainingurl}{#1}
+} 
+
+\newcommand\chapterframe[1]{
+  \begin{frame}{#1}
+    \begin{columns}[b]
+      \column{0.5\textwidth}
+      \huge
+      #1\\
+      \vspace{0.5cm}
+      \footnotesize
+      \@authors\\
+      {\bf Free Electrons}\\
+      \vspace{1cm}
+      \tinyv
+      © Copyright 2009-\the\year, Free Electrons.\\
+      Creative Commons BY-SA 3.0 license.\\
+      Latest update: \today.\\
+      Document sources, updates and translations:\\
+      \url{\@trainingurl}\\
+      Corrections, suggestions, contributions and translations are welcome!
+      \column{0.5\textwidth}
+      \includegraphics[height=4cm]{common/logo-square.pdf}
+    \end{columns}
+  \end{frame}
+  \section{#1}
+}
+
+\newcommand\chapterframewithlabel[2]{
+  \begin{frame}{#1}
+    \begin{columns}[b]
+      \column{0.5\textwidth}
+      \huge
+      #2\\
+      \vspace{0.5cm}
+      \footnotesize
+      \@authors\\
+      {\bf Free Electrons}\\
+      \vspace{1cm}
+      \tinyv
+      © Copyright 2009-\the\year, Free Electrons.\\
+      Creative Commons BY-SA 3.0 license.\\
+      Latest update: \today.\\
+      Document sources, updates and translations:\\
+      \url{\@trainingurl}\\
+      Corrections, suggestions, contributions and translations are welcome!
+      \column{0.5\textwidth}
+      \includegraphics[height=4cm]{common/logo-square.pdf}
+    \end{columns}
+  \end{frame}
+  \section{#2}
+}
+
+\newcommand\subchapterframe[2]{
+  \begin{frame}{#1}
+    \huge
+    \begin{center}
+      #2
+    \end{center}
+  \end{frame}
+}
+
+%% Create a slide announcing a lab, with the beautiful worker penguin
+%% on the left.
+%%  first argument: slide title (will be prepended by 'Practical lab - ')
+%%  second argument: contents of the slide
+\newcommand\setuplabframe[2]{
+  \begin{frame}{Practical lab - #1}
+    \begin{columns}
+      \column{0.4\textwidth}
+      \includegraphics[width=\textwidth]{common/lab-penguin.png}
+      \column{0.6\textwidth}
+      #2
+      \end{columns}
+  \end{frame}
+}
+
+
+\newcommand\todo[1]{
+  {\large \color{red}TODO: #1}
+}
diff --git a/common/kernel-labs-vars.tex b/common/kernel-labs-vars.tex
new file mode 100644
index 0000000..e27f9bd
--- /dev/null
+++ b/common/kernel-labs-vars.tex
@@ -0,0 +1,2 @@
+\def\labbooktitle{Linux kernel and driver development training}
+\def\labbookurl{http://free-electrons.com/doc/training/linux-kernel/}
diff --git a/common/kernel-title.tex b/common/kernel-title.tex
new file mode 100644
index 0000000..3fd74a2
--- /dev/null
+++ b/common/kernel-title.tex
@@ -0,0 +1,13 @@
+\begin{frame}{Linux kernel and device driver development}
+  \begin{columns}[b]
+   \column{0.5\textwidth}
+     \huge
+     Linux kernel and device driver development\\
+     \vspace{1cm}
+     \normalsize
+     Grégory Clément, Michael Opdenacker, Thomas Petazzoni\\
+     {\bf Free Electrons}
+   \column{0.5\textwidth}
+     \includegraphics[height=4cm]{common/logo-square.pdf}
+   \end{columns}
+\end{frame}
diff --git a/common/lab-penguin.png b/common/lab-penguin.png
new file mode 100644
index 0000000..f8c5a6b
Binary files /dev/null and b/common/lab-penguin.png differ
diff --git a/common/labs-footer.tex b/common/labs-footer.tex
new file mode 100644
index 0000000..6b47932
--- /dev/null
+++ b/common/labs-footer.tex
@@ -0,0 +1 @@
+\end{document}
diff --git a/common/labs-header.tex b/common/labs-header.tex
new file mode 100644
index 0000000..afb6021
--- /dev/null
+++ b/common/labs-header.tex
@@ -0,0 +1,13 @@
+\documentclass[a4wide]{book}
+
+\usepackage{labs}
+\usepackage{listings}
+
+\title{\labbooktitle \\ \vspace{1cm} Lab Book}
+\trainingurl{\labbookurl}
+
+\begin{document}
+\maketitle
+
+\makeabout
+
diff --git a/common/labs.sty b/common/labs.sty
new file mode 100644
index 0000000..fcd5cf5
--- /dev/null
+++ b/common/labs.sty
@@ -0,0 +1,154 @@
+\NeedsTeXFormat{LaTeX2e}
+
+%% Remove indentation on the first line of each paragraph, and add
+%% some space between each paragraph.
+\usepackage{parskip}
+
+%% Use a more modern, and less LaTeX-old-style-looking font.
+\usepackage{palatino}
+
+%% Use more reasonable margins. We keep a different outer margin than
+%% the inner margin so that the holes needed for the binders are
+%% properly taken into account.
+\usepackage[vmargin=3cm, inner=4cm, outer=3cm]{geometry}
+
+%% Package used to adjust the vertical space before and
+%% after \chapter, \section
+\usepackage[pagestyles]{titlesec}
+
+%% We want hyphenation to be allowed after spaces and hyphens, and we
+%% want the URL package to retain spaces in the URLS.
+\usepackage[obeyspaces,spaces,hyphens]{url}
+
+\ProvidesPackage{labs}[28/03/2011 - First rework of labs training templates]
+
+% Extensions
+\RequirePackageWithOptions{inputenc}
+
+\RequirePackage{fancyhdr}
+\RequirePackage{hyperref}
+\RequirePackage{wrapfig}
+\RequirePackage{graphicx}
+
+%%
+%% Modify Latex constant and environments to fit our needs
+%%
+
+%% Adjust style of \chapter, using the titlesec package
+\titleformat{\chapter}[display]
+  {\normalfont\huge\bfseries}{}{0pt}{\Huge}
+\titlespacing*{\chapter} {0pt}{0pt}{3pt}
+
+%% Adjust style of \section, using the titlesec package
+\titlespacing{\section}{0pt}{4pt}{4pt}
+
+%% Set the font of the marginpar env to footnote size (some kind of hack.)
+\let\oldmarginpar\marginpar
+\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize #1]%
+{\raggedright\footnotesize #1}}
+
+%% Add a \chapter{}{} command so that we can add a subtitle to the chapter
+\newcommand{\subchapter}[2]
+{
+  \chapter{#1}
+  {\Large \it #2}
+  \vspace{\headsep}
+}
+
+%% Set up the constants
+\newcommand{\@laburl}{}
+\newcommand{\@docurl}{}
+\newcommand{\@trainingurl}{}
+
+\newcommand{\@feurl}{http://free-electrons.com}
+\newcommand{\@cchref}
+{
+  \href{http://creativecommons.org/licenses/by-sa/3.0/}{Creative Commons CC BY-SA 3.0 licence}
+}
+
+\author{Free Electrons \\\url{\@feurl}}
+
+\newcommand{\@ccimg}{common/logo-cc.pdf}
+
+\newcommand{\trainingurl}[1]
+{
+  \renewcommand{\@trainingurl}{#1}
+}
+
+\newcommand{\ccimg}[1]
+{
+  \renewcommand{\@ccimg}{#1}
+}
+
+%% Define the url style
+\hypersetup{colorlinks=true, urlcolor=blue, linkcolor=blue}
+
+%% Disable chapter, section and subsection numbering
+\setcounter{secnumdepth}{-1} 
+
+%% Reset headers and footer
+\fancyhead{}
+\fancyfoot{}
+
+%% And now set them back
+\setlength{\headheight}{15pt}
+\pagestyle{fancy}
+
+%% Set the default layout
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\footrulewidth}{0.5pt}
+
+\fancyhead[LE,LO]{Free Electrons}
+\fancyhead[RE,RO]{\labbooktitle}
+\fancyfoot[RE,LO]{\copyright~2004-\the\year~\href{http://free-electrons.com}{Free Electrons}, CC BY-SA license}
+\fancyfoot[LE,RO]{\thepage}
+
+\fancypagestyle{plain}{%
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\footrulewidth}{0.5pt}
+}
+
+\setlength{\textheight}{630px}
+
+\let\cleardoublepage\clearpage
+
+%% Defining our customs commands
+
+%% Define a \code command to be used for file paths, function names
+%% and other pieces of texts that must be typeset with a fixed-size
+%% font, and that are present in a paragraph with other text. We use
+%% the \path{} command of the 'url' package because it provides
+%% correct hyphenation on slashes, and also avoids the need to escape
+%% characters such as _ $ or &.
+\newcommand{\code}[1]
+{\path{#1}}
+
+\newcommand{\makeabout}
+{
+  \section{About this document}
+
+  This document can be found on \url{\@trainingurl}.\\
+
+  It is composed of several source documents that we aggregate for each training
+  session. These individual source documents can be found on \url{http://free-electrons.com/docs}.\\
+
+  More details about our training sessions can be found on \url{http://free-electrons.com/training}.\\
+
+  \section{Copying this document}
+
+  \copyright~2004-\the\year, Free Electrons, \url{\@feurl}.\\
+
+  \begin{wrapfigure}{l}{0.1\textwidth}
+    \vspace{-15pt}
+    \begin{center}
+      \includegraphics[width=0.08\textwidth]{\@ccimg}
+    \end{center}
+  \end{wrapfigure}
+
+  This document is released under the terms of the \@cchref. This means that you
+  are free to download, distribute and even modify it, under certain conditions.
+  \\
+
+  Corrections, suggestions, contributions and translations are welcome!
+\newpage
+}
diff --git a/common/logo-cc.svg b/common/logo-cc.svg
new file mode 100644
index 0000000..6781308
--- /dev/null
+++ b/common/logo-cc.svg
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg3038"
+   version="1.1"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="New document 2">
+  <defs
+     id="defs3040" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="375"
+     inkscape:cy="520"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="496"
+     inkscape:window-height="413"
+     inkscape:window-x="648"
+     inkscape:window-y="26"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata3043">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <path
+       inkscape:connector-curvature="0"
+       d="m 530.26238,574.25352 c -8.923,-13.42 -23.369,-22.039 -39.49,-23.564 -16.542,-1.565 -32.093,4.106 -43.234,15.768 -6.793,7.111 -11.229,15.041 -13.83,24.729 -1.151,4.281 -1.312,5.869 -1.301,12.756 0.01,6.871 0.182,8.506 1.356,12.939 5.126,19.334 20.212,34.174 39.659,39.014 1.674,0.417 3.73,0.853 4.567,0.969 3.705,0.513 12.668,0.298 16.66,-0.4 16.435,-2.865 31.037,-13.469 38.531,-27.98 8.746,-16.93 7.588,-38.432 -2.918,-54.231 z m -2.183,40.915 c -4.294,15.913 -17.359,28.056 -33.849,31.459 -25.709,5.307 -50.76,-14.145 -52.357,-40.656 -1.033,-17.123 9.334,-34.303 25.251,-41.845 6.027,-2.856 10.88,-3.901 18.224,-3.926 7.064,-0.022 10.984,0.701 17.147,3.168 12.372,4.955 22.069,16.173 25.636,29.657 1.492,5.641 1.466,16.516 -0.052,22.143 z"
+       id="path14" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 464.73838,619.36052 c -4.864,-1.725 -8.595,-6.787 -9.251,-12.557 -0.976,-8.552 2.242,-15.192 8.802,-18.172 3.555,-1.613 10.012,-1.576 13.848,0.082 2.329,1.007 6.705,4.959 6.705,6.057 0,0.18 -1.512,1.072 -3.357,1.982 l -3.358,1.655 -1.792,-1.792 c -1,-1 -2.529,-1.931 -3.459,-2.104 -2.306,-0.435 -5.067,0.593 -6.316,2.347 -2.065,2.902 -2.208,10.489 -0.252,13.475 1.015,1.549 2.72,2.635 4.328,2.758 3.381,0.26 4.234,-0.032 6.234,-2.136 l 2.018,-2.12 2.599,1.43 c 1.429,0.787 2.805,1.617 3.058,1.846 0.877,0.79 -3.144,4.894 -6.379,6.51 -2.749,1.374 -3.615,1.558 -7.229,1.521 -2.264,-0.024 -5.051,-0.375 -6.199,-0.782 z"
+       id="path16" />
+    <path
+       inkscape:connector-curvature="0"
+       d="m 495.69338,619.36052 c -4.796,-1.701 -8.464,-6.604 -9.252,-12.369 -1.143,-8.352 2.224,-15.371 8.803,-18.358 3.817,-1.733 10.29,-1.601 14.159,0.293 2.395,1.171 6.394,4.847 6.394,5.876 0,0.175 -1.567,1.077 -3.485,2.004 l -3.484,1.687 -1.804,-1.969 c -1.622,-1.771 -2.054,-1.969 -4.276,-1.969 -3.059,0 -5.027,1.202 -6.089,3.719 -0.95,2.252 -1.07,7.773 -0.224,10.289 1.723,5.114 8.009,6.326 11.577,2.232 l 1.604,-1.84 3.091,1.562 c 1.7,0.857 3.091,1.705 3.091,1.882 0,1.16 -3.994,4.881 -6.681,6.223 -2.75,1.374 -3.615,1.558 -7.229,1.521 -2.259,-0.025 -5.046,-0.376 -6.195,-0.783 z"
+       id="path18" />
+  </g>
+</svg>
diff --git a/common/logo-penguins.svg b/common/logo-penguins.svg
new file mode 100644
index 0000000..85c59f5
--- /dev/null
+++ b/common/logo-penguins.svg
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg3041"
+   version="1.1"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="New document 2">
+  <defs
+     id="defs3043" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="375"
+     inkscape:cy="520"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="719"
+     inkscape:window-height="568"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata3046">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <g
+       id="g4833"
+       transform="translate(108.18008,-98.997722)">
+      <path
+         transform="matrix(0.6856195,0,0,1.1314491,-15.24469,128.49793)"
+         d="m 605.08139,267.97873 c 0,98.46791 -99.27122,178.29193 -221.72848,178.29193 -122.45727,0 -221.72849,-79.82402 -221.72849,-178.29193 0,-98.46792 99.27122,-178.291932 221.72849,-178.291932 122.45726,0 221.72848,79.824012 221.72848,178.291932 z"
+         sodipodi:ry="178.29193"
+         sodipodi:rx="221.72849"
+         sodipodi:cy="267.97873"
+         sodipodi:cx="383.35291"
+         id="path3205"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:11.65960598;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         sodipodi:type="arc" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc"
+         id="path3203"
+         d="m 268.98177,391.35838 c -16.27336,36.69967 -31.24766,51.28895 -54.26009,70.19923 -7.25328,-29.188 -10.05334,-41.81474 -6.09005,-77.73546 14.76262,-4.26264 31.23905,-11.55887 60.35014,7.53623 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:10.26935005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc"
+         id="path3168"
+         d="m 394.20419,380.26642 c 8.60824,14.64541 52.21506,57.95717 53.9599,117.60561 1.38051,30.37251 -50.21664,-65.09449 -57.07297,1.50777 4.34595,-33.93616 -0.0249,-68.59646 3.11307,-119.11338 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc"
+         id="path3170"
+         d="m 100.74572,378.46787 c -6.914027,16.38452 -41.938443,64.83942 -43.339875,131.57096 -1.108799,33.97917 40.333353,-72.82429 45.840245,1.68682 -3.490608,-37.96599 0.02,-76.74211 -2.50037,-133.25778 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="csssc"
+         id="path3178"
+         d="m 225.75041,628.47242 c 4.88245,19.1197 -19.45791,27.11214 -47.60394,31.73596 -36.364,5.97387 -59.73418,-9.84005 -45.97643,-41.50087 12.98638,-29.88569 36.66107,-53.73726 57.36883,-33.36344 21.35662,21.01223 14.01227,15.67948 36.21154,43.12835 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:9.66676617;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="csssc"
+         id="path3181"
+         d="m 254.01444,639.5216 c -5.1868,20.31154 20.67083,28.80219 50.57136,33.71424 38.63077,6.34625 63.45774,-10.45343 48.84241,-44.08785 -13.7959,-31.74864 -38.94637,-57.08701 -60.94496,-35.44317 -22.6879,22.32205 -14.88573,16.65686 -38.46881,45.81678 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:10.26935005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3245"
+         d="m 175.00209,352.30112 c -4.97083,-1.689 -7.61777,-6.24063 -7.90552,-13.59419 -0.41948,-10.71977 4.00121,-17.20224 11.95568,-17.53175 4.85498,-0.20112 9.47768,2.98782 11.0256,7.60591 0.99058,2.95535 1.43633,8.37029 0.94747,11.50981 -1.56529,10.05234 -7.87227,14.77975 -16.02323,12.01022 z"
+         style="fill:#000000" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3268"
+         d="m 303.77199,353.62764 c -4.97084,-1.68899 -7.61777,-6.24062 -7.90553,-13.59419 -0.41948,-10.71976 4.00121,-17.20224 11.95568,-17.53175 4.85498,-0.20111 9.47769,2.98783 11.0256,7.60592 0.99058,2.95535 1.43633,8.37028 0.94747,11.50981 -1.56529,10.05233 -7.87227,14.77974 -16.02322,12.01021 z"
+         style="fill:#000000" />
+    </g>
+    <g
+       id="g4843"
+       transform="translate(108.18008,-98.997722)">
+      <path
+         transform="matrix(-0.4248648,0,0,0.7011366,622.69098,357.9803)"
+         d="m 605.08139,267.97873 c 0,98.46791 -99.27122,178.29193 -221.72848,178.29193 -122.45727,0 -221.72849,-79.82402 -221.72849,-178.29193 0,-98.46792 99.27122,-178.291932 221.72849,-178.291932 122.45726,0 221.72848,79.824012 221.72848,178.291932 z"
+         sodipodi:ry="178.29193"
+         sodipodi:rx="221.72849"
+         sodipodi:cy="267.97873"
+         sodipodi:cx="383.35291"
+         id="path3173"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:16.03176498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         sodipodi:type="arc" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc"
+         id="path3175"
+         d="m 446.56148,520.8697 c 10.08428,22.74206 19.36356,31.78275 33.6239,43.50107 4.49471,-18.08722 6.22986,-25.91176 3.77388,-48.17112 -9.1481,-2.64147 -19.35821,-7.1628 -37.39778,4.67005 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:8.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc"
+         id="path3177"
+         d="m 368.96363,513.99624 c -5.33436,9.07547 -32.35664,35.9149 -33.43788,72.87786 -0.85548,18.82124 31.11826,-40.33777 35.36699,0.93433 -2.6931,-21.02956 0.0154,-42.50786 -1.92911,-73.81219 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc"
+         id="path3179"
+         d="m 550.81402,512.88171 c 4.28449,10.15316 25.98842,40.17971 26.85686,81.53192 0.68711,21.05621 -24.99377,-45.12777 -28.40629,1.04528 2.16306,-23.52677 -0.0124,-47.55556 1.54943,-82.5772 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="csssc"
+         id="path3182"
+         d="m 473.3511,667.80457 c -3.02556,11.8481 12.05767,16.80086 29.49921,19.66615 22.53405,3.70189 37.01609,-6.09768 28.49069,-25.71727 -8.0474,-18.51957 -22.71814,-33.29991 -35.55033,-20.67466 -13.23428,13.02086 -8.68312,9.71626 -22.43957,26.72578 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:8.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+      <path
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="csssc"
+         id="path3184"
+         d="m 455.83644,674.65153 c 3.21415,12.58666 -12.8093,17.84815 -31.33807,20.89205 -23.93872,3.93264 -39.32351,-6.47779 -30.26667,-27.32037 8.54904,-19.674 24.13429,-35.37569 37.76638,-21.96343 14.05924,13.83253 9.22439,10.32193 23.83836,28.39175 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:8.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3186"
+         d="m 504.79882,496.66669 c 3.08033,-1.04663 4.72058,-3.86719 4.8989,-8.42405 0.25994,-6.64282 -2.47947,-10.65989 -7.4087,-10.86408 -3.00853,-0.12462 -5.87313,1.8515 -6.83235,4.71324 -0.61384,1.83137 -0.89006,5.1869 -0.58712,7.1324 0.96998,6.22923 4.87829,9.15872 9.92927,7.44249 z"
+         style="fill:#000000;stroke-width:8.75;stroke-miterlimit:4;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3188"
+         d="m 425.00267,497.48871 c 3.08033,-1.04663 4.72058,-3.86719 4.8989,-8.42405 0.25994,-6.64282 -2.47947,-10.65988 -7.4087,-10.86407 -3.00853,-0.12463 -5.87313,1.85149 -6.83234,4.71323 -0.61385,1.83137 -0.89007,5.1869 -0.58713,7.1324 0.96998,6.22924 4.87829,9.15872 9.92927,7.44249 z"
+         style="fill:#000000;stroke-width:8.75;stroke-miterlimit:4;stroke-dasharray:none" />
+    </g>
+  </g>
+</svg>
diff --git a/common/logo-square.svg b/common/logo-square.svg
new file mode 100644
index 0000000..2d4bb4b
--- /dev/null
+++ b/common/logo-square.svg
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1368.286"
+   height="547.32623"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.48.0 r9654"
+   sodipodi:docname="logo2.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/mike/src/company/logos/logo-1000x400.png"
+   inkscape:export-xdpi="65.775719"
+   inkscape:export-ydpi="65.775719"
+   version="1.0">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.74953319"
+     inkscape:cx="221.49844"
+     inkscape:cy="218.56874"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1280"
+     inkscape:window-height="726"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(16.28571,-132.75011)">
+    <rect
+       style="fill:#9999cc;fill-opacity:1;stroke:#000000;stroke-width:13.6256485;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2389"
+       width="639.04718"
+       height="557.11804"
+       x="-6.6488914"
+       y="113.32153"
+       inkscape:export-xdpi="13.155146"
+       inkscape:export-ydpi="13.155146" />
+    <g
+       id="g4833"
+       transform="translate(-47.169811,2.7169811)">
+      <path
+         transform="matrix(0.6856195,0,0,1.1314491,-15.24469,128.49793)"
+         d="m 605.08139,267.97873 c 0,98.46791 -99.27122,178.29193 -221.72848,178.29193 -122.45727,0 -221.72849,-79.82402 -221.72849,-178.29193 0,-98.46792 99.27122,-178.291932 221.72849,-178.291932 122.45726,0 221.72848,79.824012 221.72848,178.291932 z"
+         sodipodi:ry="178.29193"
+         sodipodi:rx="221.72849"
+         sodipodi:cy="267.97873"
+         sodipodi:cx="383.35291"
+         id="path3205"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:11.65960598;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3203"
+         d="m 268.98177,391.35838 c -16.27336,36.69967 -31.24766,51.28895 -54.26009,70.19923 -7.25328,-29.188 -10.05334,-41.81474 -6.09005,-77.73546 14.76262,-4.26264 31.23905,-11.55887 60.35014,7.53623 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:10.26935005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3168"
+         d="m 394.20419,380.26642 c 8.60824,14.64541 52.21506,57.95717 53.9599,117.60561 1.38051,30.37251 -50.21664,-65.09449 -57.07297,1.50777 4.34595,-33.93616 -0.0249,-68.59646 3.11307,-119.11338 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3170"
+         d="m 100.74572,378.46787 c -6.914027,16.38452 -41.938443,64.83942 -43.339875,131.57096 -1.108799,33.97917 40.333353,-72.82429 45.840245,1.68682 -3.490608,-37.96599 0.02,-76.74211 -2.50037,-133.25778 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="csssc"
+         id="path3178"
+         d="m 225.75041,628.47242 c 4.88245,19.1197 -19.45791,27.11214 -47.60394,31.73596 -36.364,5.97387 -59.73418,-9.84005 -45.97643,-41.50087 12.98638,-29.88569 36.66107,-53.73726 57.36883,-33.36344 21.35662,21.01223 14.01227,15.67948 36.21154,43.12835 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:9.66676617;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="csssc"
+         id="path3181"
+         d="m 254.01444,639.5216 c -5.1868,20.31154 20.67083,28.80219 50.57136,33.71424 38.63077,6.34625 63.45774,-10.45343 48.84241,-44.08785 -13.7959,-31.74864 -38.94637,-57.08701 -60.94496,-35.44317 -22.6879,22.32205 -14.88573,16.65686 -38.46881,45.81678 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:10.26935005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path3245"
+         d="m 175.00209,352.30112 c -4.97083,-1.689 -7.61777,-6.24063 -7.90552,-13.59419 -0.41948,-10.71977 4.00121,-17.20224 11.95568,-17.53175 4.85498,-0.20112 9.47768,2.98782 11.0256,7.60591 0.99058,2.95535 1.43633,8.37029 0.94747,11.50981 -1.56529,10.05234 -7.87227,14.77975 -16.02323,12.01022 z"
+         style="fill:#000000"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path3268"
+         d="m 303.77199,353.62764 c -4.97084,-1.68899 -7.61777,-6.24062 -7.90553,-13.59419 -0.41948,-10.71976 4.00121,-17.20224 11.95568,-17.53175 4.85498,-0.20111 9.47769,2.98783 11.0256,7.60592 0.99058,2.95535 1.43633,8.37028 0.94747,11.50981 -1.56529,10.05233 -7.87227,14.77974 -16.02322,12.01021 z"
+         style="fill:#000000"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       id="g4843"
+       transform="translate(-47.169811,2.7169811)">
+      <path
+         transform="matrix(-0.4248648,0,0,0.7011366,622.69098,357.9803)"
+         d="m 605.08139,267.97873 c 0,98.46791 -99.27122,178.29193 -221.72848,178.29193 -122.45727,0 -221.72849,-79.82402 -221.72849,-178.29193 0,-98.46792 99.27122,-178.291932 221.72849,-178.291932 122.45726,0 221.72848,79.824012 221.72848,178.291932 z"
+         sodipodi:ry="178.29193"
+         sodipodi:rx="221.72849"
+         sodipodi:cy="267.97873"
+         sodipodi:cx="383.35291"
+         id="path3173"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:16.03176498;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3175"
+         d="m 446.56148,520.8697 c 10.08428,22.74206 19.36356,31.78275 33.6239,43.50107 4.49471,-18.08722 6.22986,-25.91176 3.77388,-48.17112 -9.1481,-2.64147 -19.35821,-7.1628 -37.39778,4.67005 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:8.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3177"
+         d="m 368.96363,513.99624 c -5.33436,9.07547 -32.35664,35.9149 -33.43788,72.87786 -0.85548,18.82124 31.11826,-40.33777 35.36699,0.93433 -2.6931,-21.02956 0.0154,-42.50786 -1.92911,-73.81219 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3179"
+         d="m 550.81402,512.88171 c 4.28449,10.15316 25.98842,40.17971 26.85686,81.53192 0.68711,21.05621 -24.99377,-45.12777 -28.40629,1.04528 2.16306,-23.52677 -0.0124,-47.55556 1.54943,-82.5772 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="csssc"
+         id="path3182"
+         d="m 473.3511,667.80457 c -3.02556,11.8481 12.05767,16.80086 29.49921,19.66615 22.53405,3.70189 37.01609,-6.09768 28.49069,-25.71727 -8.0474,-18.51957 -22.71814,-33.29991 -35.55033,-20.67466 -13.23428,13.02086 -8.68312,9.71626 -22.43957,26.72578 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:8.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="csssc"
+         id="path3184"
+         d="m 455.83644,674.65153 c 3.21415,12.58666 -12.8093,17.84815 -31.33807,20.89205 -23.93872,3.93264 -39.32351,-6.47779 -30.26667,-27.32037 8.54904,-19.674 24.13429,-35.37569 37.76638,-21.96343 14.05924,13.83253 9.22439,10.32193 23.83836,28.39175 z"
+         style="fill:#f57f19;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:8.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path3186"
+         d="m 504.79882,496.66669 c 3.08033,-1.04663 4.72058,-3.86719 4.8989,-8.42405 0.25994,-6.64282 -2.47947,-10.65989 -7.4087,-10.86408 -3.00853,-0.12462 -5.87313,1.8515 -6.83235,4.71324 -0.61384,1.83137 -0.89006,5.1869 -0.58712,7.1324 0.96998,6.22923 4.87829,9.15872 9.92927,7.44249 z"
+         style="fill:#000000;stroke-width:8.75;stroke-miterlimit:4;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path3188"
+         d="m 425.00267,497.48871 c 3.08033,-1.04663 4.72058,-3.86719 4.8989,-8.42405 0.25994,-6.64282 -2.47947,-10.65988 -7.4087,-10.86407 -3.00853,-0.12463 -5.87313,1.85149 -6.83234,4.71323 -0.61385,1.83137 -0.89007,5.1869 -0.58713,7.1324 0.96998,6.22924 4.87829,9.15872 9.92927,7.44249 z"
+         style="fill:#000000;stroke-width:8.75;stroke-miterlimit:4;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+    </g>
+    <text
+       xml:space="preserve"
+       style="font-size:22.99331284px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="605.42261"
+       y="301.76389"
+       id="text4768"><tspan
+         sodipodi:role="line"
+         x="605.42261"
+         y="301.76389"
+         style="font-size:28px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L Bold"
+         id="tspan2407">Embedded Linux</tspan><tspan
+         sodipodi:role="line"
+         x="605.42261"
+         y="351.76389"
+         style="font-size:28px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;fill:#ffffff;fill-opacity:1;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L Bold"
+         id="tspan3050">Developers</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="580"
+       y="233.79076"
+       id="text2426"><tspan
+         sodipodi:role="line"
+         id="tspan2428"
+         x="580"
+         y="233.79076" /></text>
+    <g
+       id="g2428"
+       transform="matrix(1.0205217,0,0,1.0205217,-26.363127,-71.738655)">
+      <text
+         id="text2416"
+         y="251.19456"
+         x="239.30899"
+         style="font-size:43.62042236px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+         xml:space="preserve"><tspan
+           id="tspan2418"
+           style="font-size:54.87389374px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L Bold"
+           y="251.19456"
+           x="239.30899"
+           sodipodi:role="line">Free Electrons</tspan><tspan
+           id="tspan2420"
+           style="font-size:54.87389374px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;font-family:Nimbus Sans L;-inkscape-font-specification:Nimbus Sans L Bold"
+           y="319.78693"
+           x="239.30899"
+           sodipodi:role="line" /></text>
+    </g>
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3034"
+       style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"><flowRegion
+         id="flowRegion3036"><rect
+           id="rect3038"
+           width="41.509434"
+           height="54.71698"
+           x="1083.0189"
+           y="707.70361" /></flowRegion><flowPara
+         id="flowPara3040"></flowPara></flowRoot>    <flowRoot
+       xml:space="preserve"
+       id="flowRoot3042"
+       style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"><flowRegion
+         id="flowRegion3044"><rect
+           id="rect3046"
+           width="39.622643"
+           height="69.811317"
+           x="1090.566"
+           y="705.81677" /></flowRegion><flowPara
+         id="flowPara3048"></flowPara></flowRoot>  </g>
+</svg>
diff --git a/common/minted.sty b/common/minted.sty
new file mode 100644
index 0000000..0e0585c
--- /dev/null
+++ b/common/minted.sty
@@ -0,0 +1,239 @@
+%%
+%% This is file `minted.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% minted.dtx  (with options: `package')
+%% Copyright 2010--2011 Konrad Rudolph
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% 
+%% Additionally, the project may be distributed under the terms of the new BSD
+%% license.
+%% 
+%% This work has the LPPL maintenance status `maintained'.
+%% 
+%% The Current Maintainer of this work is Konrad Rudolph.
+%% 
+%% This work consists of the files minted.dtx and minted.ins
+%% and the derived file minted.sty.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{minted}[2011/09/17 v1.7 Yet another Pygments shim for LaTeX]
+\RequirePackage{keyval}
+\RequirePackage{fancyvrb}
+\RequirePackage{xcolor}
+\RequirePackage{float}
+\RequirePackage{ifthen}
+\RequirePackage{calc}
+\RequirePackage{ifplatform}
+\DeclareOption{chapter}{\def\minted at float@within{chapter}}
+\DeclareOption{section}{\def\minted at float@within{section}}
+\ProcessOptions\relax
+\ifwindows
+  \providecommand\DeleteFile[1]{\immediate\write18{del #1}}
+\else
+  \providecommand\DeleteFile[1]{\immediate\write18{rm #1}}
+\fi
+\newboolean{AppExists}
+\newcommand\TestAppExists[1]{
+  \ifwindows
+    \DeleteFile{\jobname.aex}
+    \immediate\write18{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd)
+      do set >\jobname.aex <nul: /p x=\string^\@percentchar \string~$PATH:i>>\jobname.aex} %$
+    \newread\@appexistsfile
+    \immediate\openin\@appexistsfile\jobname.aex
+    \expandafter\def\expandafter\@tmp at cr\expandafter{\the\endlinechar}
+    \endlinechar=-1\relax
+    \readline\@appexistsfile to \@apppathifexists
+    \endlinechar=\@tmp at cr
+    \ifthenelse{\equal{\@apppathifexists}{}}
+     {\AppExistsfalse}
+     {\AppExiststrue}
+    \immediate\closein\@appexistsfile
+    \DeleteFile{\jobname.aex}
+\immediate\typeout{file deleted}
+  \else
+    \immediate\write18{which #1 && touch \jobname.aex}
+    \IfFileExists{\jobname.aex}
+     {\AppExiststrue
+      \DeleteFile{\jobname.aex}}
+     {\AppExistsfalse}
+  \fi}
+\newcommand\minted at resetoptions{}
+\newcommand\minted at defopt[1]{
+  \expandafter\def\expandafter\minted at resetoptions\expandafter{%
+    \minted at resetoptions
+    \@namedef{minted at opt@#1}{}}}
+\newcommand\minted at opt[1]{
+  \expandafter\detokenize%
+    \expandafter\expandafter\expandafter{\csname minted at opt@#1\endcsname}}
+\newcommand\minted at define@opt[3][]{
+  \minted at defopt{#2}
+  \ifthenelse{\equal{#1}{}}{
+    \define at key{minted at opt}{#2}{\@namedef{minted at opt@#2}{#3}}}
+   {\define at key{minted at opt}{#2}[#1]{\@namedef{minted at opt@#2}{#3}}}}
+\newcommand\minted at define@switch[3][]{
+  \minted at defopt{#2}
+  \define at booleankey{minted at opt}{#2}
+   {\@namedef{minted at opt@#2}{#3}}
+   {\@namedef{minted at opt@#2}{#1}}}
+\minted at defopt{extra}
+\newcommand\minted at define@extra[1]{
+  \define at key{minted at opt}{#1}{
+    \expandafter\def\expandafter\minted at opt@extra\expandafter{%
+      \minted at opt@extra,#1=##1}}}
+\newcommand\minted at define@extra at switch[1]{
+  \define at booleankey{minted at opt}{#1}
+   {\expandafter\def\expandafter\minted at opt@extra\expandafter{%
+      \minted at opt@extra,#1}}
+   {\expandafter\def\expandafter\minted at opt@extra\expandafter{%
+      \minted at opt@extra,#1=false}}}
+\minted at define@switch{texcl}{-P texcomments}
+\minted at define@switch{mathescape}{-P mathescape}
+\minted at define@switch{linenos}{-P linenos}
+\minted at define@switch{startinline}{-P startinline}
+\minted at define@switch[-P funcnamehighlighting=False]%
+  {funcnamehighlighting}{-P funcnamehighlighting}
+\minted at define@opt{gobble}{-F gobble:n=#1}
+\minted at define@opt{bgcolor}{#1}
+\minted at define@extra{frame}
+\minted at define@extra{framesep}
+\minted at define@extra{framerule}
+\minted at define@extra{rulecolor}
+\minted at define@extra{numbersep}
+\minted at define@extra{firstnumber}
+\minted at define@extra{stepnumber}
+\minted at define@extra{firstline}
+\minted at define@extra{lastline}
+\minted at define@extra{baselinestretch}
+\minted at define@extra{xleftmargin}
+\minted at define@extra{xrightmargin}
+\minted at define@extra{fillcolor}
+\minted at define@extra{tabsize}
+\minted at define@extra{fontfamily}
+\minted at define@extra{fontsize}
+\minted at define@extra{fontshape}
+\minted at define@extra{fontseries}
+\minted at define@extra{formatcom}
+\minted at define@extra{label}
+\minted at define@extra at switch{numberblanklines}
+\minted at define@extra at switch{showspaces}
+\minted at define@extra at switch{resetmargins}
+\minted at define@extra at switch{samepage}
+\minted at define@extra at switch{showtabs}
+\minted at define@extra at switch{obeytabs}
+\newsavebox{\minted at bgbox}
+\newenvironment{minted at colorbg}[1]{
+  \def\minted at bgcol{#1}
+  \noindent
+  \begin{lrbox}{\minted at bgbox}
+  \begin{minipage}{\linewidth-2\fboxsep}}
+ {\end{minipage}
+  \end{lrbox}%
+  \colorbox{\minted at bgcol}{\usebox{\minted at bgbox}}}
+\newwrite\minted at code
+\newcommand\minted at savecode[1]{
+  \immediate\openout\minted at code\jobname.pyg
+  \immediate\write\minted at code{#1}
+  \immediate\closeout\minted at code}
+\newcommand\minted at pygmentize[2][\jobname.pyg]{
+  \def\minted at cmd{pygmentize -l #2 -f latex -F tokenmerge
+    \minted at opt{gobble} \minted at opt{texcl} \minted at opt{mathescape}
+    \minted at opt{startinline} \minted at opt{funcnamehighlighting}
+    \minted at opt{linenos} -P "verboptions=\minted at opt{extra}"
+    -o \jobname.out.pyg #1}
+  \immediate\write18{\minted at cmd}
+  % For debugging, uncomment:
+  %\immediate\typeout{\minted at cmd}
+  \ifthenelse{\equal{\minted at opt@bgcolor}{}}
+   {}
+   {\begin{minted at colorbg}{\minted at opt@bgcolor}}
+  \input{\jobname.out.pyg}
+  \ifthenelse{\equal{\minted at opt@bgcolor}{}}
+   {}
+   {\end{minted at colorbg}}
+  \DeleteFile{\jobname.out.pyg}}
+\newcommand\minted at usedefaultstyle{\usemintedstyle{default}}
+\newcommand\usemintedstyle[1]{
+  \renewcommand\minted at usedefaultstyle{}
+  \immediate\write18{pygmentize -S #1 -f latex > \jobname.pyg}
+  \input{\jobname.pyg}}
+\newcommand\mint[3][]{
+  \DefineShortVerb{#3}
+  \minted at resetoptions
+  \setkeys{minted at opt}{#1}
+  \SaveVerb[aftersave={
+    \UndefineShortVerb{#3}
+    \minted at savecode{\FV at SV@minted at verb}
+    \minted at pygmentize{#2}
+    \DeleteFile{\jobname.pyg}}]{minted at verb}#3}
+\newcommand\minted at proglang[1]{}
+\newenvironment{minted}[2][]
+ {\VerbatimEnvironment
+  \renewcommand{\minted at proglang}[1]{#2}
+  \minted at resetoptions
+  \setkeys{minted at opt}{#1}
+  \begin{VerbatimOut}[codes={\catcode`\^^I=12}]{\jobname.pyg}}%
+ {\end{VerbatimOut}
+  \minted at pygmentize{\minted at proglang{}}
+  \DeleteFile{\jobname.pyg}}
+\newcommand\inputminted[3][]{
+  \minted at resetoptions
+  \setkeys{minted at opt}{#1}
+  \minted at pygmentize[#3]{#2}}
+\newcommand\newminted[3][]{
+  \ifthenelse{\equal{#1}{}}
+   {\def\minted at envname{#2code}}
+   {\def\minted at envname{#1}}
+  \newenvironment{\minted at envname}
+   {\VerbatimEnvironment\begin{minted}[#3]{#2}}
+   {\end{minted}}
+  \newenvironment{\minted at envname *}[1]
+   {\VerbatimEnvironment\begin{minted}[#3,##1]{#2}}
+   {\end{minted}}}
+\newcommand\newmint[3][]{
+  \ifthenelse{\equal{#1}{}}
+   {\def\minted at shortname{#2}}
+   {\def\minted at shortname{#1}}
+  \expandafter\newcommand\csname\minted at shortname\endcsname[2][]{
+    \mint[#3,##1]{#2}##2}}
+\newcommand\newmintedfile[3][]{
+  \ifthenelse{\equal{#1}{}}
+   {\def\minted at shortname{#2file}}
+   {\def\minted at shortname{#1}}
+  \expandafter\newcommand\csname\minted at shortname\endcsname[2][]{
+    \inputminted[#3,##1]{#2}{##2}}}
+\@ifundefined{minted at float@within}
+ {\newfloat{listing}{h}{lol}}
+ {\newfloat{listing}{h}{lol}[\minted at float@within]}
+\newcommand\listingscaption{Listing}
+\floatname{listing}{\listingscaption}
+\newcommand\listoflistingscaption{List of listings}
+\providecommand\listoflistings{\listof{listing}{\listoflistingscaption}}
+\AtBeginDocument{
+  \minted at usedefaultstyle}
+\AtEndOfPackage{
+  \ifnum\pdf at shellescape=1\relax\else
+    \PackageError{minted}
+     {You must invoke LaTeX with the
+      -shell-escape flag}
+     {Pass the -shell-escape flag to LaTeX. Refer to the minted.sty
+      documentation for more information.}\fi
+  \TestAppExists{pygmentize}
+  \ifAppExists\else
+    \PackageError{minted}
+     {You must have `pygmentize' installed
+      to use this package}
+     {Refer to the installation instructions in the minted
+      documentation for more information.}
+  \fi}
+\endinput
+%%
+%% End of file `minted.sty'.
diff --git a/common/single-slide-title.tex b/common/single-slide-title.tex
new file mode 100644
index 0000000..ab4c35e
--- /dev/null
+++ b/common/single-slide-title.tex
@@ -0,0 +1 @@
+\authors{Authors}
diff --git a/common/slide-footer.tex b/common/slide-footer.tex
new file mode 100644
index 0000000..6b47932
--- /dev/null
+++ b/common/slide-footer.tex
@@ -0,0 +1 @@
+\end{document}
diff --git a/common/slide-header.tex b/common/slide-header.tex
new file mode 100644
index 0000000..f92192d
--- /dev/null
+++ b/common/slide-header.tex
@@ -0,0 +1,11 @@
+\documentclass[obeyspaces,spaces,hyphens]{beamer}
+\usepackage[utf8]{inputenc}
+
+\mode<presentation>
+\usetheme{FreeElectrons}
+
+\institute{Free Electrons}
+
+\usepackage{eurosym}
+
+\begin{document}
diff --git a/common/sysdev-labs-vars.tex b/common/sysdev-labs-vars.tex
new file mode 100644
index 0000000..60a4dc7
--- /dev/null
+++ b/common/sysdev-labs-vars.tex
@@ -0,0 +1,2 @@
+\def\labbooktitle{Embedded Linux Training}
+\def\labbookurl{http://free-electrons.com/doc/training/embedded-linux/}
diff --git a/common/sysdev-title.tex b/common/sysdev-title.tex
new file mode 100644
index 0000000..766d5cd
--- /dev/null
+++ b/common/sysdev-title.tex
@@ -0,0 +1,4 @@
+\authors{Grégory Clément, Michael Opdenacker, Maxime Ripard, Thomas Petazzoni}
+\trainingurl{http://free-electrons.com/docs/embedded-linux-intro}
+
+\chapterframe{Embedded Linux system development}
diff --git a/labs/backup/backup.tex b/labs/backup/backup.tex
new file mode 100644
index 0000000..16d8fe1
--- /dev/null
+++ b/labs/backup/backup.tex
@@ -0,0 +1,40 @@
+\subchapter{Backing up your lab files}{Objective: clean up and make an
+archive of your lab directory}
+
+\section{End of the training session}
+
+Congratulations. You reached the end of the training session. You now
+have plenty of working examples you created by yourself, and you can
+build upon them to create more elaborate things.
+
+In this last lab, we will create an archive of all the things you
+created. We won't keep everything though, as there are lots of things
+you can easily retrieve again.
+
+\section{Create a lab archive}
+
+Go to the directory containing your felabs directory:
+
+\begin{verbatim}
+cd $HOME
+\end{verbatim}
+
+Now, run a command that will do some clean up and then create an archive with the most important files:
+
+\begin{itemize}
+\item Kernel configuration files
+\item Other source configuration files (BusyBox, Crosstool-ng...)
+\item Kernel images
+\item Toolchain
+\item Other custom files
+\end{itemize}
+
+Here is the command:
+
+\begin{verbatim}
+./felabs/archive-labs
+\end{verbatim}
+
+At end end, you should have a \code{felabs-<user>.tar.lzma} archive
+that you can copy to a USB flash drive, for example. This file should
+only be a few hundreds of MB big.
diff --git a/labs/kernel-debugging/kernel-debugging.tex b/labs/kernel-debugging/kernel-debugging.tex
new file mode 100644
index 0000000..290ead7
--- /dev/null
+++ b/labs/kernel-debugging/kernel-debugging.tex
@@ -0,0 +1,129 @@
+\subchapter{Kernel debugging mechanisms and kernel crash
+  analysis}{Objective: Use kernel debugging mechanisms and analyze a
+  kernel crash}
+
+\section{{\tt pr\_debug()} and dynamic debugging}
+
+Add a \code{pr_debug()} call in the \code{write()} operation that shows
+each character being written (or its hexadecimal representation) and
+add a similar \code{pr_debug()} call in your interrupt handler to show
+each character being received.
+
+Check what happens with your module. Do you see the debugging messages
+that you added ? Your kernel probably has neither \code{CONFIG_DEBUG} nor
+\code{CONFIG_DYNAMIC_DEBUG} set, so you shouldn't see any message.
+
+Now, recompile your kernel with \code{CONFIG_DYNAMIC_DEBUG} and reboot. The
+dynamic debug feature can be configured using debugfs, so you'll have
+to mount the debugfs filesystem first. Then, after reading the dynamic
+debug documentation in the kernel sources, do the following things :
+
+\begin{itemize}
+
+\item List all available debug messages in the kernel
+
+\item Enable all debugging messages of your serial module, and check
+  that you indeed see those messages.
+
+\item Enable just one single debug message in your serial module, and
+  check that you see just this message and not the other debug
+  messages of your module.
+
+\end{itemize}
+
+Now, you have a good mechanism to keep many debug messages in your
+drivers and be able to selectively enable only some of them.
+
+\section{debugfs}
+
+Since you have enabled debugfs to control the dynamic debug feature,
+we will also use it to add a new debugfs entry. Modify your driver to
+add :
+
+\begin{itemize}
+
+\item A directory called \code{serial} in the {\em debugfs} filesystem
+
+\item And file called \code{counter} inside the \code{serial}
+  directory of the debugfs filesystem. This file should allow to see
+  the contents of the \code{counter} variable of your module.
+
+\end{itemize}
+
+Recompile and reload your driver, and check that in
+\code{/sys/kernel/debug/serial/counter} you can see the amount of characters
+that have been transmitted by your driver.
+
+\section{Kernel crash analysis}
+
+\subsection{Setup}
+
+Go to the \code{/home/<user>/felabs/linux/debugging} directory.
+
+Make sure that your kernel has the following options enabled:
+
+\begin{itemize}
+
+\item Support for root filesystem over NFS support
+
+\item The \code{CONFIG_DEBUG_INFO} configuration option, (Kernel
+  Hacking section) which makes it possible to see source code in the
+  disassembled kernel
+
+\item Disable the \code{CONFIG_ARM_UNWIND} configuration option
+  (Kernel Hacking section). This option enables a new mechanism to
+  handle stack backtraces, but this new mechanism is not yet as
+  functional and reliable as the old mechanism based on frame
+  pointers. In our case, with our board, you get a backtrace only if
+  this option is disabled.
+
+\end{itemize}
+
+The \code{nfsroot/} directory is the root filesystem.
+
+Compile the \code{drvbroken} module provided
+  in \code{nfsroot/root/drvbroken}, after modifying the Makefile so
+  that \code{KDIR} properly points to your kernel source tree.
+
+Run the target system on the Calao board, and load the \code{drvbroken}
+kernel module. See it crashing in a nice way.
+
+\section{Analyzing the crash message}
+
+Analyze the crash message carefully. Knowing that on ARM, the pc
+register contains the location of the instruction being executed, find
+in which function does the crash happens, and what the function call
+stack is.
+
+Using LXR (for example \url{http://lxr.free-electrons.com}) or the
+kernel source code, have a look at the definition of this
+function. This, with a careful review of the driver source code should
+probably be enough to help you understand and fix the issue.
+
+\section{Further analysis of the problem}
+
+If the function source code is not enough, then you can look at the
+disassembled version of the function, either using:
+
+\begin{verbatim}
+arm-linux-gnueabi-objdump -S linux-3.0.x/vmlinux > vmlinux.disasm
+\end{verbatim}
+
+or, using \code{gdb-multiarch}\footnote{gdb-multiarch is a new package
+  supporting multiple architectures at once. If you have a cross
+  toolchain including gdb, you can also run arm-linux-gdb directly.}
+
+\begin{verbatim}
+sudo apt-get install gdb-multiarch
+gdb-multiarch linux-3.0.x/vmlinux
+(gdb) set arch arm
+(gdb) set gnutarget elf32-littlearm
+(gdb) disassemble function_name
+\end{verbatim}
+
+Then find at which exact instruction the crash occurs. The offset is
+provided by the crash output, as well as a dump of the code around the
+crashing instruction.
+
+Of course, analyzing the disassembled version of the function requires
+some assembly skills on the architecture you are working on.
diff --git a/labs/kernel-git/kernel-git.tex b/labs/kernel-git/kernel-git.tex
new file mode 100644
index 0000000..227f3cc
--- /dev/null
+++ b/labs/kernel-git/kernel-git.tex
@@ -0,0 +1,112 @@
+\subchapter{Git}{Objective: use the basic Git features}
+
+After this lab, you will be able to:
+
+\begin{itemize}
+\item Clone a Git repository
+\item Explore the history of a Git repository
+\item Make changes in your own branch
+\item Generate the patches corresponding to your own branch
+\end{itemize}
+
+\section{Setup}
+
+Go to \code{/home/<user>/felabs/linux/git/}
+
+This lab assumes that you already installed git software and cloned
+the Linus Torvalds' git tree. See our {\em Kernel source code} lab for
+details (\url{http://free-electrons.com/doc/training/linux-kernel/}).
+
+\section{Configuring Git}
+
+Configure your name and email address in git with \code{git config}.
+
+\section{Clone a repository}
+
+We already cloned Linus Torvalds' git tree, but it is useful to know
+how to do it again. Go to \url{http://git.kernel.org} and make sure you know
+how to find the \code{git://} URL of his Linux tree.
+
+Cloning downloaded quite a lot of data, but then at the end, we have
+the full history of the Linux kernel (since the kernel developers
+started to use Git, around kernel 2.6.12). We can access and explore
+this history offline.
+
+\section{Exploring the history}
+
+With \code{git log}, look at the list of changes that have been made on the scheduler.
+
+With \code{git log}, look at the list of changes and their associated
+patches, that have been made on the ATMEL serial driver
+(\code{drivers/tty/serial/atmel_serial.c}) between the versions 3.0
+and 3.1 of the kernel.
+
+With \code{git diff}, look at the differences between \code{fs/jffs2/}
+(which contains the JFFS2 filesystem driver) in 3.0 and 3.1.
+
+With \code{gitk}, look at the full history of the UBIFS filesystem (in
+\code{fs/ubifs/}).
+
+On the {\em gitweb} interface of Linus Torvalds tree, available at
+\url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git},
+search all commits that have been done by Free Electrons (hint: use
+the search engine by author).
+
+\section{Make your changes}
+
+Create your own branch with \code{git branch} and then move to it with
+\code{git checkout}.
+
+Make a dummy change to the \code{MAINTAINERS} file, and commit your
+change. Look at the difference between the master branch and your
+branch (with \code{git log}, \code{git diff} and \code{gitk}).
+
+Then, edit \code{init/main.c}. In the function \code{start_kernel()},
+after the call to \code{printk()} to print the \code{linux_banner}
+variable, add a call to \code{printk()} to print your own
+message. Commit your change.
+
+\section{Share your changes}
+
+Generate the patch series corresponding to your two changes using
+\code{git format-patch}.
+
+Configure your SMTP server using:
+
+\begin{verbatim}
+git config --global sendemail.smtpserver smtp.company.com
+\end{verbatim}
+
+And then send the patches to yourself using \code{git send-email}.
+
+\section{Tracking another tree}
+
+Say you want to work on the realtime Linux tree, so we'll add this
+tree to the trees you're tracking:
+
+\small
+\begin{verbatim}
+git remote add realtime \
+  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git
+\end{verbatim}
+\normalsize
+
+A \code{git fetch} will fetch the data for this tree. Of course, Git
+will optimize the storage, and will no store everything that's common
+between the two trees. This is the big advantage of having a single
+local repository to track multiple remote trees, instead of having
+multiple local repositories.
+
+We can then switch to the master branch of the realtime tree:
+
+\begin{verbatim}
+git checkout realtime/master
+\end{verbatim}
+
+Or look at the difference between the scheduler code in the official
+tree and in the realtime tree:
+
+\begin{verbatim}
+git diff master..realtime/master kernel/sched.c
+\end{verbatim}
+
diff --git a/labs/kernel-locking/kernel-locking.tex b/labs/kernel-locking/kernel-locking.tex
new file mode 100644
index 0000000..5ce4a21
--- /dev/null
+++ b/labs/kernel-locking/kernel-locking.tex
@@ -0,0 +1,39 @@
+\subchapter{Locking}{Objective: practice with basic locking primitives}
+
+During this lab, you will:
+
+\begin{itemize}
+\item Practice with locking primitives to implement exclusive access
+  to the device.
+\end{itemize}
+
+\section{Setup}
+
+Stay in the \code{/home/<user>/felabs/linux/character} directory.
+
+You need to have completed the previous two labs to perform this one.
+
+Boot your board with the same NFS environment as before, and load your
+serial module.
+
+\section{Adding appropriate locking}
+
+We have two shared resources in our driver:
+\begin{itemize}
+
+\item The buffer that allows to transfer the read data from the
+  interrupt handler to the read() operation.
+
+\item The device itself. It might not be a good idea to mess with the
+  device registers at the same time and in two different contexts.
+
+\end{itemize}
+
+Therefore, your job is to add a spinlock to the driver, and use it in
+the appropriate locations to prevent concurrent accesses to the shared
+buffer and to the device.
+
+Please note that you don't have to prevent two processes from writing
+at the same time: this can happen and is a valid behavior. However, if
+two processes write data at the same time to the serial port, the
+serial controller should not get confused.
diff --git a/labs/kernel-module-environment/host-vs-target.dia b/labs/kernel-module-environment/host-vs-target.dia
new file mode 100644
index 0000000..54b2b64
--- /dev/null
+++ b/labs/kernel-module-environment/host-vs-target.dia
@@ -0,0 +1,439 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Arrière-plan" visible="true" active="true">
+    <dia:object type="Standard - Box" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="17,5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.95,4.95;30.35,13.65"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="17,5"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="13.299999999999997"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="8.5999999999999996"/>
+      </dia:attribute>
+      <dia:attribute name="border_width">
+        <dia:real val="0.10000000149011612"/>
+      </dia:attribute>
+      <dia:attribute name="border_color">
+        <dia:color val="#d9cb2f"/>
+      </dia:attribute>
+      <dia:attribute name="inner_color">
+        <dia:color val="#fff8a8"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="23.65,9.3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="23.65,8.705;23.65,9.4525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="23.65,9.3"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24,6.7"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="20.2,5.65;27.8,8.37861"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#Development
+workstation#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1.411111056804657"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="24,6.7"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="23.8,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="17.8712,11.405;29.7287,12.9525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#/home/<user>/felabs/.../nfsroot/root/
+directory#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="23.8,12"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="30.3,9.3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="30.0992,8.60857;41.3558,10.0364"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="30.3,9.3"/>
+        <dia:point val="41.155,9.345"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#868686"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.40000000596046448"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O5" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="41.155,4.99"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="41.105,4.94;52.205,13.75"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="41.155,4.99"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="11"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="8.7099999999999973"/>
+      </dia:attribute>
+      <dia:attribute name="border_width">
+        <dia:real val="0.10000000149011612"/>
+      </dia:attribute>
+      <dia:attribute name="border_color">
+        <dia:color val="#5cacff"/>
+      </dia:attribute>
+      <dia:attribute name="inner_color">
+        <dia:color val="#add8e6"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="46.455,7.19"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="44.7075,6.14;48.2025,7.4575"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#Target#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1.411111056804657"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="46.455,7.19"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="46.6838,11.935"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="45.2513,11.34;48.1163,12.8875"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#/root/
+directory#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="46.6838,11.935"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="34.1,8.75"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="34.1,7.9625;37.6325,8.95"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#Network#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1.0583332926034927"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="34.1,8.75"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="1" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="23.65,13.6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="23.6,13.55;47.0168,14.75"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="23.65,13.6"/>
+        <dia:point val="23.65,14.7"/>
+        <dia:point val="46.655,14.7"/>
+        <dia:point val="46.655,13.7"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+        <dia:enum val="1"/>
+      </dia:attribute>
+      <dia:attribute name="autorouting">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="6"/>
+        <dia:connection handle="1" to="O5" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="33.4,15.6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="33.4,15.005;36.925,15.7525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NFS export#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="33.4,15.6"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+  </dia:layer>
+</dia:diagram>
diff --git a/labs/kernel-module-environment/kernel-module-environment.tex b/labs/kernel-module-environment/kernel-module-environment.tex
new file mode 100644
index 0000000..7a461d4
--- /dev/null
+++ b/labs/kernel-module-environment/kernel-module-environment.tex
@@ -0,0 +1,260 @@
+\subchapter{Module development environment}{Objective: Setup an NFS
+  based kernel module development environment}
+
+After this lab, you will be able to:
+\begin{itemize}
+
+\item Cross-compile a kernel for the ARM platform
+
+\item Boot this kernel on an NFS root filesystem, which is somewhere
+on your development workstation\footnote{NFS root filesystems are
+particularly useful to compile modules on your host, and make them
+directly visible on the target. You longer have to update the root
+filesystem by hand and transfer it to the target (requiring a shutdown
+and reboot).}
+
+\end{itemize}
+
+\section{Lab implementation}
+
+While developing a kernel module, the developer wants to change the
+source code, compile and test the new kernel module very
+frequently. While writing and compiling the kernel module is done the
+development workstation, the test of the kernel module usually has to
+be done on the target, since it might interact with hardware specific
+to the target.
+
+However, flashing the root filesystem on the target for every test is
+time-consuming and would use the flash chip needlessly.
+
+Fortunately, it is possible to set up networking between the
+development workstation and the target. Then, workstation files can be
+accessed through the network by the target, using NFS.
+
+\begin{center}
+\includegraphics[width=\textwidth]{labs/kernel-module-environment/host-vs-target.pdf}
+\end{center}
+
+\section{Setup}
+
+Stay in the \code{/home/<user>/felabs/linux/modules} directory.
+
+Install packages needed for this lab:
+
+\begin{verbatim}
+sudo apt-get install libqt4-dev u-boot-tools
+\end{verbatim}
+
+\code{libqt4-dev} is needed for \code{make xconfig}. \code{u-boot-tools}
+is needed to build the uImage file for U-boot (\code{mkimage} utility).
+
+\section{Cross-compiling toolchain setup}
+
+We are going to install a cross-compiling toolchain from
+Linaro\footnote{Note that Linaro toolchains by default generate code
+for the {\em armv7} instruction set, while our AT91 CPU only supports
+{\em armv5}. This is not a problem, as the kernel \code{Makefile} will
+invoke the cross-compiler with the right instruction set settings.}, a
+very popular source for ARM toolchains (amongst other useful resources
+for Linux on ARM).
+
+\begin{verbatim}
+sudo add-apt-repository ppa:linaro-maintainers/toolchain
+sudo apt-get install gcc-arm-linux-gnueabi
+\end{verbatim}
+
+Now find out the path and name of the cross-compiler executable by looking at the contents of the package:
+
+\begin{verbatim}
+dpkg -L gcc-arm-linux-gnueabi
+\end{verbatim}
+
+\section{Kernel configuration}
+
+Set the \code{ARCH} and \code{CROSS_COMPILE} settings for the arm
+platform and to use your cross-compiler, either by modifying the
+kernel \code{Makefile} or by setting environment variables.
+
+Configure this kernel with the ready-made configuration for boards
+with the AT91SAM9263 CPU.
+
+If needed, add the configuration options that enable booting on a root
+filesystem over NFS.
+
+Compile your kernel and generate the uImage kernel image that U-boot
+needs (the U-boot bootloader needs the kernel zImage file to be
+encapsulated in a special container and the kernel Makefile can
+generate this container for you by running the mkimage tool found in
+the uboot-mkimage package):
+
+\begin{verbatim}
+make uImage
+\end{verbatim}
+
+\section{Setting up the NFS server}
+
+Install the NFS server by installing the nfs-kernel-server
+package. Once installed, edit the \code{/etc/exports} file as
+\code{root} to add the following lines, assuming that the IP address
+of your board will be \code{192.168.0.100}:
+
+\scriptsize
+\begin{verbatim}
+/home/<user>/felabs/linux/modules/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
+/home/<user>/felabs/linux/character/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
+/home/<user>/felabs/linux/debugging/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
+\end{verbatim}
+\normalsize
+
+Then, restart the NFS server:
+
+\begin{verbatim}
+sudo /etc/init.d/nfs-kernel-server restart
+\end{verbatim}
+
+\section{Setting up serial communication with the board}
+
+Plug the Calao board on your computer using its USB-A connector. When
+plugged-in, two serial ports should appear, \code{/dev/ttyUSB0} and
+\code{/dev/ttyUSB1}. \code{/dev/ttyUSB0} is used for the JTAG while
+\code{/dev/ttyUSB1} corresponds to the {\em DBGU}, the debugging
+serial port of the AT91 processor. You can also see this device appear
+by looking at the output of \code{dmesg}.
+
+To communicate with the board through the serial port, install a serial communication program, such as \code{picocom}:
+
+\begin{verbatim}
+sudo apt-get install picocom
+\end{verbatim}
+
+Run \code{picocom -b 115200 /dev/ttyUSB1}, to start a serial
+communication on \code{/dev/ttyUSB1}, with a baudrate of 115200. If
+you wish to exit picocom, press \code{[Ctrl][a]} followed by
+\code{[Ctrl][x]}.
+
+You should now see the U-Boot prompt:
+\begin{verbatim}
+U-Boot>
+\end{verbatim}
+
+You may need to reset the board (using the tiny reset button close to
+the USB host connectors).
+
+You can now use U-Boot. Run the \code{help} command to see the available
+commands.
+
+\section{Setting up Ethernet communication}
+
+The kernel image will be transferred to the board using the TFTP
+protocol, which works on top of an Ethernet connection.
+
+To start with, install a TFTP server on your development workstation:
+
+\begin{verbatim}
+sudo apt-get install tftpd-hpa
+\end{verbatim}
+
+Copy your \code{uImage} file to the \code{/var/lib/tftpboot} directory.
+
+With a network cable, connect the Ethernet port of your board to the
+one of your computer. If your computer already has a wired connection
+to the network, your instructor will provide you with a USB Ethernet
+adapter. A new network interface, probably \code{eth1} or \code{eth2},
+should appear on your Linux system.
+
+To configure your network interface on the workstation side, click on
+the {\em Network Manager} tasklet on your desktop, and select {\em
+Edit Connections}.
+
+\begin{center}
+\includegraphics[width=8cm]{labs/kernel-module-environment/network-config-1.png}
+\end{center}
+
+Select the new wired network connection:
+
+\begin{center}
+\includegraphics[width=8cm]{labs/kernel-module-environment/network-config-2.png}
+\end{center}
+
+In the {\em IPv4 Settings} tab, make the interface use a static IP
+address, like 192.168.0.1 (of course, make sure that this address
+belongs to a separate network segment from the one of the main company
+network):
+
+\begin{center}
+\includegraphics[width=8cm]{labs/kernel-module-environment/network-config-3.png}
+\end{center}
+
+Now, configure the network on the board in U-Boot by setting the
+\code{ipaddr} and \code{serverip} environment variables:
+
+\begin{verbatim}
+setenv ipaddr 192.168.0.100
+setenv serverip 192.168.0.1
+\end{verbatim}
+
+In case the board was previously configured in a different way, we
+also turn off automatic booting after commands that can be used to
+copy a kernel to RAM:
+
+\begin{verbatim}
+setenv autostart no
+\end{verbatim}
+
+To make these settings permanent, save the environment:
+
+\begin{verbatim}
+saveenv
+\end{verbatim}
+
+You can then test the TFTP connection. First, put a small text file in
+the directory exported through TFTP on your development
+workstation. Then, from U-Boot, do:
+
+\begin{verbatim}
+tftp 0x21000000 textfile.txt
+\end{verbatim}
+
+This should download the file \code{textfile.txt} from your development
+workstation into the board's memory at location \code{0x21000000} (this
+location is part of the board DRAM). You can verify that the download
+was successful by dumping the contents of the memory:
+
+\begin{verbatim}
+md 0x21000000
+\end{verbatim}
+
+\section{Boot the system}
+
+First, boot the board to the U-Boot prompt.  Before booting the
+kernel, we need to tell it that the root filesystem should be mounted
+over NFS, by setting some kernel parameters.  Use the following U-Boot
+command to do so (in just 1 line):
+
+\scriptsize
+\begin{verbatim}
+setenv bootargs root=/dev/nfs ip=192.168.0.100
+  nfsroot=192.168.0.1:/home/<user>/felabs/linux/modules/nfsroot
+\end{verbatim}
+\normalsize
+
+Of course, you need to adapt the IP addresses to your exact network
+setup. Save the environment variables (with saveenv).  Now, download
+the kernel image through tftp:
+
+\begin{verbatim}
+tftp 0x21000000 uImage
+\end{verbatim}
+
+Now, boot your kernel:
+
+\begin{verbatim}
+bootm 0x21000000
+\end{verbatim}
+
+If everything goes right, you should reach a shell prompt. Otherwise,
+check your setup or ask your instructor for details.
+
+If the kernel fails to mount the NFS filesystem, look carefully at the
+error messages in the console. If this doesn't give any clue, you can
+also have a look at the NFS server logs in \code{/var/log/syslog}.
diff --git a/labs/kernel-module-environment/network-config-1.png b/labs/kernel-module-environment/network-config-1.png
new file mode 100644
index 0000000..5264e3e
Binary files /dev/null and b/labs/kernel-module-environment/network-config-1.png differ
diff --git a/labs/kernel-module-environment/network-config-2.png b/labs/kernel-module-environment/network-config-2.png
new file mode 100644
index 0000000..ebeb621
Binary files /dev/null and b/labs/kernel-module-environment/network-config-2.png differ
diff --git a/labs/kernel-module-environment/network-config-3.png b/labs/kernel-module-environment/network-config-3.png
new file mode 100644
index 0000000..0e007a3
Binary files /dev/null and b/labs/kernel-module-environment/network-config-3.png differ
diff --git a/labs/kernel-module-simple/kernel-module-simple.tex b/labs/kernel-module-simple/kernel-module-simple.tex
new file mode 100644
index 0000000..65b8e01
--- /dev/null
+++ b/labs/kernel-module-simple/kernel-module-simple.tex
@@ -0,0 +1,134 @@
+\subchapter{Writing modules}{Objective: create a simple kernel module}
+
+After this lab, you will be able to:
+
+\begin{itemize}
+\item Compile and test standalone kernel modules, which code is outside of the main Linux sources.
+\item Write a kernel module with several capabilities, including module parameters.
+\item Access kernel internals from your module.
+\item Setup the environment to compile it
+\item Create a kernel patch
+\end{itemize}
+
+\section{Setup}
+
+Stay inside the \code{/home/<user>/felabs/linux/modules} directory.
+Boot your board again, as you did in the previous lab.
+
+\section{Writing a module}
+
+Go to the \code{nfsroot/root} directory. All the files you generate
+there will also be visible from the target. That's great to load
+modules!
+
+Create a \code{hello_version.c} file implementing a module which
+displays this kind of message when loaded:
+
+\begin{verbatim}
+Hello Master. You are currently using Linux <version>.
+\end{verbatim}
+
+... and displays a goodbye message when unloaded.
+
+You may just start with a module that displays a hello message, and
+add version information later.
+
+Caution: you must use a kernel variable or function to get version
+information, and not just the value of a C macro. Otherwise, you will
+only get the version of the kernel you used to build the
+module. Suggestion: you can look for files in kernel sources which
+contain version in their name, and see what they do.
+
+\section{Building your module}
+
+The current directory contains a \code{Makefile} file, which lets you
+build modules outside a kernel source tree.  Compile your module.
+
+\section{Testing your module}
+
+Load your new module file. Check that it works as
+expected. Until this, unload it, modify its code, compile and load it
+again as many times as needed.
+
+Run a command to check that your module is on the list of loaded
+modules. Now, try to get the list of loaded modules with only the cat
+command.
+
+\section{Adding a parameter to your module}
+
+Add a who parameter to your module. Your module will say \code{Hello
+<who>} instead of \code{Hello Master}.
+
+ Compile and test your module by checking that it takes the who
+parameter into account when you load it.
+
+\section{Adding time information}
+
+Improve your module, so that when you unload it, it tells you how many
+seconds elapsed since you loaded it.  You can use the
+\code{do_gettimeofday()} function to achieve this.
+
+You may search for other drivers in the kernel sources using the
+\code{do_gettimeofday()} function. Looking for other examples always helps!
+
+\section{Following Linux coding standards}
+
+Your code should adhere to strict coding standards, if you want to
+have it one day merged in the mainline sources. One of the main
+reasons is code readability. If anyone used one's own style, given the
+number of contributors, reading kernel code would be very unpleasant.
+
+Fortunately, the Linux kernel community provides you with a utility to
+find coding standards violations.
+
+Run the \code{scripts/checkpatch.pl -h} command in the kernel sources,
+to find which options are available.  Now, run:
+
+\begin{verbatim}
+scripts/checkpatch.pl --file --no-tree <path>/hello_version.c
+\end{verbatim}
+
+See how many violations are reported on your code. If there are
+indenting errors, you can first run your code through the \code{indent}
+command:
+
+\begin{verbatim}
+sudo apt-get install indent
+indent -linux hello_version.c
+\end{verbatim}
+
+You can now compare the indented file with the original:
+
+\begin{verbatim}
+sudo apt-get install meld
+meld hello_version.c~ hello_version.c
+\end{verbatim}
+
+Now, get back to \code{checkpatch.pl} and fix your code until there are
+no errors left.
+
+\section{Adding the {\tt hello\_version} module to the kernel sources}
+
+Add your module sources to the \code{drivers/misc/} directory in your
+kernel sources. Of course, also modify kernel configuration and
+building files accordingly, so that you can select your module in
+\code{make xconfig} and have it compiled by the \code{make} command.
+
+Configure your kernel with the config file corresponding to your
+running kernel. Now check that the configuration interface shows your
+new driver and lets you configure it as a module.
+
+Run the \code{make} command and make sure that the code of your new
+driver is getting compiled. Then, install your kernel module using
+\code{make modules_install}. Beware, the modules should be installed
+in the root filesystem of the target, not in the root filesystem of
+your development workstation!
+
+\section{Create a kernel patch}
+
+You can be proud of your new module! To be able to share it with
+others, create a patch which adds your new files to the mainstream
+kernel.
+
+Test that your patch file is compatible with the patch command by
+applying it to unmodified kernel sources.
diff --git a/labs/kernel-power-management/kernel-power-management.tex b/labs/kernel-power-management/kernel-power-management.tex
new file mode 100644
index 0000000..c25efbc
--- /dev/null
+++ b/labs/kernel-power-management/kernel-power-management.tex
@@ -0,0 +1,131 @@
+\subchapter{Power management}{Objective: practice with standard power
+  management interfaces offered by Linux}
+
+After this lab, you will be able to:
+
+\begin{itemize}
+\item Suspend and resume your Linux system
+\item Change the CPU frequency of your system
+\end{itemize}
+
+\section{Setup}
+
+Lab data are available in \code{/home/<user>/felabs/powermgt/usage/}.
+
+Download and extract the latest update to the Linux 3.1 kernel.
+
+Suspend/resume support for the Calao board is already included in this
+kernel.
+
+Cpu frequency scaling support for this hardware was developed by Free
+Electrons and is not yet part of the mainline kernel. Therefore,
+before compiling the 3.1 kernel, you'll have to apply the three
+patches in the \code{data/} directory of this lab:
+
+\begin{itemize}
+
+\item The first patch implements the CPU frequency driver itself,
+  which allows to change the frequency on the AT91SAM9263 CPU
+
+\item The second patch adds CPU frequency support to the serial port
+  driver. When the CPU clock is changed, the divisors for the baud
+  rate generator must be modified. This is what this patch does.
+
+\item The third patch adds CPU frequency support to the Ethernet
+  controller driver for similar reasons.
+
+\end{itemize}
+
+Configure your kernel with CPU Frequency scaling support, with the CPU
+Frequency driver for AT91, and for the different cpufreq governors.
+
+Then, compile this kernel, and boot the system over NFS to the root
+filesystem included
+in \code{/home/<user>/felabs/powermgt/usage/nfsroot/}.
+
+\section{Suspend and resume}
+
+To suspend to RAM the Calao board, run :
+
+\begin{verbatim}
+echo mem > /sys/power/state
+\end{verbatim}
+
+The Calao board will then put itself in a low power-consumption mode,
+as the inactivity of most LEDs will show.
+
+To resume the Calao board, push the User button. After a short time,
+the board will be usable again.
+
+\section{CPU frequency control}
+
+Linux has a {\em cpufreq} driver to control CPU frequency. Of course, it can
+only switch between the limited number of operating states that your
+CPU and board can support.
+
+This interface can be controlled by userspace. This means it allows
+you to let the system user tune it from a graphical front-end, for
+example.
+
+Go to the \code{/sys/devices/system/cpu/cpu0/cpufreq/} directory, and
+see what available files are.
+
+Check what the current cpufreq governor is.
+
+Find what the allowed frequencies are on your system.
+
+Now look at the files which offer write permission. These are the ones
+you can use to control \code{cpufreq}.
+
+Switch to the \code{userspace} governor, the one that disables the
+kernel autopilot.  Now, set the frequency of \code{cpu0} to the maximum
+one. View the \code{scaling_cur_freq} file to check that the
+frequency is the one you expected.
+
+Change the governor to \code{performance}, check the current frequency,
+and change to \code{powersave} and check the frequency again.
+
+You can also select the \code{ondemand} governor, add some load to your
+target by running \code{ping -f target-ip} ({\em ping} in flood mode) from
+your PC and see the cpu frequency increase when your system gets
+pinged.
+
+Note that with the \code{userspace} governor enabled, you can implement
+your own, custom CPU frequency control based on your own criteria. You
+could check the system temperature, for example, and if it gets hotter
+than a specified threshold, you could slow down the frequency. You
+could also let a time critical process bump the frequency to the
+maximum value. You can see that in userspace, {\bf you} are the
+governor.
+
+\section{Using PowerTop}
+
+On your development PC. Install the nice PowerTop tool contributed by Intel:
+
+\begin{verbatim}
+sudo apt-get install powertop
+\end{verbatim}
+
+Run the \code{powertop} command, and see it display statistics, and
+list the top processes that cause you CPU to wake up from a deeper
+sleep state, causing it to consume more power. You could use this
+interface to find power management bugs in the applications running on
+your system.
+
+If you're using a laptop, remove the AC power for a while. This gives
+you access to live power estimates from ACPI.
+
+Also follow the tips that PowerTop gives you to conserve power, and
+try to make your system consume as little power as possible.
+
+Compare your power estimates with other people in the classroom, and
+try to achieve the best results. Any technique can be used!
+
+Thanks to Linaro, PowerTop is also available on ARM now. See
+\url{https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/Powertop}.
+
+So, if your embedded architecture has CPUidle support, you could try
+this utility on it. If your embedded architecture has CPUidle support,
+even if you didn't compile powertop, you can still access idle state
+statistics by looking at the files
+in \code{/sys/devices/system/cpu/cpu<n>/cpuidle}.
diff --git a/labs/kernel-serial-driver/kernel-serial-driver.tex b/labs/kernel-serial-driver/kernel-serial-driver.tex
new file mode 100644
index 0000000..e12ecbd
--- /dev/null
+++ b/labs/kernel-serial-driver/kernel-serial-driver.tex
@@ -0,0 +1,398 @@
+\subchapter{Kernel – Serial controller device driver
+  programming}{Objective: Develop a serial device driver for the
+  AT91SAM9263 CPU from scratch}
+
+\section{Warning}
+
+In this lab, we are going

-- 
Michael Opdenacker, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+33 484 253 396



More information about the training-materials-updates mailing list