[elbe-devel] [PATCH] elbe-doc: append some informations from elbe-rfs.org

Christian Teklenborg chris at linutronix.de
Mon Nov 2 16:18:57 CET 2020


Append 'Why ELBE was born' and 'ELBE technical Details' to
'elbeoverview-en.txt'. Change the installation guide in 'quickstart.txt'
and 'elbeoverview-en.txt' to the guide from elbe-rfs.org.

Signed-off-by: Christian Teklenborg <chris at linutronix.de>
---
 docs/elbeoverview-en.txt | 150 ++++++++++++++++++++++++++++++++++++---
 docs/quickstart.txt      |  33 +++------
 2 files changed, 151 insertions(+), 32 deletions(-)

diff --git a/docs/elbeoverview-en.txt b/docs/elbeoverview-en.txt
index 8d684498..6079f7a6 100644
--- a/docs/elbeoverview-en.txt
+++ b/docs/elbeoverview-en.txt
@@ -41,31 +41,38 @@ Elbe takes a different approach for solving these problems:
 Installation
 ------------
 
-Elbe is shipped as Debian package. This package will pull in the necessary
-dependencies.
+The recommended way to use ELBE is running it on a Debian PC.
+Linutronix provides a signed repository that can be included in apt.
 
-Configure `/etc/apt/sources.list.d` appropriately:
+Make sure you have root permissions and wget is installed:
+
+--------------------------------------------
+$ su -
+$ apt install wget
+--------------------------------------------
+
+Install the public key for the repo:
 
 -----------------------------------------------------------------------------------
-echo 'deb http://debian.linutronix.de/elbe buster main' >> /etc/apt/sources.list.d/elbe.list
+$ wget -O /usr/share/keyrings/elbe-archive-keyring.gpg http://debian.linutronix.de/elbe/elbe-repo.pub.gpg
 -----------------------------------------------------------------------------------
 
-Optionally the public key for the repo can be installed:
+Configure `/etc/apt/sources.list` appropriately:
 
 -----------------------------------------------------------------------------------
-wget http://debian.linutronix.de/elbe/elbe-repo.pub && apt-key add elbe-repo.pub
+$ echo "deb [signed-by=/usr/share/keyrings/elbe-archive-keyring.gpg] http://debian.linutronix.de/elbe buster main" >> /etc/apt/sources.list
 -----------------------------------------------------------------------------------
 
 Update the package list:
 
 --------------------------------------------
-aptitude update
+$ apt update
 --------------------------------------------
 
 and install elbe using the following command:
 
 --------------------------------------------
-aptitude install elbe
+$ apt install elbe
 --------------------------------------------
 
 
@@ -928,3 +935,130 @@ project directory and run 'make'. This will start the installation of the
 build VM.
 
 
