\documentclass[obeyspaces,spaces,hyphens]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{minted}

\mode<presentation>
\usetheme{Bootlin}

\newcommand{\codehack}[1]{{\usebeamercolor[fg]{code} {\tt #1}}}

\title{Buildroot: what's new?}
\authors{Thomas Petazzoni}
\institute{Bootlin}

\usepackage{hyperref}

\begin{document}

\begin{frame}{Embedded Linux Conference 2014}
  \begin{columns}[c]
   \column{0.6\textwidth}
     \huge
     Buildroot: what's new?\\
     \vspace{2cm}
     \normalsize
     Thomas Petazzoni\\
     {\bf Bootlin}\\
     {\em thomas.petazzoni@bootlin.com}
     \column{0.4\textwidth}
     \includegraphics[width=\textwidth]{logo.png}
   \end{columns}
\end{frame}

\begin{frame}{Thomas Petazzoni}
  \begin{itemize}
  \item CTO and Embedded Linux engineer at Bootlin
    \begin{itemize}
    \item Embedded Linux {\bf development}: kernel and driver
      development, system integration, boot time and power
      consumption optimization, consulting, etc.
    \item Embedded Linux {\bf training}, Linux driver development training
      and Android system development training, with materials freely
      available under a Creative Commons license.
    \item \url{http://bootlin.com}
    \end{itemize}
  \item Contributions
    \begin{itemize}
    \item {\bf Kernel support for the Marvell Armada} ARM SoCs from
      Marvell
    \item Major contributor to {\bf Buildroot}, an open-source, simple and
      fast embedded Linux build system
    \end{itemize}
  \item Living in {\bf Toulouse}, south west of France
  \end{itemize}
\end{frame}

\begin{frame}
  \begin{center}
    \Huge{Introduction to Buildroot}
  \end{center}
\end{frame}

\begin{frame}{Buildroot at a glance}
  \begin{itemize}
  \item Is an {\bf embedded Linux build system}, builds from source:
    \begin{itemize}
    \item cross-compilation toolchain
    \item root filesystem with many libraries/applications, cross-built
    \item kernel and bootloader images
    \end{itemize}
  \item {\bf Fast}, simple root filesystem in minutes
  \item {\bf Easy} to use and understand: kconfig and make
  \item {\bf Small} root filesystem, default 2 MB
  \item More than {\bf 1000 packages} available
  \item Generates filesystem images, not a distribution
  \item Vendor neutral
  \item Active community, regular releases
  \item Started in 2001, oldest still maintained build system
  \end{itemize}
\end{frame}

\begin{frame}{Who's using Buildroot: a few examples}
  \begin{columns}
    \column{0.6\textwidth}
    \begin{itemize}
    \item<1-> {\bf System makers}
      \begin{itemize}
      \item Google
      \item Barco
      \item Rockwell Collins
      \end{itemize}
    \item<2-> {\bf Processor vendors}
      \begin{itemize}
      \item Analog Devices
      \item Imagination Technologies
      \item Marvell
      \item Atmel
      \end{itemize}
    \item<3-> Many, many {\bf hobbyists} on development boards:
      Raspberry Pi, BeagleBone Black, etc.
  \end{itemize}
  \column{0.4\textwidth}
  \only<1>{\includegraphics[width=\textwidth]{google-fiber-box.jpg}}
  \only<2>{\includegraphics[width=\textwidth]{armada.jpg}}
  \only<3>{\includegraphics[width=\textwidth]{rasberrypi.jpg}}
  \end{columns}
\end{frame}

\begin{frame}{Demonstration}
  \begin{center}
    \huge{A demonstration is worth many slides!}
  \end{center}
\end{frame}

\begin{frame}
  \begin{center}
    \Huge{What's new?}
  \end{center}
\end{frame}

\begin{frame}{Increased activity}
  \begin{center}
    \includegraphics[width=0.5\textwidth]{commit-activity.png}
    \includegraphics[width=0.5\textwidth]{contributors.png}\\
    \includegraphics[width=0.5\textwidth]{mails.png}
    \includegraphics[width=0.5\textwidth]{packages.png}
  \end{center}
\end{frame}

\begin{frame}{Architecture support}
  \begin{itemize}
  \item Several {\bf new architectures} added
    \begin{itemize}
    \item AArch64
    \item ARC, contributed by Synopsys
    \item Blackfin, contributed by Analog Devices
    \item Microblaze
    \item NIOS II
    \item Xtensa, maintained by Tkos
    \end{itemize}
  \item {\bf Improved ARM} support: soft-float, softfp, hardfp, NEON,
    VFP variants
  \item {\bf Improved MIPS} support, contributed by Imagination
    Technologies
  \item {\bf Improved noMMU} support
  \end{itemize}
\end{frame}

\begin{frame}{Toolchain support}
  \begin{itemize}
  \item In the {\bf internal toolchain backend}
    \begin{itemize}
    \item Support added for {\em eglibc} and {\em glibc}
    \item Upcoming support for {\em musl}
    \item Significant cleanup of the backend
    \end{itemize}
  \item In the {\bf external toolchain backend}
    \begin{itemize}
    \item Support for many additional external toolchains: Linaro,
      Sourcery, Analog Devices, etc.
    \end{itemize}
  \item Dropped support for the {\em Crosstool-NG backend}
    \begin{itemize}
    \item But toolchains generated by {\em Crosstool-NG} can still be
      used as {\em external toolchains}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{New packages}
  \begin{itemize}
  \item Multimedia
    \begin{itemize}
    \item GStreamer 1.2, XBMC, Wayland, EFL, Qt5, Pulseaudio, Opus, Linphone, tvheadend, etc.
    \item Lots of OpenGL improvements
    \end{itemize}
  \item Scripting
    \begin{itemize}
    \item Python 3, nodejs, Lua, Python and PHP modules
    \end{itemize}
  \item System
    \begin{itemize}
    \item Systemd/udev, eudev
    \end{itemize}
  \item Databases
    \begin{itemize}
    \item MySQL server, PostgreSQL
    \end{itemize}
  \item Development
    \begin{itemize}
    \item perf, lttng, trace-cmd, wireshark, etc.
    \end{itemize}
  \item 342 packages added since January, 1st 2013.
  \end{itemize}
\end{frame}

\begin{frame}{GSoC and multimedia}
  \begin{itemize}
  \item In 2013, participated to the {\bf GSoC program}. One student,
    Spenser Gilliland, working on {\bf ARM multimedia support}
  \item {\bf GPU drivers}: PowerVR for TI, Mali for Allwinner, Vivante
    on i.MX, RaspberryPi
  \item {\bf Video acceleration}: CedarX on Allwinner, VPU on i.MX,
    Gst-omx on RaspberryPi
  \item Enabling of OpenGL ES and EGL in several packages: Qt5, Cairo,
    etc.
  \item Ongoing effort with a new GSoC 2014 project {\bf improvement
      of multimedia support}, with Hadrien Boutteville
  \end{itemize}
\end{frame}

\begin{frame}{Quality assurance: autobuilders (1)}
  \begin{center}
    \includegraphics[width=\textwidth]{autobuild.png}
  \end{center}
\end{frame}

\begin{frame}{Quality assurance: autobuilders (2)}
  \begin{center}
    \includegraphics[width=\textwidth]{autobuild-graph.png}
  \end{center}
\end{frame}

\begin{frame}[fragile]{License compliance support (1)}
  \begin{itemize}
  \item Embedded Linux systems integrate dozens of components, each
    distributed under a given license.
  \item Keeping track of the list of all components and their license
    can be a cumbersome task.
  \item Buildroot now has licensing information attached to each
    package
    \begin{block}{}
\begin{verbatim}
BUSYBOX_LICENSE = GPLv2
BUSYBOX_LICENSE_FILES = LICENSE
\end{verbatim}
    \end{block}
  \item Given a configuration, such information can be extracted for
    all the packages used in the generated system.
  \end{itemize}
\end{frame}

\begin{frame}[fragile]{License compliance support (2)}
  \begin{block}{}
\begin{verbatim}
$ make legal-info
\end{verbatim}
  \end{block}

  In \code{output/legal-info/}, generates:
  \begin{itemize}
  \item \code{buildroot.config}, copy of Buildroot configuration
  \item \code{licenses/}, directory with the licenses of each target package
  \item \code{licenses.txt}, file with the licenses of all target packages
  \item \code{manifest.csv}, CSV file with the description of all target packages
  \item \code{sources/}, directory with the tarballs
  \item Same thing for {\em host packages}: \code{host-licenses/},
    \code{host-licenses.txt}, \code{host-manifest.csv}.
  \end{itemize}
\end{frame}

\begin{frame}[fragile]{License compliance support (3)}
  \begin{block}{}
\footnotesize
\begin{verbatim}
$ cat output/legal-info/manifest.csv
"PACKAGE","VERSION","LICENSE","LICENSE FILES","SOURCE ARCHIVE"
"toolchain-external","undefined","unknown","not saved","ia32-..."
"busybox","1.22.1","GPLv2","LICENSE","busybox-1.22.1.tar.bz2"
"i2c-tools","3.1.0","GPLv2+, GPLv2 (py-smbus)","COPYING","i2c-..."
"kmod","17","LGPLv2.1+","libkmod/COPYING","kmod-17.tar.xz"
"lua","5.1.5","MIT","COPYRIGHT","lua-5.1.5.tar.gz"
\end{verbatim}
  \end{block}
\end{frame}


\begin{frame}{Eclipse plugin}
  \begin{itemize}
  \item An Eclipse plugin facilitates the usage of Buildroot
    toolchains for library and application development.
  \item {\small \url{https://github.com/mbats/eclipse-buildroot-bundle/wiki}}
  \end{itemize}
  \begin{center}
    \includegraphics[width=0.7\textwidth]{eclipse.png}
  \end{center}
\end{frame}

\begin{frame}{Configurations for boards}
  \begin{itemize}
  \item Predefined configurations for many popular boards have been
    added.
    \begin{itemize}
    \item RaspberryPi
    \item BeagleBoneBlack
    \item CubieBoard
    \item Altera SOCKit
    \item Wandboard
    \item Zedboard
    \item ...
    \end{itemize}
  \item Also lots of pre-defined configurations for QEMU emulated
    platforms.
  \item In total, 63 pre-defined board configurations
  \item \code{make <name>_defconfig && make}
  \end{itemize}
\end{frame}

\begin{frame}{Package infrastructures}
  \begin{itemize}
  \item Buildroot has {\bf package infrastructures} to factorize
    common logic between package recipes, and simplify the creation of
    new packages.
  \item Buildroot already had: \code{autotools-package},
    \code{cmake-package} and \code{generic-package}
  \item Over the last year, {\bf several package infrastructures} were
    added:
    \begin{itemize}
    \item \code{python-package}, with major improvements to the Python
      support
    \item \code{perl-package}
    \item \code{lua-package}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Dependency graphing}
  \begin{itemize}
  \item Addition of a tool to visualize the dependencies between
    packages
  \item Tied to a given configuration
  \item Allows to more easily understand why a given package is
    brought into the build.
  \item Usage:
    \begin{itemize}
    \item \code{make graph-depends} for a full dependency graph
    \item \code{make <pkg>-graph-depends} for the dependencies of one
      package
    \item \code{ls output/graphs}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Dependency graphing: example 1}
  \begin{center}
    \includegraphics[height=0.8\textheight]{graph-depends1.pdf}
  \end{center}
\end{frame}

\begin{frame}{Dependency graphing: example 2}
  \begin{center}
    \includegraphics[width=\textwidth]{graph-depends2.pdf}
  \end{center}
\end{frame}

\begin{frame}{Dependency graphing: example 3}
  \begin{center}
    \includegraphics[width=\textwidth]{graph-depends3.pdf}
  \end{center}
\end{frame}

\begin{frame}{Build time graphing}
  \begin{itemize}
  \item Buildroot records the duration of each step for each package:
    extract, patch, configure, build, install, etc.
  \item Using this information, it can produce graphs to help analyze
    the build duration.
  \item Useful to understand what is taking the longest to build, and
    where build time optimizations should be made.
  \item After a build, generate a graph with:
    \begin{itemize}
    \item \code{make graph-build}
    \item \code{ls output/graphs}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Build time graphing: example 1}
  \begin{center}
    \includegraphics[width=\textwidth]{build-hist-build.pdf}
  \end{center}
\end{frame}

\begin{frame}{Build time graphing: example 2}
  \begin{center}
    \includegraphics[width=\textwidth]{build-pie-packages.pdf}
  \end{center}
\end{frame}

\begin{frame}{Support for customization}
  Lots of improvements to help customizing the Buildroot build
  \begin{itemize}
  \item {\bf \code{BR2_EXTERNAL}}: can point to a directory that
    contains additional package recipes and {\em defconfigs}
    \begin{itemize}
    \item Useful to separate the open-source components (in the core
      Buildroot) from proprietary/company-specific packages
    \item \code{make BR2_EXTERNAL=../foobar}
    \item \code{foobar/package}, \code{foobar/board},
      \code{foobar/configs}
    \end{itemize}
  \item {\bf Rootfs overlay}: a directory copied over the root
    filesystem after all packages are built, but before the root
    filesystem image is created.
  \item {\bf Hook scripts}: {\bf post-build} and {\bf post-image}
    scripts can be called to tweak the root filesystem and/or the
    images.
  \end{itemize}
\end{frame}

\begin{frame}{Entering the 21st century}
  Finally, a new web site, and a Google+ page
  \begin{center}
    \includegraphics[width=0.5\textwidth]{buildroot-site.png}
    \includegraphics[width=0.5\textwidth]{google-plus.png}
  \end{center}
\end{frame}

\begin{frame}
  \begin{center}
  \Huge
  Questions?\\
  \vspace{1.5cm}
  \huge
  Thomas Petazzoni\\
  \large
  \vspace{0.5cm}
  \code{thomas.petazzoni@bootlin.com}
  \vspace{0.5cm}
  \newline Slides under CC-BY-SA 3.0\\
  \scriptsize
  \url{http://bootlin.com/pub/conferences/2014/elc/petazzoni-buildroot-whats-new/}
  \end{center}
\end{frame}

\end{document}
