summaryrefslogtreecommitdiff
path: root/distribution/yocto-example-layer/customization.tex
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2018-11-27 22:57:33 +0100
committerJohn Ogness <john.ogness@linutronix.de>2018-11-29 15:37:16 +0106
commit5d9043ce4f07dbc63a2996874e798de4a83538c2 (patch)
treeae754cf03c83db31a4bf98cd1a7f443428fe064a /distribution/yocto-example-layer/customization.tex
parent7ae33ef4607d2e17254e8ac1bc02aa9741bbe719 (diff)
add 'yocto-layer-example'
This is a first attemp to create a new slideset for day2 of yocto-trainig. The slideset is based on 'yocto-advanced' but with integration of 'meta-schulung' explanations. I used a slightly modified version of 'meta-schulung'. The following changes are currently not available in git: I don't use linux-yocto in meta-schulung, but use an own kernel-recipe and integrate the RT-PREEMPT patch. wic: i can't see the need for the second partition and the need for huge files in the kconfig. It works for me by adding ' --align 1024 ' to the wic setup. I decided to use ext2 instead of ext4. I renamed the rootfs.bb file into schulung-base.bb I use the u-boot recipe from poky. However i don't use u-boot for anything atm. But bootloader is on our agenda.. Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'distribution/yocto-example-layer/customization.tex')
-rw-r--r--distribution/yocto-example-layer/customization.tex79
1 files changed, 79 insertions, 0 deletions
diff --git a/distribution/yocto-example-layer/customization.tex b/distribution/yocto-example-layer/customization.tex
new file mode 100644
index 0000000..0cd7969
--- /dev/null
+++ b/distribution/yocto-example-layer/customization.tex
@@ -0,0 +1,79 @@
+\subsection{Image customizations}
+\begin{frame}[fragile]
+\frametitle{Adding a bootscript}
+\begin{itemize}
+\item Add 'systemd' to DISTRO\_FEATURES
+\item Inherit from systemd.bbclass
+\item Your package needs to set SYSTEMD\_SERVICE variable; e.g.
+\begin{verbatim}
+SYSTEMD_SERVICE_${PN} = "connman.service"
+\end{verbatim}
+\item To disable the service, set SYSTEMD\_AUTO\_ENABLE to 'disable'
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{User and group configuration}
+Use this in an image recipe:
+\begin{verbatim}
+inherit extrausers
+EXTRA_USERS_PARAMS = "\
+ useradd -p '' tester; \
+ groupadd developers; \
+ userdel nobody; \
+ groupdel -g video; \
+ groupmod -g 1020 developers; \
+ usermod -s /bin/sh tester; \
+ "
+\end{verbatim}
+Or the useradd class for creating a user if a package is installed.
+For an example see useradd-example.bb
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{External sources}
+E.g. for a heavily customized kernel
+\begin{itemize}
+\item Kernel source directory on the development machine
+\item Inherit externalsrc class
+\item Set EXTERNALSRC variable to point to your external source code
+\end{itemize}
+
+This local.conf extension:
+\begin{verbatim}
+INHERIT += "externalsrc"
+EXTERNALSRC_pn-myrecipe = "/some/path/to/your/source/tree"
+\end{verbatim}
+overrides the SOURCE\_URI of pn-myrecipe.bb
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Blacklist packages}
+To blacklist a package, inherit the blacklist.bbclass globally and set
+PNBLACKLIST for each recipe you wish to blacklist.
+
+
+Specify the PN value as a variable flag (varflag) and provide a reason,
+which is reported, if the package is requested to be built as the value:
+\begin{verbatim}
+INHERIT += "blacklist"
+PNBLACKLIST[exoticware] = "Not supported by our organization."
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Override oe-init-buildenv templates}
+Default templates can be overridden by setting TEMPLATECONF
+to e.g. meta-foo/conf during ./oe-init-buildenv.
+
+Then meta-foo/conf bblayers.conf.sample and local.conf.sample will
+be used.
+
+The default location is specified in
+
+\begin{verbatim}
+% cat .templateconf
+# Template settings
+TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}
+\end{verbatim}
+\end{frame}