blob: 4a91e4f55b827237dc71a30b7ff2533f5affa7e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
\input{configpres}
\title{ELBE - subcommands}
\maketitle
\subsection{ELBE commands}
\begin{frame}
\frametitle{Documentation}
\begin{itemize}
\item Have a look at /usr/share/doc/elbe/
\item Please read /usr/share/doc/elbe/elbeoverview-en.html
\item There are man pages e.g. 'man elbe', 'man elbe-control', \dots
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{create project}
Create a new project:
\begin{verbatim}
$ elbe initvm create \
--directory /home/user/elbe-initvm
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{attach/start initvm}
attach to running vm:
\begin{verbatim}
$ elbe initvm attach
\end{verbatim}
start the vm (e.g. after host PC reboot):
\begin{verbatim}
$ cd /home/user/elbe-initvm
$ elbe initvm start
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{start build}
\begin{verbatim}
$ cp /usr/share/doc/elbe-doc/examples/bbb-jessie.xml.gz .
$ gunzip bbb-jessie.xml.gz
$ elbe initvm submit --build-bin --build-sources bbb-jessie.xml
Build started, waiting till it finishes
project still busy, waiting
project still busy, waiting
...
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{generated files}
\begin{verbatim}
$ ls elbe-build-$DATE
bin-cdrom.iso
elbe-report.txt
log.txt
licence.txt
sdcard.img
source.xml
src-cdrom.iso
validation.txt
\end{verbatim}
\end{frame}
\begin{frame}
\frametitle{bin-cdrom.iso}
\begin{itemize}
\item ISO image that contains all used binary debian packages
\item it is only created if the --build-bin switch was provided at elbe initvm submit
\item a rebuild of the initvm and target image can be done with this cdrom and
without a connection to a debian repository.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{elbe-report.txt}
\begin{itemize}
\item elbe report containing informations about used packages, finetuning, etc
\item 'asciidoc elbe-report.txt' generates a html file
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{log.txt}
\begin{itemize}
\item logfile from the image build process in asciidoc format
\item 'asciidoc log.txt' generates a html file
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{licence.txt}
\begin{itemize}
\item contains the licence text of all used debian packages
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{sdcard.img}
\begin{itemize}
\item Images or archives containing the target RFS
\item The 'target' section in the XML file describes which image and archive
files are created; the 'fstab' section describes their content.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{source.xml}
\begin{itemize}
\item based on the XML file given to 'elbe create'
\item added a 'fullpkgs' section containing informations about all installed
packages and their version
\item added a 'sources\_list' section that contains the used mirrors
\item added a 'apt\_prefs' section that contains the pinning settings
\item added a 'elbe\_version' section that contains the version number of
the elbe tool that generated the file
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{src-cdrom.iso}
\begin{itemize}
\item ISO image that contains all used source debian packages
\item it is only created if the --build-source switch was provided at elbe initvm submit
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{validation.txt}
\begin{itemize}
\item if elbe create was called with a XML file containing a 'fullpkgs' section
the file contains informations if a package version differs
\item if a package in the 'pkg-list' was not found on one of the mirrors this
will be logged in this file
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-setsel usage}
\begin{enumerate}
\item Create package list:
\begin{verbatim}
# remove all pkgs not wanted on the target
target$ dpkg --purge vim-nox libxml2-dev
# export installed package list
target$ dpkg --get-selections > selections.list
# copy list to hostpc
target$ scp selections.list YOURPC:/tmp
\end{verbatim}
\item Import the package list to your xml file:
\begin{verbatim}
hostpc$ elbe setsel rfs.xml /tmp/selections.list
\end{verbatim}
\end{enumerate}
\end{frame}
\begin{frame}[fragile]
\frametitle{initvm and target image build from a binary CDROM}
\begin{verbatim}
$ elbe initvm create --directory=elbe-from-cd \
elbe/elbe-build-$DATE/bin-cdrom.iso
\end{verbatim}
This command builds an initvm and the target image without using 'http'
repositories.
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-chg\_archive}
It is possible to include an archive into the xml file, that is unpacked into
the target RFS before and after the finetuning step:
\begin{verbatim}
$ mkdir archive/testd
$ cd archive
$ echo 'port = 1234' > archive/testd/myconfig
$ sudo tar cjf ../archive.tar.bz2 *
$ cd ..
$ elbe chg_archive <xmlfile> archive.tar.bz2
\end{verbatim}
NOTE: The file must be a bzip2 compressed tar (.tar.bz2)
Take care on access right and owners of the files.
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-get\_archive}
It is also possible to extract an archive from an XML file:
\begin{verbatim}
$ elbe get_archive <xmlfile> <archive>
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-show}
The elbe show command prints out some textual information about an
ELBE xml file:
\begin{verbatim}
$ elbe show --verbose arm-example.xml
== arm-example.xml: ARMexample - version 08.15 ==
Debian suite: wheezy/armel
[...]
\end{verbatim}
The '--verbose' parameter shows more informations, like the complete package
list.
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-checkupdates}
Use a source.xml file to check if there are updates available for an existing
image:
\begin{verbatim}
$ elbe check_updates source.xml
checking /home/user/rfs/build-release/source.xml
armel
Reading package lists... Done
Building dependency tree... Done
Reading package lists... Done
Building dependency tree... Done
adduser 3.113+nmu1 != 3.113+nmu3
1 updates required
\end{verbatim}
This can be used e.g. as cronjob to get notifications if updates are availabe.
Than the person responsible for updates can decide what needs to be done.
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-diff}
compares to RFS trees and suggests commands to update the archive tar and a
'finetuning' section:
\begin{verbatim}
$ sudo elbe diff rfs rfs-modified
suggesting:
<rm>/etc/init.d/mountall-bootclean.sh</rm>
<rm>/etc/init.d/bootmisc.sh</rm>
tar rf archive.tar -C build/rfs /sbin/dhclient-script
tar rf archive.tar -C build/rfs /etc/init.d/mountfstab.sh
\end{verbatim}
This can be used if a (nfsroot) filesystem was modified and these modifications
should be included in an ELBE XML file.
\end{frame}
\begin{frame}[fragile]
\frametitle{elbe-pkgdiff}
compares to RFS trees and displays the difference of the installed packages
\begin{verbatim}
$ sudo elbe pkgdiff `pwd`/rfs `pwd`/rfs-modified
-<pkg>firmware-ivtv</pkg>
-<pkg>firmware-ipw2x00</pkg>
\end{verbatim}
This can be used if a (nfsroot) filesystem was modified and these modifications
should be included in an ELBE XML file.
\end{frame}
\input{tailpres}
|