From 7032a45ced955efc7d369b3ccf6491654d6549b0 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Tue, 17 May 2016 15:55:39 +0200
Subject: yocto-basics: split slides

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 distribution/yocto-basic/yocto-imgbuild2.tex | 265 +++++++++++++++++++++++++++
 1 file changed, 265 insertions(+)
 create mode 100644 distribution/yocto-basic/yocto-imgbuild2.tex

(limited to 'distribution/yocto-basic/yocto-imgbuild2.tex')

diff --git a/distribution/yocto-basic/yocto-imgbuild2.tex b/distribution/yocto-basic/yocto-imgbuild2.tex
new file mode 100644
index 0000000..b6a04bb
--- /dev/null
+++ b/distribution/yocto-basic/yocto-imgbuild2.tex
@@ -0,0 +1,265 @@
+\begin{frame}[fragile]
+\frametitle{start the image}
+\begin{verbatim}
+% runqemu qemux86 core-image-minimal
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/
+├── buildstats
+├── cache
+├── deploy
+├── log
+├── sstate-control
+├── stamps
+├── sysroots
+├── work
+└── work-shared
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/buildstats/core-image-minimal-qemux86/201408271416/
+├── acl-2.2.52-r0
+├── acl-native-2.2.52-r0
+├── alsa-lib-native-1.0.27.2-r0
+├── attr-2.4.47-r0
+├── attr-native-2.4.47-r0
+├── autoconf-native-2.69-r11
+...
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/buildstats/core-image-minimal-qemux86/201408271416/acl-2.2.52-r0/
+├── do_compile
+├── do_compile_ptest_base
+├── do_configure
+├── do_configure_ptest_base
+├── do_fetch
+├── do_install
+├── do_install_ptest_base
+├── do_package
+├── do_packagedata
+├── do_package_write_rpm
+├── do_patch
+├── do_populate_lic
+├── do_populate_sysroot
+└── do_unpack
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+408271416/acl-2.2.52-r0/do_unpack
+Event: TaskStarted
+Started: 1409143746.65
+acl-2.2.52-r0: do_unpack: Elapsed time: 0.22 seconds
+CPU usage: 7.1%
+EndIOinProgress: 0
+EndReadsComp: 973062
+EndReadsMerged: 543875573
+EndSectRead: 36860156
+EndSectWrite: 1158945211
+EndTimeIO: 30104972
+EndTimeReads: 5545878
+EndTimeWrite: 1455538600
+...
+StartWritesComp: 12202741
+Status: PASSED
+Ended: 1409143746.87
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/
+├── buildstats
+├── cache
+├── deploy
+├── log
+├── sstate-control
+├── stamps
+├── sysroots
+├── work
+└── work-shared
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/deploy/
+├── images
+│   └── qemux86
+│       ├── bzImage -> bzImage--3.14+git0+09424...
+│       ├── core-image-minimal-qemux86-20140827121546.rootfs.ext3
+│       ├── core-image-minimal-qemux86-20140827121546.rootfs.manifest
+│       ├── core-image-minimal-qemux86-20140827121546.rootfs.tar.bz2
+│       ├── core-image-minimal-qemux86.ext3 -> core-image...
+│       ├── ...
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/deploy/
+├── licenses
+│   ├── acl
+│   │   ├── COPYING
+│   │   ├── COPYING.LGPL
+│   │   ├── generic_GPLv2
+│   │   └── generic_LGPLv2.1
+│   ├── acl-native
+│   ├── alsa-lib-native
+│   ├── apr-native
+│   ├── ..
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+tmp/deploy/
+└── rpm
+    ├── all
+    │   ├── packagegroup-core-standalone-sdk-target-1.0-r8.all.rpm
+    │   ├── packagegroup-core-standalone-sdk-target-dbg-1.0-r8.all.rpm
+    │   ├── packagegroup-core-standalone-sdk-target-dev-1.0-r8.all.rpm
+    │   ├── repodata
+    │   ├── run-postinsts-1.0-r9.all.rpm
+    │   ├── ...
+    ├── i586
+    ├── qemux86
+    └── x86_64_nativesdk
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{inspect the build}
+\begin{verbatim}
+├── % cat sstate-control/manifest-<pn>.<task>
+|    /home/devel/poky/build/tmp/sysroots/x86_64-linux/usr/include/zconf.h
+|    /home/devel/poky/build/tmp/sysroots/x86_64-linux/usr/include/zlib.h
+|    /home/devel/poky/build/tmp/sysroots/x86_64-linux/usr/lib/libz.so.1
+\end{verbatim}
+\pause
+\begin{verbatim}
+├── sysroots  # for the differnet architectures
+\end{verbatim}
+\pause
+\begin{verbatim}
+├── work      # work directories / where the sources are built
+|     % ls tmp/work/qemux86-poky-linux/linux-yocto/3.14+gitAUTOINC+0942...
+|    deploy-linux-yocto  linux                         packages-split
+|    deploy-rpms         linux-qemux86-standard-build  pkgdata
+|    image               linux-yocto.spec              pseudo
+|    license-destdir     package                       sysroot-destdir
+|    temp
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{execute a specific task}
+\begin{verbatim}
+bitbake <recipe> -c <task>
+\end{verbatim}
+use
+\begin{verbatim}
+bitbake <recipe> -c listtasks
+\end{verbatim}
+to get a list of all available tasks
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build dependencies}
+dependency graphs (sucks because they're really huge)
+\begin{verbatim}
+bitbake -g <target>
+\end{verbatim}
+\pause
+it is better to use the dependency explorer
+\begin{verbatim}
+bitbake -g -u depexp <target>
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{developer shell}
+\begin{verbatim}
+bitbake <recipe> -c devshell
+\end{verbatim}
+use ./configure and make to debug build issues
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{cleanup}
+\begin{verbatim}
+% bitbake -c clean core-image-minimal
+\end{verbatim}
+\pause
+\begin{itemize}
+\item doesn't cleanup dependencies
+\item doesn't remove deployed files
+\item triggers repackaging of all packages
+\end{itemize}
+
+\vspace{2em}
+To start from scratch backup the conf directory
+and remove everything from build. Otherwise
+sstate-cache will be used.
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{cleanup}
+\begin{verbatim}
+% bitbake -c clean xserver-nodm-init
+\end{verbatim}
+\pause
+\begin{itemize}
+\item doesn't cleanup dependencies
+\item removes deployed files
+\item removes downloaded files
+\item removes data from work and sysroot directory
+\item doesn't remove data from sstate
+\item triggers restoring files from sstate-cache
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{cleanup}
+\begin{verbatim}
+% bitbake -c cleanall xserver-nodm-init
+\end{verbatim}
+\pause
+\begin{itemize}
+\item doesn't cleanup dependencies
+\item removes deployed files
+\item removes downloaded files
+\item removes data from work and sysroot directory
+\item removes data from sstate-cache
+\item triggers fetch, compilation and packaging of the component
+\item BUT changes will not be in the image
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{force recompilation}
+\begin{verbatim}
+% bitbake -f -c compile xserver-nodm-init
+\end{verbatim}
+\begin{itemize}
+\item changes are not in the image
+\item and not in the package
+\end{itemize}
+\end{frame}
-- 
cgit v1.2.3

