\input{configpres}
\title{ELBE - Embedded Linux Build Environment}
\maketitle
\subsection{ELBE usage}
\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}
ARMexample08.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/debianhttphttp://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}
...
armel20G256qemu-system-armtestrdttyAMA0,115200n1versatilepbsmc91c111de:ad:be:ef:be:05tcp225022
...
\end{lstlisting}
\end{scriptsize}
\end{frame}
\begin{frame}[fragile]
\frametitle{The ELBE XML format: Defining a target}
\lstset{language=XML}
\begin{scriptsize}
\begin{lstlisting}
myARMtec.linutronix.defoottyS0,115200nfsroot.tar.gzbuild-essentialbashlessgitdebhelpernfs-commonopenssh-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 \
/home/user/elbe-test/install.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
060MB20481533126976128KiBstatic04MiB/boot/vmlinuzdynamic126MiB
\end{lstlisting}
\end{scriptsize}
\end{frame}
\begin{frame}[fragile]
\frametitle{Creating UBI images}
\lstset{language=XML}
\begin{scriptsize}
\begin{lstlisting}
/optubifs-x lzorw/ubifs-x lzoroproc/procproc
\end{lstlisting}
\end{scriptsize}
\end{frame}
\input{tailpres}