[FE training-materials-updates] kernel: add a different chapter for kernel sources

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Aug 28 12:11:31 CEST 2013


Repository : git://git.free-electrons.com/training-materials.git

On branch  : kernel-ng
Link       : http://git.free-electrons.com/training-materials/commit/?id=bcae3a3314426a703a6ec5d1a50e6ae31ac1c089

>---------------------------------------------------------------

commit bcae3a3314426a703a6ec5d1a50e6ae31ac1c089
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Wed Aug 28 12:09:13 2013 +0200

    kernel: add a different chapter for kernel sources
    
    Instead of using the same contents as the sysdev course, we use our
    own content for the kernel source. It removes all the discussion on
    how to use the tarballs and the patches, and explains how to get the
    kernel sources with Git and create a branch from a given stable
    release.
    
    As we discussed in the past, generating and manipulating kernel
    patches with just patch and diff is no longer done by anybody, and
    it's not the point of a kernel development course to teach about patch
    and diff.
    
    For now, it is kept for the sysdev course, we can discuss what to do
    about this later on.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


>---------------------------------------------------------------

bcae3a3314426a703a6ec5d1a50e6ae31ac1c089
 Makefile                                           |    2 +-
 .../kernel-linux-intro-sources.tex                 |   95 ++++++++++++++++++++
 2 files changed, 96 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c88b64e..f90f98a 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ KERNEL_SLIDES = \
 		sysdev-linux-intro-versioning \
 		kernel-introduction-lab \
 		kernel-embedded-linux-usage-title \
-		sysdev-linux-intro-sources \
+		kernel-linux-intro-sources \
 		kernel-source-code-title \
 		kernel-source-code-drivers \
 		kernel-source-code-layout \
diff --git a/slides/kernel-linux-intro-sources/kernel-linux-intro-sources.tex b/slides/kernel-linux-intro-sources/kernel-linux-intro-sources.tex
new file mode 100644
index 0000000..e74d42a
--- /dev/null
+++ b/slides/kernel-linux-intro-sources/kernel-linux-intro-sources.tex
@@ -0,0 +1,95 @@
+\subsection{Linux kernel sources}
+
+\begin{frame}
+  \frametitle{Location of kernel sources}
+  \begin{itemize}
+  \item The official version of the Linux kernel, as released by Linus
+    Torvalds is available at \url{http://www.kernel.org}
+    \begin{itemize}
+    \item This version follows the well-defined development model of
+      the kernel
+    \item However, it may not contain the latest development from a
+      specific area, due to the organization of the development model
+      and because features in development might not be ready for
+      mainline inclusion
+    \end{itemize}
+  \item Many kernel sub-communities maintain their own kernel, with
+    usually newer but less stable features
+    \begin{itemize}
+    \item Architecture communities (ARM, MIPS, PowerPC, etc.), device
+      drivers communities (I2C, SPI, USB, PCI, network, etc.), other
+      communities (real-time, etc.)
+    \item They generally don't release official versions, only
+      development trees are available
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Getting Linux sources}
+  \begin{itemize}
+
+  \item The kernel sources are available from
+    \url{http://kernel.org/pub/linux/kernel} as {\bf full tarballs}
+    (complete kernel sources) and {\bf patches} (differences between
+    two kernel versions).
+  \item But for kernel development, one generaly uses the Git version
+    control system:
+    \begin{itemize}
+    \item Fetch the entire kernel sources and history\\
+      \code{git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git}
+    \item Create a branch that starts at a specific stable version\\
+      \code{git checkout -b <name-of-branch> v3.11}
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Linux kernel size (1)}
+  \begin{itemize}
+  \item Linux 3.10 sources:\\
+    Raw size: 573 MB (43,000 files, approx 15,800,000 lines)\\
+    \code{gzip} compressed tar archive: 105 MB\\
+    \code{bzip2} compressed tar archive: 83 MB (better)\\
+    \code{xz} compressed tar archive: 69 MB (best)
+  \item Minimum Linux 2.6.29 compiled kernel size with
+    \code{CONFIG_EMBEDDED}, for a kernel that boots a QEMU PC (IDE
+    hard drive, ext2 filesystem, ELF executable support):\\
+    532 KB (compressed), 1325 KB (raw)
+  \item Why are these sources so big?\\
+    Because they include thousands of device drivers, many network
+    protocols, support many architectures and filesystems...
+  \item The Linux core (scheduler, memory management...) is pretty
+    small!
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Linux kernel size (2)}
+  As of kernel version 3.10.
+  \begin{columns}
+    \column{0.5\textwidth}
+    \begin{itemize}
+    \item \code{drivers/}: 49.4\%
+    \item \code{arch/}: 21.9\%
+    \item \code{fs/}: 6.0\%
+    \item \code{include/}: 4.7\%
+    \item \code{sound/}: 4.4\%
+    \item \code{Documentation/}: 4.0\%
+    \item \code{net/}: 3.9\%
+    \item \code{firmware/}: 1.0\%
+    \item \code{kernel/}: 1.0\%
+    \end{itemize}
+    \column{0.5\textwidth}
+    \begin{itemize}
+    \item \code{tools/}: 0.9\%
+    \item \code{scripts/}: 0.5\%
+    \item \code{mm/}: 0.5\%
+    \item \code{crypto/}: 0.4\%
+    \item \code{security/}: 0.4\%
+    \item \code{lib/}: 0.4\%
+    \item \code{block/}: 0.2\%
+    \item ...
+    \end{itemize}
+  \end{columns}
+\end{frame}



More information about the training-materials-updates mailing list