-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Failed to compile on a Raspberry Pi 2 #209
Comments
yes, the backend for ARM is not available yet. this is still in my plan. at the moment, even though Unicorn can emulate multiple architectures, it only works for X86 host. i have no ARM hardware at the moment. if you can donate a Raspberry Pi, i can put this as priority! thanks. |
Please explain how I can help you, maybe having qemu for arm...
|
On Odroid C1 it looks like this:
|
yes, it is the same issue. |
Why don't you set up a donation button on the unicorn home page towards this goal? If an arm SBC is needed, the $35 or so should be rather easy to raise. |
i will think about that. to clarify: it is not like i cannot afford such a machine, but it is more about getting community involved & contributed for this open source project. thanks. |
Indeed, that's precisely what I had in mind :) BTW, could you or lunixbochs comment on the suitability of both your projects in this thread? |
yes, building emulators for games on top of Unicorn should be one of the most prominent applications of this engine. a lot of hard work is needed, but i really look forward to the first game emulator like this. so the idea is that you have x86 binary, and you want to emulate that on ARM? |
Yep, that's what the person was asking about. It would be great in an x86 linux SDL game if the SDL/OpenGL parts could get translated natively using the local SDL and glshim. I think if you care to post there yourself, maybe the odroid guys could help with some hardware needs. It should be good for the project's publicity anyway. (a separate thread would be a good idea, especially right above ExaGear :) ) |
glshim can already punch through a user-mode emulator for rendering, without the emulator's participation, as long as shared memory is supported (which unfortunately does not currently include Unicorn/Usercorn, as there's no file mmap interface, but I just opened #261 for that). Check out https://boards.openpandora.org/topic/11506-glshim/?page=17#comment-393842 for some info on using it with Exagear. Unfortunately QEMU's CPU perf won't come close to Exagear's for games without some floating point changes (which I've PoC'd for a ~2x speedup, though full NEON support in TCG would be better), and maybe a single address map mode where guest = host address (that's part of why Exagear has such fast memory IO). I'm actually pretty interested in writing a runtime-assisted static recompiler with Usercorn to assist with porting games as well. |
Thanks, strange that the ExaGear announcement from a few days ago doesn't mention this at all. Even if still unofficial and unsupported it looks like the best bet. (at least until a Unicorn based emulator becomes usable) |
They know about it and I've been working with them on it, but I guess they're waiting for better WINE support. |
@aquynh, would you be willing to give an overview of the work that would be required to write a backend for ARM hosts? |
you can diff Unicorn's qemu/tcg/i386/* with the same directory of Qemu 2.2.1 to see what was changed for Unicorn. then you do similar thing with qemu/tcg/arm/. |
@gaffe23 it almost compiles. TCG has slightly different backends for each arch. Take a look at my comment here #259 TCG needs to be tweaked slightly from normal QEMU, because on normal QEMU you have a different QEMU binary for each architecture (like qemu-i386, qemu-arm, etc). With Unicorn, qemu-i386 and qemu-arm are both in the same binary, which I think causes tcg.o to link multiple times. tcg.o for ARM currently throws "duplicate variable definition" if you link it multiple times due to some extern-defined ARM platform detection variables. |
i dont have time right now, but you can take a look at qemu/header_gen.py. some duplication symbols can be put there, and then you run "make header" to generate new code. this helps in some cases, but sometimes you need to modify more in the core to solve this duplication problem. |
@lunixbochs, you should diff qemu/tcg/i386/* against Qemu 2.2.1 to see what else is modified for Unicorn. it is a bit more complicated than just fixing some duplication symbols. |
@aquynh Have you seen the recent $5 Rpi Zero news? I could donate that much to be able to play with usercorn on arm :) |
Haha is this still possible to run Ubuntu with Gcc on this machine? if so, would be a nice platform to test. Yes will be great if you can donate. Can you please email me for more discussion? Thanks! |
Running in cli mode won't be a problem, it's an ordinary single-core 512 MB Rpi, slightly overclocked - the only problem I foresee is being able to get it quickly (it's already sold out at the moment I think). |
Hopefully the issue is trivial and it will soon become possible to try x86 emulation out: EDIT: |
Good job !
|
cool! you guys are still welcome to donate some hardware so i can play with this :-) |
Anyone wanting to build unicorn natively, be aware the Makefile defaults to: make -j8 so on 1GB boards it's necessary to provide some (ZRAM) swap. Even so I was able to build entirely from ramdisk. |
if we change that to "make -j4" by default, does it help? |
Yeah, that will potentially halve the memory usage during build. I've also had issues building unicorn in virtual machines with limited ram. |
i pushed a commit to change "-j8" to "-j4" by default |
@aquynh I've put in a word for you in the thread about the upcoming 64-bit Odroid C2 board. I sincerely hope these guys possess some marketing savvy! |
thanks for the word! Unicorn can compile and run on ARM64 now. please spread this news, thanks. |
Hello guys,
So, I have discovered your project because someone suggested it to me on freenode.net.
I downloaded the code and do what COMPILE.txt explain, but I fail to compile using ./make.sh with the folowing error :
Hope it will be usefull and you can help me.
Have a good day 😄.
The text was updated successfully, but these errors were encountered: