From 8a80c5e9576263f1e262d7adb2b4aa4d6966b78f Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Fri, 22 Jan 2016 16:28:30 +0100
Subject: improve ordering of yocto basic slides

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 distribution/yocto-basic/pres_yocto-basic.tex | 179 ++++----------------------
 1 file changed, 25 insertions(+), 154 deletions(-)

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

diff --git a/distribution/yocto-basic/pres_yocto-basic.tex b/distribution/yocto-basic/pres_yocto-basic.tex
index e5b7129..77b17fc 100644
--- a/distribution/yocto-basic/pres_yocto-basic.tex
+++ b/distribution/yocto-basic/pres_yocto-basic.tex
@@ -30,10 +30,6 @@
 % cd poky
 % git checkout origin/jethro -b jethro -t
 \end{verbatim}
-\begin{itemize}
-\item is used to modify the environment and change the CWD to <builddir>
-\item ./oe-init-buildenv-memres is used to keep the bitbake-server running
-\end{itemize}
 \end{frame}
 
 
@@ -401,13 +397,9 @@ $ bitbake -e <recipe-name> | grep FILESPATH
 	\item patches are applied in the order they appear in SRC\_URI
 	\item quilt is used to apply the patches
 \end{itemize}
-\pause
-standard options
 \begin{description}
 \item[apply=no] apply patch or not; default is yes
-\pause
 \item[striplevel=0] striplevel to use when applying a patch; default is 1
-\pause
 \item[patchdir=\${S}/foo] directory in which the patch should be applied;
  default is \${S}
 \end{description}
@@ -415,7 +407,6 @@ standard options
 
 \begin{frame}
 \frametitle{SRC\_URI patch options \#2}
-specific options
 \begin{description}
 \item[mindate] apply patch only if SRCDATE
  \footnote{The date of the source code used to build the package.
@@ -507,16 +498,11 @@ an append file must be named after the base package:
 	\frametitle{download \& patch}
 \begin{description}
 \item [do\_checkuri] validates the SRC\_URI value
-\pause
 \item [do\_checkuriall] validates the SRC\_URI value for all recipes required
 	to build a target"
-\pause
 \item [do\_fetch] fetches the source code
-\pause
 \item [do\_fetchall] fetches all remote sources required to build a target
-\pause
 \item [do\_unpack] unpacks the source code into a working directory
-\pause
 \item [do\_patch] locates patch files and applies them to the source code
 \end{description}
 \end{frame}
@@ -526,15 +512,11 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_configure] configures the source by enabling and disabling any
 	build-time and configuration options for the software being built
-\pause
 \item [do\_configure\_ptest\_base] configures the runtime test suite included
 	in the software being built
-\pause
 \item [do\_compile] compiles the source in the compilation directory
-\pause
 \item [do\_install] copies files from the compilation directory to a holding
 	area
-\pause
 \item [do\_populate\_sysroot] copies a subset of files installed by
 	do\_install into the sysroot in order to make them available to other
 	recipes
@@ -546,25 +528,18 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_packagedata] creates package metadata used by the build system to
 	generate the final packages
-\pause
 \item [do\_package] analyzes the content of the holding area and splits it
 	into subsets based on available packages and files
-\pause
 \item [do\_package\_write] creates the actual packages and places them in the
 	Package Feed area
-\pause
 \item [do\_package\_write\_deb] creates the actual DEB packages and places
 	them in the Package Feed area
-\pause
 \item [do\_package\_write\_ipk] creates the actual IPK packages and places
 	them in the Package Feed area
-\pause
 \item [do\_package\_write\_rpm] creates the actual RPM packages and places
 	them in the Package Feed area
-\pause
 \item [do\_package\_write\_tar] creates tar archives for packages and places
 	them in the Package Feed area
-\pause
 \item [do\_package\_index] creates or updates the index in the Package Feed
 	area
 \end{description}
@@ -575,12 +550,9 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_rootfs] creates the root filesystem (file and directory structure)
 	for an image
