From 3b0fed3e2cb511038a6897f12c09cf141bb3f048 Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Fri, 7 Nov 2014 12:34:17 +0100
Subject: update elbe-example to be elbe-1.0 compatible

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 distribution/elbe-example/pres_elbe-example_en.tex | 178 ++++++++++-----------
 1 file changed, 84 insertions(+), 94 deletions(-)

(limited to 'distribution/elbe-example/pres_elbe-example_en.tex')

diff --git a/distribution/elbe-example/pres_elbe-example_en.tex b/distribution/elbe-example/pres_elbe-example_en.tex
index e80a2e1..dd39b24 100644
--- a/distribution/elbe-example/pres_elbe-example_en.tex
+++ b/distribution/elbe-example/pres_elbe-example_en.tex
@@ -20,68 +20,58 @@
 \subsection{generate a buildenv}
 
 \begin{frame}[fragile]
-\frametitle{minimal XML file}
-\begin{verbatim}
-<ns0:RootFileSystem
- xmlns:ns0="https://www.linutronix.de/projects/Elbe"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- created="2009-05-20T08:50:56" revision="6"
- xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd">
-  <project>
-    <name>mini xml</name>
-    <version>1</version>
-    <description>
-      optimal to use as buildenv
-    </description>
-    <buildtype>armel</buildtype>
-    <mirror>
-      <primary_host>ftp.debian.org</primary_host>
-      <primary_path>/debian</primary_path>
-      <primary_proto>http</primary_proto>
-      <url-list>
-        <url>
-          <binary>http://debian.linutronix.de/elbe wheezy main</binary>
-        </url>
-      </url-list>
-    </mirror>
-\end{verbatim}
+\frametitle{use elbe-init.xml}
+\begin{lstlisting}
+$ cp /usr/share/doc/elbe-doc/examples/elbe-init.xml .
+$ elbe init --directory=./initvm elbe-init.xml
+$ cd initvm
+$ make
+$ make run-con
+\end{lstlisting}
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{minimal XML file}
-\begin{verbatim}
-    <suite>wheezy</suite>
-    <buildimage>
-      <kinitrd>elbe-bootstrap</kinitrd>
-      <pkg-list>
-        <pkg>build-essential</pkg>
-        <pkg>debhelper</pkg>
-        <pkg>devscripts</pkg>
-        <pkg>autotools-dev</pkg>
-        <pkg>automake</pkg>
-      </pkg-list>
-    </buildimage>
-  </project>
-  <target>
-    <hostname>mini</hostname>
-    <domain>linutronix</domain>
-    <passwd>foo</passwd>
-    <finetuning>
-    </finetuning>
-    <pkg-list>
-      <pkg>bash</pkg>
-    </pkg-list>
-  </target>
-</ns0:RootFileSystem>
-\end{verbatim}
+	\frametitle{mini.xml}
+	\begin{lstlisting}
+	<project>
+		<name>mini xml</name>
+		<version>1</version>
+		<description>
+			optimal to use as buildenv
+		</description>
+		<buildtype>armhf</buildtype>
+		<mirror>
+			<primary_host>ftp.debian.org</primary_host>
+			<primary_path>/debian</primary_path>
+			<primary_proto>http</primary_proto>
+		</mirror>
+		<suite>wheezy</suite>
+	</project>
+	\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+	\frametitle{mini.xml}
+	\begin{lstlisting}
+	<target>
+		<hostname>mini</hostname>
+		<domain>linutronix</domain>
+		<passwd>foo</passwd>
+		<finetuning>
+		</finetuning>
+		<pkg-list>
+			<pkg>bash</pkg>
+		</pkg-list>
+	</target>
+	\end{lstlisting}
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{create and build mini.xml}
+\frametitle{build mini.xml}
 \begin{lstlisting}
-$ elbe create --directory=./buildenv mini.xml
-$ cd buildenv
-$ make
+$ elbe control create_project  mini.xml
+$ elbe control list_projects
+$ elbe build /var/cache/elbe/...
 \end{lstlisting}
 \end{frame}
 
@@ -246,7 +236,7 @@ myapp_1.0_i386.changes
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{host myapp in a debian repository}
+\frametitle{host myapp source in a debian repository}
 \begin{lstlisting}
 $ cd ..
 $ mkdir -p myrepo/conf
@@ -260,7 +250,7 @@ Suite: stable
 Codename: wheezy
 Update: - myremoterepo
 Version:
-Architectures: i386 amd64 source
+Architectures: armhf source
 Components: main
 Description: my debian packages
 \end{verbatim}
