From 5d9043ce4f07dbc63a2996874e798de4a83538c2 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Tue, 27 Nov 2018 22:57:33 +0100
Subject: 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>
---
 distribution/yocto-example-layer/distro.tex | 147 ++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)
 create mode 100644 distribution/yocto-example-layer/distro.tex

(limited to 'distribution/yocto-example-layer/distro.tex')

diff --git a/distribution/yocto-example-layer/distro.tex b/distribution/yocto-example-layer/distro.tex
new file mode 100644
index 0000000..8861c1b
--- /dev/null
+++ b/distribution/yocto-example-layer/distro.tex
@@ -0,0 +1,147 @@
+\subsection{Define a distribution}
+\begin{frame}
+\frametitle{Why define a distribution?}
+\begin{itemize}
+\item Naming of the toolchain (codenames, vendor)
+\item Version numbers
+\item Enable default features
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{distro features: file-systems}
+\begin{description}
+\item[cramfs] CramFS support
+\item[ext2] tools for supporting for devices with internal HDD/Microdrive
+        for storing files (instead of Flash only devices)
+\item[nfs] NFS client support (for mounting NFS exports on device)
+\item[smbfs] SMB networks client support
+        (for mounting Samba/Microsoft Windows shares on device)
+\end{description}
+\end{frame}
+
+\begin{frame}
+\frametitle{distro features: hardware support}
+\begin{description}
+\item[alsa] ALSA/sound support
+        (OSS compatibility kernel modules installed if available)
+\item[bluetooth] bluetooth support (integrated BT only)
+\item[irda] IrDA support
+\item[wifi] WiFi support (integrated only).
+\item[keyboard] keyboard support (e.g. keymaps will be loaded during boot)
+\end{description}
+\end{frame}
+
+\begin{frame}
+\frametitle{distro features: grahpics}
+\begin{description}
+\item[opengl] the Open Graphics Library, which is a cross-language,
+        multi-platform application programming interface used for rendering two
+        and three-dimensional graphics
+\item[directfb] DirectFB support
+\end{description}
+\end{frame}
+
+\begin{frame}
+\frametitle{distro features: networking}
+\begin{description}
+\item[ipsec] IPSec support
+\item[ipv6] IPv6 support
+\item[ppp] PPP dialup support
+\end{description}
+\end{frame}
+
+\begin{frame}
+\frametitle{distro features: bus support}
+\begin{description}
+\item[pci] PCI bus support
+\item[pcmcia] PCMCIA/CompactFlash support
+\item[usbgadget] USB Gadget Device support (for USB networking/serial/storage)
+\item[usbhost] USB Host support
+        (allows to connect external keyboard, mouse, storage, network etc)
+\end{description}
+\end{frame}
+
+\begin{frame}
+\frametitle{distro features: software}
+\begin{description}
+\item[systemd] support for this init manager, which is a full replacement of
+        for init with parallel starting of services, reduced shell overhead,
+        and other features. This init manager is used by many distributions
+\item[wayland] the Wayland display server protocol
+        and the library that supports it
+\item[x11] X server and libraries
+\end{description}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{use a DISTRO\_FEATURE}
+Normally the distro features are used in package groups in a core layer.
+e.g. 'meta/recipes-core/packagegroups/packagegroup-base.bb':
+\begin{verbatim}
+PACKAGES = ' \
+     ..
+     ${@base_contains("DISTRO_FEATURES", \
+                      "opengl", "packagegroup-opengl", "", d)} \
+     ..
+     '
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Yocto with local mirror}
+\begin{description}
+\item [PREMIRRORS] list of mirrors that are tried before SRC\_URI
+\item [MIRRORS] list of mirrors that are tried after SRC\_URI
+\item [BB\_FETCH\_PREMIRRORONLY = "1"] only use sources from PREMIRRORS
+\item [BB\_NO\_NETWORK = "1"] throws error instead of accessing internet
+\end{description}
+typical in local.conf to generate the mirror:
+\begin{description}
+\item [BB\_GENERATE\_MIRROR\_TARBALLS = "1"] generates a tarball that can be
+  used as mirror
+\end{description}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Define an own distribution}
+\begin{lstlisting}
+$ cd ~/poky/meta-schulung
+$ mkdir conf/distro
+$ pluma conf/distro/schulung.conf
+\end{lstlisting}
+\begin{verbatim}
+require conf/distro/poky.conf
+DISTRO = "schulung"
+DISTRO_NAME = "Schulung (Yocto Schulung Example Distro)"
+DISTRO_VERSION = "1.0"
+DISTRO_CODENAME = "pengin"
+MAINTAINER = "Your Name <you@schulung>"
+SDK_VENDOR = "-schulungsdk"
+TARGET_VENDOR = "-schulung"
+DISTROOVERRIDES = "schulung:poky"
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Use own distribution}
+\begin{lstlisting}
+$ cd ~/poky/build-schulung
+$ pluma conf/local.conf
+\end{lstlisting}
+\begin{verbatim}
+#STATE_DIR ?= "/home/prebuilt/qemuarm/sstate-cache"
+#BB_NO_NETWORK = "1"
+MACHINE ??= "qemuarm"
+DL_DIR ?= "/home/downloads"
+DISTRO ?= "schulung"
+PACKAGE_CLASSES ?= "package_ipk"
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+USER_CLASSES ?= "buildstats image-mklibs image-prelink"
+PATCHRESOLVE = "noop"
+CONF_VERSION = "1"
+\end{verbatim}
+\begin{lstlisting}
+$ bitbake core-image-minimal
+\end{lstlisting}
+\end{frame}
-- 
cgit v1.2.3

