[FE training-materials-updates] Reorganize and split the linux kernel chapter

maxime.ripard at free-electrons.com maxime.ripard at free-electrons.com
Thu May 10 13:46:13 CEST 2012


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

commit 28dccd11f76e83f48a9638c18ac47e8eaf77c9ab
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Thu May 10 12:02:37 2012 +0200

    Reorganize and split the linux kernel chapter
    
    Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>

diff --git a/Makefile b/Makefile
index 7176c8e..76dac79 100644
--- a/Makefile
+++ b/Makefile
@@ -23,10 +23,16 @@ SYSDEV_SLIDES = sysdev-intro \
 		sysdev-bootloaders-sequence \
 		sysdev-bootloaders-u-boot \
 		sysdev-bootloaders-lab \
-		sysdev-linux-kernel-intro \
-		sysdev-kernel-fetch-and-patch \
-		sysdev-kernel-configuration-and-compiling \
-		sysdev-using-kernel-modules \
+		sysdev-linux-intro-title \
+		sysdev-linux-intro-features \
+		sysdev-linux-intro-versioning \
+		sysdev-linux-intro-sources \
+		sysdev-linux-intro-lab-sources \
+		sysdev-linux-intro-configuration \
+		sysdev-linux-intro-compilation \
+		sysdev-linux-intro-cross-compilation \
+		sysdev-linux-intro-lab-cross-compilation \
+		sysdev-linux-intro-modules \
 		sysdev-root-filesystem-title \
 		sysdev-root-filesystem-principles \
 		sysdev-root-filesystem-contents \
