summaryrefslogtreecommitdiff
path: root/distribution/yocto-example-layer/kernel.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/kernel.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/kernel.tex')
-rw-r--r--distribution/yocto-example-layer/kernel.tex64
1 files changed, 64 insertions, 0 deletions
diff --git a/distribution/yocto-example-layer/kernel.tex b/distribution/yocto-example-layer/kernel.tex
new file mode 100644
index 0000000..336a6f3
--- /dev/null
+++ b/distribution/yocto-example-layer/kernel.tex
@@ -0,0 +1,64 @@
+\subsection{Add own kernel}
+\begin{frame}
+\frametitle{Workflow}
+\begin{itemize}
+\item Configure and build kernel without yocto
+\item Extract Kernel configuration and source/patches
+\item Integrate source, config and patches into yocto
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Kernel configuration}
+\begin{lstlisting}
+$ cd ~
+$ git clone linux.git
+$ cd linux
+$ git checkout -b linux-4.19.1 v4.19.1
+$ git archive --format=tar.gz \
+ --prefix=linux-4.19.1/ \
+ -o ../linux-4.19.1.tar.gz HEAD
+$ ARCH=arm make vexpress_defconfig
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Add a kernel recipe}
+\begin{lstlisting}
+$ cd ~/poky/meta-schulung
+$ mkdir -p recipes-bsp/linux-vanilla/files/vexpress
+$ mv ~/linux-4.19.1.tar.gz recipes-bsp/linux-vanilla/files
+$ cp ~/linux/.config recipes-bsp/linux-vanilla/files/vexpress/defconfig
+$ pluma recipes-bsp/linux-vanilla/linux-vanilla_4.19.1.bb
+\end{lstlisting}
+\begin{verbatim}
+SECTION = "kernel"
+DESCRIPTION = "Linux vanilla kernel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+inherit kernel
+COMPATIBLE_MACHINE_vexpress = "vexpress"
+KERNEL_DEVICETREE_vexpress = "vexpress-v2p-ca9.dtb"
+SRC_URI = "file://linux-${PV}.tar.gz file://defconfig"
+S = "${WORKDIR}/linux-${PV}"
+\end{verbatim}
+\end{frame}
+
+
+\begin{frame}[fragile]
+\frametitle{Use own kernel recipe}
+\begin{lstlisting}
+$ cd ~/poky/meta-schulung
+$ pluma conf/machine/vexpress.conf
+\end{lstlisting}
+\begin{verbatim}
+DEFAULTTUNE ?= "armv7athf-neon"
+require conf/machine/include/tune-cortexa8.inc
+SERIAL_CONSOLE = "115200 ttyAMA0"
+PREFERRED_PROVIDER_virtual/kernel = "linux-vanilla"
+\end{verbatim}
+\begin{lstlisting}
+$ cd ~/poky/build-schulung
+$ bitbake core-image-schulung
+\end{lstlisting}
+\end{frame}