\documentclass[aspectratio=169,obeyspaces,spaces,hyphens,dvipsnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{minted}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage[normalem]{ulem}

\mode<presentation>
\usetheme{Bootlin}

\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
  \hbox{}\nobreak\hfil(#1)%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
  {\savebox\mybox{#1}\begin{quotation}}
  {\signed{\usebox\mybox}\end{quotation}}

\title{Buildroot: what's new?}
\conference{Embedded Linux Conference 2018}
\authors{Thomas Petazzoni}
\email{thomas.petazzoni@bootlin.com}
\institute{Bootlin}
\slidesurl{https://bootlin.com/pub/conferences/2018/elc/petazzoni-buildroot-whats-new}

\begin{document}

\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
\section{Buildroot: what's new?}
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}

\begin{frame}{Thomas Petazzoni}
  \begin{columns}
    \column{0.6\textwidth}
  \begin{itemize}
  \item CTO and Embedded Linux engineer at Bootlin
    \begin{itemize}
    \item Embedded Linux specialists.
    \item Development, consulting and training.
    \item \url{https://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 {\bf Toulouse}, south west of France
  \item Windsurfing, snowboarding
  \end{itemize}
  \column{0.4\textwidth}
  \begin{center}
    \includegraphics[width=0.8\textwidth]{windsurf.jpg}\\
    \includegraphics[width=0.8\textwidth]{snowboard.jpg}\\
  \end{center}
\end{columns}
\end{frame}

\begin{frame}{Poll time}
  \begin{itemize}
  \item Who already knows about Buildroot ?
    \pause
  \item Who is already using Buildroot ?
    \pause
  \item Who is using OpenEmbedded / Yocto Project ?
    \pause
  \item Who is using OpenWRT / LEDE ?
    \pause
  \item Who is using another build system ?
  \end{itemize}
\end{frame}

\begin{frame}{Buildroot at a glance}
  \begin{columns}
    \column{0.8\textwidth}
  \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 2300 packages} available
  \item Generates filesystem images, not a distribution
  \item Vendor neutral
  \item Active community, stable releases every 3 months
  \item Started in 2001, oldest still maintained build system
  \item \url{http://buildroot.org}
  \end{itemize}
  \column{0.2\textwidth}
  \includegraphics[width=\textwidth]{logo.png}
\end{columns}
\end{frame}

\begin{frame}{What's new?}
  \begin{itemize}
  \item Last {\em What's new} talk at the {\em Embedded Linux
      Conference 2014}, i.e 4 years ago
  \item Lots of things have changed and improved in Buildroot since
    then, time for a new {\em What's new} talk!
  \item Main topics discussed
    \begin{itemize}
    \item Project activity
    \item Release schedule and LTS
    \item Architecture support
    \item Toolchain support
    \item Infrastructure improvements
    \item Testing improvements
    \item Misc
    \end{itemize}
  \end{itemize}
\end{frame}

\definecolor{bblue}{HTML}{4F81BD}
\definecolor{rred}{HTML}{C0504D}
\definecolor{ggreen}{HTML}{9BBB59}
\definecolor{ppurple}{HTML}{9F4C7C}

\begin{frame}{Project activity: per commits}
  \begin{tikzpicture}
    \begin{axis}[
      width  = 0.85*\textwidth,
      height = 6cm,
      major x tick style = transparent,
      ybar,
      bar width=5pt,
      ymajorgrids = true,
      ylabel = {Number of commits per release},
      ylabel style={yshift=0.8cm},
      symbolic x coords={2012.05,2012.08,2012.11,2013.02,2013.05,2013.08,2013.11,2014.02,2014.05,2014.08,2014.11,2015.02,2015.05,2015.08,2015.11,2016.02,2016.05,2016.08,2016.11,2017.02,2017.05,2017.08,2017.11,2018.02},
      xtick = data,
      scaled y ticks = false,
      ymin = 0, ymax = 2000,
      legend cell align=left,
      x tick label style={rotate=45,anchor=east,style={font=\tiny}},
      legend style = {
        at={(1,1.05)},
        anchor=south east,
        column sep=1ex
      }
    ]
      \addplot[style={bblue,fill=bblue,mark=none}]
        coordinates {(2012.05, 543) (2012.08, 557) (2012.11, 856) (2013.02, 849) (2013.05, 903) (2013.08, 744) (2013.11, 909) (2014.02, 1117) (2014.05, 1293) (2014.08, 1353) (2014.11, 1355) (2015.02, 1250) (2015.05, 1800) (2015.08, 1477) (2015.11, 1133) (2016.02, 1474) (2016.05, 1400) (2016.08, 1826) (2016.11, 1423) (2017.02, 1369) (2017.05, 1432) (2017.08, 1587) (2017.11, 1150) (2018.02, 1139)};
    \end{axis}
  \end{tikzpicture}
\end{frame}

\begin{frame}{Project activity: contributors}
  \begin{tikzpicture}
    \begin{axis}[
      width  = 0.85*\textwidth,
      height = 6cm,
      major x tick style = transparent,
      ybar,
      bar width=5pt,
      ymajorgrids = true,
      ylabel = {Number of contributors per release},
      ylabel style={yshift=0.8cm},
      symbolic x coords={2012.05,2012.08,2012.11,2013.02,2013.05,2013.08,2013.11,2014.02,2014.05,2014.08,2014.11,2015.02,2015.05,2015.08,2015.11,2016.02,2016.05,2016.08,2016.11,2017.02,2017.05,2017.08,2017.11,2018.02},
      xtick = data,
      scaled y ticks = false,
      enlargelimits = 0.05,
      ymin = 0, ymax = 140,
      legend cell align=left,
      x tick label style={rotate=45,anchor=east,style={font=\tiny}},
      legend style = {
        at={(1,1.05)},
        anchor=south east,
        column sep=1ex
      }
    ]
      \addplot[style={rred,fill=rred,mark=none}]
        coordinates {(2012.05, 43) (2012.08, 44) (2012.11, 57) (2013.02, 52) (2013.05, 70) (2013.08, 74) (2013.11, 77) (2014.02, 83) (2014.05, 95) (2014.08, 86) (2014.11, 78) (2015.02, 89) (2015.05, 111) (2015.08, 108) (2015.11, 108) (2016.02, 104) (2016.05, 116) (2016.08, 124) (2016.11, 101) (2017.02, 110) (2017.05, 109) (2017.08, 108) (2017.11, 109) (2018.02, 106)};
    \end{axis}
  \end{tikzpicture}
\end{frame}

\begin{frame}{Project activity: mailing list activity}
  \begin{tikzpicture}
    \begin{axis}[
      width  = 0.95*\textwidth,
      height = 6cm,
      major x tick style = transparent,
      ybar,
      bar width=2pt,
      ymajorgrids = true,
      ylabel = {E-mails per month},
      ylabel style={yshift=0.8cm},
      symbolic x coords={2012.January,2012.February,2012.March,2012.April,2012.May,2012.June,2012.July,2012.August,2012.September,2012.October,2012.November,2012.December,2013.January,2013.February,2013.March,2013.April,2013.May,2013.June,2013.July,2013.August,2013.September,2013.October,2013.November,2013.December,2014.January,2014.February,2014.March,2014.April,2014.May,2014.June,2014.July,2014.August,2014.September,2014.October,2014.November,2014.December,2015.January,2015.February,2015.March,2015.April,2015.May,2015.June,2015.July,2015.August,2015.September,2015.October,2015.November,2015.December,2016.January,2016.February,2016.March,2016.April,2016.May,2016.June,2016.July,2016.August,2016.September,2016.October,2016.November,2016.December,2017.January,2017.February,2017.March,2017.April,2017.May,2017.June,2017.July,2017.August,2017.September,2017.October,2017.November,2017.December,2018.January,2018.February},
      xtick = {2012.January,2013.January,2014.January,2015.January,2016.January,2017.January,2018.January},
      scaled y ticks = false,
      ymin = 0, ymax = 4000,
      legend cell align=left,
      x tick label style={rotate=45,anchor=east,style={font=\tiny}},
      legend style = {
        at={(1,1.05)},
        anchor=south east,
        column sep=1ex
      }
    ]
      \addplot[style={ppurple,fill=ppurple,mark=none}]
        coordinates {(2012.January, 1050) (2012.February, 1034) (2012.March, 1582) (2012.April, 887) (2012.May, 1170) (2012.June, 848) (2012.July, 1287) (2012.August, 1497) (2012.September, 1288) (2012.October, 1333) (2012.November, 1938) (2012.December, 1820) (2013.January, 2027) (2013.February, 1547) (2013.March, 2011) (2013.April, 1209) (2013.May, 1908) (2013.June, 1389) (2013.July, 1538) (2013.August, 1171) (2013.September, 1911) (2013.October, 2359) (2013.November, 2085) (2013.December, 2113) (2014.January, 2246) (2014.February, 2883) (2014.March, 2377) (2014.April, 2203) (2014.May, 2478) (2014.June, 2771) (2014.July, 2634) (2014.August, 1878) (2014.September, 2117) (2014.October, 3573) (2014.November, 2823) (2014.December, 2381) (2015.January, 2151) (2015.February, 2143) (2015.March, 3367) (2015.April, 3514) (2015.May, 1880) (2015.June, 2066) (2015.July, 4176) (2015.August, 2931) (2015.September, 2127) (2015.October, 2982) (2015.November, 2303) (2015.December, 2996) (2016.January, 2432) (2016.February, 3390) (2016.March, 3120) (2016.April, 2414) (2016.May, 2339) (2016.June, 3042) (2016.July, 3326) (2016.August, 2363) (2016.September, 1983) (2016.October, 2885) (2016.November, 2518) (2016.December, 2155) (2017.January, 1877) (2017.February, 2638) (2017.March, 2998) (2017.April, 2623) (2017.May, 2386) (2017.June, 2419) (2017.July, 3850) (2017.August, 1618) (2017.September, 2358) (2017.October, 2288) (2017.November, 2592) (2017.December, 2087) (2018.January, 2300) (2018.February, 1819)};
    \end{axis}
  \end{tikzpicture}
\end{frame}

\begin{frame}{Project activity: packages}
  \begin{tikzpicture}
    \begin{axis}[
      width  = 0.85*\textwidth,
      height = 6cm,
      major x tick style = transparent,
      ybar,
      bar width=5pt,
      ymajorgrids = true,
      ylabel = {Number of packages},
      ylabel style={yshift=0.8cm},
      symbolic x coords={2012.05,2012.08,2012.11,2013.02,2013.05,2013.08,2013.11,2014.02,2014.05,2014.08,2014.11,2015.02,2015.05,2015.08,2015.11,2016.02,2016.05,2016.08,2016.11,2017.02,2017.05,2017.08,2017.11,2018.02},
      xtick = data,
      scaled y ticks = false,
      ymin = 0, ymax = 2500,
      legend cell align=left,
      x tick label style={rotate=45,anchor=east,style={font=\tiny}},
      legend style = {
        at={(1,1.05)},
        anchor=south east,
        column sep=1ex
      }
    ]
      \addplot[style={ggreen,fill=ggreen,mark=none}]
        coordinates {(2012.05, 797) (2012.08, 840) (2012.11, 894) (2013.02, 946) (2013.05, 1026) (2013.08, 1097) (2013.11, 1143) (2014.02, 1204) (2014.05, 1279) (2014.08, 1355) (2014.11, 1400) (2015.02, 1503) (2015.05, 1599) (2015.08, 1686) (2015.11, 1735) (2016.02, 1800) (2016.05, 1888) (2016.08, 1994) (2016.11, 2023) (2017.02, 2093) (2017.05, 2138) (2017.08, 2196) (2017.11, 2239) (2018.02, 2300)};
    \end{axis}
  \end{tikzpicture}
\end{frame}

\begin{frame}{Release schedule and LTS}
  \begin{itemize}
  \item Since 2009, releases every {\bf three months}: YYYY.02, YYYY.05,
    YYYY.08, YYYY.11
    \begin{itemize}
    \item Never skipped a release or missed a release date!
    \end{itemize}
    \pause
  \item Until 2017.02
    \begin{itemize}
    \item Point releases for the latest stable, but only until the
      next stable release
    \item Only option to get updates is to migrate to the next release
    \end{itemize}
    \pause
  \item Since 2017.02, one {\bf LTS release} per year
    \begin{itemize}
    \item Every YYYY.02 release will be {\bf maintained for one year},
      with security, build and bug fixes
    \item 2017.02 had {\bf 10 point releases}, from 2017.02.1 to
      2017.02.10, 778 commits
    \item 2018.02 published on March 4th 2018, new LTS release
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Maintenance and physical meetings}
  \begin{columns}
    \column{0.5\textwidth}
    \begin{itemize}
    \item Used to have a single committer/project maintainer: Peter
      Korsgaard
    \item {\bf Two additional committers} have been appointed in recent years:
      \begin{itemize}
      \item Thomas Petazzoni (i.e, me)
      \item Arnout Vandecappelle
      \end{itemize}
    \item {\bf Physical meetings}
      \begin{itemize}
      \item One meeting before ELCE,
      \item One meeting after FOSDEM, Brussels
      \item One more private hackaton for the core team in the summer
      \end{itemize}
    \end{itemize}
    \column{0.5\textwidth}
    \includegraphics[width=\textwidth]{meeting.jpg}
  \end{columns}
\end{frame}

\begin{frame}{Architectures}
  \begin{itemize}
  \item Probably the build system with the largest number of
    architectures supported
    \pause
    \begin{itemize}
    \item ARC, ARM(eb,nommu), ARM64(eb), Blackfin, C-Sky, m68k,
      Microblaze(el), mips(64)(el), nios2, OpenRISC, PowerPC(64)(le),
      SuperH, Sparc(64), x86(\_64), Xtensa
    \end{itemize}
    \pause
  \item {\bf ARM Cortex M3/M4 noMMU} support
  \item Merge of {\bf ARM/ARM64} options, to select ARM64 cores
  \item {\bf PowerPC64 little endian and big endian} support,
    contributions from IBM
  \item {\bf MIPS improvements}: MIPS32r6 and MIPS64r6 support, MIPS
    core selection, NaN/FP32 selection, contributions from Imagination
    Technologies
  \item {\bf OpenRISC}, {\bf C-Sky}, {\bf Sparc64} support
  \item Re-enabling of {\bf m68k} both Coldfire (noMMU) and 68k (MMU)
  \item {\bf Blackfin} and {\bf Microblaze} improved with uClibc-ng
    support
  \item SH64 and AVR32 support removed
  \end{itemize}
\end{frame}

\begin{frame}{Toolchains}
  \begin{itemize}
  \item Buildroot supports:
    \begin{itemize}
    \item Building its own toolchain: so-called {\bf internal toolchain} back-end
    \item Using an existing pre-built toolchain: {\bf external toolchain} back-end
    \end{itemize}
    \pause
  \item Internal toolchain improvements
    \begin{itemize}
    \item Support for {\bf musl} C library added
    \item Moved from uClibc to {\bf uClibc-ng}
    \item {\bf Regular updates}: gcc up to 7.x (default is 6.x),
      binutils 2.29 (default 2.28), gdb 8.0 (default 7.12), glibc
      2.27, uClibc-ng 1.0.28, musl 1.1.19.
    \item {\bf LTO} and {\bf Fortran} support
    \item Toolchain {\bf wrapper} also used for the internal back-end:
      allows sanity checks
    \item eglibc removed
    \end{itemize}
    \pause
  \item External toolchain improvements
    \begin{itemize}
    \item Logic split in {\bf multiple packages}, one per external toolchain
      family
    \item Include/library paths {\bf sanity checking} in the wrapper
    \item Numerous {\bf updates}: Linaro/Sourcery toolchains, new
      Imagination Technologies toolchains, removed old toolchains
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{{\tt toolchains.bootlin.com}}
  \begin{columns}
    \column{0.6\textwidth}
    \begin{itemize}
    \item Side project, but Buildroot related
    \item Freely available {\bf pre-built toolchains} for a wide range of
      architectures and configurations
    \item {\bf 34 different architecture}/variants
    \item glibc/uClibc-ng/musl, as available
    \item Two versions: stable and bleeding-edge
    \item Built by Buildroot, on Gitlab CI
    \item {\bf Tested} by building a Linux kernel and minimal userspace, and
      if supported, booting under QEMU
    \item \url{https://toolchains.bootlin.com}
    \end{itemize}
    \column{0.4\textwidth}
    \includegraphics[width=\textwidth]{toolchains-fe.png}
  \end{columns}
\end{frame}

\begin{frame}{Infrastructure: relocatable SDK}
  \begin{itemize}
  \item \code{output/host} contains
    \begin{itemize}
    \item The native tools, including the cross-compiler
    \item The toolchain {\em sysroot}, with all libraries and headers
    \end{itemize}
  \item Can be used as an SDK
    \begin{itemize}
    \item Allows application developers to build applications
      targeting the root filesystem without having to use Buildroot
    \end{itemize}
  \item \code{output/host} is now {\bf relocatable}, which makes it
    easier to use as an SDK
  \item \code{make sdk} prepares the SDK
    \begin{itemize}
    \item Replaces absolute {\em RPATH} in native binaries by relative
      ones
    \item Installs a \code{relocate-sdk.sh} script that users of the
      SDK must run to fix up the remaining absolute paths
    \end{itemize}
  \item Related work:
    \begin{itemize}
    \item \code{output/host/usr/*} moved to \code{output/host/}
    \item {\em RPATH} in target binaries are now cleaned up
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}[fragile]{Infrastructure: hashes}
  \begin{itemize}
  \item Each package now has a \code{<pkg>.hash} file that contains
    hashes
    \begin{itemize}
    \item For the tarball being downloaded
    \item For the patches being downloaded, if any
    \item For the license files included in the upstream source code
    \end{itemize}
  \item Tarball/patch hashes are checked when the package is
    extracted, i.e at every build
  \item License files hashes are checked when generating the licensing
    report (\code{make legal-info})
  \item Allows to:
    \begin{itemize}
    \item check the integrity of what is downloaded,
    \item ensure that tarballs stored locally have not been modified
    \item detect if license terms have changed upstream
    \item detect if upstream messes up and re-uploads a new (but
      different) tarball
    \end{itemize}
  \item Almost all packages have a hash file now: 2247 packages out of
    2315 packages
  \end{itemize}

  \begin{block}{}
{\tiny
\begin{verbatim}
# Verified from http://ftp.isc.org/isc/bind9/9.11.1-P3/bind-9.11.1-P3.tar.gz.sha256.asc
sha256 52426e75432e46996dc90f24fca027805a341c38fbbb022b60dc9acd2677ccf4 bind-9.11.1-P3.tar.gz
sha256 d3906dfe153e2c48440d3ca1d5319f5e89b4b820cdfc5d0779c23d7ac2b175e9 COPYRIGHT
\end{verbatim}
}
  \end{block}

\end{frame}

\begin{frame}[fragile]{Infrastructure: licensing report}
  \begin{itemize}
  \item Packages include a description of the license and paths to
    license files
    \begin{block}{}
{\small
\begin{verbatim}
DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
DBUS_LICENSE_FILES = COPYING
\end{verbatim}
}
    \end{block}
  \item Collected by \code{make legal-info}: source tarballs, patches,
    license files, manifests
  \item Improvements
    \begin{itemize}
    \item {\bf SPDX license codes} used to describe the licensing of
      all packages
    \item {\bf Hashes} added for license files, in order to detect changes
    \item Storage of source code for binary artifacts such as
      pre-built toolchains, using \code{<pkg>_ACTUAL_SOURCE}
    \item Many {\bf more packages have license details}: 2223 out of
      2315 packages
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Infrastructure: {\tt BR2\_EXTERNAL}}
  \begin{itemize}
  \item \code{BR2_EXTERNAL} allows to implement packages, store {\em
      defconfigs} and other build-related files outside of the
    Buildroot tree
  \item Allows separating the upstream Buildroot from
    project/company-specific packages and data
  \item Simplified form of {\em layer} concept found in
    Yocto/OE/OpenWRT
  \item Available since 2014.02
  \item Improvements
    \begin{itemize}
    \item Support for multiple \code{BR2_EXTERNAL} directories
    \item Support for implementing bootloader packages and filesystem
      image formats in \code{BR2_EXTERNAL}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Infrastructure: package infrastructures}
  \begin{itemize}
  \item Base infrastructure: \code{generic-package}
  \item Specialized infrastructures for specific build systems:
    \code{autotools-package},
    \code{cmake-package}, \code{python-package}
  \item Improvements
    \begin{itemize}
    \item \code{python-package} extended to support Python 3.x
    \item New \code{perl-package} infrastructure for {\bf Perl}
      packages
    \item New \code{virtual-package} infrastructure for {\bf virtual}
      packages such as OpenGL, jpeg, udev
    \item New \code{waf-package} infrastructure for {\bf Waf} based
      packages
    \item New \code{rebar-package} infrastructure for {\bf Erlang}
      packages
    \item New \code{kconfig-package} infrastructure, used by Linux,
      BusyBox, uClibc-ng, Barebox, U-Boot, etc.
    \item New \code{kernel-module} infrastructure to help building
      kernel modules
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Infrastructure: graphing}
  \begin{columns}
    \column{0.4\textwidth}
    \begin{itemize}
    \item Already existing:
      \begin{itemize}
      \item \code{make graph-depends}, \code{make <pkg>-graph-depends},
        to generate dependency graphs
      \item \code{make graph-build}, graph of the build time per package
      \end{itemize}
    \item Improvements
      \begin{itemize}
      \item \code{make graph-size}, size of the filesystem, split by package
      \item \code{make <pkg>-graph-rdepends}, graph of the reverse
        dependencies
      \end{itemize}
    \end{itemize}
    \column{0.6\textwidth}
    \only<1>{\includegraphics[width=\textwidth]{graph-size.pdf}}
    \only<2>{\includegraphics[width=\textwidth]{libglib2-graph-rdepends.pdf}}
    \end{columns}
\end{frame}

\begin{frame}{Infrastructure: {\em skeleton} restructuring}
  \begin{itemize}
  \item {\bf Skeleton}: base of the root filesystem, main directory
    hierarchy and basic config files
  \item Initially a single set of files copied to \code{TARGET_DIR} at
    the beginning of the build
  \item Now:
    \begin{itemize}
    \item \code{skeleton} is a virtual package, that depends on
      \code{skeleton-init-sysv}, \code{skeleton-init-systemd},
      \code{skeleton-init-none} or \code{skeleton-custom}
    \item Common base: \code{skeleton-init-common}
    \item Core init scripts moved in \code{initscripts}
    \item Allows to avoid SysV cruft in systemd systems and vice-versa
    \item Allowed to implement read-only rootfs support with {\em
        systemd}
    \item Support for merged \code{/usr}, used by {\em systemd}
      support
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Filesystem support}
  \begin{itemize}
  \item Support for generating filesystem images in a large number of
    formats
  \item Improvements
    \begin{itemize}
    \item \code{ext2}, \code{ext3} and \code{ext4} images now
      generated by \code{mkfs.ext<X>} instead of \code{genext2fs},
      to better support ext3/ext4
    \item Support for AXFS added
    \item ISO9660 support re-written, to support Grub2 and Isolinux as
      bootloaders, initramfs and pure ISO9660 scenarios
    \item Usage of {\em genimage} to generate complete SD card/MMC
      images in many {\em defconfigs}
    \item Ability to specify a custom script to run within the {\em
        fakeroot} environment when creating filesystem images
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}{Reproducible builds}
  \begin{itemize}
  \item Idea: get binary identical results for repeated builds of a
    given configuration
  \item Option \code{BR2_REPRODUCIBLE} added
  \item Various things already fixed:
    \begin{itemize}
    \item Sets \code{SOURCE_DATE_EPOCH}, used by gcc and various
      packages
    \item Date/time of files in the filesystem
    \item Build date, user, host name in the Linux kernel build and
      BusyBox
    \item Remove timestamps in Python \code{.pyc} files
    \item ...
    \end{itemize}
  \item A lot more remains to be done. Unfortunately, the developers
    who started this work are no longer active.
  \end{itemize}
\end{frame}

\begin{frame}{Packages}
  \begin{itemize}
  \item By far where most of the contributions go: updating existing
    packages and adding new packages
  \item More than {\bf 1000 packages} added between 2014.05 and 2018.02
  \item Significant updates/additions
    \begin{itemize}
    \item SELinux support
    \item Qt 5.9 (including Qt WebEngine), Gtk 3.x, EFL updates
    \item OpenCV 3.0
    \item Kodi
    \item Go, Mono, Rust
    \item Python modules (many!), Perl modules, Erlang modules
    \item Docker, aufs
    \item System upgrade: SWupdate, RAUC
    \item HW support: AMD Catalyst, Freescale i.MX, NVidia, TI
    \item Apache, ClamAV, Dovecot, MariaDB, Nginx, Asterisk
    \item Glib C++ stack: glibmm, atkmm, cairomm, gtkmm, etc.
    \item ... and SuperTuxKart!
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}[fragile]{Testing: runtime testing infrastructure}
  \begin{columns}
    \column{0.4\textwidth}
  \begin{itemize}
  \item Run-time test infrastructure added in \code{support/testing/}
  \item Test cases written in Python
  \item Build a given Buildroot configuration, boot under QEMU, run
    commands and check results
  \item Tests for filesystem images, packages, core functionality,
    init systems
  \end{itemize}
  \column{0.6\textwidth}
  \begin{block}{}
    \fontsize{7}{7}\selectfont
    \begin{minted}{python}
class TestDropbear(infra.basetest.BRTest):
    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
        """
        BR2_SYSTEM_DHCP="eth0"
        BR2_PACKAGE_DROPBEAR=y
        BR2_TARGET_ROOTFS_CPIO=y
        # BR2_TARGET_ROOTFS_TAR is not set
        """

    def test_run(self):
        img = os.path.join(self.builddir,"images","rootfs.cpio")
        self.emulator.boot(arch="armv5",
                           kernel="builtin",
                           options=["-initrd", img,
                                    "-net", "nic"])
        self.emulator.login("testpwd")
        cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22"
        _, exit_code = self.emulator.run(cmd)
        self.assertEqual(exit_code, 0)
\end{minted}
\end{block}
\end{columns}
\end{frame}

\begin{frame}{Testing: CI}
  \begin{columns}
    \column{0.6\textwidth}
    \begin{itemize}
    \item Already existing: \code{http://autobuild.buildroot.org}
      \begin{itemize}
      \item Set of ~50 architecture/toolchain configurations
      \item Choose a random architecture/toolchain configuration, a
        random selection of packages, and build
      \item Results reported on a Web page, e-mailed to the mailing list
      \end{itemize}
    \item Improvements
      \begin{itemize}
      \item All {\bf defconfigs} are built on {\em Gitlab CI}
      \item {\bf Run-time tests} are executed on {\em Gitlab CI}
      \item \code{autobuild.b.o} supports {\bf testing
          multiples branches} (master, next, LTS)
      \item Notifications from \code{autobuild.b.o} sent to relevant
        developers
      \end{itemize}
    \end{itemize}
    \column{0.4\textwidth}
    \includegraphics[width=\textwidth]{gitlab-ci.png}
  \end{columns}
\end{frame}

\begin{frame}[fragile]{Tooling}
  \begin{columns}
    \column{0.6\textwidth}
    \begin{itemize}
    \item \code{DEVELOPERS} file and associated
      \code{get-developers} tool
      \begin{itemize}
      \item Much like \code{MAINTAINERS} in the Linux kernel
      \item Used when sending patches
      \item Used to report build failures per package or
        per-architecture to the relevant developers
      \end{itemize}
    \item \code{check-package} script to detect obvious
      mistakes in packages
    \item \code{test-pkg} to build test a package with a large number of
      architecture/toolchain configurations
    \item \code{scanpypi} script to generate Python packages
      \begin{itemize}
      \item Connects to {\em Pypi}, analyzes the metadata, and produces
        a Buildroot {\em package}
      \end{itemize}
    \end{itemize}
    \column{0.4\textwidth}
    \begin{block}{DEVELOPERS}
      {\tiny
\begin{verbatim}
N:      Waldemar Brodkorb <wbx@openadk.org>
F:      arch/Config.in.bfin
F:      arch/Config.in.m68k
F:      arch/Config.in.or1k
F:      arch/Config.in.sparc
F:      package/glibc/
F:      package/mksh/
F:      package/uclibc/
F:      package/uclibc-ng-test/
\end{verbatim}
      }
    \end{block}

    \begin{block}{test-pkg}
{\tiny
\begin{verbatim}
  armv5-ctng-linux-gnueabi [ 1/49]: OK
armv7-ctng-linux-gnueabihf [ 2/49]: OK
          br-aarch64-glibc [ 3/49]: OK
             br-arcle-hs38 [ 4/49]: SKIPPED
              br-arm-basic [ 5/49]: OK
    br-arm-cortex-a9-glibc [ 6/49]: OK
              ...........

       49 builds, 27 skipped,
       0 build failed, 0 legal-info failed
\end{verbatim}
}
\end{block}
  \end{columns}
\end{frame}

\begin{frame}{Misc improvements}
  \begin{itemize}
  \item {\bf Linux extensions} infrastructure, to support building
    packages that need kernel patching: Xenomai, RTAI, specific
    drivers
  \item {\bf Linux tools} infrastructure, to build user-space tools
    part of the kernel tree: {\em perf}, {\em gpio}, {\em iio}, {\em
      cpupower}, {\em tmon}, {\em self-tests}
  \item Complete revamp of the {\em gettext} handling, option
    \code{BR2_SYSTEM_ENABLE_NLS} to control native language support
  \item Checks on the architecture of cross-compiled binaries, to
    detect packages that do not cross-compile to the correct
    architecture
  \item Support for hardening features: {\em relro} and {\em fortify
      source}, still experimental.
  \end{itemize}
\end{frame}

\begin{frame}{Features on the radar}
  \begin{itemize}
  \item Git download cache
    \begin{itemize}
    \item Avoid re-cloning an entire Git repository every time the
      version/tag of a Git-fetched package is changed
    \end{itemize}
  \item Per-package out of tree build
    \begin{itemize}
    \item Avoids {\em rsync} when using {\em local} packages or
      \code{<pkg>_OVERRIDE_SRCDIR} and improves debugging experience
    \item Avoids extracting the source code twice when building host and
      target variants
    \end{itemize}
  \item Top-level parallel build
    \begin{itemize}
    \item Building different packages in parallel
    \item Requires per-package staging and host directories
    \end{itemize}
  \item Improve package tooling
    \begin{itemize}
    \item Track upstream package releases using
      \url{http://www.release-monitoring.org}
    \item Track CVEs using the NIST database
    \end{itemize}
  \item {\em Go} and {\em Meson} package infrastructures
  \end{itemize}
\end{frame}

\begin{frame}{Conclusion}

  \begin{itemize}
  \item Active project
  \item LTS releases with security updates
  \item Relocatable SDK
  \item Rich and up-to-date package set
  \item Good and increasing testing effort
  \item Interesting new features on the roadmap
  \end{itemize}

  \begin{center}
    {\bf Getting started with Buildroot} tutorial at this ELC as part of
    the E-ALE track, on Wednesday at 2:30 PM.
  \end{center}

\end{frame}

\begin{frame}
  \centering
  \Huge
  Questions? Suggestions? Comments?\\
  \vspace{0.5cm}
  \huge
  Thomas Petazzoni\\
  \large
  {\em \insertemail}\\
  \vspace{0.5cm}
  Slides under CC-BY-SA 3.0\\
  \scriptsize
  \url{\insertslidesurl}
  \vspace{0.5cm}
  \begin{columns}
  \column{0.9\textwidth}
  \footnotesize
  \centering
  Support our crowdfunding campaign to develop\\
  an upstream Linux kernel driver for Allwinner VPU\\
  \url{https://bootlin.com/blog/allwinner-vpu-crowdfunding/}
  \column{0.1\textwidth}
  \includegraphics[height=2cm]{common/allwinnervpu.jpg}
  \end{columns}
\end{frame}


\end{document}
