[buildd-tools-devel] schroot and qemu

Roger Leigh rleigh at codelibre.net
Wed Nov 6 10:38:19 UTC 2013


On Tue, Nov 05, 2013 at 12:43:06AM +0100, Pascal Greliche wrote:
> Hello I created a schroot with "mk-sbuild --arch armel" it works well by running qemu automatically.
> Now I have a rootfs already built and would like to work the same way.
> how schroot knows it needs to run qemu?

This bit is "magic"; schroot itself knows nothing about qemu.
This is done entirely by the Linux kernel using its "binfmt_misc"
support; the qemu package registers the qemu programs for each
supported binary format, so when you run an ELF armel linux
binary, it knows to run it using a particular qemu program.

The only thing schroot does is to bind mount the appropriate
qemu interpreters in the chroot so that they are available.
This is done by the 15binfmt setup script.  Apart from this
tiny bit of setup, everything else is just handled by the
kernel directly.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



More information about the Buildd-tools-devel mailing list