On Wed, Feb 10, 2010 at 10:38 PM, Damion Yates <dam...@google.com> wrote: > I've grabbed the latest stable qemu and compiled under scratchbox. I > hit an issue compiling it, with no __builtin__clear_cache() so linked in > a kludge.c containing a call to __clear_cache() with the params passed > as they would be to __builtin__clear_cache(). > > Firstly does this sound like it should work as a workaround?
That's how I did it (except that I replaced the calls to __builtin__clear_cache with calls to __clear_cache in tcg/arm/tcg-target.h and exec-all.h. > It certainly got me to the next level, which is that I can now run loads > of linux binaries on my armlinux system (a Nokia n900). I've tried tower > toppler (http://toppler.sourceforge.net/) which uses SDL (via X11) and > this was surprisingly fast, in fact it almost felt as fast as the native > toppler that somebody crosscompiled already. Most linux utils work when > I copy then and any dependant libs from my x86 laptop to the phone. I'm > lucky (I guess) that /lib/ld-linux.so.3 is the arm version and I'm using > a slightly older .2 for x86 so I can have both files there. I also > enabled arbitrary execution of binaries via binfmt_misc. The 600 Mhz Arm > V8 Cortex (I think it is), feels like it's running at about Pentium 90 > speeds, which I'm hoping is enough for what I really want to get going. The N900 has an ARMv7 Cortex-A8 (OMAP3). P90 is about the speed I'd expect. Note it will seem much slower if your program makes heavy use of floating point. > I want to run an old, possibly win16 Windows game under wine. I saw that > user mode qemu-i386 was able to run wine in a post in 2004: > http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/2004-June/014468.html > - This was on a PPC however. > > When I run wine it SEGVs out and the strace of it shows it dies trying > to do clone(). I also can't run things like xterm which can't do fork(). > Is this because by default it's trying to go via the arm "/bin/sh" to > invoke whatever it wants to exec() in to? > > Should clone()/fork() work? Has anyone been able to run wine ./blah.exe > under user-linux mode of qemu on arm or indeed any other non x86 based > CPU ? I have seen a complex Linux i386 program run on an ARM platform (with multithreading and Qt; note it crashed at some point but it was due to the application doing access to uninitialized memory). IIRC it was using chroot from inside QEMU (in main) to make sure that all calls to exec would happen on an x86 file system. You might give that a try. Laurent