Foreign Environments a-la Scratchbox
Apr. 4th, 2011 02:57 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
The following steps are to create foreign architecture schroot(1)
environments similar to those in Scratchbox. The example is for Debian-based x86 host and little-endian ARM target. The resulting emulated environment will make use of Qemu as an interpreter for non-native binaries (see /proc/sys/fs/binfmt_misc
Linux kernel facility).
- Install the
qemu-user-static
package which automatically registers Qemu interpreters for binaries of architectures supported by Qemu, including ARM. - Copy
/usr/bin/qemu-static-arm
into/new/chroot/dir/usr/bin
. - Run
debootstrap --arch=arm etch /new/chroot/dir http://archive.debian.org/debian
. -
Append the following paragraph to
/etc/schroot/schroot.conf
for the new environment:
[arm] type=directory directory=/new/chroot/dir
-
Check the resulting environment:
alexo@codedot:~$ schroot -c arm (arm)alexo@codedot:~$ uname -srm Linux 2.6.32-5-amd64 armv5tel (arm)alexo@codedot:~$