[bootlin/training-materials updates] master: yocto: slides: move "Automating layer management" to a section on its own (b1ca0161)
Luca Ceresoli
luca.ceresoli at bootlin.com
Tue Jun 6 23:08:36 CEST 2023
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/b1ca0161fe26326101bb895f8f235aac1e4c8d1d
>---------------------------------------------------------------
commit b1ca0161fe26326101bb895f8f235aac1e4c8d1d
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date: Tue Jun 6 23:08:36 2023 +0200
yocto: slides: move "Automating layer management" to a section on its own
This makes has nothing to do with the "Distro layers" section.
Closes: https://github.com/bootlin/training-materials/issues/199
Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>---------------------------------------------------------------
b1ca0161fe26326101bb895f8f235aac1e4c8d1d
agenda/yocto-agenda.tex | 9 +-
agenda/yocto-online-agenda.tex | 8 +-
mk/yocto-stm32.mk | 1 +
mk/yocto.mk | 1 +
slides/yocto-layer-distro/yocto-layer-distro.tex | 165 ---------------------
.../yocto-layer-management.tex | 164 ++++++++++++++++++++
6 files changed, 180 insertions(+), 168 deletions(-)
diff --git a/agenda/yocto-agenda.tex b/agenda/yocto-agenda.tex
index 92aaff74..51bc4d2f 100644
--- a/agenda/yocto-agenda.tex
+++ b/agenda/yocto-agenda.tex
@@ -229,7 +229,6 @@
\begin{itemize}
\item Distro configuration
\item Distro layers
- \item Automating layer management
\end{itemize}
}
@@ -291,7 +290,13 @@
\end{itemize}
}
-\feagendaonecolumn
+\feagendatwocolumn
+{Lecture - Automating layer management}
+{
+ \begin{itemize}
+ \item Automating layer management
+ \end{itemize}
+}
{Lecture - Runtime Package Management}
{
\begin{itemize}
diff --git a/agenda/yocto-online-agenda.tex b/agenda/yocto-online-agenda.tex
index d1683d51..5aeb0a5e 100644
--- a/agenda/yocto-online-agenda.tex
+++ b/agenda/yocto-online-agenda.tex
@@ -289,7 +289,13 @@
\end{itemize}
}
-\feagendaonecolumn
+\feagendatwocolumn
+{Lecture - Automating layer management}
+{
+ \begin{itemize}
+ \item Automating layer management
+ \end{itemize}
+}
{Lecture - Runtime Package Management}
{
\begin{itemize}
diff --git a/mk/yocto-stm32.mk b/mk/yocto-stm32.mk
index 92b05fa3..27e3a19c 100644
--- a/mk/yocto-stm32.mk
+++ b/mk/yocto-stm32.mk
@@ -27,6 +27,7 @@ YOCTO_STM32_SLIDES = \
yocto-licensing \
yocto-sdk \
yocto-sdk-lab \
+ yocto-layer-management \
yocto-runtime-package-management \
yocto-resources \
last-slides
diff --git a/mk/yocto.mk b/mk/yocto.mk
index fe10a8e9..16eb1736 100644
--- a/mk/yocto.mk
+++ b/mk/yocto.mk
@@ -27,6 +27,7 @@ YOCTO_SLIDES = \
yocto-licensing \
yocto-sdk \
yocto-sdk-lab \
+ yocto-layer-management \
yocto-runtime-package-management \
yocto-resources \
last-slides
diff --git a/slides/yocto-layer-distro/yocto-layer-distro.tex b/slides/yocto-layer-distro/yocto-layer-distro.tex
index 43e5cbff..adbe63a9 100644
--- a/slides/yocto-layer-distro/yocto-layer-distro.tex
+++ b/slides/yocto-layer-distro/yocto-layer-distro.tex
@@ -111,168 +111,3 @@ MAINTAINER = "..."
\end{itemize}
\end{itemize}
\end{frame}
-
-\subsection{Automating layer 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 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}
- \item A good way to distribute a distribution (Poky, custom
- layers, BSP, \code{.templateconf}\dots) is to use Google's
- \code{repo}.
- \item \code{Repo} is used in Android to distribute its source
- code, which is split into many \code{git} repositories. It's a
- wrapper to handle several \code{git} repositories at once.
- \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}
-
-\begin{frame}[fragile]
- \frametitle{Manifest example}
- \begin{block}{}
- \fontsize{9}{9}\selectfont
- \begin{minted}{xml}
-<?xml version="1.0" encoding="UTF-8"?>
-<manifest>
- <remote name="yocto-project" fetch="git.yoctoproject.org" />
- <remote name="private" fetch="git.example.net" />
-
- <default revision="kirkstone" remote="private" />
-
- <project name="poky" remote="yocto-project" />
- <project name="meta-ti" remote="yocto-project" />
- <project name="meta-custom" />
- <project name="meta-custom-bsp" />
- <project path="meta-custom-distro" name="distro">
- <copyfile src="templateconf" dest="poky/.templateconf" />
- </project>
-</manifest>
- \end{minted}
- \end{block}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Retrieve the project using \code{repo}}
- \begin{minted}{sh}
-$ mkdir my-project; cd my-project
-$ repo init -u https://git.example.net/manifest.git
-$ repo sync -j4
- \end{minted}
- \begin{itemize}
- \item \code{repo init} uses the \code{default.xml} manifest in the
- repository, unless specified otherwise.
- \item You can see the full \code{repo} documentation at
- \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{9}{9}\selectfont
- \begin{minted}{yaml}
-header:
- version: 8
-machine: mymachine
-distro: mydistro
-target:
- - myimage
-
-repos:
- meta-custom:
-
- bitbake:
- url: "https://git.openembedded.org/bitbake"
- refspec: "2.0"
- layers:
- .: excluded
-
- openembedded-core:
- url: "https://git.openembedded.org/openembedded-core"
- refspec: kirkstone
- layers:
- meta:
- \end{minted}
- \end{block}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{kas configuration}
- \fontsize{9}{9}\selectfont
- \begin{block}{}
- \begin{minted}{yaml}
- meta-freescale:
- url: "https://github.com/Freescale/meta-freescale"
- refspec: kirkstone
-
- meta-openembedded:
- url: https://git.openembedded.org/meta-openembedded
- refspec: kirkstone
- layers:
- meta-oe:
- meta-python:
- meta-networking:
- \end{minted}
- \end{block}
-
-
- \begin{itemize}
- \item Then a single command will build all the listed target for the
-machine:
-
- \begin{minted}{sh}
-$ kas build meta-custom/mymachine.yaml
- \end{minted}
-
- \item Or, alternatively, invoke bitbake commands:
-
- \begin{minted}{sh}
-$ kas shell /path/to/kas-project.yml -c 'bitbake dosfsutils-native'
- \end{minted}
- \end{itemize}
-\end{frame}
diff --git a/slides/yocto-layer-management/yocto-layer-management.tex b/slides/yocto-layer-management/yocto-layer-management.tex
new file mode 100644
index 00000000..b116a9d2
--- /dev/null
+++ b/slides/yocto-layer-management/yocto-layer-management.tex
@@ -0,0 +1,164 @@
+\section{Automating layer 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 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}
+ \item A good way to distribute a distribution (Poky, custom
+ layers, BSP, \code{.templateconf}\dots) is to use Google's
+ \code{repo}.
+ \item \code{Repo} is used in Android to distribute its source
+ code, which is split into many \code{git} repositories. It's a
+ wrapper to handle several \code{git} repositories at once.
+ \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}
+
+\begin{frame}[fragile]
+ \frametitle{Manifest example}
+ \begin{block}{}
+ \fontsize{9}{9}\selectfont
+ \begin{minted}{xml}
+<?xml version="1.0" encoding="UTF-8"?>
+<manifest>
+ <remote name="yocto-project" fetch="git.yoctoproject.org" />
+ <remote name="private" fetch="git.example.net" />
+
+ <default revision="kirkstone" remote="private" />
+
+ <project name="poky" remote="yocto-project" />
+ <project name="meta-ti" remote="yocto-project" />
+ <project name="meta-custom" />
+ <project name="meta-custom-bsp" />
+ <project path="meta-custom-distro" name="distro">
+ <copyfile src="templateconf" dest="poky/.templateconf" />
+ </project>
+</manifest>
+ \end{minted}
+ \end{block}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Retrieve the project using \code{repo}}
+ \begin{minted}{sh}
+$ mkdir my-project; cd my-project
+$ repo init -u https://git.example.net/manifest.git
+$ repo sync -j4
+ \end{minted}
+ \begin{itemize}
+ \item \code{repo init} uses the \code{default.xml} manifest in the
+ repository, unless specified otherwise.
+ \item You can see the full \code{repo} documentation at
+ \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{9}{9}\selectfont
+ \begin{minted}{yaml}
+header:
+ version: 8
+machine: mymachine
+distro: mydistro
+target:
+ - myimage
+
+repos:
+ meta-custom:
+
+ bitbake:
+ url: "https://git.openembedded.org/bitbake"
+ refspec: "2.0"
+ layers:
+ .: excluded
+
+ openembedded-core:
+ url: "https://git.openembedded.org/openembedded-core"
+ refspec: kirkstone
+ layers:
+ meta:
+ \end{minted}
+ \end{block}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{kas configuration}
+ \fontsize{9}{9}\selectfont
+ \begin{block}{}
+ \begin{minted}{yaml}
+ meta-freescale:
+ url: "https://github.com/Freescale/meta-freescale"
+ refspec: kirkstone
+
+ meta-openembedded:
+ url: https://git.openembedded.org/meta-openembedded
+ refspec: kirkstone
+ layers:
+ meta-oe:
+ meta-python:
+ meta-networking:
+ \end{minted}
+ \end{block}
+
+
+ \begin{itemize}
+ \item Then a single command will build all the listed target for the
+machine:
+
+ \begin{minted}{sh}
+$ kas build meta-custom/mymachine.yaml
+ \end{minted}
+
+ \item Or, alternatively, invoke bitbake commands:
+
+ \begin{minted}{sh}
+$ kas shell /path/to/kas-project.yml -c 'bitbake dosfsutils-native'
+ \end{minted}
+ \end{itemize}
+\end{frame}
More information about the training-materials-updates
mailing list