[bootlin/training-materials updates] master: yocto: add slides from my best practices talk (a360c6cc)

Alexandre Belloni alexandre.belloni at bootlin.com
Tue Oct 20 19:48:25 CEST 2020


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/a360c6cc59142cca7ef5928ecc06f0ea4401e629

>---------------------------------------------------------------

commit a360c6cc59142cca7ef5928ecc06f0ea4401e629
Author: Alexandre Belloni <alexandre.belloni at bootlin.com>
Date:   Tue Oct 20 19:48:25 2020 +0200

    yocto: add slides from my best practices talk
    
    Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>


>---------------------------------------------------------------

a360c6cc59142cca7ef5928ecc06f0ea4401e629
 slides/yocto-layer-distro/yocto-layer-distro.tex | 96 ++++++++++++++++++++++++
 slides/yocto-licensing/yocto-licensing.tex       | 49 +++++++++++-
 2 files changed, 141 insertions(+), 4 deletions(-)

diff --git a/slides/yocto-layer-distro/yocto-layer-distro.tex b/slides/yocto-layer-distro/yocto-layer-distro.tex
index 01d1bc23..b5afc1a0 100644
--- a/slides/yocto-layer-distro/yocto-layer-distro.tex
+++ b/slides/yocto-layer-distro/yocto-layer-distro.tex
@@ -97,6 +97,27 @@ MAINTAINER = "..."
   \end{itemize}
 \end{frame}
 
+\subsection{Release management}
+
+\begin{frame}[fragile]
+  \frametitle{Release management}
+  There are multiple tasks that OE/bitbake based projects let you do
+  on your own to ensure build reproducibility:
+  \begin{itemize}
+  \item Code distribution and project setup.
+  \item Release tagging
+  \end{itemize}
+  A separate tool is needed for that, usual solutions are:
+  \begin{itemize}
+  \item combo-layer, as done by Poky:
+    \url{https://wiki.yoctoproject.org/wiki/Combo-layer}
+  \item git submodules + setup script. Great example in YOE:
+    \url{https://github.com/YoeDistro/yoe-distro}
+  \item repo and \code{templateconf} or setup script
+  \item kas
+  \end{itemize}
+\end{frame}
+
 \begin{frame}
   \frametitle{Distribute the distribution}
   \begin{itemize}
@@ -109,6 +130,9 @@ MAINTAINER = "..."
     \item The only requirement is to use \code{git}.
     \item The \code{repo} configuration is stored in \code{manifest}
       file, usually available in its own \code{git} repository.
+  \item It could also be in a specific branch of your custom layer.
+  \item It only handles fetching code, handling \code{local.conf} and
+    \code{bblayers.conf} is done separately
   \end{itemize}
 \end{frame}
 
@@ -150,3 +174,75 @@ $ repo sync -j4
       \url{https://source.android.com/source/using-repo.html}.
   \end{itemize}
 \end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{repo: release}
+  To tag a release, a few steps have to be taken:
+  \begin{itemize}
+  \item Optionally tag the custom layers
+  \item For each project entry in the manifest, set the revision
+    parameter to either a tag or a commit hash.
+  \item Commit and tag this version of the manifest.
+  \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{kas}
+  \begin{itemize}
+  \item Specific tool developed by Siemens for OpenEmbedded:
+    \url{https://github.com/siemens/kas}
+  \item Will fetch layers and build the image in a single command
+  \item Uses a single JSON or YAML configuration file part of the
+    custom layer
+  \item Can generate and run inside a Docker container
+  \item Can setup \code{local.conf} and \code{bblayers.conf}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{kas configuration}
+  \begin{block}{}
+  \fontsize{10}{10}\selectfont
+  \begin{minted}{yaml}
+header:
+  version: 8
+machine: mymachine
+distro: mydistro
+target:
+  - myimage
+
+repos:
+  meta-custom:
+
+  bitbake:
+    url: "https://git.openembedded.org/bitbake"
+    refspec: "1.46"
+
+  openembedded-core:
+    url: "https://git.openembedded.org/openembedded-core"
+    refspec: dunfell
+    layers:
+      meta:
+  \end{minted}
+  \end{block}
+\end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{kas configuration}
+  \fontsize{10}{10}\selectfont
+  \begin{block}{}
+  \begin{minted}{yaml}
+  meta-freescale:
+    url: "https://github.com/Freescale/meta-freescale"
+    refspec: dunfell
+
+  meta-openembedded:
+   url: http://git.openembedded.org/meta-openembedded
+   refspec: dunfell
+   layers:
+     meta-oe:
+     meta-python:
+     meta-networking:
+  \end{minted}
+  \end{block}
+\end{frame}
+
diff --git a/slides/yocto-licensing/yocto-licensing.tex b/slides/yocto-licensing/yocto-licensing.tex
index cc4cc11e..42e3220f 100644
--- a/slides/yocto-licensing/yocto-licensing.tex
+++ b/slides/yocto-licensing/yocto-licensing.tex
@@ -64,10 +64,51 @@ LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
 \end{frame}
 
 \begin{frame}[fragile]
-  \frametitle{Manifest of packages licenses}
+  \frametitle{Listing licenses}
+  OpenEmbbedded will generate a manifest of all the licenses of the
+  software present on the target image in
+  \code{$BUILDDIR/tmp/deploy/licenses/<image>/license.manifest}
+  \begin{block}{}
+    \fontsize{9}{9}\selectfont
+    \begin{minted}{console}
+PACKAGE NAME: busybox
+PACKAGE VERSION: 1.31.1
+RECIPE NAME: busybox
+LICENSE: GPLv2 & bzip2-1.0.6
+
+PACKAGE NAME: dropbear
+PACKAGE VERSION: 2019.78
+RECIPE NAME: dropbear
+LICENSE: MIT & BSD-3-Clause & BSD-2-Clause & PD
+    \end{minted}
+  \end{block}
+\end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{Providing license text}
+  To include the license text in the root filesystem either:
   \begin{itemize}
-    \item A summary of all the packages and their licenses is
-    available in:
-    \code{$BUILDDIR/tmp/deploy/licenses/<image>/license.manifest}
+  \item Use \code{COPY_LIC_DIRS = "1"} and \code{COPY_LIC_MANIFEST =
+    "1"}
+  \item or use \code{LICENSE_CREATE_PACKAGE = "1"} to generate
+    packages including the license and install the required license
+    packages.
   \end{itemize}
 \end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{Providing sources}
+  OpenEmbbedded provides the \code{archiver} class to generate
+  tarballs of the source code:
+  \begin{itemize}
+  \item Use \code{INHERIT += "archiver"}
+  \item Set the \code{ARCHIVER_MODE} variable, the default is to
+    provide patched sources. To provide configured sources:
+  \end{itemize}
+    \begin{block}{}
+      \fontsize{9}{9}\selectfont
+      \begin{minted}{bash}
+ARCHIVER_MODE[src] = "configured"
+      \end{minted}
+    \end{block}
+\end{frame}




More information about the training-materials-updates mailing list