From d2ce8eda89a1a50daac191fecd341b1213325571 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Thu, 28 Aug 2014 17:18:12 +0200
Subject: yocto: describe adding fsl layers and building a predefined image

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 .../yocto-advanced/pres_yocto-advanced.tex         | 184 +++++++++++++++++++--
 1 file changed, 166 insertions(+), 18 deletions(-)

(limited to 'distribution/yocto-advanced/pres_yocto-advanced.tex')

diff --git a/distribution/yocto-advanced/pres_yocto-advanced.tex b/distribution/yocto-advanced/pres_yocto-advanced.tex
index 0b0a917..480712b 100644
--- a/distribution/yocto-advanced/pres_yocto-advanced.tex
+++ b/distribution/yocto-advanced/pres_yocto-advanced.tex
@@ -3,13 +3,60 @@
 \title{YOCTO - Advanced}
 \maketitle
 
+\begin{frame}
+\frametitle{Agenda}
+\begin{itemize}
+\item Using BSP layers (sabrelite)
+\item Build a predefined image (sabrelite)
+\item Define a distribution
+\item Create layers \& recipes
+\item Create images
+\item Yocto \& ELBE combined
+\end{itemize}
+\end{frame}
+
+\subsection{Using BSP layers}
+\begin{frame}[fragile]
+\frametitle{get an existing layer}
+retrive the layer from your BSP/SoC vendor
+\begin{verbatim}
+poky % git clone -b daisy https://github.com/Freescale/meta-fsl-arm-extra
+\end{verbatim}
+have a look at it's dependencies
+\begin{verbatim}
+poky % cat meta-fsl-arm-extra/conf/layer.conf | grep LAYERDEPENDS
+LAYERDEPENDS_fsl-arm-extra = "core fsl-arm"
+\end{verbatim}
+and retrieve them also
+\begin{verbatim}
+poky % git clone -b daisy git://git.yoctoproject.org/meta-fsl-arm
+\end{verbatim}
+check dependencies again
+\begin{verbatim}
+poky % cat meta-fsl-arm/conf/layer.conf | grep LAYERDEPENDS
+\end{verbatim}
+\dots no dependencies?! \dots OK - finished.
+
+\vspace{2em}
+README says sth. different (openembedded-core) but we have this one already;
+it is called 'meta' in poky.
+\end{frame}
+
+\begin{frame}
+\frametitle{generate a new build environment}
+\begin{verbatim}
+poky % . oe-init-build-env build-fsl
+poky/build-fsl %
+\end{verbatim}
+\end{frame}
+
 \subsection{Build configuration}
 \begin{frame}
 \frametitle{overview}
 builds are configured using two configuration files
 \begin{itemize}
-	\item build/conf/bblayers.conf
-	\item build/conf/local.conf
+	\item build-fsl/conf/bblayers.conf
+	\item build-fsl/conf/local.conf
 \end{itemize}
 \end{frame}
 
@@ -18,20 +65,63 @@ builds are configured using two configuration files
 additional layers are added with absolute! path to the BBLAYERS variable
 \begin{verbatim}
 BBLAYERS ?= " \
-  /home/local/src/poky/meta \
-  /home/local/src/poky/meta-yocto \
-  /home/local/src/poky/meta-yocto-bsp \
-  /home/local/meta-mylayer \
+  /home/devel/poky/meta \
+  /home/devel/poky/meta-yocto \
+  /home/devel/poky/meta-yocto-bsp \
+  "
+\end{verbatim}
+\pause
+\begin{verbatim}
+% bitbake-layers show-layers
+layer                 path                                  priority
+=====================================================================
+meta                  /home/devel/poky/meta                 5
+meta-yocto            /home/devel/poky/meta-yocto           5
+meta-yocto-bsp        /home/devel/poky/meta-yocto-bsp       5
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{add fsl layers}
+modify the BBLAYERS variable in bblayers.conf
+\begin{verbatim}
+BBLAYERS ?= " \
+  /home/devel/poky/meta \
+  /home/devel/poky/meta-yocto \
+  /home/devel/poky/meta-yocto-bsp \
+  /home/devel/poky/meta-fsl-arm \
+  /home/devel/poky/meta-fsl-arm-extra \
   "
 \end{verbatim}
 \pause
 \begin{verbatim}
 % bitbake-layers show-layers
