From 1185cd77bdba1d1a70eb0993c9e6aacad1aaf329 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Thu, 28 Aug 2014 10:28:46 +0200
Subject: yocto: add build configuration and move it from basic to advanced

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

(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 637d60e..0b0a917 100644
--- a/distribution/yocto-advanced/pres_yocto-advanced.tex
+++ b/distribution/yocto-advanced/pres_yocto-advanced.tex
@@ -3,8 +3,59 @@
 \title{YOCTO - Advanced}
 \maketitle
 
+\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
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{bblayers.conf}
+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 \
+  "
+\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
+\end{verbatim}
+\end{frame}
+
+\begin{frame}
+\frametitle{local.conf}
+is used to configure
+\begin{itemize}
+	\item the target machine
+	\item paths
+	\item the used distribution
+	\item package formats
+	\item arch of developer machine
+	\item additional image features
+	\item use additional classes
+	\item enable testing
+	\item devshell terminal
+	\item patch resolver
+	\item disk monitoring
+	\item sstate mirrors
+	\item qemu configuration
+	\item layer priorities
 \subsection{Freescale}
 \begin{frame}
+
 \frametitle{using meta-fsl}
 bla
 \end{frame}
@@ -55,6 +106,56 @@ bla
 	\end{itemize}
 \end{frame}
 
+It is possible for a recipe with a lower version number PV in a layer that has a higher priority to take precedence.
+
+Also, the layer priority does not currently affect the precedence order of .conf or .bbclass files. Future versions of BitBake might address this.
+
+itbake-layers <command> [arguments]
+                
+
+The following list describes the available commands:
+
+    help: Displays general help or help on a specified command.
+
+    show-layers: Shows the current configured layers.
+
+    show-recipes: Lists available recipes and the layers that provide them.
+
+    show-overlayed: Lists overlayed recipes. A recipe is overlayed when a recipe with the same name exists in another layer that has a higher layer priority.
+
+    show-appends: Lists .bbappend files and the recipe files to which they apply.
+
+    show-cross-depends: Lists dependency relationships between recipes that cross layer boundaries.
+
+    flatten: Flattens the layer configuration into a separate output directory. Flattening your layer configuration builds a "flattened" directory that contains the contents of all layers, with any overlayed recipes removed and any .bbappend files appended to the corresponding recipes. You might have to perform some manual cleanup of the flattened layer as follows:
+
+        Non-recipe files (such as patches) are overwritten. The flatten command shows a warning for these files.
+
+        Anything beyond the normal layer setup has been added to the layer.conf file. Only the lowest priority layer's layer.conf is used.
+
+        Overridden and appended items from .bbappend files need to be cleaned up. The contents of each .bbappend end up in the flattened recipe. However, if there are appended or changed variable values, you need to tidy these up yourself. Consider the following example. Here, the bitbake-layers command adds the line #### bbappended ... so that you know where the following lines originate:
+
+             ...
+             DESCRIPTION = "A useful utility"
+             ...
+             EXTRA_OECONF = "--enable-something"
+             ...
+
+             #### bbappended from meta-anotherlayer ####
+
+             DESCRIPTION = "Customized utility"
+             EXTRA_OECONF += "--enable-somethingelse"
+                                        
+
+        Ideally, you would tidy up these utilities as follows:
+
+             ...
+             DESCRIPTION = "Customized utility"
+             ...
+             EXTRA_OECONF = "--enable-something --enable-somethingelse"
+
+$ yocto-layer create mylayer
+
 \begin{frame}
 \frametitle{adding a kernel}
 bla
-- 
cgit v1.2.3

