[buildd-tools-devel] schroot and qemu

Pascal Greliche pascal.greliche at mac.com
Wed Nov 6 14:22:51 UTC 2013


Thanks,

interesting answers. I added qemu-arm-static in the right place and now it works (binfmt was already there)

The 15binfmt setup script is not in my distrib (Ubuntu 12.4 LTS)
ls /etc/schroot/setup.d/
00check  05btrfs  05file  05lvm  05union  10mount  15killprocs  20copyfiles  20nssdatabases  50chrootname  99check

I'll investigate later if it is normal and/or how to add it.

Thanks

-- 
Pascal greliche

Le 6 nov. 2013 à 14:19, Wookey a écrit :

> +++ Roger Leigh [2013-11-06 10:38 +0000]:
>> 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.
> 
> And this page ( https://wiki.debian.org/Arm64Qemu ) explains how to do
> this 'manually' if you need to (e.g. for an arch not yet in the qemu
> package). That shows where the files go and what they look like to
> implement the binfmt magic. It's all rather nifty.
> 
> 
> Wookey
> -- 
> Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
> http://wookware.org/
> 
> _______________________________________________
> Buildd-tools-devel mailing list
> Buildd-tools-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/buildd-tools-devel




More information about the Buildd-tools-devel mailing list