[FE training-materials-updates] yocto: slides: add parts on devtool and quilt

Antoine Ténart antoine.tenart at free-electrons.com
Wed Sep 7 16:51:21 CEST 2016


Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=22e7bf04c9c45ef414a302975d79ec04c38cd6b7

>---------------------------------------------------------------

commit 22e7bf04c9c45ef414a302975d79ec04c38cd6b7
Author: Antoine Tenart <antoine.tenart at free-electrons.com>
Date:   Wed Sep 7 15:57:25 2016 +0200

    yocto: slides: add parts on devtool and quilt
    
    Signed-off-by: Antoine Tenart <antoine.tenart at free-electrons.com>


>---------------------------------------------------------------

22e7bf04c9c45ef414a302975d79ec04c38cd6b7
 slides/yocto-sdk/yocto-sdk.tex | 136 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 126 insertions(+), 10 deletions(-)

diff --git a/slides/yocto-sdk/yocto-sdk.tex b/slides/yocto-sdk/yocto-sdk.tex
index c672876..e1b5bd2 100644
--- a/slides/yocto-sdk/yocto-sdk.tex
+++ b/slides/yocto-sdk/yocto-sdk.tex
@@ -1,6 +1,22 @@
-\section{Creating and using an SDK}
+\section{Application development workflow}
 
-\subsection{Introduction to the SDK}
+\begin{frame}
+  \frametitle{Recommended workflows}
+  \begin{itemize}
+    \item Different development workflows are possible given the
+      needs:
+      \begin{itemize}
+        \item Low-level application development (bootloader, kernel).
+        \item Application development.
+        \item Temporary modifications on an external project (bug
+          fixes, security fixes).
+      \end{itemize}
+    \item Three workflows exists for theses needs: the \code{SDK},
+      \code{devtool} and \code{quilt}.
+  \end{itemize}
+\end{frame}
+
+\subsection{The Yocto Project SDK}
 
 \begin{frame}
   \frametitle{Overview}
@@ -40,7 +56,7 @@
 \end{frame}
 
 \begin{frame}
-  \frametitle{The Poky SDK}
+  \frametitle{The Yocto Project SDK}
   \begin{itemize}
     \item The Poky reference system is used to generate images, by
       building many applications and doing a lot configuration work.
@@ -49,9 +65,9 @@
           application itself.
         \item We want to be able to develop, test and debug easily.
       \end{itemize}
-    \item The Poky SDK is an application development SDK, which can be
-      generated to provide a full environment compatible with the
-      target.
+    \item The Yocto Project SDK is an application development SDK,
+      which can be generated to provide a full environment compatible
+      with the target.
     \item It includes a toolchain, libraries headers and all the
       needed tools.
     \item This SDK can be installed on any computer and is
@@ -60,8 +76,6 @@
   \end{itemize}
 \end{frame}
 
-\subsection{Generating an SDK}
-
 \begin{frame}
   \frametitle{Available SDKs}
   \begin{itemize}
@@ -138,8 +152,6 @@
   \end{itemize}
 \end{frame}
 
-\subsection{Use the SDK}
-
 \begin{frame}[fragile]
   \frametitle{SDK format}
   \begin{itemize}
@@ -243,3 +255,107 @@ $ make
       \end{itemize}
   \end{itemize}
 \end{frame}
+
+\subsection{Devtool}
+
+\begin{frame}
+  \frametitle{Overview}
+  \begin{itemize}
+    \item \code{Devtool} is a set of utilities to ease the integration
+    and the development of OpenEmbedded recipes.
+    \item It can be used to:
+      \begin{itemize}
+        \item Generate a recipe for a given upstream package.
+        \item Modify an existing recipe and its package sources.
+        \item Upgrade an existing recipe to use a newer upstream
+          package.
+      \end{itemize}
+    \item \code{Devtool} adds a new layer, automatically managed, in
+      \code{$BUILDDIR/workspace/}.
+    \item It then adds or appends recipes to this layer so that the
+      recipes point to a local path for their sources. In
+      \code{$BUILDDIR/workspace/sources/}.
+      \begin{itemize}
+        \item Local sources are managed by \code{git}.
+        \item All modifications made locally should be commited.
+      \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{\code{devtool} usage 1/3}
+  There are three ways of creating a new \code{devtool} project:
+  \begin{itemize}
+    \item To create a new recipe:
+      \code{devtool add <recipe> <fetchuri>}
+      \begin{itemize}
+        \item Where \code{recipe} is the recipe's name.
+        \item \code{fetchuri} can be a local path or a remote {\em
+          uri}.
+      \end{itemize}
+    \item To modify an existing recipe: \code{devtool modify <recipe>}
+    \item To upgrade a given recipe:
+      \code{devtool upgrade -V <version> <recipe>}
+      \begin{itemize}
+        \item Where \code{version} is the new version of the upstream
+          package.
+      \end{itemize}
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{\code{devtool} usage 2/3}
+  Once a \code{devtool} project is started, commands can be issued:
+  \begin{itemize}
+    \item \code{devtool edit <recipe>}: edit \code{recipe} in a text
+      editor (as defined by the \code{EDITOR} environment variable).
+    \item \code{devtool build <recipe>}: build the given
+      \code{recipe}.
+    \item \code{devtool build-image <image>}: build \code{image} with
+      the additional \code{devtool} recipes' packages.
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{\code{devtool} usage 3/3}
+  \begin{itemize}
+    \item \code{devtool deploy-target <recipe> <target>}: upload the
+      \code{recipe}'s package on \code{target}, which is a live
+      running target with an SSH server running (\code{user at address}).
+    \item \code{devtool update-recipe <recipe>}: generate patches from
+      git commits made locally.
+    \item \code{devtool reset <recipe>}: remove \code{recipe} from the
+      control of \code{devtool}. Standard layers and remote sources
+      are used again as usual.
+  \end{itemize}
+\end{frame}
+
+\subsection{Quilt}
+
+\begin{frame}
+  \frametitle{Overview}
+  \begin{itemize}
+    \item Quilt is an utility to manage patches which can be used
+      without having a clean source tree.
+    \item It can be used to create patches for packages already
+      available in the build system.
+    \item Be careful when using this workflow: the modifications won't
+      persist across builds!
+  \end{itemize}
+\end{frame}
+
+\begin{frame}
+  \frametitle{Using Quilt}
+  \begin{enumerate}
+    \item Find the recipe working directory in
+      \code{$BUILDDIR/tmp/work/}.
+    \item Create a new \code{Quilt} patch:
+      \code{$ quilt new topic.patch}
+    \item Add files to this patch: \code{$ quilt add file0.c file1.c}
+    \item Make the modifications by editing the files.
+    \item Test the modifications:
+      \code{$ bitbake -c compile -f package}
+    \item Generate the patch file: \code{$ quilt refresh}
+    \item Move the generated patch into the recipe's directory.
+  \end{enumerate}
+\end{frame}




More information about the training-materials-updates mailing list