emdebian logo
 

About Emdebian
 Emdebian & Debian
 Purpose
 Customisations
 Tdeb support

Cross toolchains
 Toolchain packages
 Toolchain Status

Packages
 Root Filesystem
 Build Tools
 Target packages
 Repository Key  Crossbuild bugs

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.


[ Cross building ] [ Root filesystem ]


See the emdebian contact page for information on contacting us.

Last Modified: Sun, Apr 6 02:00:18 UTC 2008
Copyright © 2000-2008 The Embedded Debian Project;
Emdebian is an offical subproject of Debian.