ARM Wine -- Raspberry Pi and 2G/2G vs 3G/1G

Questions about Wine on Linux
Locked
hinchliff
Newbie
Newbie
Posts: 2
Joined: Fri Mar 24, 2017 8:14 am

ARM Wine -- Raspberry Pi and 2G/2G vs 3G/1G

Post by hinchliff »

I have been experimenting with running Wine on ARM from within Docker containers, with the purpose of using them on Raspberry Pi:

https://github.com/hinchliff/arm7-wine
https://hub.docker.com/u/hinchliff/

I have been doing most of this development work on my x86 based laptop, using the excellent work from resin.io, and running ARM Wine in emulation on x86 in Docker actually works pretty well -- I can play all the winemine I want!

However, the first time I tried to use my hinchliff/arm7-wine-run docker container on a Raspberry Pi 2, I ran into this error "Wine requires a 3G/1G user/kernel memory split to work properly."

Do you have any suggestions for recompiling Wine to work with the 2G/2G memory split on the Raspberry Pi? I do not want to recompile the linux kernel on the Raspberry Pi. It looks like "exagear" has managed to modify Wine to support the 2G/2G split, but I have not been able to find any details on what changes they needed to make to Wine.

My first attempt at trying this is currently compiling within my Docker container. I have added this to my Dockerfile for arm7-wine-build:

Code: Select all

# Hack the Wine source to allow 2G/2G memory split
RUN sed -e 's/check_vmsplit( &temp );/\/\/check_vmsplit( &temp );/' -i /wine-source/loader/main.c && \
    sed -e '/context->Edx/ s/0xbfffffff/0x7fffffff/' -i /wine-source/dlls/krnl386.exe16/vxd.c && \
    sed -e '/static void *address_space_limit/ s/0xc0000000/0x80000000/' -i /wine-source/dlls/ntdll/virtual.c && \
    sed -e '/static void *user_space_limit/ s/0x7fff0000/0x5fff0000/' -i /wine-source/dlls/ntdll/virtual.c && \
    sed -e '/static void *working_set_limit/ s/0x7fff0000/0x5fff0000/' -i /wine-source/dlls/ntdll/virtual.c
So I don't know, yet, if that will work. But I think I will be pretty surprised if it does!
DarkPlayer
Level 2
Level 2
Posts: 23
Joined: Sun Mar 13, 2016 11:15 am

Re: ARM Wine -- Raspberry Pi and 2G/2G vs 3G/1G

Post by DarkPlayer »

hinchliff wrote: Do you have any suggestions for recompiling Wine to work with the 2G/2G memory split on the Raspberry Pi? I do not want to recompile the linux kernel on the Raspberry Pi. It looks like "exagear" has managed to modify Wine to support the 2G/2G split, but I have not been able to find any details on what changes they needed to make to Wine.
The reason why wine requires the 3G/1G split is because windows applications depend on this. Recompiling your kernel might therefore be a better solution.
hinchliff
Newbie
Newbie
Posts: 2
Joined: Fri Mar 24, 2017 8:14 am

Re: ARM Wine -- Raspberry Pi and 2G/2G vs 3G/1G

Post by hinchliff »

Yes, recompiling the kernel should work. But if "exagear" has managed to do this without modifying the kernel, I'd like to see if I can get something similar working (without having to pay for it). (And Wine is still compiling in my Docker container)
DarkPlayer
Level 2
Level 2
Posts: 23
Joined: Sun Mar 13, 2016 11:15 am

Re: ARM Wine -- Raspberry Pi and 2G/2G vs 3G/1G

Post by DarkPlayer »

I did not say that it is not possible, but the change might break the application you are trying to run. For exagear the things are a bit different, they emulate a whole CPU and can also emulate any kind of memory model, although this might require some kind of page file.
Locked