See also the Emdebian Guide, Problematic packages

Emdebian rootfs

The root filesystem is a basic set of packages needed to provide a usable login environment around a kernel and kernel modules. The rootfs must be extensible to a full system so normal packaging tools need to be supported. See also Emdebian website.

The main Debian root filesystem is based on 'Essential' - a collection of packages that contain: Essential: yes in debian/control and although small in Debian terms, it is still much too large for Emdebian.

This page concentrates on how to use the emdebian-rootfs package to build an Emdebian root filesystem for your device and describes how to customize your package set for your needs.

This is a work in progress!

Root filesystems are the newest part of the DebPg:emdebian-tools support and only a few brave souls are currently running Emdebian on real hardware. Please update this page with your own progress notes.

Package sets

Within these limitations, Emdebian already supports three flavours of root filesystem as well as full machine:variant customisation support.

busybox rootfs

The list of packages in this set (currently the smallest bootable root filesystem available from Emdebian) is regularly maintained as part of the emdebian-rootfs package and you can view the contents of the package set any time:

$ less /usr/lib/emdebian-tools/emdebian.crossd

As of emdebian-rootfs 0.9.4, the package set consists of:

        required="busybox dpkg libstdc++6 libgcc1 libc6 cdebconf
        libdebian-installer4 zlib1g libnewt0.52 libslang2"

        base="apt gpgv libncurses5 libreadline5 readline-common mktemp
        debconf-shell debianutils makedev base-passwd whiptail
        gnupg udev base-files debian-archive-keyring udhcpc udhcpd sysv-rc
        util-linux module-init-tools initscripts"

basic Gtk+ rootfs

A medium sized package set that provides the libraries for a GUI based on Gtk+ without the GUI itself.

$ less /usr/lib/emdebian-tools/emdebian.gtk

        required="busybox dpkg libstdc++6 libgcc1 libc6 cdebconf
        libdebian-installer4 zlib1g libnewt0.52 libslang2"

        base="apt gpgv libncurses5 libreadline5 readline-common mktemp
        debconf-shell debianutils makedev base-passwd whiptail
        gnupg udev base-files debian-archive-keyring libgtk2.0-0
        libatk1.0-0 libpango1.0-0 libxcursor1 libxfixes3 libxdamage1
        libxrandr2 libxcomposite1 libxi6 libxinerama1 libcupsys2
        libtiff4 libjpeg6b_6b libglib2.0-0 libcairo2 libfontconfig1
        fontconfig-config ttf-bitstream-vera"

GNOME Palmtop Environment rootfs

Intended as a fully functional installation for devices such as an iPAQ, this package set includes libraries and GUI applications.

$ less /usr/lib/emdebian-tools/emdebian.gpe

        required="busybox dpkg libstdc++6 libgcc1 libc6 cdebconf
        libdebian-installer4 zlib1g libnewt0.52 libslang2"

        base="apt gpgv libncurses5 libreadline5 readline-common mktemp
        debconf-shell debianutils makedev base-passwd whiptail iptables
        gnupg udev base-files debian-archive-keyring libgtk2.0-0
        libatk1.0-0 libpango1.0-0 libxcursor1 libxfixes3 libxdamage1
        libxrandr2 libxcomposite1 libxi6 libxinerama1 libcupsys2
        libtiff4 libjpeg62 libglib2.0-0 libcairo2 libfontconfig1
        fontconfig-config ttf-bitstream-vera libgpewidget1 gpe-go
        gpe-calendar libsoundgen0 libhandoff0 gpe-edit gpe-icons
        libgpepimc0 gpe-contacts libsoup2.2-8 dbus libavahi-client3
        gpe-gallery gpe-todo gpe-expenses xinit gpe-lights gpe-othello libice6
        gpe-question gpe-taskmanager gpe-timesheet libstartup-notification0
        libsm6 matchbox rxvt xdemineur galculator udhcpc udhcpd sysv-rc util-linux
        module-init-tools sysvinit-utils"

