blob: 801a6454db6a44f240707d5a5510087cd81eb14e (
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
|
\subsection{Applications}
\begin{frame}
\frametitle{Adding own applications}
\begin{itemize}
\item Recipe already available? check http://layers.openembedded.org
\item Look for a similar recipe
\item Proper bbclass available?
\end{itemize}
On the next slides, we have a look what is useful for very simple applications,
autotools and Cmake based projects and QT applications.
\end{frame}
\begin{frame}[fragile]
\frametitle{Simple (overview)}
file layout
\begin{verbatim}
example
├── files
│ └── example.c
└── example_0.1.bb
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{Simple (add source)}
\begin{lstlisting}
$ cd ~/poky/meta-schulung
$ mkdir -p recipes-example/example/files
$ pluma recipes-example/example/files/example.c
\end{lstlisting}
\begin{verbatim}
#include <stdio.h>
int main(int argc, char **argv) {
printf("Hello, world!\n");
return 0;
}
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{Simple (add recipe)}
\begin{lstlisting}
$ cd ~/poky/meta-schulung
$ pluma recipes-example/example/example_0.1.bb
\end{lstlisting}
\begin{verbatim}
DESCRIPTION = "Simple Example"
LICENSE = "CLOSED"
SRC_URI = "file://example.c"
do_compile() {
$CC $CFLAGS -o example ${WORKDIR}/example.c $LDFLAGS
}
do_install() {
install -D -m 0755 example ${D}${base_bindir}/example
}
\end{verbatim}
\begin{lstlisting}
$ cd ~/poky/build-schulung
$ bitbake example
\end{lstlisting}
\end{frame}
|