@@ -268,9 +258,9 @@ Description: my debian packages
 
 
 \begin{frame}[fragile]
-\frametitle{host myapp in a debian repository}
+\frametitle{host myapp source in a debian repository}
 \begin{lstlisting}
-$ reprepro include wheezy ../myapp_1.0_i386.changes
+$ reprepro includedsc wheezy ../myapp_1.0.dsc
 $ sudo mkdir /var/www/
 $ sudo rsync -av --exclude=db --exclude=conf * \
 /var/www/myrepo/
@@ -281,15 +271,16 @@ $ sudo rsync -av --exclude=db --exclude=conf * \
 \begin{frame}[fragile]
 \frametitle{build debian package inside the buildenv}
 \begin{lstlisting}
-$ cd ../buildenv
+# login to elbe-initvm
 $ make run-con
 \end{lstlisting}
-login into buildenv and configure apt to use myrepo
+change into buildenv and configure apt to use myrepo
 \begin{lstlisting}
+$ elbe chroot /var/cache/elbe/...
 $ echo 'deb-src http://10.0.2.2/myrepo wheezy main' >> /etc/apt/sources.list
 $ apt-get update
 \end{lstlisting}
-retrive myapp source package and build armel binary package
+retrive myapp source package and build armhf binary package
 \begin{lstlisting}
 $ apt-get source myapp
 $ cd myapp-1.0
@@ -306,10 +297,10 @@ $ myapp
 
 
 \begin{frame}[fragile]
-\frametitle{add myapp armel package to the repo}
+\frametitle{add myapp armhf package to the repo}
 \begin{lstlisting}
 $ cd ../myrepo
-$ reprepro include wheezy /tmp/myapp_1.0_armel.changes
+$ reprepro include wheezy /tmp/myapp_1.0_armhf.changes
 $ sudo rsync -av --exclude=db --exclude=conf * \
 /var/www/myrepo/
 \end{lstlisting}
@@ -331,9 +322,6 @@ $ $EDIT mini.xml
       <primary_path>/debian</primary_path>
       <primary_proto>http</primary_proto>
       <url-list>
-        <url>
-          <binary>http://debian.linutronix.de/elbe wheezy main</binary>
-        </url>
         <url>
           <binary>http://LOCALMACHINE/myrepo wheezy main</binary>
           <source>http://LOCALMACHINE/myrepo wheezy main</source>
@@ -419,9 +407,11 @@ $ $EDIT mini.xml
 \begin{frame}[fragile]
 \frametitle{build and extract target as nfsroot}
 \begin{lstlisting}
-$ elbe create mini.xml --directory=./target
-$ cd target
-$ make
+$ elbe control set_xml /var/cache/elbe/.. mini.xml
+$ elbe control build /var/cache/elbe/..
+$ elbe list_files /var/cache/elbe/..
+$ elbe get_file /var/cache/elbe/.. elbe-report.txt
+$ elbe get_file /var/cache/elbe/.. rootfs.tar.gz
 \end{lstlisting}
 hint: it is possible to generate a html page from the elbe-report.txt:
 \begin{lstlisting}
@@ -429,8 +419,8 @@ $ asciidoc elbe-report.txt
 \end{lstlisting}
 host the nfs root filesystem
 \begin{lstlisting}
-$ sudo mkdir -p /nfs/elbe-armel
-$ sudo tar xzf rootfs.tar.gz -C /nfs/elbe-armel
+$ sudo mkdir -p /nfs/elbe-armhf
+$ sudo tar xzf rootfs.tar.gz -C /nfs/elbe-armhf
 $ su -c \
 'echo "/nfs *(rw,sync,no_subtree_check,insecure) \
 >> /etc/exports"'
@@ -439,7 +429,7 @@ $ sudo /etc/init.d/nfs-kernel-server restart
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{build current kernel for qemu armel boot}
+\frametitle{build current kernel for qemu armhf boot}
 \begin{verbatim}
 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
 $ cd linux
@@ -462,7 +452,7 @@ $ cd ..
 qemu-system-arm -M versatilepb -no-reboot \
   -m 256 -usb \
   -kernel linux-qemu-arm/arch/arm/boot/zImage \
-  -append 'root=/dev/nfs nfsroot=10.0.2.2:/nfs/elbe-armel
+  -append 'root=/dev/nfs nfsroot=10.0.2.2:/nfs/elbe-armhf
            ip=dhcp init=/usr/bin/myapp'
 \end{lstlisting}
 \end{frame}
