From e11da41853ddb36745c68adaab352fbe00bebc16 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Wed, 18 May 2016 09:44:42 +0200
Subject: split yocto advanced training

use several tex files and include them in the presentation

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 .../yocto-advanced/yocto-add-own-kernel.tex        | 74 ++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 distribution/yocto-advanced/yocto-add-own-kernel.tex

(limited to 'distribution/yocto-advanced/yocto-add-own-kernel.tex')

diff --git a/distribution/yocto-advanced/yocto-add-own-kernel.tex b/distribution/yocto-advanced/yocto-add-own-kernel.tex
new file mode 100644
index 0000000..7f86ecc
--- /dev/null
+++ b/distribution/yocto-advanced/yocto-add-own-kernel.tex
@@ -0,0 +1,74 @@
+\subsection{Writing recipes}
+\begin{frame}[fragile]
+\frametitle{adding a kernel}
+create the file 'meta-mini/recipes-bsp/linux-vanilla/linux-vanilla\_3.16.1.bb':
+\begin{verbatim}
+SECTION = "kernel"
+DESCRIPTION = "Linux vanilla kernel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+KERNEL_IMAGETYPE ?= "uImage"
+
+inherit kernel
+require recipes-kernel/linux/linux-dtb.inc
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{adding a kernel \#2}
+\begin{verbatim}
+COMPATILBE_MACHINE_imx6qsabrelite = "imx6qsabrelite"
+KERNEL_DEVICETREE_imx6qsabrelite = "arch/arm/boot/dts/imx6q-sabrelite.dts"
+COMPATILBE_MACHINE_beaglebone-black = "beaglebone-black"
+KERNEL_DEVICETREE_beaglebone-black = "arch/arm/boot/dts/am335x-boneblack.dts"
+
+S = "${WORKDIR}/git
+
+BRANCH = "master"
+SRC_URI = "https://www.kernel.org/pub/linux/kernel/v3.x/linux-${PV}.tar.xz \
+	file://defconfig"
+
+SRC_URI[md5sum] = "e7a985a243b7941b6bc6240fcbc797fc"
+SRC_URI[sha256sum] = "be37dda8ea090525661d64e5c7fc8580f313b7f9ba8592e32120f1332b
+
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+LINUX_VERSION_EXTENSION = "-linutronix"
+
+do_configure_prepend() {
+	cp '${WORKDIR}/defconfig' '${S}/.config'
+}
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{adding a defconfig}
+copy your .config file to
+'meta-mini/recipes-bsp/linux-vanilla/files/beaglebone-black/defconfig'
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{using a specific kernel}
+add
+\begin{verbatim}
+PREFERRED_PROVIDER_virtual/kernel = "linux-vanilla"
+\end{verbatim}
+to meta-mini/machine/beaglebone-black.conf
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Providers}
+\begin{verbatim}
+--8<- meta/classos/kernel.bbclass --
+PROVIDES += "virtual/kernel"
+--8<--------------------------------
+\end{verbatim}
+
+PREFERRED\_PROVIDER\_virtual/kernel = "linux-vanilla"
+
+
+\pause
+\vspace{2em}
+also a preferred version can be set:
+
+PREFERRED\_VERSION\_virtual/kernel = "3.18.5"
+\end{frame}
-- 
cgit v1.2.3