-\pause
 \item [do\_vmdkimg] creates a .vmdk image for use with VMware and compatible
 	virtual machine hosts"
-\pause
 \item [do\_deploy] writes deployable output files to the deploy directory
-\pause
 \item [do\_populate\_sdk] creates the file and directory structure for an
 	installable SDK
 \end{description}
@@ -590,16 +562,12 @@ an append file must be named after the base package:
 \frametitle{cleanup}
 \begin{description}
 \item [do\_clean] removes all output files for a target
-\pause
 \item [do\_cleanall] removes all output files, shared state cache, and
 	downloaded source files for a target
-\pause
 \item [do\_cleansstate] removes all output files and shared state cache for a
 	target
-\pause
 \item [do\_rm\_work] removes work files after the build system has finished
 	with them
-\pause
 \item [do\_rm\_work\_all] top-level task for removing work files after the
 	build system has finished with them
 \end{description}
@@ -610,24 +578,17 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_kernel\_checkout] checks out source/meta branches for a linux-yocto
 	style kernel
-\pause
 \item [do\_validate\_branches] ensures that the source/meta branches are on
 	the locations specified by their SRCREV values for a linux-yocto style
 	kernel"
-\pause
 \item [do\_kernel\_configme] assembles the kernel configuration for a
 	linux-yocto style kernel
-\pause
 \item [do\_menuconfig] runs 'make menuconfig' for the kernel
-\pause
 \item [do\_diffconfig] compares the old and new config files after running
 	do\_menuconfig for the kernel
-\pause
 \item [do\_savedefconfig] creates a minimal Linux kernel configuration file
-\pause
 \item [do\_kernel\_configcheck] validates the kernel configuration for a
 	linux-yocto style kernel
-\pause
 \item [do\_sizecheck] checks the size of the kernel image against
 	KERNEL\_IMAGE\_MAXSIZE (if set)
 \end{description}
@@ -638,12 +599,9 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_compile\_kernelmodules] compiles loadable modules for the Linux
 	kernel
-\pause
 \item [do\_strip] strips unneeded sections out of the Linux kernel image
-\pause
 \item [do\_kernel\_link\_vmlinux] creates a symbolic link in arch/\$arch/boot
 	for vmlinux kernel images
-\pause
 \item [do\_bundle\_initramfs] combines an initial ramdisk image and kernel
 	together to form a single image
 \end{description}
@@ -654,7 +612,6 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_populate\_lic] writes license information for the recipe that is
 	collected later when the image is constructed
-\pause
 \item [do\_spdx] a build stage that takes the source code and scans it on a
 	remote FOSSOLOGY server in order to produce an SPDX document
 \end{description}
@@ -665,13 +622,10 @@ an append file must be named after the base package:
 \begin{description}
 \item [do\_uboot\_mkimage] creates a uImage file from the kernel for the
 	U-Boot bootloader
-\pause
 \item [do\_generate\_qt\_config\_file] writes a qt.conf file for building a
 	Qt-based application
-\pause
 \item [do\_devshell] starts a shell with the environment set up for
 	development/debugging
-\pause
 \item [do\_listtasks] lists all defined tasks for a target
 \end{description}
 \end{frame}
