Skip to content

Commit

Permalink
slides/buildroot: update to Buildroot 2020.02
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  • Loading branch information
tpetazzoni committed Apr 3, 2020
1 parent 8fc4101 commit fdc2bfb
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 206 deletions.
58 changes: 29 additions & 29 deletions slides/buildroot-advanced-packages/buildroot-advanced-packages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -443,19 +443,23 @@ \subsection{Init scripts and systemd unit files}
\begin{itemize}

\item Buildroot supports several main init systems: {\em sysvinit},
{\em Busybox} and {\em systemd}
{\em Busybox}, {\em systemd}, {\em OpenRC}

\item When packages want to install a program to be started at boot
time, they need to install either a startup script ({\em
sysvinit}/{\em Busybox}) or a {\em systemd service} file.
time, they need to install a startup script ({\em
sysvinit}/{\em Busybox}), a {\em systemd service} file, etc.

\item They can do so with the \code{<pkg>_INSTALL_INIT_SYSV} and
\code{<pkg>_INSTALL_INIT_SYSTEMD} variables, which contain a list of
shell commands.
\item They can do so using the following variables, which contain a
list of shell commands.
\begin{itemize}
\item \code{<pkg>_INSTALL_INIT_SYSV}
\item \code{<pkg>_INSTALL_INIT_SYSTEMD}
\item \code{<pkg>_INSTALL_INIT_OPENRC}
\end{itemize}

\item Buildroot will execute either the \code{<pkg>_INSTALL_INIT_SYSV}
or the \code{<pkg>_INSTALL_INIT_SYSTEMD} commands of all enabled
packages depending on the selected init system.
\item Buildroot will execute the appropriate
\code{<pkg>_INSTALL_INIT_xyz} commands of all enabled packages
depending on the selected init system.

\end{itemize}

Expand All @@ -473,11 +477,6 @@ \subsection{Init scripts and systemd unit files}
define BIND_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/bind/named.service \
$(TARGET_DIR)/usr/lib/systemd/system/named.service

mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf /usr/lib/systemd/system/named.service \
$(TARGET_DIR)/etc/systemd/system/[...]/named.service
endef
\end{minted}
\end{block}
Expand Down Expand Up @@ -593,13 +592,13 @@ \subsection{Hooks}
\begin{frame}[fragile]{Hooks: examples}
\begin{block}{libungif.mk: remove unneeded binaries}
\begin{block}{bind.mk: remove unneeded binaries}
\begin{minted}[fontsize=\scriptsize]{make}
define LIBUNGIF_BINS_CLEANUP
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(LIBUNGIF_BINS))
define BIND_TARGET_REMOVE_TOOLS
rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_TOOLS_BIN))
endef

LIBUNGIF_POST_INSTALL_TARGET_HOOKS += LIBUNGIF_BINS_CLEANUP
BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS
\end{minted}
\end{block}

Expand All @@ -611,8 +610,8 @@ \subsection{Hooks}
endef

ifeq ($(BR2_PACKAGE_OPENSSL),y)
VSFTPD_DEPENDENCIES += openssl
VSFTPD_LIBS += -lssl -lcrypto
VSFTPD_DEPENDENCIES += openssl host-pkgconf
VSFTPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`
VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
endif
\end{minted}
Expand Down Expand Up @@ -748,10 +747,11 @@ \subsection{Virtual packages}
solve this situation.
\begin{itemize}
\item \code{libgles} is a virtual package offering the OpenGL ES API
\item Eight packages are {\em providers} of the OpenGL ES API:
\code{gpu-amd-bin-mx51}, \code{gpu-viv-bin-mx6q}, \code{mesa3d},
\item Ten packages are {\em providers} of the OpenGL ES API:
\code{gpu-amd-bin-mx51}, \code{imx-gpu-viv},
\code{gcnano-binaries}, \code{mali-t76x}, \code{mesa3d},
\code{nvidia-driver}, \code{nvidia-tegra23-binaries},
\code{rpi-userland}, \code{sunxi-mali}, \code{ti-gfx}
\code{rpi-userland}, \code{sunxi-mali-mainline}, \code{ti-gfx}
\end{itemize}
\end{itemize}
\end{frame}
Expand Down Expand Up @@ -813,23 +813,23 @@ \subsection{Virtual packages}

\begin{frame}[fragile]{Virtual package provider}

\begin{block}{sunxi-mali/Config.in}
\begin{block}{sunxi-mali-mainline/Config.in}
{\small
\begin{verbatim}
config BR2_PACKAGE_SUNXI_MALI
bool "sunxi-mali"
config BR2_PACKAGE_SUNXI_MALI_MAINLINE
bool "sunxi-mali-mainline"
select BR2_PACKAGE_HAS_LIBEGL
select BR2_PACKAGE_HAS_LIBGLES
config BR2_PACKAGE_PROVIDES_LIBGLES
default "sunxi-mali"
default "sunxi-mali-mainline"
\end{verbatim}}
\end{block}

\begin{block}{sunxi-mali/sunxi-mali.mk}
\begin{block}{sunxi-mali-mainline/sunxi-mali-mainline.mk}
\begin{minted}{make}
[...]
SUNXI_MALI_PROVIDES = libegl libgles
SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles
[...]
\end{minted}
\end{block}
Expand Down
4 changes: 2 additions & 2 deletions slides/buildroot-build/buildroot-build.tex
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ \section{Managing the build and the configuration}
contains the value for all options (except those having unmet
dependencies)
\item The default \code{.config}, without any customization, has
4074 lines (as of Buildroot 2019.02)
4367 lines (as of Buildroot 2020.02)
\begin{itemize}
\item Not very practical for reading and modifying by humans.
\end{itemize}
Expand Down Expand Up @@ -241,7 +241,7 @@ \section{Managing the build and the configuration}
\begin{verbatim}
BR2_arm=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_GCC_VERSION_4_9_X=y
BR2_GCC_VERSION_7_X=y
\end{verbatim}
\end{block}
}
Expand Down
6 changes: 3 additions & 3 deletions slides/buildroot-introduction/buildroot-introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ \section{Introduction to Buildroot}
\item Vendor neutral
\item Active community, regular releases
\begin{itemize}
\item The present slides cover {\em Buildroot 2019.02}. There may
\item The present slides cover {\em Buildroot 2020.02}. There may
be some differences if you use older or newer Buildroot versions.
\end{itemize}
\item \url{https://buildroot.org}
Expand Down Expand Up @@ -91,8 +91,8 @@ \section{Introduction to Buildroot}
\begin{itemize}
\item Maintained during one year
\item Security fixes, bug fixes, build fixes
\item Current LTS is release is \code{2019.02}, next one will be
\code{2020.02}.
\item Current LTS is release is \code{2020.02}, next one will be
\code{2021.02}.
\end{itemize}
\end{itemize}
\end{frame}
Expand Down
51 changes: 25 additions & 26 deletions slides/buildroot-new-packages/buildroot-new-packages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ \subsection{Package infrastructures}
\item Buildroot does not re-invent the build system of each
component, it simply uses it.
\item Numerous build systems available: hand-written Makefiles or
shell scripts, {\em autotools}, {\em CMake} and also some specific
to languages: Python, Perl, Lua, Erlang, etc.
shell scripts, {\em autotools}, {\em Meson}, {\em CMake} and also
some specific to languages: Python, Perl, Lua, Erlang, etc.
\item In order to avoid duplicating code, Buildroot has {\em package
infrastructures} for well-known build systems.
\item And a generic package infrastructure for software components
Expand Down Expand Up @@ -1239,60 +1239,60 @@ \subsection{Target vs. host packages}
\item No \code{Config.in.host}, not visible in \code{menuconfig}.
\end{itemize}
\begin{block}{package/bison/bison.mk}
\begin{minted}[fontsize=\tiny]{make}
BISON_VERSION = 3.0.4
\begin{minted}[fontsize=\tiny]{make}
BISON_VERSION = 3.4.2
BISON_SOURCE = bison-$(BISON_VERSION).tar.xz
BISON_SITE = $(BR2_GNU_MIRROR)/bison
BISON_LICENSE = GPL-3.0+
BISON_LICENSE_FILES = COPYING
# parallel build issue in examples/c/reccalc/
BISON_MAKE = $(MAKE1)
HOST_BISON_DEPENDENCIES = host-m4
$(eval $(host-autotools-package))
\end{minted}
\end{minted}
\end{block}
\end{frame}
\begin{frame}[fragile]{Example 2: a flashing utility}
\begin{frame}[fragile]{Example 2: filesystem manipulation tool}
\begin{itemize}
\item \code{dfu-util}, to reflash devices support the USB DFU
protocol. Typically used on a development PC.
\item \code{fatcat}, is designed to manipulate FAT filesystems, in
order to explore, extract, repair, recover and forensic them.
\item Not used as a build dependency of another package
$\rightarrow$ visible in \code{menuconfig}.
\end{itemize}
\begin{block}{package/dfu-util/Config.in.host}
\begin{block}{package/fatcat/Config.in.host}
\tiny
\begin{verbatim}
config BR2_PACKAGE_HOST_DFU_UTIL
bool "host dfu-util"
config BR2_PACKAGE_HOST_FATCAT
bool "host fatcat"
help
Dfu-util is the host side implementation of the DFU 1.0
specification of the USB forum. DFU is intended to download
and upload firmware to devices connected over USB.
Fatcat is designed to manipulate FAT filesystems, in order
to explore, extract, repair, recover and forensic them. It
currently supports FAT12, FAT16 and FAT32.
http://dfu-util.gnumonks.org/
https://github.com/Gregwar/fatcat
\end{verbatim}
\end{block}
\begin{block}{package/dfu-util/dfu-util.mk}
\begin{block}{package/fatcat/fatcat.mk}
\begin{minted}[fontsize=\tiny]{make}
DFU_UTIL_VERSION = 0.6
DFU_UTIL_SITE = http://dfu-util.gnumonks.org/releases
DFU_UTIL_LICENSE = GPL-2.0+
DFU_UTIL_LICENSE_FILES = COPYING
FATCAT_VERSION = 1.1.0
FATCAT_SITE = $(call github,Gregwar,fatcat,v$(FATCAT_VERSION))
FATCAT_LICENSE = MIT
FATCAT_LICENSE_FILES = LICENSE
HOST_DFU_UTIL_DEPENDENCIES = host-libusb
$(eval $(host-autotools-package))
$(eval $(host-cmake-package))
\end{minted}
\end{block}
\end{frame}
\begin{frame}[fragile]{Example 3: target and host of the same package}
\begin{block}{package/e2tools/e2tools.mk}
\begin{minted}[fontsize=\tiny]{make}
E2TOOLS_VERSION = 3158ef18a903ca4a98b8fa220c9fc5c133d8bdf6
E2TOOLS_SITE = $(call github,ndim,e2tools,$(E2TOOLS_VERSION))
E2TOOLS_VERSION = 0.0.16.4
E2TOOLS_SITE = $(call github,ndim,e2tools,v$(E2TOOLS_VERSION))
# Source coming from GitHub, no configure included.
E2TOOLS_AUTORECONF = YES
Expand All @@ -1316,4 +1316,3 @@ \subsection{Target vs. host packages}
the different package infrastructures.
\end{itemize}
}
Loading

0 comments on commit fdc2bfb

Please sign in to comment.