summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/yocto-add-simple-application.tex
blob: cf7fa579ae4c54116a06e71037437e73f8fbbfc2 (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
\begin{frame}
\frametitle{adding an own application}
\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{as simple as posible}
use this folder layout
\begin{verbatim}
poky/meta-mini/recipes-hello % tree
hello
├── files
│   └── hello.c
└── hello.bb
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{as simple as posible \#2}
this is the content of hello.bb
\begin{verbatim}
DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT; \
  md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"
SRC_URI = "file://hello.c"
S = "${WORKDIR}"

do_compile() {
  ${CC} hello.c -o hello
}

do_install() {
  install -d ${D}${bindir}
  install -m 0755 hello ${D}${bindir}
}
\end{verbatim}
\end{frame}