Fri Mar 25 18:39:49 EDT 2016


Hard to understand how it actually works, but with binfmt-support, it
seems to be sufficient to place the target ld, ld-linux and libc in

root@zoe:/etc/qemu-binfmt/arm/lib# ls -l
total 1344
-rwxr-xr-x 1 root root  134328 Feb 27 00:48 ld-2.18.so
lrwxrwxrwx 1 root root      10 Feb 22 23:03 ld-linux.so.3 -> ld-2.18.so
-rwxr-xr-x 1 root root 1239048 Feb 27 00:48 libc-2.18.so
lrwxrwxrwx 1 root root      12 Feb 22 23:02 libc.so.6 -> libc-2.18.so


So the way to go seems to be to get binfmt-support to work properly.
That is then linked to run qemu-arm-static (or any other program).

qemu-arm-static uses /etc/qemu-binfmt/arm/lib (hardcoded default).

So i have it working up to the point that it works manually:

  cd $ROOT/bin ; qemu-arm-static ls

but not automatically

Installing qemu-user-binfmt made it work on zoo, which uses qemu-arm from qemu-user package.

Also works on zoe, but I need to keep /etc/qemu-binfmt/arm/lib directory.

I still find it odd that I can't chroot..

Ha, on zoo I had trouble before it looks like:
tom@zoo:/lib$ ls -al ld-linux.so.3 
lrwxrwxrwx 1 root root 28 Feb 17 17:26 ld-linux.so.3 -> arm-linux-gnueabi/ld-2.21.so

It's part of libc6:armel

Final word:

dpkg --add-architecture armel
apt-get update
apt-get install libc6:armel qemu-user-binfmt


apt-get install libc6:armel qemu-user-static

Both work.
Now why doesn't the timesys chroot work?

Wow this is tricky...  This worked:

chroot mnt qemu-arm-static -L / bin/sh

This runs qemu-arm-static inside chroot, which is then told to look
for libraries at / instead of its default location.