Skip to content

Commit

Permalink
Yocto: add links to ref manual for variables
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Opdenacker <[email protected]>
  • Loading branch information
Michael Opdenacker committed Nov 27, 2023
1 parent 79bda44 commit 2d89216
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ \section{Set up the NFS server on the workstation}
\section{Add a package to the rootfs image}

You can add packages to be built by editing the local configuration file
\code{$BUILDDIR/conf/local.conf}. The \code{IMAGE_INSTALL} variable controls the
\code{$BUILDDIR/conf/local.conf}. The \yoctovar{IMAGE_INSTALL} variable controls the
packages included into the output image.
To illustrate this, add the Dropbear SSH server to the list of enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ \section{Set up the NFS server on the workstation}
\section{Add a package to the rootfs image}

You can add packages to be built by editing the local configuration file
\code{$BUILDDIR/conf/local.conf}. The \code{IMAGE_INSTALL} variable controls the
\code{$BUILDDIR/conf/local.conf}. The \yoctovar{IMAGE_INSTALL} variable controls the
packages included into the output image.
To illustrate this, add the Dropbear SSH server to the list of enabled
Expand Down
2 changes: 1 addition & 1 deletion labs/yocto-custom-image/yocto-custom-image.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ \section{Add a basic image recipe}
\section{Select the images capabilities and packages}

You can control the packages built and included into the final image with the
\code{IMAGE_INSTALL} configuration variable. It is a list of packages to be
\yoctovar{IMAGE_INSTALL} configuration variable. It is a list of packages to be
built. You can also use package groups to include a bunch of programs, generally
enabling a functionality, such as \code{packagegroup-core-boot} which adds the
minimal set of packages required to boot an image (i.e. a shell or a kernel).
Expand Down
14 changes: 7 additions & 7 deletions slides/yocto-advanced/yocto-advanced.tex
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ \subsection{Variables}
\begin{itemize}
\item Append the machine name to only define a configuration variable
for a given machine.
\item It tries to match with values from \code{OVERRIDES} which
includes \code{MACHINE}, \code{SOC_FAMILY}, and more.
\item If the override is in \code{OVERRIDES}, the assignment is
\item It tries to match with values from \yoctovar{OVERRIDES} which
includes \yoctovar{MACHINE}, \yoctovar{SOC_FAMILY}, and more.
\item If the override is in \yoctovar{OVERRIDES}, the assignment is
applied, otherwise it is ignored.
\end{itemize}
\begin{block}{}
Expand Down Expand Up @@ -255,7 +255,7 @@ \subsection{Package variants}
\frametitle{Package selection}
\begin{itemize}
\item Variants are selected thanks to the
\code{PREFERRED_PROVIDER} configuration variable.
\yoctovar{PREFERRED_PROVIDER} configuration variable.
\item The package names {\bf have to} suffix this variable.
\item Examples:
\begin{itemize}
Expand All @@ -274,7 +274,7 @@ \subsection{Package variants}
\code{DEFAULT_PREFERENCE = "-1"}
\item When multiple package versions are available, it is also
possible to explicitly pick a given version with
\code{PREFERRED_VERSION}.
\yoctovar{PREFERRED_VERSION}.
\item The package names {\bf have to} suffix this variable.
\item {\bf \%} can be used as a wildcard.
\item Example:
Expand All @@ -296,7 +296,7 @@ \subsection{Selection of packages to install}
target, and we will see this later.
\item When developing or debugging, adding packages can be useful,
without modifying the recipes.
\item Packages are controlled by the \code{IMAGE_INSTALL}
\item Packages are controlled by the \yoctovar{IMAGE_INSTALL}
configuration variable.
\end{itemize}
\end{frame}
Expand Down Expand Up @@ -358,7 +358,7 @@ \subsection{The power of BitBake}
\item BitBake stores the output of each task in a directory, the
shared state cache.
\item This cache is used to speed up compilation.
\item Its location is defined by the \code{SSTATE_DIR} variable and
\item Its location is defined by the \yoctovar{SSTATE_DIR} variable and
defaults to \code{build/sstate-cache}.
\item Over time, as you compile more recipes, it can grow quite
big. It is possible to clean old data with:
Expand Down
14 changes: 6 additions & 8 deletions slides/yocto-basics/yocto-basics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,16 @@ \subsection{Configuring the build system}

\begin{frame}
\frametitle{Configuring the build}
\begin{itemize}
\item The \code{conf/local.conf} configuration file holds local
The \code{conf/local.conf} configuration file holds local
user configuration variables:
\begin{description}
\item[BB\_NUMBER\_THREADS] How many tasks BitBake should perform
\begin{itemize}
\item \yoctovar{BB_NUMBER_THREADS}: How many tasks BitBake should perform
in parallel. Defaults to the number of CPU threads on the system.
\item[PARALLEL\_MAKE] How many processes should be used when
\item \yoctovar{PARALLEL_MAKE}: How many processes should be used when
compiling. Defaults to the number of CPU threads on the system.
\item[MACHINE] The machine the target is built for, e.g.
\item \yoctovar{MACHINE}: The machine the target is built for, e.g.
\code{beaglebone}.
\end{description}
\end{itemize}
\end{itemize}
\end{frame}

\subsection{Building an image}
Expand Down
2 changes: 1 addition & 1 deletion slides/yocto-image/yocto-image.tex
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ \subsection{Introduction to images}
\item Image generation overview:
\begin{enumerate}
\item An empty directory is created for the root filesystem.
\item Packages from \code{IMAGE_INSTALL} are installed into it
\item Packages from \yoctovar{IMAGE_INSTALL} are installed into it
using the package manager.
\item One or more images files are created, depending on the
\code{IMAGE_FSTYPES} value.
Expand Down
28 changes: 14 additions & 14 deletions slides/yocto-recipe-advanced/yocto-recipe-advanced.tex
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ \subsection{Extending a recipe}
is updated to a newer version, the append files must also be
updated.
\item If adding new files, the path to their directory must
be prepended to the \code{FILESEXTRAPATHS} variable.
be prepended to the \yoctovar{FILESEXTRAPATHS} variable.
\begin{itemize}
\item Files are looked up in paths referenced in
\code{FILESEXTRAPATHS}, from left to right.
\yoctovar{FILESEXTRAPATHS}, from left to right.
\item Prepending a path makes sure it has priority over the recipe's
one. This allows to override recipes' files.
\end{itemize}
Expand Down Expand Up @@ -94,7 +94,7 @@ \subsection{Providing virtual packages}
\item \code{bitbake} allows to use virtual names instead of the actual
package name. We saw a use case with \emph{package
variants}.
\item The virtual name is specified through the \code{PROVIDES}
\item The virtual name is specified through the \yoctovar{PROVIDES}
variable.
\item Several recipes can provide the same virtual name. Only one
will be built and installed into the generated image.
Expand Down Expand Up @@ -158,7 +158,7 @@ \subsection{Classes}
\item Automatically applies patch files listed in \code{SRC_URI}
\item Defines mirrors: \code{SOURCEFORGE_MIRROR},
\code{DEBIAN_MIRROR}, \code{GNU_MIRROR}, \code{KERNELORG_MIRROR}\dots
\item Defines \code{oe_runmake}, using \code{EXTRA_OEMAKE} to use
\item Defines \code{oe_runmake}, using \yoctovar{EXTRA_OEMAKE} to use
custom arguments.
\end{itemize}
\end{frame}
Expand All @@ -169,7 +169,7 @@ \subsection{Classes}
\item Used to build Linux kernels.
\item Defines tasks to configure, compile and install a kernel and
its modules.
\item Automatically applies a \code{defconfig} listed in \code{SRC_URI}
\item Automatically applies a \code{defconfig} listed in \yoctovar{SRC_URI}
\begin{block}{}
\begin{minted}{sh}
SRC_URI += "file://defconfig"
Expand All @@ -182,9 +182,9 @@ \subsection{Classes}
\code{virtual/kernel}.
\item Configuration variables are available:
\begin{itemize}
\item \code{KERNEL_IMAGETYPE}, defaults to \code{zImage}
\item \code{KERNEL_EXTRA_ARGS}
\item \code{INITRAMFS_IMAGE}
\item \yoctovar{KERNEL_IMAGETYPE}, defaults to \code{zImage}
\item \yoctovar{KERNEL_EXTRA_ARGS}
\item \yoctovar{INITRAMFS_IMAGE}
\end{itemize}
\end{itemize}
\end{frame}
Expand All @@ -202,9 +202,9 @@ \subsection{Classes}
\item \code{do_install}: runs \code{make install}
\end{itemize}
\item Extra configuration parameters can be passed with
\code{EXTRA_OECONF}.
\yoctovar{EXTRA_OECONF}.
\item Compilation flags can be added thanks to the
\code{EXTRA_OEMAKE} variable.
\yoctovar{EXTRA_OEMAKE} variable.
\end{itemize}
\end{frame}

Expand Down Expand Up @@ -234,16 +234,16 @@ \subsection{Classes}
\item This class helps to add users to the resulting image.
\item Adding custom users is required by many services to avoid
running them as root.
\item \code{USERADD_PACKAGES} must be defined when the \code{useradd} class
\item \yoctovar{USERADD_PACKAGES} must be defined when the \code{useradd} class
is inherited. It defines the individual packages produced by the
recipe that need users or groups to be added.
\item Users and groups will be created before the packages using
it perform their \code{do_install}.
\item At least one of the two following variables must be set:
\begin{itemize}
\item \code{USERADD_PARAM}: parameters to pass to
\item \yoctovar{USERADD_PARAM}: parameters to pass to
\code{useradd}.
\item \code{GROUPADD_PARAM}: parameters to pass to
\item \yoctovar{GROUPADD_PARAM}: parameters to pass to
\code{groupadd}.
\end{itemize}
\end{itemize}
Expand Down Expand Up @@ -287,7 +287,7 @@ \subsection{Classes}
\begin{itemize}
\item Disables \code{do_configure} and \code{do_compile}
\item Provides a default \code{do_install} that copies whatever is
in \code{S} (useful e.g. when extracting a pre-built RPM/DEB)
in \yoctovar{S} (useful e.g. when extracting a pre-built RPM/DEB)
\end{itemize}
\item Additionally you probably need:
\begin{itemize}
Expand Down
Loading

0 comments on commit 2d89216

Please sign in to comment.