Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V support #136

Open
volkertb opened this issue Apr 9, 2023 · 5 comments
Open

RISC-V support #136

volkertb opened this issue Apr 9, 2023 · 5 comments

Comments

@volkertb
Copy link

volkertb commented Apr 9, 2023

I'm frankly surprised that no one else has created an issue for this feature request yet.

Obviously, adding support for a different architecture is far from a trivial task, as we can see from the work that was needed (and continues to be needed?) to get it working with ppc64le.

But RISC-V is a promising architecture, and although not yet as ubiquitous as ARM, it's beginning to gain some serious industry traction. And with more affordable development hardware becoming available for it as well recently, perhaps it would be a good idea to start thinking about what would be needed for Hangover to allow 32-bit and 64-bit x86 applications to run on RISC-V hardware?

Thanks for considering.

@OctopusET
Copy link

I'm building hangover on my visionfive2 (riscv64) now. I changed arm to riscv32 when I build qemu. Build works for now but the problem is llvm-mingw.
It doesn't support riscv64, what could be the solution for it?

@AndreRH
Copy link
Owner

AndreRH commented Apr 10, 2023

Mostly RISC-V is in the same bucket as PPC64le. There's a distinction between unixlib based WoW64 (old wow64) and PE based WoW64 (new wow64). Hangover now only works with new wow64, so even if you port the unix side of Wine to RISC-V or PPC64le you can't have PE files loaded with the emulator in between. I still haven't investigated if that's a hard limitation or we could work around it.
As with PPC64le there were already patches for RISC-V, I started the port in the Wine 3.x era, but there was no user interest back then so I stopped: https://github.com/AndreRH/wine/tree/riscv64
Supporting 64-bit x86 applications is currently another Hangover limitation and will likely be solved upstream for ARM64. One thing here I could imagine is that porting wow64.dll to w64ow64.dll (or whatever name suites best) might be a hacky general purpose solution.
llvm-mingw is only used to build the PE parts of Wine, that could be solved by crosscompilation. The real problem is that Wine itself can't be build for RISC-V yet (see my old branch above).

All this won't happen in my spare time until:

  • The ARM64 solution is stable enough
  • I see real demand for it

But patches are welcome for those points:

  • Find out if PE-on-unixlib wow64 is possible
  • Bring back the RISC-V64 port
  • Make a 64-bit version of wow64.dll for 64-bit x86 applications

@AndreRH
Copy link
Owner

AndreRH commented Oct 13, 2023

So I think I'm happy enough now with the ARM64 solutions we have.
And testing revealed it's possible to have PE-on-unixlib wow64, even without hacks.
Though 64-bit applications likely won't be possible.
I added https://throne.com/andrerh/item/b263322d-3c73-4423-90bc-34b5936d5efd and a RISC-V Patreon level: https://www.patreon.com/checkout/andre_opensource?rid=10905632

@volkertb
Copy link
Author

@AndreRH Please check your direct messages on Patreon. Thanks! 🙂

@volkertb
Copy link
Author

volkertb commented Oct 22, 2023

@AndreRH Have you seen this yet? https://www.phoronix.com/news/Milk-V-Oasis

There is currently a discount offer for pre-orders, but shipping won't be expected until 10 months from now.

Stil, it looks like an interesting (additional) development platform to keep an eye on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants