emdebian logo
 

About Emdebian
 Emdebian & Debian
 Purpose
 Customisations
 Flavours
 Extending Emdebian
 Localisation support
 Emdebian Tdebs

Cross toolchains
 Toolchain packages

Emdebian Crush
 Packages
 Build Tools
 Repository Key
 Installation Guide

Emdebian Grip
 Packages
 Repository Key
 Update logs
 Installation Guide

Documentation
 Introductory Guide
 Emdebian Wiki
 Emdebian FAQ
 Packaging rules
 Packaging infrastructure
 Packaging guideline
 DebConf paper

Support
 Contact Us
 Mailing List Archives

Help Emdebian
 Developers' Info
 Subversion
 ToDo list

News

History
 Slind
 Stag
 Emdebsys

Links
 Emdebian Bootldr
 Emdebian Kernel
 Emdebian JTAG
 Scratchbox
 QEmu
 CELF

Valid HTML 4.01!

 
   

[ Cross building ] [ Root filesystem ] [ Mixing Emdebian and Debian ]


Emdebian Howto

Scope

Emdebian methods, the emdebian-tools scripts and this tutorial are inherently reliant on Debian and are only expected to operate normally when running on a Debian system. Ubuntu and other Debian derivatives are not fully supported yet. Non-Debian distributions are not supported at all. Ubuntu users are recommended to create a Debian chroot for Debian sid and work with emdebian-tools inside that chroot. Patches are welcome but the primary focus of Emdebian is getting Debian to cross-build successfully and to prepare an Emdebian distribution that provides a Debian installation for embedded devices, within the limits of the device.

Introduction to emdebian-tools

emdebian-tools supports various ways of using Emdebian:


Building new Emdebian packages

The emdebian-tools Debian package is a collection of scripts to ease the process of cross-building Debian packages for Emdebian, reducing package size, separating translations into individual files and handling dependencies. emdebian-tools depends on each of the other packages built from the main source package.

During installation, emdebian-tools configures an extra apt source for the Emdebian toolchain repository which also provides interim updates for emdebian-tools and other similar tools developed within Emdebian. e.g.

$ sudo apt-get install emdebian-tools

After installation, it is important to update and upgrade to get any updates to emdebian-tools between Debian releases.

$ sudo apt-get update
$ sudo apt-get upgrade

(and similarly with aptitude).

Contents of the emdebian-tools package

  • emsetup : Check your system for cross-build support and determine some defaults for other emdebian-tools scripts. If you intend to build your own packages, modify Emdebian ones or build an Emdebian rootfs, run this using the simulate option to see what changes may be needed before proceeding.

  • emchain : Toolchain builder for cross compiling. If a pre-built toolchain is not found or not available, emchain can build a custom toolchain for your needs using the current Debian version of gcc.

  • em_make : Emdebianise a Debian package. Creates suitable changelog entries, omits certain debhelper scripts from debian/rules and maintains a patchset for emdebian. Removes all documentation and udeb packages from debian/ control.

  • emdebuild : Emdebian version of debuild that handles cross-building the emdebianised tree. Requires a suitable cross-building toolchain to be installed for the requested architecture, e.g. gcc-4.1-arm-linux-gnu, available from the emdebian tools repository via emsetup or built for your particular configuration using emchain.

  • empdebuild : Emdebian version of pbuilder that handles cross-building in a chroot. Supports creating an emdebian chroot tarball including an Emdebian toolchain and chroot cross-building of emdebianised packages using emdebuild. Includes support for debian/xcontrol files to specify which Build-Cross-Depends packages to install with apt-cross.


Using existing Emdebian packages

emdebian-rootfs is a separate package for users who only need to use binary packages from Emdebian, rather than build new ones or modify existing ones from Debian sources and Emdebian patches.

Currently, Emdebian only has root filesystem packages for ARM but also supports machine:variant customisations.

Contents of the emdebian-rootfs package

  • emsandbox : Emdebian wrapper around debootstrap providing machine/variant specific customisation for a small root filesystem based on Emdebian packages.


Emdebian cross-compiler toolchains

Modifying the Emdebian packages requires a cross-compiler and the supporting packages. Emdebian provides pre-built toolchains for the architectures supported by Debian for installation on i386, amd64 or powerpc. Toolchains are complex sets of packages and it remains difficult to maintain a full set of installable packages, especially during transitions in gcc or glibc.

emsetup tries to automate the process of identifying and installing all the packages necessary to provide a cross-compiler on a given system for a specified host architecture. Where a suitable toolchain is not available from Emdebian, emchain can assist in cross-building gcc and preparing suitable versions of other packages for you. Even with this assistance, it is not always possible to provide an installable toolchain for all requirements. Feel free to nag Emdebian on IRC or the mailing list for help if your requirements are not currently met and /or available packages cannot be installed. The Emdebian website does include instructions for preparing a toolchain manually but this may involve patching gcc and other packaging tasks.


Repackaging Debian packages for a smaller installation.

Emdebian Grip is currently being tested (Nov 08) - repositories will be available on this site once testing is complete.

The emdebian-grip package (which can be installed separately from emdebian-tools) contains scripts to obtain, unpack, remove certain files, repack and include into a dedicated repository.

Packages for Emdebian Grip are not cross-built (not rebuilt at all) which has a few effects:

  • Packages for Emdebian Grip need to exist in Debian (to obtain binaries for each supported architecture).

  • Emdebian Grip will retain the pre-built objects, unmodified. Maintainer scripts are retained. Package names are retained, along with functionality, so that existing Debian tools can be used with Emdebian Grip packages.

The aim of Emdebian Grip is to reduce the size on various levels:

  1. Installed size of packages - removing manpages, removing info pages, migrate localisation support into Emdebian TDebs.

  2. Package meta-data - truncate the long description, remove various control fields like Recommends:, Suggests:, VCS* and Homepage: to reduce the size of the package data cache.

  3. Limited package numbers - by using a "filtered" repository, Grip controls the number and range of packages available whilst retaining a complete dependency chain using edos-debcheck. This further reduces the size of the package meta-data on the device as well as reducing the time taken to synchronise Emdebian Grip with Debian. Unfortunately, this currently means that two repositories are needed.


[ Cross building ] [ Root filesystem ]


See the emdebian contact page for information on contacting us.

Last Modified: Sat, Nov 15 06:25:13 UTC 2008
Copyright © 2000-2008 The Embedded Debian Project;
Emdebian is an offical subproject of Debian.