blob: a9eebb65f3a184a58d2aa517dbd2505ee5b1b870 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
\subsection{Yocto Layers}
\begin{frame}
\frametitle{bitbake-layers}
is useful to debug relations between different layers, options are:
\begin{description}
\item [show-layers] shows the current configured layers
\item [show-recipes] lists available recipes and the layers that provide them.
\item [show-overlayed] lists overlayed recipes
\item [show-appends] lists .bbappend files
and the recipe files to which they apply
\item [show-cross-depends] lists dependency relationships
between recipes that cross layer boundaries
\item [flatten] flattens the layer configuration
into a separate output directory.
\end{description}
\end{frame}
\begin{frame}[fragile]
\frametitle{Create and use own layer}
\begin{lstlisting}
$ cd ~/poky
$ . ./oe-init-build-env build-schulung
$ cd ..
$ bitbake-layers create-layer -p 10 meta-schulung
NOTE: Starting bitbake server...
Add your new layer with 'bitbake-layers add-layer meta-schulung'
$ cd build-schulung
$ bitbake-layers add-layer ../meta-schulung
NOTE: Starting bitbake server...
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Folder layout}
\begin{verbatim}
meta-schulung
+ conf
| + layer.conf
+ classes
| + class1.bbclass
| + class2.bbclass
+ recipes-category1
| + package-1
| + package-1.bb
| + package-2
| + package-2.bb
+ recipes-category2
| ..
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{meta-*/conf/layer.conf}
each layer needs a configuration file
\begin{itemize}
\item add conf and class directories to BBPATH
\begin{verbatim}BBPATH =. "${LAYERDIR}"\end{verbatim}
\item add recipe directories to BBFILES
\begin{verbatim}BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"\end{verbatim}
\item add layer name to BBFILE\_COLLECTIONS
\begin{verbatim}BBFILE_COLLECTIONS += "mylayer"\end{verbatim}
\item set root of the layer
\begin{verbatim}BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"\end{verbatim}
\item set default priority of the layer
\begin{verbatim}BBFILE_PRIORITY_mylayer = "5"\end{verbatim}
\item set version of layer (only increment if dependencies with other
layers are affected)
\begin{verbatim}LAYERVERSION_mylayer = "2"\end{verbatim}
\item set dependencies to other layers
\begin{verbatim}LAYERDEPENDS_mylayer = "meta-yocto"\end{verbatim}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Definitions}
\begin{itemize}
\item It is possible for a recipe with a lower version number PV in a layer
that has a higher priority to take precedence.
\item Also, the layer priority does not currently affect the precedence
order of .conf or .bbclass files. Future versions of BitBake might address this.
\end{itemize}
\end{frame}
|