@@ -470,22 +460,22 @@ qemu-system-arm -M versatilepb -no-reboot \
 \begin{frame}[fragile]
 \frametitle{strip the nfsroot}
 \begin{verbatim}
-$ sudo rm -rf /nfs/elbe-armel/etc
-$ sudo rm -rf /nfs/elbe-armel/sbin
-$ sudo rm -rf /nfs/elbe-armel/var
-$ sudo rm -rf /nfs/elbe-armel/usr/share
-$ sudo rm -rf /nfs/elbe-armel/usr/lib
-$ sudo rm -rf /nfs/elbe-armel/usr/sbin
-$ sudo cp /nfs/elbe-armel/usr/bin/myapp .
-$ sudo rm -rf /nfs/elbe-armel/usr/bin/*
-$ sudo mv myapp /nfs/elbe-armel/usr/bin/
-$ sudo cp -a /nfs/elbe-armel/lib/arm-linux-gnueabi/ld-* .
-$ sudo cp -a /nfs/elbe-armel/lib/arm-linux-gnueabi/libc-2.13.so .
-$ sudo cp -a /nfs/elbe-armel/lib/arm-linux-gnueabi/libc.so.6 .
-$ sudo rm /nfs/elbe-armel/lib/arm-linux-gnueabi/*
-$ sudo mv libc-2.13.so /nfs/elbe-armel/lib/arm-linux-gnueabi/
-$ sudo mv libc.so.6 /nfs/elbe-armel/lib/arm-linux-gnueabi/
-$ sudo mv ld-* /nfs/elbe-armel/lib/arm-linux-gnueabi/
+$ sudo rm -rf /nfs/elbe-armhf/etc
+$ sudo rm -rf /nfs/elbe-armhf/sbin
+$ sudo rm -rf /nfs/elbe-armhf/var
+$ sudo rm -rf /nfs/elbe-armhf/usr/share
+$ sudo rm -rf /nfs/elbe-armhf/usr/lib
+$ sudo rm -rf /nfs/elbe-armhf/usr/sbin
+$ sudo cp /nfs/elbe-armhf/usr/bin/myapp .
+$ sudo rm -rf /nfs/elbe-armhf/usr/bin/*
+$ sudo mv myapp /nfs/elbe-armhf/usr/bin/
+$ sudo cp -a /nfs/elbe-armhf/lib/arm-linux-gnueabi/ld-* .
+$ sudo cp -a /nfs/elbe-armhf/lib/arm-linux-gnueabi/libc-2.13.so .
+$ sudo cp -a /nfs/elbe-armhf/lib/arm-linux-gnueabi/libc.so.6 .
+$ sudo rm /nfs/elbe-armhf/lib/arm-linux-gnueabi/*
+$ sudo mv libc-2.13.so /nfs/elbe-armhf/lib/arm-linux-gnueabi/
+$ sudo mv libc.so.6 /nfs/elbe-armhf/lib/arm-linux-gnueabi/
+$ sudo mv ld-* /nfs/elbe-armhf/lib/arm-linux-gnueabi/
 \end{verbatim}
 \end{frame}
 
@@ -493,10 +483,10 @@ $ sudo mv ld-* /nfs/elbe-armel/lib/arm-linux-gnueabi/
 \begin{frame}[fragile]
 \frametitle{update the ELBE XML file}
 \begin{verbatim}
-$ sudo mkdir /nfs/elbe-armel-orig
-$ sudo tar xzf rootfs.tar.gz -C /nfs/elbe-armel-orig/
+$ sudo mkdir /nfs/elbe-armhf-orig
+$ sudo tar xzf rootfs.tar.gz -C /nfs/elbe-armhf-orig/
 $ elbe pkgdiff
-$ sudo elbe diff /nfs/elbe-armel-orig /nfs/elbe-armel > diff.txt
+$ sudo elbe diff /nfs/elbe-armhf-orig /nfs/elbe-armhf > diff.txt
 $ cd ..
 \end{verbatim}
 \begin{verbatim}
@@ -526,7 +516,7 @@ $ qemu-system-arm -M versatilepb \
 \begin{lstlisting}
 $ mkdir -p /mirrors/debian
 $ cd debian
-$ debmirror -p -d wheezy, -a i386,amd64,armel,armhf \
+$ debmirror -p -d wheezy, -a i386,amd64,armhf \
      --di-dist=wheezy \
      --method=http --no-check-gpg \
      -h ftp.de.debian.org .
-- 
cgit v1.2.3