diff --git a/slides/sysdev-kernel-configuration-and-compiling/kernel-mrproper.png b/slides/sysdev-linux-intro-compilation/kernel-mrproper.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/kernel-mrproper.png
rename to slides/sysdev-linux-intro-compilation/kernel-mrproper.png
diff --git a/slides/sysdev-linux-intro-compilation/sysdev-linux-intro-compilation.tex b/slides/sysdev-linux-intro-compilation/sysdev-linux-intro-compilation.tex
new file mode 100644
index 0000000..d10eae8
--- /dev/null
+++ b/slides/sysdev-linux-intro-compilation/sysdev-linux-intro-compilation.tex
@@ -0,0 +1,96 @@
+\subsection[Installation on the host]{Compiling and installing the
+  kernel for the host system}
+
+\begin{frame}
+  \frametitle{Kernel compilation}
+  \begin{itemize}
+  \item \code{make}
+    \begin{itemize}
+    \item in the main kernel source directory
+    \item Remember to run \code{make -j 4} if you have multiple CPU
+      cores to speed up the compilation process
+    \item No need to run as root !
+    \end{itemize}
+  \item Generates
+    \begin{itemize}
+    \item \code{vmlinux}, the raw uncompressed kernel image, at the
+      ELF format, useful for debugging purposes, but cannot be booted
+    \item \code{arch/<arch>/boot/*Image}, the final, usually
+      compressed, kernel image that can be booted
+      \begin{itemize}
+      \item \code{bzImage} for x86, \code{zImage} for ARM,
+        \code{vmImage.gz} for Blackfin, etc.
+      \end{itemize}
+    \item All kernel modules, spread over the kernel source tree, as
+      \code{.ko} files.
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Kernel installation}
+  \begin{itemize}
+  \item \code{make install}
+    \begin{itemize}
+    \item Does the installation for the host system by default, so
+      needs to be run as root. Generally not used when compiling for
+      an embedded system, and it installs files on the development
+      workstation.
+    \end{itemize}
+  \item Installs
+    \begin{itemize}
+    \item \code{/boot/vmlinuz-<version>} \\
+      Compressed kernel image. Same as the one in
+      \code{arch/<arch>/boot}
+    \item \code{/boot/System.map-<version>}\\
+      Stores kernel symbol addresses
+    \item \code{/boot/config-<version>}\\
+      Kernel configuration for this version
+    \end{itemize}
+  \item Typically re-runs the bootloader configuration utility to take
+    into account the new kernel.
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Module installation}
+  \begin{itemize}
+  \item \code{make modules_install}
+    \begin{itemize}
+    \item Does the installation for the host system by default, so
+      needs to be run as root
+    \end{itemize}
+  \item Installs all modules in \code{/lib/modules/<version>/}
+    \begin{itemize}
+    \item \code{kernel/}\\
+      Module \code{.ko} (Kernel Object) files, in the same directory
+      structure as in the sources.
+    \item \code{modules.alias}\\
+      Module aliases for module loading utilities. Example line:\\
+      \code{alias sound-service-?-0 snd_mixer_oss}
+    \item \code{modules.dep}\\
+      Module dependencies
+    \item \code{modules.symbols}\\
+      Tells which module a given symbol belongs to.
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Kernel cleanup targets}
+  \begin{columns}
+    \column{0.8\textwidth}
+    \begin{itemize}
+    \item Clean-up generated files (to force re-compilation):\\
+      \code{make clean}
+    \item Remove all generated files. Needed when switching from one
+      architecture to another. Caution: also removes your .config file!\\
+      \code{make mrproper}
+    \item Also remove editor backup and patch reject files (mainly to
+      generate patches):\\
+      \code{make distclean}
+    \end{itemize}
+    \column{0.2\textwidth}
+    \includegraphics[width=0.9\textwidth]{slides/sysdev-linux-intro-compilation/kernel-mrproper.png}
+  \end{columns}
+\end{frame}
diff --git a/slides/sysdev-kernel-configuration-and-compiling/gconfig-screenshot.png b/slides/sysdev-linux-intro-configuration/gconfig-screenshot.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/gconfig-screenshot.png
rename to slides/sysdev-linux-intro-configuration/gconfig-screenshot.png
diff --git a/slides/sysdev-kernel-configuration-and-compiling/iso-example.png b/slides/sysdev-linux-intro-configuration/iso-example.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/iso-example.png
rename to slides/sysdev-linux-intro-configuration/iso-example.png
diff --git a/slides/sysdev-kernel-configuration-and-compiling/menuconfig-screenshot.png b/slides/sysdev-linux-intro-configuration/menuconfig-screenshot.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/menuconfig-screenshot.png
rename to slides/sysdev-linux-intro-configuration/menuconfig-screenshot.png
diff --git a/slides/sysdev-kernel-configuration-and-compiling/nconfig-screenshot.png b/slides/sysdev-linux-intro-configuration/nconfig-screenshot.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/nconfig-screenshot.png
rename to slides/sysdev-linux-intro-configuration/nconfig-screenshot.png
diff --git a/slides/sysdev-kernel-configuration-and-compiling/sysdev-kernel-configuration-and-compiling.tex b/slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex
similarity index 63%
rename from slides/sysdev-kernel-configuration-and-compiling/sysdev-kernel-configuration-and-compiling.tex
rename to slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex
index a60f0ad..04983e7 100644
--- a/slides/sysdev-kernel-configuration-and-compiling/sysdev-kernel-configuration-and-compiling.tex
+++ b/slides/sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex
@@ -146,7 +146,7 @@
 \begin{frame}
   \frametitle{make xconfig screenshot}
   \begin{center}
-    \includegraphics[width=\textwidth]{slides/sysdev-kernel-configuration-and-compiling/xconfig-screenshot.png}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-configuration/xconfig-screenshot.png}
   \end{center}
 \end{frame}
 
@@ -157,14 +157,14 @@
   unselect found parameters.
 
   \begin{center}
-    \includegraphics[width=0.9\textwidth]{slides/sysdev-kernel-configuration-and-compiling/xconfig-search.png}
+    \includegraphics[width=0.9\textwidth]{slides/sysdev-linux-intro-configuration/xconfig-search.png}
   \end{center}
 \end{frame}
 
 \begin{frame}
 \frametitle{Kernel configuration options}
   \begin{center}
-    \includegraphics[width=\textwidth]{slides/sysdev-kernel-configuration-and-compiling/xconfig-iso-example.pdf}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-configuration/xconfig-iso-example.pdf}
   \end{center}
 \end{frame}
 
@@ -207,7 +207,7 @@ CONFIG_NTFS_RW=y
     \vspace{0.5cm}
     Required Debian packages: \code{libglade2-dev}
     \column{0.5\textwidth}
-    \includegraphics[width=0.9\textwidth]{slides/sysdev-kernel-configuration-and-compiling/gconfig-screenshot.png}
+    \includegraphics[width=0.9\textwidth]{slides/sysdev-linux-intro-configuration/gconfig-screenshot.png}
   \end{columns}
 \end{frame}
 
@@ -223,7 +223,7 @@ CONFIG_NTFS_RW=y
     \vspace{0.5cm}
     Required Debian packages: \code{libncurses-dev}
     \column{0.5\textwidth}
-    \includegraphics[width=0.9\textwidth]{slides/sysdev-kernel-configuration-and-compiling/menuconfig-screenshot.png}
+    \includegraphics[width=0.9\textwidth]{slides/sysdev-linux-intro-configuration/menuconfig-screenshot.png}
   \end{columns}
 \end{frame}
 
@@ -239,7 +239,7 @@ CONFIG_NTFS_RW=y
     \vspace{0.5cm}
     Required Debian packages: \code{libncurses-dev}
     \column{0.5\textwidth}
-    \includegraphics[width=0.9\textwidth]{slides/sysdev-kernel-configuration-and-compiling/nconfig-screenshot.png}
+    \includegraphics[width=0.9\textwidth]{slides/sysdev-linux-intro-configuration/nconfig-screenshot.png}
   \end{columns}
 \end{frame}
 
@@ -526,264 +526,3 @@ CONFIG_NTFS_RW=y
     \end{itemize}
   \end{itemize}
 \end{frame}
-
-\subsection[Installation on the host]{Compiling and installing the
-  kernel for the host system}
-
-\begin{frame}
-  \frametitle{Kernel compilation}
-  \begin{itemize}
-  \item \code{make}
-    \begin{itemize}
-    \item in the main kernel source directory
-    \item Remember to run \code{make -j 4} if you have multiple CPU
-      cores to speed up the compilation process
-    \item No need to run as root !
-    \end{itemize}
-  \item Generates
-    \begin{itemize}
-    \item \code{vmlinux}, the raw uncompressed kernel image, at the
-      ELF format, useful for debugging purposes, but cannot be booted
-    \item \code{arch/<arch>/boot/*Image}, the final, usually
-      compressed, kernel image that can be booted
-      \begin{itemize}
-      \item \code{bzImage} for x86, \code{zImage} for ARM,
-        \code{vmImage.gz} for Blackfin, etc.
-      \end{itemize}
-    \item All kernel modules, spread over the kernel source tree, as
-      \code{.ko} files.
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Kernel installation}
-  \begin{itemize}
-  \item \code{make install}
-    \begin{itemize}
-    \item Does the installation for the host system by default, so
-      needs to be run as root. Generally not used when compiling for
-      an embedded system, and it installs files on the development
-      workstation.
-    \end{itemize}
-  \item Installs
-    \begin{itemize}
-    \item \code{/boot/vmlinuz-<version>} \\
-      Compressed kernel image. Same as the one in
-      \code{arch/<arch>/boot}
-    \item \code{/boot/System.map-<version>}\\
-      Stores kernel symbol addresses
-    \item \code{/boot/config-<version>}\\
-      Kernel configuration for this version
-    \end{itemize}
-  \item Typically re-runs the bootloader configuration utility to take
-    into account the new kernel.
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Module installation}
-  \begin{itemize}
-  \item \code{make modules_install}
-    \begin{itemize}
-    \item Does the installation for the host system by default, so
-      needs to be run as root
-    \end{itemize}
-  \item Installs all modules in \code{/lib/modules/<version>/}
-    \begin{itemize}
-    \item \code{kernel/}\\
-      Module \code{.ko} (Kernel Object) files, in the same directory
-      structure as in the sources.
-    \item \code{modules.alias}\\
-      Module aliases for module loading utilities. Example line:\\
-      \code{alias sound-service-?-0 snd_mixer_oss}
-    \item \code{modules.dep}\\
-      Module dependencies
-    \item \code{modules.symbols}\\
-      Tells which module a given symbol belongs to.
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Kernel cleanup targets}
-  \begin{columns}
-    \column{0.8\textwidth}
-    \begin{itemize}
-    \item Clean-up generated files (to force re-compilation):\\
-      \code{make clean}
-    \item Remove all generated files. Needed when switching from one
-      architecture to another. Caution: also removes your .config file!\\
-      \code{make mrproper}
-    \item Also remove editor backup and patch reject files (mainly to
-      generate patches):\\
-      \code{make distclean}
-    \end{itemize}
-    \column{0.2\textwidth}
-    \includegraphics[width=0.9\textwidth]{slides/sysdev-kernel-configuration-and-compiling/kernel-mrproper.png}
-  \end{columns}
-\end{frame}
-
-\subsection{Cross-compiling the kernel}
-
-\begin{frame}
-  \frametitle{Cross-compiling the kernel}
-  When you compile a Linux kernel for another CPU architecture
-  \begin{itemize}
-  \item Much faster than compiling natively, when the target system is
-    much slower than your GNU/Linux workstation.
-  \item Much easier as development tools for your GNU/Linux
-    workstation are much easier to find.
-  \item To make the difference with a native compiler, cross-compiler
-    executables are prefixed by the name of the target system,
-    architecture and sometimes
-    library. Examples:\\
-    \small
-    \code{mips-linux-gcc}, the prefix is \code{mips-linux-}\\
-    \code{arm-linux-gnueabi-gcc}, the prefix is \code{arm-linux-gnueabi-}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}[fragile]
-  \frametitle{Specifying cross-compilation}
-
-  The CPU architecture and cross-compiler prefix are defined through
-  the \code{ARCH} and \code{CROSS_COMPILE} variables in the toplevel
-  Makefile.
-
-  \begin{itemize}
-  \item \code{ARCH} is the name of the architecture. It is defined by
-    the name of the subdirectory in \code{arch/} in the kernel sources
-  \item \code{CROSS_COMPILE} is the prefix of the cross compilation
-    tools
-    \begin{itemize}
-    \item Example: \code{arm-linux-} if your compiler is \code{arm-linux-gcc}
-    \end{itemize}
-  \item Three solutions
-    \begin{itemize}
-    \item Force these two variables in the main kernel \code{Makefile}
-\begin{verbatim}
-ARCH?= arm
-CROSS_COMPILE?= arm-linux-
-\end{verbatim}
-    \item Pass \code{ARCH} and \code{CROSS_COMPILE} on the \code{make}
-      command line
-    \item Define \code{ARCH} and \code{CROSS_COMPILE} as environment
-      variables
-    \item Don't forget to have the values properly set at all steps,
-      otherwise the kernel configuration and build system gets
-      confused
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Predefined configuration files}
-  \begin{itemize}
-  \item Default configuration files available, per board or per-CPU
-    family
-    \begin{itemize}
-    \item They are stored in \code{arch/<arch>/configs/}, and are
-      just minimal \code{.config} files
-    \item This is the most common way of configuring a kernel for
-      embedded platforms
-    \end{itemize}
-  \item Run \code{make help} to find if one is available for your
-    platform
-  \item To load a default configuration file, just run\\
-    \code{make acme_defconfig}
-    \begin{itemize}
-    \item This will overwrite your existing \code{.config} !
-    \end{itemize}
-  \item To create your own default configuration file
-    \begin{itemize}
-    \item \code{make savedefconfig}, to create a minimal
-      configuration file
-    \item \code{mv defconfig arch/<arch>/configs/myown_defconfig}
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Configuring the kernel}
-  \begin{itemize}
-  \item After loading a default configuration file, you can adjust the
-    configuration to your needs with the normal \code{xconfig},
-    \code{gconfig} or \code{menuconfig} interfaces
-  \item You can also start the configuration from scratch without
-    loading a default configuration file
-  \item As the architecture is different than your host architecture
-    \begin{itemize}
-    \item Some options will be different from the native configuration
-      (processor and architecture specific options, specific drivers,
-      etc.)
-    \item Many options will be identical (filesystems, network
-      protocol, architecture-independent drivers, etc.)
-    \end{itemize}
-  \item Make sure you have the support for the right CPU, the right
-    board and the right device drivers.
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Building and installing the kernel}
-  \begin{itemize}
-  \item Run \code{make}
-  \item Copy the final kernel image to the target storage
-    \begin{itemize}
-    \item can be \code{uImage}, \code{zImage}, \code{vmlinux},
-      \code{bzImage} in \code{arch/<arch>/boot}
-    \end{itemize}
-  \item make install is rarely used in embedded development, as the
-    kernel image is a single file, easy to handle
-    \begin{itemize}
-    \item It is however possible to customize the make install
-      behaviour in \code{arch/<arch>/boot/install.sh}
-    \end{itemize}
-  \item \code{make modules_install} is used even in embedded
-    development, as it installs many modules and description files
-    \begin{itemize}
-    \item \code{make INSTALL_MOD_PATH=<dir>/ modules_install}
-    \item The \code{INSTALL_MOD_PATH} variable is needed to install
-      the modules in the target root filesystem instead of your host
-      root filesystem.
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Kernel command line}
-  \begin{itemize}
-  \item In addition to the compile time configuration, the kernel
-    behaviour can be adjusted with no recompilation using the {\bf
-      kernel command line}
-  \item The kernel command line is a string that defines various
-    arguments to the kernel
-    \begin{itemize}
-    \item It is very important for system configuration
-    \item \code{root=} for the root filesystem (covered later)
-    \item \code{console=} for the destination of kernel messages
-    \item and many more, documented in
-      \code{Documentation/kernel-parameters.txt} in the kernel sources
-    \end{itemize}
-  \item This kernel command line is either
-    \begin{itemize}
-    \item Passed by the bootloader. In U-Boot, the contents of the
-      \code{bootargs} environment variable is automatically passed to the
-      kernel
-    \item Built into the kernel, using the \code{CONFIG_CMDLINE} option.
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\setuplabframe
-{Kernel cross-compiling}
-{
-  \begin{itemize}
-  \item Set up the cross-compiling environment
-  \item Configure the kernel \code{Makefile} accordingly
-  \item Cross-compile the kernel for an \code{arm} platform
-  \item On this platform, interact with the bootloader and boot your
-    kernel
-  \end{itemize}
-}
diff --git a/slides/sysdev-kernel-configuration-and-compiling/xconfig-iso-example.dia b/slides/sysdev-linux-intro-configuration/xconfig-iso-example.dia
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/xconfig-iso-example.dia
rename to slides/sysdev-linux-intro-configuration/xconfig-iso-example.dia
diff --git a/slides/sysdev-kernel-configuration-and-compiling/xconfig-screenshot.png b/slides/sysdev-linux-intro-configuration/xconfig-screenshot.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/xconfig-screenshot.png
rename to slides/sysdev-linux-intro-configuration/xconfig-screenshot.png
diff --git a/slides/sysdev-kernel-configuration-and-compiling/xconfig-search.png b/slides/sysdev-linux-intro-configuration/xconfig-search.png
similarity index 100%
rename from slides/sysdev-kernel-configuration-and-compiling/xconfig-search.png
rename to slides/sysdev-linux-intro-configuration/xconfig-search.png
diff --git a/slides/sysdev-linux-intro-cross-compilation/sysdev-linux-intro-cross-compilation.tex b/slides/sysdev-linux-intro-cross-compilation/sysdev-linux-intro-cross-compilation.tex
new file mode 100644
index 0000000..8c12c32
--- /dev/null
+++ b/slides/sysdev-linux-intro-cross-compilation/sysdev-linux-intro-cross-compilation.tex
@@ -0,0 +1,151 @@
+\subsection{Cross-compiling the kernel}
+
+\begin{frame}
+  \frametitle{Cross-compiling the kernel}
+  When you compile a Linux kernel for another CPU architecture
+  \begin{itemize}
+  \item Much faster than compiling natively, when the target system is
+    much slower than your GNU/Linux workstation.
+  \item Much easier as development tools for your GNU/Linux
+    workstation are much easier to find.
+  \item To make the difference with a native compiler, cross-compiler
+    executables are prefixed by the name of the target system,
+    architecture and sometimes
+    library. Examples:\\
+    \small
+    \code{mips-linux-gcc}, the prefix is \code{mips-linux-}\\
+    \code{arm-linux-gnueabi-gcc}, the prefix is \code{arm-linux-gnueabi-}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{Specifying cross-compilation}
+
+  The CPU architecture and cross-compiler prefix are defined through
+  the \code{ARCH} and \code{CROSS_COMPILE} variables in the toplevel
+  Makefile.
+
+  \begin{itemize}
+  \item \code{ARCH} is the name of the architecture. It is defined by
+    the name of the subdirectory in \code{arch/} in the kernel sources
+  \item \code{CROSS_COMPILE} is the prefix of the cross compilation
+    tools
+    \begin{itemize}
+    \item Example: \code{arm-linux-} if your compiler is \code{arm-linux-gcc}
+    \end{itemize}
+  \item Three solutions
+    \begin{itemize}
+    \item Force these two variables in the main kernel \code{Makefile}
+\begin{verbatim}
+ARCH?= arm
+CROSS_COMPILE?= arm-linux-
+\end{verbatim}
+    \item Pass \code{ARCH} and \code{CROSS_COMPILE} on the \code{make}
+      command line
+    \item Define \code{ARCH} and \code{CROSS_COMPILE} as environment
+      variables
+    \item Don't forget to have the values properly set at all steps,
+      otherwise the kernel configuration and build system gets
+      confused
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Predefined configuration files}
+  \begin{itemize}
+  \item Default configuration files available, per board or per-CPU
+    family
+    \begin{itemize}
+    \item They are stored in \code{arch/<arch>/configs/}, and are
+      just minimal \code{.config} files
+    \item This is the most common way of configuring a kernel for
+      embedded platforms
+    \end{itemize}
+  \item Run \code{make help} to find if one is available for your
+    platform
+  \item To load a default configuration file, just run\\
+    \code{make acme_defconfig}
+    \begin{itemize}
+    \item This will overwrite your existing \code{.config} !
+    \end{itemize}
+  \item To create your own default configuration file
+    \begin{itemize}
+    \item \code{make savedefconfig}, to create a minimal
+      configuration file
+    \item \code{mv defconfig arch/<arch>/configs/myown_defconfig}
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Configuring the kernel}
+  \begin{itemize}
+  \item After loading a default configuration file, you can adjust the
+    configuration to your needs with the normal \code{xconfig},
+    \code{gconfig} or \code{menuconfig} interfaces
+  \item You can also start the configuration from scratch without
+    loading a default configuration file
+  \item As the architecture is different than your host architecture
+    \begin{itemize}
+    \item Some options will be different from the native configuration
+      (processor and architecture specific options, specific drivers,
+      etc.)
+    \item Many options will be identical (filesystems, network
+      protocol, architecture-independent drivers, etc.)
+    \end{itemize}
+  \item Make sure you have the support for the right CPU, the right
+    board and the right device drivers.
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Building and installing the kernel}
+  \begin{itemize}
+  \item Run \code{make}
+  \item Copy the final kernel image to the target storage
+    \begin{itemize}
+    \item can be \code{uImage}, \code{zImage}, \code{vmlinux},
+      \code{bzImage} in \code{arch/<arch>/boot}
+    \end{itemize}
+  \item make install is rarely used in embedded development, as the
+    kernel image is a single file, easy to handle
+    \begin{itemize}
+    \item It is however possible to customize the make install
+      behaviour in \code{arch/<arch>/boot/install.sh}
+    \end{itemize}
+  \item \code{make modules_install} is used even in embedded
+    development, as it installs many modules and description files
+    \begin{itemize}
+    \item \code{make INSTALL_MOD_PATH=<dir>/ modules_install}
+    \item The \code{INSTALL_MOD_PATH} variable is needed to install
+      the modules in the target root filesystem instead of your host
+      root filesystem.
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Kernel command line}
+  \begin{itemize}
+  \item In addition to the compile time configuration, the kernel
+    behaviour can be adjusted with no recompilation using the {\bf
+      kernel command line}
+  \item The kernel command line is a string that defines various
+    arguments to the kernel
+    \begin{itemize}
+    \item It is very important for system configuration
+    \item \code{root=} for the root filesystem (covered later)
+    \item \code{console=} for the destination of kernel messages
+    \item and many more, documented in
+      \code{Documentation/kernel-parameters.txt} in the kernel sources
+    \end{itemize}
+  \item This kernel command line is either
+    \begin{itemize}
+    \item Passed by the bootloader. In U-Boot, the contents of the
+      \code{bootargs} environment variable is automatically passed to the
+      kernel
+    \item Built into the kernel, using the \code{CONFIG_CMDLINE} option.
+    \end{itemize}
+  \end{itemize}
+\end{frame}
diff --git a/slides/sysdev-linux-kernel-intro/linux-kernel-in-system.dia b/slides/sysdev-linux-intro-features/linux-kernel-in-system.dia
similarity index 100%
rename from slides/sysdev-linux-kernel-intro/linux-kernel-in-system.dia
rename to slides/sysdev-linux-intro-features/linux-kernel-in-system.dia
diff --git a/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex b/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex
new file mode 100644
index 0000000..e289ed2
--- /dev/null
+++ b/slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex
@@ -0,0 +1,122 @@
+\subsection{Linux features}
+
+\begin{frame}
+  \frametitle{Linux kernel in the system}
+  \begin{center}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-features/linux-kernel-in-system.pdf}
+  \end{center}
+\end{frame}
+
+\begin{frame}
+  \frametitle{History}
+  \begin{itemize}
+  \item The Linux kernel is one component of a system, which also
+    requires libraries and applications to provide features to end
+    users.
+  \item The Linux kernel was created as a hobby in 1991 by a Finnish
+    student, Linus Torvalds.
+    \begin{itemize}
+    \item Linux quickly started to be used as the kernel for free
+      software operating systems
+    \end{itemize}
+  \item Linus Torvalds has been able to create a large and dynamic
+    developer and user community around Linux.
+  \item Nowadays, hundreds of people contribute to each kernel
+    release, individuals or companies big and small.
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Linux license}
+  \begin{itemize}
+  \item The whole Linux sources are Free Software released under the
+    GNU General Public License version 2 (GPL v2).
+  \item For the Linux kernel, this basically implies that:
+    \begin{itemize}
+    \item When you receive or buy a device with Linux on it, you
+      should receive the Linux sources, with the right to study,
+      modify and redistribute them.
+    \item When you produce Linux based devices, you must release the
+      sources to the recipient, with the same rights, with no
+      restriction..
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Linux kernel key features}
+  \begin{columns}
+    \column{0.5\textwidth}
+    \begin{itemize}
+    \item Portability and hardware support. Runs on most
+      architectures.
+    \item Scalability. Can run on super computers as well as on tiny
+      devices (4 MB of RAM is enough).
+    \item Compliance to standards and interoperability.
+    \item Exhaustive networking support.
+    \end{itemize}
+    \column{0.5\textwidth}
+    \begin{itemize}
+    \item Security. It can't hide its flaws. Its code is reviewed by
+      many experts.
+    \item Stability and reliability.
+    \item Modularity. Can include only what a system needs even at run
+      time.
+    \item Easy to program. You can learn from existing code. Many
+      useful resources on the net.
+    \end{itemize}
+  \end{columns}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Supported hardware architectures}
+  3.0 status
+  \begin{itemize}
+  \item See the \code{arch/} directory in the kernel sources
+  \item Minimum: 32 bit processors, with or without MMU, and
+    \code{gcc} support
+  \item 32 bit architectures (\code{arch/} subdirectories)\\
+    \code{arm, avr32, blackfin, cris, frv, h8300, m32r, m68k, microblaze, mips, mn10300, parisc, s390, score, sparc, um, unicore32, xtensa}
+  \item 64 bit architectures:\\
+    \code{alpha, ia64, sparc64, tile}
+  \item 32/64 bit architectures\\
+    \code{powerpc, x86, sh}
+  \item Find details in kernel sources: \code{arch/<arch>/Kconfig},
+    \code{arch/<arch>/README}, or \code{Documentation/<arch>/}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{System calls}
+  \begin{itemize}
+  \item The main interface between the kernel and userspace is the set
+    of system calls
+  \item About ~300 system calls that provide the main kernel services
+    \begin{itemize}
+    \item File and device operations, networking operations,
+      inter-process communication, process management, memory mapping,
+      timers, threads, synchronization primitives, etc.
+    \end{itemize}
+  \item This interface is stable over time: only new system calls can
+    be added by the kernel developers
+  \item This system call interface is wrapped by the C library, and
+    userspace applications usually never make a system call directly
+    but rather use the corresponding C library function
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Virtual filesystems}
+  \begin{itemize}
+  \item Linux makes system and kernel information available in
+    user-space through virtual filesystems.
+  \item Virtual filesystems allow applications to see directories and
+    files that do not exist on any real storage: they are created on the
+    fly by the kernel
+  \item The two most important virtual filesystems are
+    \begin{itemize}
+    \item \code{proc}, for process-related information
+    \item \code{sysfs}, for device-related information
+    \end{itemize}
+  \end{itemize}
+\end{frame}
diff --git a/slides/sysdev-linux-intro-lab-cross-compilation/sysdev-linux-intro-lab-cross-compilation.tex b/slides/sysdev-linux-intro-lab-cross-compilation/sysdev-linux-intro-lab-cross-compilation.tex
new file mode 100644
index 0000000..aff7817
--- /dev/null
+++ b/slides/sysdev-linux-intro-lab-cross-compilation/sysdev-linux-intro-lab-cross-compilation.tex
@@ -0,0 +1,11 @@
+\setuplabframe
+{Kernel cross-compiling}
+{
+  \begin{itemize}
+  \item Set up the cross-compiling environment
+  \item Configure the kernel \code{Makefile} accordingly
+  \item Cross-compile the kernel for an \code{arm} platform
+  \item On this platform, interact with the bootloader and boot your
+    kernel
+  \end{itemize}
+}
diff --git a/slides/sysdev-linux-intro-lab-sources/sysdev-linux-intro-lab-sources.tex b/slides/sysdev-linux-intro-lab-sources/sysdev-linux-intro-lab-sources.tex
new file mode 100644
index 0000000..dffd1c7
--- /dev/null
+++ b/slides/sysdev-linux-intro-lab-sources/sysdev-linux-intro-lab-sources.tex
@@ -0,0 +1,9 @@
+\setuplabframe
+{Kernel sources}
+{
+  Time to start the practical lab !
+  \begin{itemize}
+  \item Get the Linux kernel sources
+  \item Apply patches
+  \end{itemize}
+}
diff --git a/slides/sysdev-using-kernel-modules/linux-kernel-in-a-nutshell.jpg b/slides/sysdev-linux-intro-modules/linux-kernel-in-a-nutshell.jpg
similarity index 100%
rename from slides/sysdev-using-kernel-modules/linux-kernel-in-a-nutshell.jpg
rename to slides/sysdev-linux-intro-modules/linux-kernel-in-a-nutshell.jpg
diff --git a/slides/sysdev-using-kernel-modules/sysdev-using-kernel-modules.tex b/slides/sysdev-linux-intro-modules/sysdev-linux-intro-modules.tex
similarity index 98%
rename from slides/sysdev-using-kernel-modules/sysdev-using-kernel-modules.tex
rename to slides/sysdev-linux-intro-modules/sysdev-linux-intro-modules.tex
index 7fe1aa0..ac3d6d3 100644
--- a/slides/sysdev-using-kernel-modules/sysdev-using-kernel-modules.tex
+++ b/slides/sysdev-linux-intro-modules/sysdev-linux-intro-modules.tex
@@ -143,7 +143,7 @@ $ dmesg
     \item Our rating: 2 stars
     \end{itemize}
     \column{0.3\textwidth}
-    \includegraphics[width=\textwidth]{slides/sysdev-using-kernel-modules/linux-kernel-in-a-nutshell.jpg}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-modules/linux-kernel-in-a-nutshell.jpg}
   \end{columns}
 \end{frame}
 
diff --git a/slides/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex b/slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex
similarity index 97%
rename from slides/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
rename to slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex
index a2609ff..5d6cff1 100644
--- a/slides/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
+++ b/slides/sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex
@@ -224,13 +224,3 @@ cd ..; mv linux-3.0 linux-3.1.3
 \end{verbatim}
   \end{itemize}
 \end{frame}
-
-\setuplabframe
-{Kernel sources}
-{
-  Time to start the practical lab !
-  \begin{itemize}
-  \item Get the Linux kernel sources
-  \item Apply patches
-  \end{itemize}
-}
diff --git a/slides/sysdev-linux-intro-title/sysdev-linux-intro-title.tex b/slides/sysdev-linux-intro-title/sysdev-linux-intro-title.tex
new file mode 100644
index 0000000..e4f7e65
--- /dev/null
+++ b/slides/sysdev-linux-intro-title/sysdev-linux-intro-title.tex
@@ -0,0 +1 @@
+\section{Linux kernel introduction}
diff --git a/slides/sysdev-linux-kernel-intro/new-development-process.dia b/slides/sysdev-linux-intro-versioning/new-development-process.dia
similarity index 100%
rename from slides/sysdev-linux-kernel-intro/new-development-process.dia
rename to slides/sysdev-linux-intro-versioning/new-development-process.dia
diff --git a/slides/sysdev-linux-kernel-intro/old-development-process.dia b/slides/sysdev-linux-intro-versioning/old-development-process.dia
similarity index 100%
rename from slides/sysdev-linux-kernel-intro/old-development-process.dia
rename to slides/sysdev-linux-intro-versioning/old-development-process.dia
diff --git a/slides/sysdev-linux-kernel-intro/stable-kernels.png b/slides/sysdev-linux-intro-versioning/stable-kernels.png
similarity index 100%
rename from slides/sysdev-linux-kernel-intro/stable-kernels.png
rename to slides/sysdev-linux-intro-versioning/stable-kernels.png
diff --git a/slides/sysdev-linux-kernel-intro/sysdev-linux-kernel-intro.tex b/slides/sysdev-linux-intro-versioning/sysdev-linux-intro-versioning.tex
similarity index 52%
rename from slides/sysdev-linux-kernel-intro/sysdev-linux-kernel-intro.tex
rename to slides/sysdev-linux-intro-versioning/sysdev-linux-intro-versioning.tex
index bf67fe7..c3b5d4f 100644
--- a/slides/sysdev-linux-kernel-intro/sysdev-linux-kernel-intro.tex
+++ b/slides/sysdev-linux-intro-versioning/sysdev-linux-intro-versioning.tex
@@ -1,128 +1,3 @@
-\section{Linux kernel introduction}
-
-\subsection{Linux features}
-
-\begin{frame}
-  \frametitle{Linux kernel in the system}
-  \begin{center}
-    \includegraphics[width=\textwidth]{slides/sysdev-linux-kernel-intro/linux-kernel-in-system.pdf}
-  \end{center}
-\end{frame}
-
-\begin{frame}
-  \frametitle{History}
-  \begin{itemize}
-  \item The Linux kernel is one component of a system, which also
-    requires libraries and applications to provide features to end
-    users.
-  \item The Linux kernel was created as a hobby in 1991 by a Finnish
-    student, Linus Torvalds.
-    \begin{itemize}
-    \item Linux quickly started to be used as the kernel for free
-      software operating systems
-    \end{itemize}
-  \item Linus Torvalds has been able to create a large and dynamic
-    developer and user community around Linux.
-  \item Nowadays, hundreds of people contribute to each kernel
-    release, individuals or companies big and small.
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Linux license}
-  \begin{itemize}
-  \item The whole Linux sources are Free Software released under the
-    GNU General Public License version 2 (GPL v2).
-  \item For the Linux kernel, this basically implies that:
-    \begin{itemize}
-    \item When you receive or buy a device with Linux on it, you
-      should receive the Linux sources, with the right to study,
-      modify and redistribute them.
-    \item When you produce Linux based devices, you must release the
-      sources to the recipient, with the same rights, with no
-      restriction..
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Linux kernel key features}
-  \begin{columns}
-    \column{0.5\textwidth}
-    \begin{itemize}
-    \item Portability and hardware support. Runs on most
-      architectures.
-    \item Scalability. Can run on super computers as well as on tiny
-      devices (4 MB of RAM is enough).
-    \item Compliance to standards and interoperability.
-    \item Exhaustive networking support.
-    \end{itemize}
-    \column{0.5\textwidth}
-    \begin{itemize}
-    \item Security. It can't hide its flaws. Its code is reviewed by
-      many experts.
-    \item Stability and reliability.
-    \item Modularity. Can include only what a system needs even at run
-      time.
-    \item Easy to program. You can learn from existing code. Many
-      useful resources on the net.
-    \end{itemize}
-  \end{columns}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Supported hardware architectures}
-  3.0 status
-  \begin{itemize}
-  \item See the \code{arch/} directory in the kernel sources
-  \item Minimum: 32 bit processors, with or without MMU, and
-    \code{gcc} support
-  \item 32 bit architectures (\code{arch/} subdirectories)\\
-    \code{arm, avr32, blackfin, cris, frv, h8300, m32r, m68k, microblaze, mips, mn10300, parisc, s390, score, sparc, um, unicore32, xtensa}
-  \item 64 bit architectures:\\
-    \code{alpha, ia64, sparc64, tile}
-  \item 32/64 bit architectures\\
-    \code{powerpc, x86, sh}
-  \item Find details in kernel sources: \code{arch/<arch>/Kconfig},
-    \code{arch/<arch>/README}, or \code{Documentation/<arch>/}
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{System calls}
-  \begin{itemize}
-  \item The main interface between the kernel and userspace is the set
-    of system calls
-  \item About ~300 system calls that provide the main kernel services
-    \begin{itemize}
-    \item File and device operations, networking operations,
-      inter-process communication, process management, memory mapping,
-      timers, threads, synchronization primitives, etc.
-    \end{itemize}
-  \item This interface is stable over time: only new system calls can
-    be added by the kernel developers
-  \item This system call interface is wrapped by the C library, and
-    userspace applications usually never make a system call directly
-    but rather use the corresponding C library function
-  \end{itemize}
-\end{frame}
-
-\begin{frame}
-  \frametitle{Virtual filesystems}
-  \begin{itemize}
-  \item Linux makes system and kernel information available in
-    user-space through virtual filesystems.
-  \item Virtual filesystems allow applications to see directories and
-    files that do not exist on any real storage: they are created on the
-    fly by the kernel
-  \item The two most important virtual filesystems are
-    \begin{itemize}
-    \item \code{proc}, for process-related information
-    \item \code{sysfs}, for device-related information
-    \end{itemize}
-  \end{itemize}
-\end{frame}
-
 \subsection{Linux versioning scheme and development process}
 
 \begin{frame}
@@ -148,7 +23,7 @@
 \begin{frame}
   \frametitle{Until 2.6 (2)}
   \begin{center}
-    \includegraphics[width=\textwidth]{slides/sysdev-linux-kernel-intro/old-development-process.pdf}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-versioning/old-development-process.pdf}
   \end{center}
 \end{frame}
 
@@ -186,7 +61,7 @@
 \begin{frame}
   \frametitle{Merge and bug fixing windows}
   \begin{center}
-    \includegraphics[width=\textwidth]{slides/sysdev-linux-kernel-intro/new-development-process.pdf}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-versioning/new-development-process.pdf}
   \end{center}
 \end{frame}
 
@@ -208,7 +83,7 @@
       longer (2 or 3 years), unlike other versions.
     \end{itemize}
     \column{0.3\textwidth}
-    \includegraphics[width=\textwidth]{slides/sysdev-linux-kernel-intro/stable-kernels.png}
+    \includegraphics[width=\textwidth]{slides/sysdev-linux-intro-versioning/stable-kernels.png}
   \end{columns}
 \end{frame}
 
@@ -273,4 +148,3 @@ Date:   Wed Jul 13 11:29:17 2011 +0200
     \end{itemize}
   \end{itemize}
 \end{frame}
-

-----------------------------------------------------------------------

Summary of changes:
 Makefile                                           |   14 +-
 .../kernel-mrproper.png                            |  Bin 53880 -> 53880 bytes
 .../sysdev-linux-intro-compilation.tex             |   96 +++++++
 .../gconfig-screenshot.png                         |  Bin 18926 -> 18926 bytes
 .../iso-example.png                                |  Bin 5199 -> 5199 bytes
 .../menuconfig-screenshot.png                      |  Bin 100313 -> 100313 bytes
 .../nconfig-screenshot.png                         |  Bin 32834 -> 32834 bytes
 .../sysdev-linux-intro-configuration.tex}          |  273 +-------------------
 .../xconfig-iso-example.dia                        |    0
 .../xconfig-screenshot.png                         |  Bin 101265 -> 101265 bytes
 .../xconfig-search.png                             |  Bin 61607 -> 61607 bytes
 .../sysdev-linux-intro-cross-compilation.tex       |  151 +++++++++++
 .../linux-kernel-in-system.dia                     |    0
 .../sysdev-linux-intro-features.tex                |  122 +++++++++
 .../sysdev-linux-intro-lab-cross-compilation.tex   |   11 +
 .../sysdev-linux-intro-lab-sources.tex             |    9 +
 .../linux-kernel-in-a-nutshell.jpg                 |  Bin 15145 -> 15145 bytes
 .../sysdev-linux-intro-modules.tex}                |    2 +-
 .../sysdev-linux-intro-sources.tex}                |   10 -
 .../sysdev-linux-intro-title.tex                   |    1 +
 .../new-development-process.dia                    |    0
 .../old-development-process.dia                    |    0
 .../stable-kernels.png                             |  Bin 16850 -> 16850 bytes
 .../sysdev-linux-intro-versioning.tex}             |  132 +---------
 24 files changed, 410 insertions(+), 411 deletions(-)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-compilation}/kernel-mrproper.png (100%)
 create mode 100644 slides/sysdev-linux-intro-compilation/sysdev-linux-intro-compilation.tex
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/gconfig-screenshot.png (100%)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/iso-example.png (100%)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/menuconfig-screenshot.png (100%)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/nconfig-screenshot.png (100%)
 rename slides/{sysdev-kernel-configuration-and-compiling/sysdev-kernel-configuration-and-compiling.tex => sysdev-linux-intro-configuration/sysdev-linux-intro-configuration.tex} (63%)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/xconfig-iso-example.dia (100%)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/xconfig-screenshot.png (100%)
 rename slides/{sysdev-kernel-configuration-and-compiling => sysdev-linux-intro-configuration}/xconfig-search.png (100%)
 create mode 100644 slides/sysdev-linux-intro-cross-compilation/sysdev-linux-intro-cross-compilation.tex
 rename slides/{sysdev-linux-kernel-intro => sysdev-linux-intro-features}/linux-kernel-in-system.dia (100%)
 create mode 100644 slides/sysdev-linux-intro-features/sysdev-linux-intro-features.tex
 create mode 100644 slides/sysdev-linux-intro-lab-cross-compilation/sysdev-linux-intro-lab-cross-compilation.tex
 create mode 100644 slides/sysdev-linux-intro-lab-sources/sysdev-linux-intro-lab-sources.tex
 rename slides/{sysdev-using-kernel-modules => sysdev-linux-intro-modules}/linux-kernel-in-a-nutshell.jpg (100%)
 rename slides/{sysdev-using-kernel-modules/sysdev-using-kernel-modules.tex => sysdev-linux-intro-modules/sysdev-linux-intro-modules.tex} (98%)
 rename slides/{sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex => sysdev-linux-intro-sources/sysdev-linux-intro-sources.tex} (97%)
 create mode 100644 slides/sysdev-linux-intro-title/sysdev-linux-intro-title.tex
 rename slides/{sysdev-linux-kernel-intro => sysdev-linux-intro-versioning}/new-development-process.dia (100%)
 rename slides/{sysdev-linux-kernel-intro => sysdev-linux-intro-versioning}/old-development-process.dia (100%)
 rename slides/{sysdev-linux-kernel-intro => sysdev-linux-intro-versioning}/stable-kernels.png (100%)
 rename slides/{sysdev-linux-kernel-intro/sysdev-linux-kernel-intro.tex => sysdev-linux-intro-versioning/sysdev-linux-intro-versioning.tex} (52%)


More information about the training-materials-updates mailing list