summaryrefslogtreecommitdiff
path: root/distribution
diff options
context:
space:
mode:
authorManuel Traut <manut@linutronix.de>2014-08-27 18:36:40 +0200
committerManuel Traut <manut@linutronix.de>2014-08-27 18:36:40 +0200
commitb17a3f2746e818b92468823b8c5ec6a3dac36b33 (patch)
treead583b98ae94d46a811d3f71cefc852dded8dafb /distribution
parent40416bc39302eb0360af0d2073743a1cf4fc269a (diff)
extend yocto slides
Signed-off-by: Manuel Traut <manut@linutronix.de>
Diffstat (limited to 'distribution')
-rw-r--r--distribution/yocto-advanced/pres_yocto-advanced.tex33
-rw-r--r--distribution/yocto-basic/pres_yocto-basic.tex439
-rw-r--r--distribution/yocto-intro/pres_yocto-intro.tex27
3 files changed, 482 insertions, 17 deletions
diff --git a/distribution/yocto-advanced/pres_yocto-advanced.tex b/distribution/yocto-advanced/pres_yocto-advanced.tex
index ae229ef..84377f7 100644
--- a/distribution/yocto-advanced/pres_yocto-advanced.tex
+++ b/distribution/yocto-advanced/pres_yocto-advanced.tex
@@ -3,23 +3,25 @@
\title{YOCTO - Advanced}
\maketitle
+\subsection{Freescale}
\begin{frame}
-\frametitle{define a distribution}
+\frametitle{using meta-fsl}
bla
\end{frame}
-DISTRO\_FEATURES
-
+\subsection{TI}
\begin{frame}
-\frametitle{SDK generation}
+\frametitle{using meta-ti}
bla
\end{frame}
\begin{frame}
-\frametitle{SDK usage}
+\frametitle{define a distribution}
bla
\end{frame}
+DISTRO\_FEATURES
+
\begin{frame}
\frametitle{creating a layer}
bla
@@ -38,6 +40,22 @@ bla
use PR Service
+Package Groups
+•Package Group Recipe
+ DESCRIPTION = “My Package Group”
+ LICENSE = “MIT”
+ LIC_FILES_CHECKSUM = “file://<licfile>;md5=<chksum>
+ inherit packagegroup
+ PROVIDES = “${PACKAGES}”
+ PACKAGES = “packagegroup-mypkg-apps packagegroup-mypkg-tools”
+ RDEPENDS_packagegroup-mypkg-apps = “sqlite3 python-core python-sqlite3”
+ RDEPENDS_pacakgegroup-mypkg-tools = “sudo gzip tar”
+•Image Recipe
+ IMAGE_INSTALL = “packagegroup-core-boot packagegroup-mypkg-apps”
+ Inherit core-image
+
+
+
\begin{frame}
\frametitle{create bootable images for x86}
t.b.d.
@@ -129,4 +147,9 @@ PREFEREED\_PROVIDER\_virtual/kernel = "linux-yocto"
\end{itemize}
\end{frame}
+\begin{frame}
+\frametitle{Yocto \& ELBE combined}
+ bla
+\end{frame}
+
\input{tailpres}
diff --git a/distribution/yocto-basic/pres_yocto-basic.tex b/distribution/yocto-basic/pres_yocto-basic.tex
index 715cd9c..64a4c02 100644
--- a/distribution/yocto-basic/pres_yocto-basic.tex
+++ b/distribution/yocto-basic/pres_yocto-basic.tex
@@ -14,9 +14,8 @@
\item Tasks
\item Machines
\item Configuration
-\item Commands and Debug methods
-\item Boundary Sabrelite Imagebuild
-\item TI Beaglebone Black Imagebuild
+\item Images - generation \& debug methods
+\item SDK generation and usage
\end{itemize}
\end{frame}
@@ -84,6 +83,21 @@ layers should be grouped by functionality
\end{itemize}
\end{frame}
+\begin{frame}[fragile]
+ \frametitle{directory layout}
+ \begin{verbatim}
+poky
+├── bitbake
+├── documentation
+├── meta
+├── meta-selftest
+├── meta-skeleton
+├── meta-yocto
+├── meta-yocto-bsp
+└── scripts
+ \end{verbatim}
+\end{frame}
+
\subsection{Variable assignments}
\begin{frame}
\frametitle{available operators}
@@ -525,6 +539,7 @@ an append file must be named after the base package:
\begin{itemize}
\item are defined and ordered in classes
\item can be overriden by classes and recipes
+\end{itemize}
\end{frame}
\begin{frame}
@@ -618,7 +633,7 @@ an append file must be named after the base package:
\item [do\_cleanall] removes all output files, shared state cache, and
downloaded source files for a target
\pause
-\item [do\_cleanstate] removes all output files and shared state cache for a
+\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
@@ -812,21 +827,421 @@ that is used by the Board .conf file
bla
\end{frame}
-\subsection{Commands \& Debugging}
+\subsection{Images - generation \& debug methods}
\begin{frame}
-\frametitle{commands and debug methods}
-bla
+\frametitle{basics}
+\begin{itemize}
+\item images are constructed using the packages built earlier and put into the
+ Package Feeds
+\pause
+\item decisions of what to install on the image is based on the minimum
+ defined set of required components in an image recipe
+\pause
+\item this minimum set is then expanded based on dependencies to produce a
+ package solution
+\pause
+\item variety of formats (tar.bz2, ext2, ext3, jffs, \dots) are supported
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{prepare environment}
+\begin{itemize}
+\item bitbake is typically not installed into regular search paths
+\pause
+\item the environment of the bash is modified to find the commands
+\pause
+\item non-bash shells are not supported
+\end{itemize}
+\pause
+\begin{verbatim}
+% . ./oe-init-buildenv <builddir>
+\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}
+
+\begin{frame}[fragile]
+\frametitle{build a predefined image}
+\begin{verbatim}
+% bitbake core-image-minimal
+\end{verbatim}
+\end{frame}
+
+\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}
+tmp/
+...
+├── log/cooker/qemux86/20140827121546.log
+\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
+\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{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}
-\subsection{Freescale}
+\begin{frame}[fragile]
+\frametitle{execute a specific task}
+\begin{verbatim}
+bitbake <recipe> -c <task
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build dependencies}
+dependency graphs (sucks because they're really huge)
+\begin{verbatim}
+bitbake -g <target>
+\end{verbatim}
+\pause
+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{inspect builds using toaster}
+start toaster web application
+\begin{verbatim}
+poky/build % source toaster start
+\end{verbatim}
+\pause
+run bitbake
+
+\vspace{2em}
+\pause
+use 'http://localhost:8000' to browse through the build informations
+\pause
+\begin{verbatim}
+poky/build % source toaster stop
+\end{verbatim}
+is used to stop toaster (only one toaster per pc possible)
+\vspace{2em}
+\pause
+
+only actions between toaster start and stop are recorded
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{cleanup}
+\begin{verbatim}
+% bitbake -c 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}
+\pause
+To start from scratch backup the conf directory
+and remove everything from build.
+\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 nothing, files from sstate are used
+\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
+\item triggers fetch, compilation and packaging of the component
+\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}
+
+\subsection{SDK generatrion \& usage}
\begin{frame}
-\frametitle{using meta-fsl}
-bla
+\frametitle{Yocto ADT}
+Core Components
+\vspace{2em}
+\begin{itemize}
+\item System Root
+\item QEMU Emulator
+\item Cross Development Toolchain
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Yocto ADT}
+Eclipse Plugin
+\vspace{2em}
+\begin{itemize}
+\item Roundtrip Application Development
+\item Toolchain/System Root Integration
+\item Emulated and Hardware Targets
+\item Application Templates
+\item On-target Debugging
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{Yocto ADT}
+Profiling Tools
+\vspace{2em}
+\begin{itemize}
+\item LatencyTOP
+\item PowerTOP
+\item OProfile
+\item Perf
+\item SystemTap
+\item Lttng-ust
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build a toolchain}
+\begin{verbatim}
+poky/build % bitbake meta-toolchain
+\end{verbatim}
+\vspace{2em}
+tmp/deploy/sdk/poky-eglibc-x86\_64-meta-toolchain-i586-toolchain-1.6.1.sh
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build adt installer}
+\begin{verbatim}
+poky/build % bitbake adt-installer
+\end{verbatim}
+\vspace{2em}
+tmp/deploy/sdk/adt\_installer.tar.bz2
\end{frame}
-\subsection{TI}
\begin{frame}
-\frametitle{using meta-ti}
+\frametitle{SDK usage}
bla
\end{frame}
diff --git a/distribution/yocto-intro/pres_yocto-intro.tex b/distribution/yocto-intro/pres_yocto-intro.tex
index c7d30e9..c51f334 100644
--- a/distribution/yocto-intro/pres_yocto-intro.tex
+++ b/distribution/yocto-intro/pres_yocto-intro.tex
@@ -4,6 +4,33 @@
\maketitle
\begin{frame}
+\frametitle{Agenda}
+\begin{itemize}
+ \item Intro
+ \begin{itemize}
+ \item What is Yocto?
+ \item History
+ \item Yocto compared with other methods
+ \end{itemize}
+ \pause
+ \item Basics
+ \begin{itemize}
+ \item Understand the workflow
+ \item Build predefined images / SDKs
+ \item Inspect / Debug builds
+ \end{itemize}
+ \pause
+ \item Advanced
+ \begin{itemize}
+ \item Using BSP layers (fsl/ti)
+ \item Create layers \& recipes
+ \item Create images
+ \item Yocto \& ELBE combined
+ \end{itemize}
+\end{itemize}
+\end{frame}
+
+\begin{frame}
\frametitle{Yocto is \dots}
\begin{itemize}
\item an Ecosystem (not a single open-source project)