Emdebian Multistrap information
Multistrap and cross-building
[ Multistrap overview ] [ Secure Apt ] [ Example configurations ] [ Using multistrap for pbuilder chroots ] [ Multiple repositories ] [ Cascading configuration ] [ Cross building support ] [ Multistrap Wiki page ]
pdebuild-cross
Multistrap provides a way to simplify the process of cross-building Debian packages inside a clean chroot. pdebuild-cross uses a multistrap configuration to replace debootstrap in the creation of the chroot and then uses pbuilder hooks to keep the cross building meta-data up to date and to install cross-dependencies at build time.
By default, pdebuild-cross-create gives you a cross-building chroot for your default dpkg-cross architecture, or armel if none was set. To change this:
$ sudo dpkg-reconfigure dpkg-cross
Specify your chosen architecture in the CROSSARCH field in pdebuild-cross.rc and change the MULTISTRAPFILE field in the same file to specify the multistrap configuration file for this architecture. e.g. for mipsel, specify /usr/share/multistrap/mipsel.conf.
See also the debian-embedded mailing list archives
Create the cross-chroot:
$ sudo apt-get install pdebuild-cross $ sudo pdebuild-cross-create
From the package build directory (where pdebuild-cross can find debian/changelog), start the cross-build itself with:
$ pdebuild-cross
If the sources are in subversion, there is an additional helper script: svn-pdebuild-cross which also supports passing options on to svn-buildpackage. e.g.
$ svn-pdebuild-cross --svn-ignore
pbuilder usage
The cross-building chroot can be used directly with pbuilder:
$ sudo pbuilder login --configfile /etc/pdebuild-cross/pdebuild-cross.rc
Use the pbuilder support to make permanent changes within the cross-building chroot, should that be necessary:
$ sudo pbuilder login --configfile /etc/pdebuild-cross/pdebuild-cross.rc --save-after-login
Limitations
-
xapt is used inside the cross-building chroot, so each package will need a debian/xcontrol file with the cross dependency information:
Build-Depends-Tools - packages like debhelper which contain files that need to be executed within the cross-building chroot.
Build-Depends - packages which contain libraries and development headers typically. These will be installed as cross-dependencies using xapt.
Back to the Emdebian Project homepage.