example sizes

(A typical Debian debootstrap is >130Mb compressed.)

-rw-r--r--  1 root root 8.4M 2008-03-05 15:39 emdebian-arm.tgz
-rw-r--r--  1 root root 9.7M 2008-03-05 19:55 emdebian-balloon3.tgz
-rw-r--r--  1 root root  18M 2008-02-20 18:12 emdebian-balloon-gpe.tgz

Finally, a possible list for an X system: Maemo 770 (not all these packages are yet available from Emdebian): osso-core-config, base-files, base-passwd, dnsmasq, uhotplug, initscripts, libc6, libgcc1, libperl5.8, libpopt0, libstdc++, libxrender1, login, makedev, mawk, module-init-tools, passwd, perl-base, wlan-firmware, sudo, sysvinit, sysv-rc, udhcp, xserver-xomap, xserver-?

Creating your root filesystem

Installing the packages

You will need to install a package called emdebian-rootfs, either from Debian repositories or the Emdebian repository. emdebian-rootfs also brings in apt-cross and dpkg-cross.

$ sudo apt-get install emdebian-rootfs

Installation will ask you several questions, including where you want to build your root filesystem (ensure this directory is writable - the default is only intended for use within a chroot) and whether you want to change the default target suite (unstable) not recommended. dpkg-cross will offer you the chance to set a default cross-building architecture which saves a lot of typing later on. If you choose None, you will need to add '--arch ARCH' to all the emdebian-rootfs commands.

The main script you will be using is emsandbox - i.e. you are encouraged to create a sandbox and see how it works.

Create a basic root filesystem

sudo emsandbox create

(Note: unlike many of the build tools, emsandbox needs to run as sudo for the whole operation, mainly because it is using debootstrap and device nodes as well as unpacking the .deb archives using dpkg.

Watch as emsandbox downloads the packages via debootstrap and then extracts the contents from each Emdebian package.

Yes, this is a lot simpler (on the surface) than building packages but this is only the beginning. :-)

Example install

Balloon3

My main test device is a Balloon3 board. The process of transferring the root filesystem onto this board involves:

Important notes

  1. Lack of any Lilo, Grub or BIOS process.
  2. An Emdebian device will not usually have a handy DVD drive so it becomes standard to expect the kernel, modules and root filesystem to be installed from a handy USB stick.
  3. Other options include an SD card or similar and it remains possible to combine that with a Windows executable so that the user can put in the Emdebian SD card, Windows auto runs the executable which then offers to replace ?WindowsMobile (or whatever) with Emdebian. :-)

  4. Replace means just that - most Emdebian devices will not be able to support dual-booting in any usable manner. Some form of data backup onto the SD card would be AGoodThing(tm).

Choosing a different package set

See Emdebian machine:variant support if you are likely to use the same package set on more than one device or you want to shorten the command line.

sudo emsandbox create --script /usr/lib/emdebian-tools/emdebian.gpe

or create a packages.conf file with:

# SCRIPT overrides the default emsandbox suite-script that debootstrap
# uses to determine the base and required packages and the all important
# sequence in which the packages can be installed. SCRIPT can be overridden
# on the emsandbox command line.
# DEFAULT: /usr/lib/emdebian-tools/emdebian.crossd
SCRIPT=/usr/lib/emdebian-tools/emdebian.gpe

In the following examples, the variables mean:

Copy the packages.conf file into $workdir/machine/$name/$variant/

On my test system, $workdir = /opt/emdebian/ so the packages.conf file for the default balloon device is in /opt/emdebian/machine/balloon/default/

To use the packages.conf for the default balloon device:

sudo emsandbox -m balloon create

To use the packages.conf for the GPE variant (/opt/emdebian/machine/balloon/gpe/packages.conf on my test system)

sudo emsandbox -m balloon -v gpe create

CategoryEmdebian