\subsection{Linux sources}

\begin{frame}
  \frametitle{Linux sources structure 1/4}
  \begin{itemize}
  \item \code{arch/<architecture>}
    \begin{itemize}
    \item Architecture specific code
    \end{itemize}
  \item \code{arch/<architecture>/mach-<machine>}
    \begin{itemize}
    \item Machine/board specific code
    \end{itemize}
  \item \code{block}
    \begin{itemize}
    \item Block layer core
    \end{itemize}
  \item \code{COPYING}
    \begin{itemize}
    \item Linux copying conditions (GNU GPL)
    \end{itemize}
  \item \code{CREDITS}
    \begin{itemize}
    \item Linux main contributors
    \end{itemize}
  \item \code{crypto/}
    \begin{itemize}
    \item Cryptographic libraries
    \end{itemize}
  \item \code{Documentation/}
    \begin{itemize}
    \item Kernel documentation. Don't miss it!
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Linux sources structure 2/4}
  \begin{itemize}  
  \item \code{drivers/}
    \begin{itemize}
    \item All device drivers except sound ones (usb, pci...)
    \end{itemize}
  \item \code{fs/}
    \begin{itemize}
    \item Filesystems (\code{fs/ext3/}, etc.)
    \end{itemize}
  \item \code{include/}
    \begin{itemize}
    \item Kernel headers
    \end{itemize}
  \item \code{include/asm-<architecture>}
    \begin{itemize}
    \item Architecture and machine dependent headers
    \end{itemize}
  \item \code{include/linux}
    \begin{itemize}
    \item Linux kernel core headers
    \end{itemize}
  \item \code{init/}
    \begin{itemize}
    \item Linux initialization (including \code{main.c})
    \end{itemize}
  \item \code{ipc/}
    \begin{itemize}
    \item Code used for process communication
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Linux sources structure 3/4}
  \begin{itemize}  
  \item \code{Kbuild}
    \begin{itemize}
    \item Part of the kernel build system
    \end{itemize}
  \item \code{kernel/}
    \begin{itemize}
    \item Linux kernel core (very small!)
    \end{itemize}
  \item \code{lib/}
    \begin{itemize}
    \item Misc library routines (zlib, crc32...)
    \end{itemize}
  \item \code{MAINTAINERS}
    \begin{itemize}
    \item Maintainers of each kernel part. Very useful!
    \end{itemize}
  \item \code{Makefile}
    \begin{itemize}
    \item Top Linux Makefile (sets arch and version)
    \end{itemize}
  \item \code{mm/}
    \begin{itemize}
    \item Memory management code (small too!)
    \end{itemize}
  \item \code{net/}
    \begin{itemize}
    \item Network support code (not drivers)
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Linux sources structure 4/4}
  \begin{itemize}
  \item \code{README}
    \begin{itemize}
    \item Overview and building instructions
    \end{itemize}
  \item \code{REPORTING-BUGS}
    \begin{itemize}
    \item Bug report instructions
    \end{itemize}
  \item \code{samples/}
    \begin{itemize}
    \item Sample code (markers, kprobes, kobjects...)
    \end{itemize}
  \item \code{scripts/}
    \begin{itemize}
    \item Scripts for internal or external use
    \end{itemize}
  \item \code{security/}
    \begin{itemize}
    \item Security model implementations (SELinux...)
    \end{itemize}
  \item \code{sound/}
    \begin{itemize}
    \item Sound support code and drivers
    \end{itemize}
  \item \code{usr/}
    \begin{itemize}
    \item Code to generate an initramfs cpio archive.
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Accessing development sources 1/2}
  \begin{itemize}
  \item Useful if you are involved in kernel development or if you
    found a bug in the source code.
  \item Kernel development sources are now managed with Git:
    \url{http://git-scm.com/}
  \item You can browse Linus' Git tree (if you just need to check a
    few files):
    \url{http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux.git;a=tree}
  \item You can also directly use Git on your workstation
    \begin{itemize}
    \item Debian / Ubuntu: install the git-core package
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Accessing development sources 2/2}
  \begin{itemize}
  \item Choose a Git development tree on \url{http://git.kernel.org/}
  \item Get a local copy (“clone”) of this tree.
    \begin{itemize}
    \item \code{git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git}
    \end{itemize}
  \item Update your copy whenever needed: \code{git pull}
  \item See our training materials on Git: \url{http://free-electrons.com/docs/git/}
  \end{itemize}
\end{frame}