-layer                 path                                      priority
-==========================================================================
-meta                  /home/local/src/poky/meta                 5
-meta-yocto            /home/local/src/poky/meta-yocto           7
-meta-yocto-bsp        /home/local/src/poky/meta-yocto-bsp       5
+layer                 path                                  priority
+=====================================================================
+meta                  /home/devel/poky/meta                 5
+meta-yocto            /home/devel/poky/meta-yocto           5
+meta-yocto-bsp        /home/devel/poky/meta-yocto-bsp       5
+meta-fsl-arm          /home/devel/poky/meta-fsl-arm         5
+meta-fsl-arm-extra    /home/devel/poky/meta-fsl-arm-extra   4
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{overlayed recipes}
+to see which recipes replace official ones:
+\begin{verbatim}
+poky/build-fsl % bitbake-layers show-overlayed
+Parsing recipes..done.
+=== Overlayed recipes ===
+directfb:
+  meta                 1.7.1
+  meta-fsl-arm         1.6.3
+directfb-examples:
+  meta                 1.7.0
+  meta-fsl-arm         1.6.0
+xserver-xorg:
+  meta                 2:1.15.0
+  meta-fsl-arm         2:1.14.4
 \end{verbatim}
 \end{frame}
 
@@ -56,22 +146,80 @@ is used to configure
 \subsection{Freescale}
 \begin{frame}
 
-\frametitle{using meta-fsl}
-bla
+\begin{frame}[fragile]
+\frametitle{configure the machine}
+to get a list of currently available machines configs:
+\begin{verbatim}
+poky/build-fsl % grep -r '@NAME' ../meta*/conf/machine
+\end{verbatim}
+imx6qsabrelite.conf - seems to be the one for our bord, so set
+\begin{verbatim}
+MACHINE ??= "imx6qsabrelite"
+\end{verbatim}
+in conf/local.conf
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{package format}
+as we realized with toaster, rpm packaging consumes a lot of CPU time, so lets
+try ipk, by setting
+\begin{verbatim}
+PACKAGE_CLASSES ?= "package_ipk"
+\end{verbatim}
+in conf/local.conf
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{set extra image features}
+we want an image suitable for development, so set
+\begin{verbatim}
+EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug eclipse-debug tools-profile"
+\end{verbatim}
+in conf/local.conf
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build an predefined image}
+use
+\begin{verbatim}
+ls ../*/*/images/
+\end{verbatim}
+to get a list of predefined images; however none of them fits my needs\dots
+\begin{verbatim}
+poky/build-fsl % cd ..
+poky % git clone -b daisy https://github.com/Freescale/meta-fsl-demos.git
+poky % git clone -b daisy git://git.openembedded.org/meta-openembedded
+poky % cd -
+\end{verbatim}
+and edit conf/bblayers.conf, to match
+\begin{verbatim}
+BBLAYERS ?= " \
+  /home/devel/poky/meta \
+  /home/devel/poky/meta-yocto \
+  /home/devel/poky/meta-yocto-bsp \
+  /home/devel/poky/meta-fsl-arm \
+  /home/devel/poky/meta-fsl-arm-extra \
+  /home/devel/poky/meta-openembedded/meta-oe \
+  /home/devel/poky/meta-fsl-demos \
+  "
+\end{verbatim}
 \end{frame}
 
-\subsection{TI}
 \begin{frame}
-\frametitle{using meta-ti}
-bla
+\frametitle{build a fsl demo image}
+\begin{verbatim}
+poky/build-fsl % source toaster start
+poky/build-fsl % bitbake qt-in-use-image
+Currently 4 running tasks (26 of 4459):
+\end{verbatim}
+\dots coffee break!
 \end{frame}
 
 \begin{frame}
 \frametitle{define a distribution}
 bla
-\end{frame}
-
 DISTRO\_FEATURES
+\end{frame}
 
 \begin{frame}
 \frametitle{creating a layer}
-- 
cgit v1.2.3

