|
Emdebian rootfsThe 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. The main Debian root filesystem is based on 'Essential' -
a collection of packages that contain:
Emdebian uses several methods to reduce this size:
Other methods yet to be investigated include:
Emdebian Rootfs packagesdebootstrap methodThe current Emdebian rootfs uses debootstrap - the same tool as Debian itself. There are limitations with using debootstrap but it is familiar to those using Debian (or Debian-derivative distributions) already. To reduce the workload on the target device, the standard debootstrap method has been altered for Emdebian. This is called the unpacking method. debootstrap is still used to create the first part of the eventual system but each .deb is unpacked using dpkg, without running any maintainer scripts. Other adjustments are then made to the debootstrap environment to support booting without packages that would normally be available in Debian (like perl). The modified first stage install process of debootstrap results in an almost complete filesystem with no .deb packages remaining. debootstrap requires that there is at least a nominal split between "base" and "required" packages and it is advisable to retain a similar split as with normal debootstrap - "required" for packages that debootstrap can unpack directly and "base" for packages that need to be unpacked separately. The actual list of packages used for any particular run of emsandbox can change between releases of emdebian-tools and can be customised for specific machines and machine variants. The following should be read as an example of a working rootfs, not as a definition of what emsandbox would provide for your rootfs. Requiredbusybox dash dpkg libstdc++6 libgcc1 libc6 cdebconf libdebian-installer4 zlib1g libnewt0.52 libslang2Baseapt gpgv libncurses5 libreadline5 readline-common mktemp debconf-shell debianutils makedev base-passwd whiptail gnupg udevSourcesbusybox dpkg glibc gcc-4.2 cdebconf ncurses mktemp libdebian-installer zlib apt gnupg readline5 debianutils makedev base-passwd newt slang2 udev debconfCreating the rootfsEmdebian expects that most users will want to customise their rootfs and the packages contained in the basic rootfs outlined above are being continually updated as new versions are uploaded to Debian. Therefore, there is no static link to a downloadable root filesystem for Emdebian. Instead, emdebian-tools includes emsandbox which sets up debootstrap to create a basic Emdebian rootfs. emsandbox also supports customisation through a system of machine variants - a default set for a particular machine and custom sets of variants of that machine. emsandbox works from prebuilt binary packages and so creating a root filesystem requires that the full set of packages have already been cross built for Emdebian and are available in a repository that debootstrap can use. Currently, Emdebian hosts prebuilt binary packages for ARM. If you want a different architecture or packages that have not yet been cross built for Emdebian, use emsource and emdebuild to create the packages and then create your own repository (e.g. with reprepro). Configuring the root filesystemThe Emdebian rootfs, as generated by emsandbox is not fully configured - packages are unpacked and certain support files are created but none of the packages are configured (not even the pre-install scripts). This last stage is the only process that must be run on the actual device before the first boot, using the emsecondstage script which requires a working chroot environment. Typically, emsecondstage is run from some kind of minimal bootloader environment that has sufficient support for mounting subsystems like proc and filesystems like the root filesystem partition and can chroot into the root filesystem. This method means that the majority of the work of creating the root filesystem can be done on the build machine. Using machine:variant customisation, you can choose between:
Set the script you want to use (which could also be one of your own) in the packages.conf machine:variant customisation file: ... SCRIPT=/usr/lib/emdebian-tools/emdebian.gpe |
Last Modified: Wed, Sep 10 02:31:14 UTC 2008
Copyright © 2000-2008
The Embedded Debian Project;
Emdebian is an offical subproject of Debian.