PINE64
Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook (https://forum.pine64.org/forumdisplay.php?fid=76)
+--- Forum: General Discussion on Pinebook (https://forum.pine64.org/forumdisplay.php?fid=77)
+--- Thread: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? (/showthread.php?tid=6877)



Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - UltraBloxX - 11-25-2018

QEMU has an interesting mode, where it can emulate only machine instructions of usermode binariesĀ and not an entire machine with own kernel. This should allow transparent execution of x86 binaries in theory. Has anyone tried this with a Pinebook? And if yes, what's the performance like.

https://ownyourbits.com/2018/06/13/transparently-running-binaries-from-any-architecture-in-linux-with-qemu-and-binfmt_misc/


RE: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - cvmiller - 11-25-2018

Haven't tried it, but I suspect it would be pretty poor bordering on unusable.


RE: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - UltraBloxX - 11-26-2018

Well, from what I read, on Raspberry Pi 2 it's pretty usable (and it's SoC is also based on Cortex A53 cores). Besides x86 Linux apps, people were even able to get Windows apps to work through Wine that way. Obviously, performance wouldn't be blazing, but it should be usable for modest and non-CPU/GPU intensive tasks. Unlike full-system emulation, kernel and syscalls would be still native ARM, will full native performance.

I will try to get it running, apparently, qemu-user-static is present in repos and binfmt_misc support in Neon kernel is also present. Only a chroot x86 environment, such as Debian/i386 is required to get it running.


RE: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - UltraBloxX - 11-27-2018

Well, I was able to install a debian stretch i686 chroot with debootstrap, and enter it with QEMU user mode.

I was roughly following tutorial for Raspberry Pi:

https://www.raspberrypi.org/forums/viewtopic.php?t=204547

It's not quite fast, but it works and it consumes a very small amount of memory (overhead is very small per process). And not that slow, as you would expect from true x86 VM on ARM. Overall, CLI is usable. If such chroot is connected to running host X11, this certainly opens up a way to run some x86-only applications on Pinebook (and even some Wine apps).

It's still rough around the edges, like, you need to replace in chroot the /usr/bin/chfn with a symlink to /bin/true during installation. Also, for some reason - it's faster on KDE Neon than on Armbian.


[Image: cN8ak4pl.png]



RE: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - meredith - 12-16-2018

I have run SpiderOak this way, which is about the only thing I've run into that was both closed-source and non-ARM, and it worked but was painfully slow because SpiderOak is just an intense app. Smaller tests using hugo (a golang static site generator) binaries were quite pleasing though.

It's been a bit since I did this but I didn't use an alternate root filesystem and instead used debian's multiarch support -- IIRC there's even package support that sets up binfmt_misc for you.

Check out https://wiki.debian.org/QemuUserEmulation

It has some outdated info now, I believe you can stop reading at "That's it." Oh, and when adding a new arch and pulling libraries for it, you need to use "i686" or "amd64" since this was written for someone who wants to run emulated armhf binaries.


RE: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - strider - 12-18-2018

I've managed to get exagears running on the DietPi image (couldn't install it on Neon). Still haven't managed to get anything graphical running but I doubt there will be good results if exagears doesn't support the Mali GPU.


RE: Is it possible to run x86 binaries on Pinebook via QEMU user space emulation? - igorp - 12-21-2018

Armbian officially provides Exagear virtually for all Ubuntu based desktops out of the box. For year(s) - installation goes from armbian-config

On a more powerful board it looks like this:
https://www.youtube.com/watch?v=__HKvtiOSTY
https://www.youtube.com/watch?v=cz7eEvp5DN0

On all hardware. Performance is as is.

> Also, for some reason - it's faster on KDE Neon than on Armbian.

Compare speed on the same kernel. It is not very likely that fancy OS like KDE Neon is faster in any task.