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-adt.tex | 193 +++++++++++++++++++++++++++++++++
 1 file changed, 193 insertions(+)
 create mode 100644 distribution/yocto-basic/yocto-adt.tex

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

diff --git a/distribution/yocto-basic/yocto-adt.tex b/distribution/yocto-basic/yocto-adt.tex
new file mode 100644
index 0000000..17d0733
--- /dev/null
+++ b/distribution/yocto-basic/yocto-adt.tex
@@ -0,0 +1,193 @@
+\subsection{ADT}
+\begin{frame}
+\frametitle{Yocto ADT (Application Development Kit}
+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 an external usable toolchain}
+\begin{verbatim}
+poky/build % bitbake meta-toolchain
+# OR to include headers and static version of all used libraries
+poky/build % bitbake -c populate_sdk core-image-minimal
+\end{verbatim}
+\vspace{2em}
+\pause
+to install the toolchain:
+\begin{verbatim}
+% ./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/devel/sdk/environment-setup-i586-poky-linux
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{export a nfsroot}
+\begin{verbatim}
+poky/build % runqemu-extract-sdk \
+tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2 \
+~/sdk/core-image-minimal
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build a internal usable toolchain}
+\begin{verbatim}
+poky/build % bitbake meta-ide-support
+\end{verbatim}
+\vspace{2em}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{build ADT installer script}
+\begin{verbatim}
+poky/build % bitbake adt-installer
+poky/build % cp tmp/deploy/sdk/adt_installer.tar.bz2 ~/
+poky/build % cd
+% cp tmp/deploy/sdk/adt_installer.tar.bz2 ~/
+% tar xjf adt_installer.tar.bz2
+% cd adt-installer
+\end{verbatim}
+\end{frame}
+
+\begin{frame}
+\frametitle{configure ADT installer}
+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'
+\item[YOCTOADT\_TARGETS] machine target architectures to setup cross SDKs
+\item[YOCTOADT\_QEMU] install qemu? \[Y/N\]
+\item[YOCTOADT\_NFS\_UTIL] needed for eclipse \[Y/N\]
+\end{description}
+\end{frame}
+
+\begin{frame}
+\frametitle{configure ADT installer \#2}
+configuration for each supported BSP
+\begin{description}
+\item[YOCTOADT\_TARGET\_MACHINE\_<arch>] qemu that should be used, e.g. qemux86
+\item[YOCTOADT\_ROOTFS\_<arch>] rfs images that should be used, e.g. sato-sdk
+\item[YOCTOADT\_TARGET\_SYSROOT\_<arch>] needs to match above variable
+\item[YOCTOADT\_TARGET\_SYSROOT\_LOC\_<arch>] path where the sysroot will be
+	stored
+\end{description}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{run ADT installer}
+\begin{verbatim}
+adt-installer % ./adt_installer
+Please enter the install location (default: /opt/poky/2.0): <return>
+...
+[ADT_INST] Please enter your selections here:
+S<return>
+...
+\end{verbatim}
+\pause
+to use the ADT, the environment needs to be sourced:
+\begin{verbatim}
+% .  /opt/poky/2.0/environment-setup-i586-poky-linux
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{ADT \& Eclipse}
+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
+% tar xzf eclipse-*.tar.gz
+% ./eclipse/eclipse
+\end{verbatim}
+\pause
+add the yocto update-site (Help, Install New Software, Add\dots)
+\begin{verbatim}
+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
+goto 'Help, Install New Software, Add\dots' again and
+select 'Kepler' as update site and select 'Linux Tools' and
+'Mobile and Device Development'; select 'Next' until you can
+'Finish' and quit eclipse
+\end{frame}
+
+\begin{frame}
+\frametitle{configure Eclipse}
+\begin{itemize}
+	\item select 'Window, Preferences, Yocto Project ADT'
+	\item select 'Standalone pre-built toolchain'
+	\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}
+
+\begin{frame}
+\frametitle{Hello World example}
+\begin{itemize}
+	\item select 'File, New, Project\dots'
+	\item select 'C/C++, C Project'
+	\item select 'Yocto Project ADT Autotools Project, Hello World ANSI C Project'
+	\item enter a 'Project name' and select 'Next'
+	\item enter 'Basic settings' and select 'Finish'
+	\item if opened, close the 'Welcome' window
+	\item right click on the root project folder and select 'Reconfigure Project'
+	\item right click on the root project folder and select 'Build Project'
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+\frametitle{remote execution and debugging}
+\begin{itemize}
+	\item switch to 'Remote System Explorer' perspective
+	\item create a new 'TCF' connection
+	\item switch to 'C/C++' perspective and select 'Run / Debug Configurations'
+	\item select the preconfigured 'C/C++ Application' and select the correct
+		'Connection'
+	\item set 'Remote Absolute File Path' to sth. like '/usr/bin/<yourapp>'
+	\item select 'Apply', 'Debug' - Next time you can use this preconfigured debug
+		configuration
+\end{itemize}
+\end{frame}
-- 
cgit v1.2.3