+ELBE technical Details
+----------------------
+
+This article describes the qemu features ELBE is using.
+
+One essential point to understand is that qemu combines two fundamentally
+different functionalities, which can also be used independently and that ELBE
+uses both of them separately:
+
+- Virtualization (running a machine-in-a-machine)
+- Emulation (running foreign machine-code)
+
+Both are traditionally used in combination (to run, for example, a full
+ARM-based Android mobile device on an x86-based development machine). ELBE,
+however, uses both functionalities separately, each one without the other:
+
+At the outside, ‘elbe initvm’ runs a full virtual machine with the host
+system’s architecture, using the kvm technology. On a typical x86-based host,
+this VM still runs x86 code at full efficiency, but does so in a fully
+encapsulated environment, running its own kernel with virtualized devices in
+it own root-file resides in a single file (buildenv.img) on the hosts file
+system. This virtual machine must be booted before it can be used and
+communication happens through its virtual console or through virtual network
+connections.
+
+At the inside, ‘elbe chroot’ runs a CPU emulation environment without machine
+virtualization. This command actually does two separate things at once:
+
+- chroot - i.e. divert all child processes to view a certain directory as their
+  root. Within this directory, there is a full set of subdirectories (/etc,
+  /usr, /var, …) and the child processes cannot see or access anything outside
+  this directory.
+- qemu-user-binfmt - i.e. register qemu in such a way that binaries of the
+  target architecture (e.g. ARM) are transparently called via qemu (this fairly
+  complex technique is documented e.g. on https://wiki.debian.org/QemuUserEmulation)
+
+The effect is that inside this ‘elbe chroot’ environment target .deb packages
+can be deployed and target binaries executed. However, there is not kernel
+running in the target architecture and the devices are still those provided by
+the encapsulating initvm virtual machine.
+
+While at the ‘elbe initvm’ boundary, the outside can only see a single ‘qemu’
+process and a single ‘buildenv.img’ file, the ‘elbe chroot’ boundary is much
+more transparent, allowing the outside to observe individual processes and files
+of the inner environment.
+
+
+Why ELBE was born
+-----------------
+This article describes why the ELBE project was born.
+
+Early embedded Linux devices
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Well, first we should look at embedded devices to see what they used to look
+like and how some of them look like today.
+
+The first devices, that were initially called embedded Linux, had about 4MiB
+flash and around 16MiB of RAM. With these constrains in mind people started to
+hack a root file system for their devices. If they had bad luck you had to
+start with building a cross toolchain first.
+
+Once that part was over you could focus on the user land. Busybox is a good
+tool to start with since it contains most of the required programs in a small
+single binary. Those programs and a few configurations files on top and you were
+done. Maybe you had to compile your “added value” binary or something else
+that was not part of busybox but that was it.
+
+Cross-build Toolkits
+~~~~~~~~~~~~~~~~~~~~
+
+Now sum up the single steps which were required to create a root file from
+scratch and create a tool to ease your life. This is when tools like
+OpenEmbedded, EDLK were born. Those tools are still good as long as they are
+well maintained. They aren’t just projects that are that small these days.
+A lot of them are getting very complex. This includes hardware that has much
+more RAM and a GiBs of NAND flash if not replaced by a disk or mmc card and
+the software, that is used, is more extensive.
+
+Rootfilesystems are getting bigger and bigger
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A lot of libraries are used to ease the development of a system. A toolkit for
+GUI development, several libraries for multimedia support just to name a few.
+
+Depending on the build environment that is used, it is more or less difficult to
+add a package that is not yet included. It depends on the scripting language
+that is used, the format keeping the build instructions and the user’s ability
+to understand it and make changes.
+
+Adding Debugging Tools is not that easy
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Adding a debug version of a package to the root file system means a rebuild or
+restart of the build process to create this piece of the rootfile system
+assuming that a debug version can be selected (and not added to the build process).
+Even then the debug version isn’t installed in a jiffy.
+
+There is usually one person in charge of the root file system and a few others
+that are developing the application or a component of the application. One of
+the application developers has a problem and wants just to install a debug
+version of the library in question or replace it with a later version of it or a
+substitute library just to see if his problem goes away or not. He doesn’t
+necessarily know how to handle the build environment to make such changes. So he
+has to ask the person in charge of the root filesystem to make this change and
+send him the new filesystem.
+
+The application developer never did this kind of work because the Linux
+distribution on his desktop computer takes care of these things for him.
+The same distribution runs a test suite (if available) of the package after it
+has been built to spot problems in the compiled binaries which can’t be run if
+the package is cross compiled.
+
+No Bugtracking Informations available
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Another missing feature is the bug tracking against all packages in the root
+file system including security updates. This can be a full time job for one
+person even just by looking after 10 packages with a reasonable size. So why try
+to do a lot of work alone while this work is already done by large communities
+around Linux distribution like Debian?
+
+Debian for embedded?
+~~~~~~~~~~~~~~~~~~~~
+
+Instead of doing the work again we tried to figure out how Debian could be
+reused in a way that will fulfill our needs.
diff --git a/docs/quickstart.txt b/docs/quickstart.txt
index f061ee71..a2a200e3 100644
--- a/docs/quickstart.txt
+++ b/docs/quickstart.txt
@@ -45,35 +45,20 @@ But ELBE can also be installed from git.
 Binary Debian packages
 ~~~~~~~~~~~~~~~~~~~~~~
 
-The latest packages for elbe reside in the following repository
+The recommended way to use ELBE is running it on a Debian PC.
+Linutronix provides a signed repository that can be included in apt.
 
---------------------------------------------------------
-http://debian.linutronix.de/elbe
-http://debian.linutronix.de/elbe-common
---------------------------------------------------------
-
-Create the file `/etc/apt/sources.list.d/elbe.list`
-with the following contents:
-
---------------------------------------------------------
-deb http://debian.linutronix.de/elbe buster main
-deb http://debian.linutronix.de/elbe-common buster main
---------------------------------------------------------
-
-Add a repository key to the list of trusted keys (as root):
-
---------------------------------------------------------
-$ wget -q -O - http://debian.linutronix.de/elbe-common/elbe-repo.pub | apt-key add -
---------------------------------------------------------
-
-Then run (as root):
+Installation on Debian buster (or later)
 
 --------------------------------------------------------
-$ apt-get update
-$ apt-get install elbe
+$ su -
+$ apt install wget
+$ wget -O /usr/share/keyrings/elbe-archive-keyring.gpg http://debian.linutronix.de/elbe/elbe-repo.pub.gpg
+$ echo "deb [signed-by=/usr/share/keyrings/elbe-archive-keyring.gpg] http://debian.linutronix.de/elbe buster main" >> /etc/apt/sources.list
+$ apt update
+$ apt install elbe
 --------------------------------------------------------
 
-
 Create initvm and submit XML files
 ----------------------------------
 The first thing you need to do is set up a virtual-machine for
-- 
2.20.1



More information about the elbe-devel mailing list