From 5943fbf9f9b0ed3aaf4c4a1a008320d5a170be5e Mon Sep 17 00:00:00 2001 From: Jan Altenberg Date: Fri, 25 Jan 2013 17:35:35 +0100 Subject: Initial version of ELBE usage slides --- distribution/elbe-usage/pres_elbe-usage_en.tex | 423 +++++++++++++++++++++++++ images/elbe-process.png | Bin 0 -> 37051 bytes images/emu-process.png | Bin 0 -> 11200 bytes 3 files changed, 423 insertions(+) create mode 100644 images/elbe-process.png create mode 100644 images/emu-process.png diff --git a/distribution/elbe-usage/pres_elbe-usage_en.tex b/distribution/elbe-usage/pres_elbe-usage_en.tex index 01ffda8..be63d54 100644 --- a/distribution/elbe-usage/pres_elbe-usage_en.tex +++ b/distribution/elbe-usage/pres_elbe-usage_en.tex @@ -7,6 +7,429 @@ \begin{frame} \frametitle{What is ELBE?} +ELBE is a Debian based system to generate root-filesystems for embedded devices \end{frame} +\begin{frame}[fragile] +\frametitle{How to install ELBE} +\begin{verbatim} +# On a Debian based system +$ echo 'deb http://debian.linutronix.de/elbe \ +squeeze main' >> /etc/apt/sources.list +$ aptitude install elbe +\end{verbatim} +Or get the latest source from github: +\begin{verbatim} +git clone https://github.com/Linutronix/elbe.git +\end{verbatim} +\end{frame} + +\begin{frame} +\frametitle{ELBE: Overview} +\begin{itemize} +\item The Elbe system consists of the program elbe which is implemented in Python +\item Similar to git, it can be called with several sub commands +\item An Elbe project consists of an xml file that describes the project +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{ELBE: Documentation} +\begin{itemize} +\item Have a look at /usr/share/doc/elbe/ +\item Please read /usr/share/doc/elbe/elbeoverview-en.html +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{How ELBE works} +\begin{figure}[h] +\centering +\includegraphics[width=10cm]{images/elbe-process.png} +\end{figure} +\end{frame} + +\begin{frame} +\frametitle{How ELBE works} +\begin{figure}[h] +\centering +\includegraphics[width=10cm]{images/emu-process.png} +\end{figure} +\end{frame} + +\begin{frame} +\frametitle{The ELBE workflow} +\begin{enumerate} +\item Create an XML file +\item Create a project based on that XML file +\item Change to the project directory an run make +\end{enumerate} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE: command overview} +Create a new project: +\begin{verbatim} +elbe create \ + --directory /home/user/example example.xml +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE: start build} +\begin{verbatim} +cd /home/user/example +# Note: the next step might take a while +make +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE: Using the VM} +\begin{verbatim} +cd /home/user/example +make run +# or (without graphics) +make run-con +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format} +/usr/share/doc/elbe/examples/ contains a couple of examples: +\begin{verbatim} +$ ls -1 /usr/share/doc/elbe/examples/ +amd64-example.xml +arm-complex-example.xml.gz +arm-example.xml +i386-example.xml +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: Project setup} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + + ARMexample + 08.15 +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: Project setup} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + +... + + debian.tu-bs.de + /debian + http + + + http://debian.linutronix.de/elbe squeeze main + + + +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: Project setup} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + +... + + squeeze +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: Project setup} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + +... + + armel + 20G + 256 + qemu-system-arm + testrd + ttyAMA0,115200n1 + versatilepb + + smc91c111 + de:ad:be:ef:be:05 + + + + tcp + 22 + 5022 + + + + + +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: Defining a target} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + + myARM + tec.linutronix.de + foo + ttyS0,115200 + + + nfsroot.tar.gz + + + + + + build-essential + bash + less + git + debhelper + nfs-common + openssh-server + + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: finetuning} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + +... + + /usr/share/doc + /var_ro + /my/name/on/target + +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{The ELBE XML format: finetuning} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + +... + + cp /etc/passwd etc/ + +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame} +\frametitle{ELBE modes} +\begin{itemize} +\item default +\item norecommend (can be combined with any of the other modes): Don't install recommended packages +\item setsel: The resulting image will just contain dpkg. This mode offers a finegrained control on which packages should be installed +\item diet: Only copy files referenced in the package management. Only use this for small and simple root filesystems! +\end{itemize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE modes: Example} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + +... + + + + + bash + +... + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE command overview: elbe-setsel} +\begin{enumerate} +\item Create package list: +\begin{verbatim} +dpkg --get-selections > selections.list +\end{verbatim} +\item Import the package list to your xml file: +\begin{verbatim} +elbe setsel selections.list +\end{verbatim} +\end{enumerate} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Using a CDROM} +\begin{itemize} +\item Each ELBE build will create a CD-ROM image with the package (which have been used for the installation): install.iso +\item You can use this ISO image for future builds: +\begin{verbatim} + +/home/user/elbe-exmpl/install.iso + +\end{verbatim} +\item You can also use the elbe-setcdrom command +\end{itemize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE command overview: elbe-setcdrom} +\begin{verbatim} +$ elbe setcdrom mysqueeze.xml elbe-cd.iso +\end{verbatim} +This command removes all configured mirrors and additional urls from the XML file and sets the given ISO image as the only mirror. +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE command overview: elbe-chg\_archive} +It is possible to include an archive into the xml file, that is unpacked into the target root-filesystem after the finetuning step: +\begin{verbatim} +elbe chg_archive archive.tar.bz2 +\end{verbatim} +NOTE: The file must be a bzip2 compressed tar (.tar.bz2) +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE command overview: elbe-get\_archive} +It is also possible to extract an archive from an XML file: +\begin{verbatim} +elbe get_archive +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE command overview: elbe-show} +The elbe show command prints out some textual information about an ELBE xml file: +\begin{verbatim} +$ elbe show arm-example.xml +== arm-example.xml: ARMexample - version 08.15 == +Debian suite: squeeze/armel +[...] +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{ELBE command overview: elbe-xsdtoasciidoc} +Create an asciidoc documentation from an annotated XML Schema file +\begin{verbatim} +# Create asciidoc format +$ elbe xsdtoasciidoc --output=myasciidoc dbsfed.xsd +# Create HTML doc +$ asciidoc myasciidoc +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Creating UBI images} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + + + linux.img 1 + 0 + 60MB + + + 2048 + 1533 + 126976 + 128KiB + + static + + 0 + 4MiB + /boot/vmlinuz + + + dynamic + + 1 + 26MiB + + + +\end{lstlisting} +\end{scriptsize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Creating UBI images} +\lstset{language=XML} +\begin{scriptsize} +\begin{lstlisting} + + + + /opt + + ubifs + -x lzo + + rw + + + + / + + ubifs + -x lzo + + ro + + + proc + /proc + + proc + + + +\end{lstlisting} +\end{scriptsize} +\end{frame} \input{tailpres} diff --git a/images/elbe-process.png b/images/elbe-process.png new file mode 100644 index 0000000..3dedbee Binary files /dev/null and b/images/elbe-process.png differ diff --git a/images/emu-process.png b/images/emu-process.png new file mode 100644 index 0000000..f1b1107 Binary files /dev/null and b/images/emu-process.png differ -- cgit v1.2.3