From 1185cd77bdba1d1a70eb0993c9e6aacad1aaf329 Mon Sep 17 00:00:00 2001 From: Manuel Traut 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 --- .../yocto-advanced/pres_yocto-advanced.tex | 101 +++++++++++++++++++++ distribution/yocto-basic/pres_yocto-basic.tex | 13 +-- distribution/yocto-intro/pres_yocto-intro.tex | 2 + 3 files changed, 107 insertions(+), 9 deletions(-) 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 [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 diff --git a/distribution/yocto-basic/pres_yocto-basic.tex b/distribution/yocto-basic/pres_yocto-basic.tex index b3cfdc1..67b5bd3 100644 --- a/distribution/yocto-basic/pres_yocto-basic.tex +++ b/distribution/yocto-basic/pres_yocto-basic.tex @@ -13,7 +13,6 @@ \item Classes \item Tasks \item Machines -\item Configuration \item Images \item ADT \end{itemize} @@ -59,9 +58,11 @@ \pause \item add or replace class files \pause -\item 'conf/layer.conf' is used to define the recipe location(s) +\item 'conf/layer.conf' is used to configure the layer \pause \item are added and ordered via BBLAYERS variable in build/conf/bblayers.conf +\pause +\item 'bitbake-layers show-layers' is used to show used layers \end{itemize} \end{frame} @@ -821,12 +822,6 @@ that is used by the Board .conf file \end{description} \end{frame} -\subsection{Configuration} -\begin{frame} -\frametitle{basics} -bla -\end{frame} - \subsection{Images} \begin{frame} \frametitle{basics} @@ -1185,7 +1180,7 @@ and remove everything from build. \subsection{ADT} \begin{frame} - \frametitle{Yocto ADT (Application Development Kit} +\frametitle{Yocto ADT (Application Development Kit} Core Components \vspace{2em} \begin{itemize} diff --git a/distribution/yocto-intro/pres_yocto-intro.tex b/distribution/yocto-intro/pres_yocto-intro.tex index 2b1a14c..69a8553 100644 --- a/distribution/yocto-intro/pres_yocto-intro.tex +++ b/distribution/yocto-intro/pres_yocto-intro.tex @@ -22,7 +22,9 @@ \pause \item Advanced \begin{itemize} + \item Build configuration \item Using BSP layers (fsl/ti) + \item Define a distribution \item Create layers \& recipes \item Create images \item Yocto \& ELBE combined -- cgit v1.2.3