Windows apps are mostly compiled for x86 and they won't run on ARM with bare Wine, likewise ARM applications won't run on x86(_64) with bare Wine, so this is not our motivation. The original Motivation was to be able to run winelib-apps on ARM, that even was before it got public that win8 will run on ARM devices. Meanwhile we are in progress to support these new ARM PEs for win8! Possible other goals, but they need some more brainstorming:
use it for WineCE, which might be able to run WinCE apps. Actual Problem is that all CE apps come along without relocation table, so they should be loaded at their baseaddress (0x10000), which might not always be free. (Further all DLL exports should be register call on x86.) Still there is a pre-alpha or maybe proof-of-concept of WineCE at github.
run the assembler parts of x86 in qemu and call function in Wine compiled for ARM, which might speed up some things (darwine tried that before to support x86 apps on PowerPC, but they stopped because the byteswapping (big endian <-> little endian) was too much work, but ARM is mostly little endian, so we have a chance if everything works fine with packed structures. I already gathered some information how darwine tried to do it)
- Yes, It works! (TM)
- First patch was September 18. 2009, final patchset sent September 18. 2010 and they got in Wine-1.3.4
- Wine on ARM already get's packaged in Maemo and Fedora.
- Already ported Putty to ARM as winelib application.
- Running trivial win8 ARM PEs also works with native c runtime.
libs/port/interlocked.c: get multiarch ready
libs/wine/port.c: add assembler parts
add assembler parts in winebuild
find the problem with wineboot
rebase the patches to current git
make some tools and dlls ARM ready (step by step, mostly easy so AndreHentschel will do it when its time has come)
turn the debugger stuff in winedbg and dbghelp from stubs to implementation for ARM (mostly done)
add an ARM disassembler
add a Thumb disassembler
add a Thumb2 disassembler
Implement LCMapStringEx to support win8 PEs (Bug 29730)
relay tracing (winebuild port to ARM? on wine-devel)
- libs/port/interlocked.c: maybe native operations
Notify the user when the kernel doesn't use a 3GiB/1GiB user/kernel virtual memory split (Bug 31892)
- Get the Linux Kernel patch upstream that fixes running win32/ARM applications
e.g. crosscompiling per Scratchbox (An ARM mode crti.o is expected)
wine-1.5.4 - wine-1.5.7
Use the Linaro toolchain (A Thumb mode crti.o is expected (Bug 30134))
Every toolchain with Thumb support should work as we are independent from the crti.o mode now
Compiling on the ARM Device is recommended, anyway here is a crosscompiling example:
../configure --host=arm-linux-gnueabi host_alias=arm-linux-gnueabi --with-wine-tools=../path/to/your/native/wine/build
How to help
- Fix compiler warnings
x86 per qemu
Actually there is a bug in qemu, so it can't work without a patch (qemu-i386-user on ARM host: wine hangs).
This configuration is not supported, but you'll be able to run some Applications. Don't ask for support on winehq.org, but be free to read I got Wine/x86 1.5.11 to run on Linux/ARM with qemu!.
- compile it with
./configure --target-list=i386-linux-user --extra-cflags=-marm && make
- copy Wine/x86 with all needed libraries from your desktop to the corresponding /usr/gnemul/qemu-i386/* folders except wine-preloader (it won't work)
- as root run
echo ':i386:M::\x7fELF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff\xff:/path/to/patched/qemu/i386-linux-user/qemu-i386:' >/proc/sys/fs/binfmt_misc/register echo ':DOSWin:M::MZ::/usr/gnemul/qemu-i386/usr/bin/wine:' >/proc/sys/fs/binfmt_misc/register
- create a wineprefix on your desktop with
WINEARCH=win32 WINEPREFIX=~/.winex86 wine wineboot
- copy it from your desktop to your home folder
- run Wine/x86 with something like /path/to/patched/qemu/i386-linux-user/qemu-i386 /usr/gnemul/qemu-i386/usr/bin/wine winecfg
Remember: This configuration is not supported. Don't ask for support on winehq.org.
My and Vincents slides can be found here: FOSDEM2013
Example of porting existing source to Android using SDL: Qemu on Android
Much earlier, there was some experience using Qemu to run the WINE x86 binary under Zaurus's ARM Debian: http://www.oesf.org/forum/index.php?showtopic=14829
Mixed topic, including ARM discussions: http://forum.winehq.org/viewtopic.php?p=67218
Some x86-to-ARM translation strategies were also discussed: http://forum.openhandhelds.org/viewtopic.php?f=16&t=1088
Replacing X11 backend driver with SDL (mostly for Android): http://forum.winehq.org/viewtopic.php?t=13533
Android running x86 wine and solitaire (by using ubuntu hack and binfmt) : http://forum.xda-developers.com/showthread.php?t=1258506