View Single Post
Applesaws's Avatar
Posts: 21 | Thanked: 15 times | Joined on Jan 2011
#95
Originally Posted by orokusaki View Post
This is very cool. I have been trying to get this going for about 2-3 days. I can run

qemu-i386 /chroot/lib/ld-linux.so.2 --library-path '/chroot/lib' /chroot/usr/bin/wine-pthread

Which gives me:
qemu: Unsupported syscall: 240
Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit

So it does run, if I change my library-path it doesnt get this far. So something is working.

But I cannot chroot. It says:
chroot /chroot
chroot: cannot run command `/bin/sh': No such file or directory

But /chroot/bin/sh is there.. and its the i386 version.

I have used qemu 0.15 compiled myself on my phone (took hours) and ubuntu 9.04 chroot...

I dont have a nokia phone, I have a motorola droid. So I have it chrooted for an ubuntu arm. Then in that enviroment, am I then running vncserver, and then export display=0:1 and then xterm and then try to run qemu-i386, but run i386 compiled apps in a folder called /chroot. I made an img file of /bin /lib, everything you took from slackware, I took from ubuntu 9.04.. stuck it in an image file and mount it with -o loop.


qemu-i386 /chroot/lib/ld-linux.so.2 --library-path '/chroot/lib' /chroot/usr/bin/wine-pthread /chroot.sol.exe

qemu: Unsupported syscall: 240
qemu: Unsupported syscall: 240
wine: fork : Invalid Argument

Even recompiled the kernel to get bin_fmtmisc
The problem is that the kernel doesn't know to run x86 applications with qemu unless you tell it to with binfmt. And since wine-pthread doesn't know to fork things by calling qemu (the kernel is supposed to step in and do that if binfmt is configured correctly when it sees an x86 application), nothing works unless binfmt works. Unfortunately, AFAIK no one has been able to make the chroot work, most experiencing similar errors to yours, probably indicating that we all have problems with our chroots or our binfmt magic is configured incorrectly.
Damion, please come back and help us =(