@@ -682,12 +636,9 @@ an append file must be named after the base package:
 a machine config is used to describe a board
 \begin{itemize}
 	\item machine configs are stored in the layers: conf/machine/*
-\pause
 	\item settings can be splitted in different include *.inc files
-\pause
 	\item e.g. one include for CPU that is used by the SoC inc file,
 that is used by the Board .conf file
-\pause
 	\item the include files can be stored in different layers
 \end{itemize}
 \end{frame}
@@ -697,15 +648,10 @@ that is used by the Board .conf file
 \begin{description}
 	\item [UBOOT\_MACHINE] value passed on the make command line when building a
 		U-Boot image
-\pause
 	\item [UBOOT\_MAKE\_TARGET] target called in the Makefile
-\pause
 	\item [UBOOT\_ENTRYPOINT] entry point for the U-Boot image
-\pause
 	\item [PREFERRED\_PROVIDER\_virtual/kernel] default kernel
-\pause
 	\item [KERNEL\_DEVICETREE] default devicetree
-\pause
 	\item [KERNEL\_IMAGETYPE] type of kernel to build for a device,
 		defaults to 'zImage'
 \end{description}
@@ -716,21 +662,17 @@ that is used by the Board .conf file
 \begin{description}
 	\item[SOC\_FAMILY] groups together machines based upon the same family of SOC
 		(System On Chip)
-\pause
 	\item [MACHINEOVERRIDES] lists overrides specific to the current machine.
 		By default, this list includes the value of MACHINE. This can be used in
 		recipes; e.g. MACHINEOVERRIDES =. "mymachine" and in the recipe
 		SRC\_URI\_append\_mymachine = "file://mymachine-quirk.patch"
-\pause
 	\item [MACHINE\_FEATURES] list of hardware features the MACHINE supports
 		\footnote{acpi, alsa, apm, bluetooth, ext2, irda, keyboard, pci, pcmcia,
 		screen, serial, touchscreen, usbgadget, usbhost, wifi}
-\pause
 	\item [MACHINE\_EXTRA\_RRECOMMENDS] list of machine-specific packages to
 		install as part of the image being built that are not essential for booting
 		the machine. The image being built has no build dependencies on the packages
 		in this list.
-\pause
 \item [SERIAL\_CONSOLE] speed and device for the serial port used to attach
 		the serial console. This variable is given to the kernel as the 'console'
 		parameter. After booting occurs, getty is started on that port so remote
@@ -742,11 +684,8 @@ that is used by the Board .conf file
 \frametitle{compiler settings}
 \begin{description}
 \item [DEFAULTTUNE] e.g. armv6hf or cortexa8hf-neon, x86-64, \dots
-\pause
 \item [TUNE\_FEATURES] e.g. "armv7a vfp neon"
-\pause
 \item [TUNEVALID] Descriptions, stored as flags, of valid tuning features
-\pause
 \item [TUNECONFLICTS] list of conflicting features for a given feature
 \end{description}
 \end{frame}
@@ -755,11 +694,8 @@ that is used by the Board .conf file
 \frametitle{software}
 \begin{description}
 \item [PREFERRED\_VERSION\_xserver-xorg] compatible xserver version
-\pause
 \item [PREFERRED\_PROVIDER\_virtual/kernel] recommended kernel
-\pause
 \item [IMAGE\_FSTYPES] formats for the rootfs, e.g. "ext3 tar.bz2"
-\pause
 \item [IMAGE\_CLASSES] list of classes that all images should inherit, default
 		is image\_types, e.g. to hook in own image generation code
 \end{description}
@@ -943,20 +879,13 @@ tmp/deploy/
 \begin{frame}[fragile]
 \frametitle{inspect the build}
 \begin{verbatim}
-tmp/
-...
-├── log/cooker/qemux86/20140827121546.log
+├── % 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}
-├── sstate-control/manifest-<pn>.<task>
-|    /home/local/src/poky/build2/tmp/sysroots/x86_64-linux/usr/include/zconf.h
-|    /home/local/src/poky/build2/tmp/sysroots/x86_64-linux/usr/include/zlib.h
-|    /home/local/src/poky/build2/tmp/sysroots/x86_64-linux/usr/lib/libz.so.1
-\end{verbatim}
-\pause
-\begin{verbatim}
-├── stamps    # cache files
 ├── sysroots  # for the differnet architectures
 \end{verbatim}
 \pause
@@ -971,28 +900,6 @@ tmp/
 \end{verbatim}
 \end{frame}
 
-\begin{frame}[fragile]
-\frametitle{inspect the build}
-\begin{verbatim}
-tmp/
-└── work-shared
-\end{verbatim}
-For efficiency, the OpenEmbedded build system creates and uses this directory
-to hold recipes that share a work directory with other recipes.
-
-
-\vspace{2em}
-In practice, this is only used for gcc and its variants.
-\end{frame}
-
-\begin{frame}[fragile]
-\frametitle{inspect the build}
-\begin{verbatim}
-downloads/
-\end{verbatim}
-all fetched source tarballs
-\end{frame}
-
 \begin{frame}[fragile]
 \frametitle{execute a specific task}
 \begin{verbatim}
@@ -1012,7 +919,7 @@ dependency graphs (sucks because they're really huge)
 bitbake -g <target>
 \end{verbatim}
 \pause
-dependency explorer
+it is better to use the dependency explorer
 \begin{verbatim}
 bitbake -g -u depexp <target>
 \end{verbatim}
@@ -1039,9 +946,9 @@ use ./configure and make to debug build issues
 \end{itemize}
 
 \vspace{2em}
-\pause
 To start from scratch backup the conf directory
-and remove everything from build.
+and remove everything from build. Otherwise
+sstate-cache will be used.
 \end{frame}
 
 \begin{frame}[fragile]
@@ -1056,7 +963,7 @@ and remove everything from build.
 \item removes downloaded files
 \item removes data from work and sysroot directory
 \item doesn't remove data from sstate
-\item triggers nothing, files from sstate are used
+\item triggers restoring files from sstate-cache
 \end{itemize}
 \end{frame}
 
@@ -1071,8 +978,9 @@ and remove everything from build.
 \item removes deployed files
 \item removes downloaded files
 \item removes data from work and sysroot directory
-\item removes data from sstate
+\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}
 
@@ -1127,7 +1035,7 @@ Profiling Tools
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{build a external usable toolchain}
+\frametitle{build an external usable toolchain}
 \begin{verbatim}
 poky/build % bitbake meta-toolchain
 # OR to include headers and static version of all used libraries
@@ -1137,31 +1045,31 @@ poky/build % bitbake -c populate_sdk core-image-minimal
 \pause
 to install the toolchain:
 \begin{verbatim}
-% ./tmp/deploy/sdk/poky-eglibc-x86\_64-meta-toolchain-i586-toolchain-2.0.sh
+% ./tmp/deploy/sdk/poky-glibc-x86\_64-meta-toolchain-i586-toolchain-2.0.sh
 Enter target directory for SDK (default: /opt/poky/2.0): /home/devel/sdk
 \end{verbatim}
 \pause
 to use the toolchain:
 \begin{verbatim}
-source /home/local/sdk/environment-setup-i586-poky-linux
+source /home/devel/sdk/environment-setup-i586-poky-linux
 \end{verbatim}
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{build a internal usable toolchain}
+\frametitle{export a nfsroot}
 \begin{verbatim}
-poky/build % bitbake meta-ide-support
+poky/build % runqemu-extract-sdk \
+tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2 \
+~/sdk/core-image-minimal
 \end{verbatim}
-\vspace{2em}
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{export a nfsroot}
+\frametitle{build a internal usable toolchain}
 \begin{verbatim}
-poky/build % runqemu-extract-sdk \
-tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2 \
-~/sdk/core-image-minimal
+poky/build % bitbake meta-ide-support
 \end{verbatim}
+\vspace{2em}
 \end{frame}
 
 \begin{frame}[fragile]
@@ -1182,11 +1090,8 @@ general configuration
 \begin{description}
 \item[YOCTOADT\_REPO] http repo with rootfs images and ipkg packages.
 	Needs to match the layout from 'http://adtrepo.yoctoproject.org'
-\pause
 \item[YOCTOADT\_TARGETS] machine target architectures to setup cross SDKs
-\pause
 \item[YOCTOADT\_QEMU] install qemu? \[Y/N\]
-\pause
 \item[YOCTOADT\_NFS\_UTIL] needed for eclipse \[Y/N\]
 \end{description}
 \end{frame}
@@ -1196,11 +1101,8 @@ general configuration
 configuration for each supported BSP
 \begin{description}
 \item[YOCTOADT\_TARGET\_MACHINE\_<arch>] qemu that should be used, e.g. qemux86
-\pause
 \item[YOCTOADT\_ROOTFS\_<arch>] rfs images that should be used, e.g. sato-sdk
-\pause
 \item[YOCTOADT\_TARGET\_SYSROOT\_<arch>] needs to match above variable
-\pause
 \item[YOCTOADT\_TARGET\_SYSROOT\_LOC\_<arch>] path where the sysroot will be
 	stored
 \end{description}
@@ -1225,10 +1127,6 @@ to use the ADT, the environment needs to be sourced:
 
 \begin{frame}[fragile]
 \frametitle{ADT \& Eclipse}
-only supported eclipse releases: kepler \& juno
-
-
-\vspace{2em}
 install and start eclipse:
 \begin{verbatim}
 % wget http://ftp.fau.de/eclipse/technology/epp/downloads/release/kepler/R/eclipse-cpp-kepler-R-linux-gtk.tar.gz
@@ -1238,9 +1136,10 @@ install and start eclipse:
 \pause
 add the yocto update-site (Help, Install New Software, Add\dots)
 \begin{verbatim}
-http://downloads.yoctoproject.org/releases/eclipse-plugin/2.0/kepler/
+http://downloads.yoctoproject.org/releases/eclipse-plugin/1.9/kepler/
 \end{verbatim}
 select and install all components, by clicking
+
 'Next, Next, Accept Licenses, Finish, Accept installing from insecure source,
 and accept to restart eclipse'
 \pause
@@ -1255,11 +1154,9 @@ select 'Kepler' as update site and select 'Linux Tools' and
 \begin{itemize}
 	\item select 'Window, Preferences, Yocto Project ADT'
 	\item select 'Standalone pre-built toolchain'
-	\item set Toolchain Root Location '/home/devel/src/poky/build'
-	\item set Sysroot Location '/home/devel/poky/build/tmp/sysroots/qemux86'
-	\item use 'QEMU' as 'Target Options'
-	\item set Kernel to
-		'/home/devel/adt-installer/download\_image/bzImage-qemux86.bin'
+	\item set Toolchain Root Location '/home/devel/sdk'
+	\item set Sysroot Location '/home/devel/sdk/core-image-minimal'
+	\item use 'native' as 'Target Options'
 	\item 'Apply' the Settings and close the dialog with 'OK'
 \end{itemize}
 \end{frame}
@@ -1278,41 +1175,15 @@ select 'Kepler' as update site and select 'Linux Tools' and
 \end{itemize}
 \end{frame}
 
-\begin{frame}[fragile]
-\frametitle{start qemu}
-\begin{itemize}
-	\item select 'Run, External Tools, External Tools Configurations\dots'
-	\item select 'Program, qemu\_i586-poky'
-	\item edit the arguments that they match:
-\begin{verbatim}
--e "source /opt/poky/2.0/environment-setup-i586-poky-
-linux;runqemu qemux86 /home/local/adt-installer/download_image/
-bzImage-qemux86.bin /home/local/sdk/core-image-minimal ;bash"
-\end{verbatim}
-	\item select 'Apply, Run'
-\end{itemize}
-Attention! This starts a NFS Server on a user port that listens on all network
-interfaces of the PC
-\end{frame}
-
 \begin{frame}
 \frametitle{remote execution and debugging}
 \begin{itemize}
 	\item switch to 'Remote System Explorer' perspective
-	\pause
 	\item create a new 'TCF' connection
-	\pause
 	\item switch to 'C/C++' perspective and select 'Run / Debug Configurations'
-	\pause
 	\item select the preconfigured 'C/C++ Application' and select the correct
 		'Connection'
-	\pause
 	\item set 'Remote Absolute File Path' to sth. like '/usr/bin/<yourapp>'
-	\pause
-	\item select the 'Debugger' tab and set 'gdb' to the deugger of your
-		toolchain; e.g.
-		'/home/devel/poky/build/tmp/sysroots/x86\_64-linux/usr/bin/i586-poky-linux-none/i586-poky-linux-gnueabi-gdb'
-	\pause
 	\item select 'Apply', 'Debug' - Next time you can use this preconfigured debug
 		configuration
 \end{itemize}
-- 
cgit v1.2.3

