top | item 25749490

Huawei ExaGear: x86_64 apps on Arm 64-bit Linux systems

143 points| my123 | 5 years ago |threedots.ovh

58 comments

order
[+] chmod775|5 years ago|reply
Note that Eltech's ExaGear used to be a thing, and has now largely disappeared, along with the company homepage.

I don't know whether they've been bought by Huawei, who is now reviving the product under their own name.

Original announcement of discontinuation:

    --- Eltechs Weekly News Digest ---

    We have discontinued ExaGear...
    Dear ExaGear users!

    We're really sorry to announce our business decision about discontinuing our services and products.

    You'll be able to continue using all of your purchased products, the license checking functionality will work.

    You can download our most recent ExaGear Desktop version 3.1 below:

    ExaGear Desktop for Raspberry Pi 3
    ExaGear Desktop for Raspberry Pi 2
    ExaGear Desktop for Raspberry Pi 1/Zero
    ExaGear Desktop for Odroid XU4
    ExaGear Desktop for Odroid C2
    ExaGear Desktop for Odroid 32bit
    ExaGear Desktop for NVIDIA Jetson TX1 / TX2
    ExaGear Desktop for NVIDIA Jetson TK1
    ExaGear Desktop for CubieBoard
    ExaGear Desktop for Banana Pi
    ExaGear Desktop for ARMv7
    ExaGear Desktop for ARMv8
    We strongly recommend to save ExaGear installation package on your own hard drive because the download won't be available after February 28th, 2019.
Source: https://web.archive.org/web/20190227095445/http://forum.elte...
[+] chmod775|5 years ago|reply
Some more information:

A chinese-speaking internet user put in some research and according to them it appears to be Eltech's software. They also appear to be somewhat angry that Huawei did not properly credit Eltech.

Note that apparently there was a lot of controversy around this on Chinese boards, with people arguing vehemently for either side (based on Eltech's software vs. not based on it).

Chinese: https://zhuanlan.zhihu.com/p/263519125

Translated: https://translate.google.com/translate?sl=auto&tl=en&u=https...

HN user 'oefrha' managed to find the official project page and documentation:

https://news.ycombinator.com/item?id=25750553

[+] my123|5 years ago|reply
Eltechs' ExaGear at the time only provided x86_32 compatibility on top of 32-bit Arm.

This is a major departure from that, my best guess would be that Huawei purchased the company and then poured lots of resources to it.

[+] trizic|5 years ago|reply
Also check out Box86: https://github.com/ptitSeb/box86

Impressive to see people playing Half-Life 2, Unreal Tournament 99 and 2004 on a Raspberry Pi 4.

Curious if this could be extended to Emscripten (JIT for WebAssembly/Emscripten?) which would be perfect for archiving and portability. Closest project I have seen is DOSBox-X which seems to already have an Emscripten port: https://github.com/joncampbell123/dosbox-x

HL2: https://www.youtube.com/watch?v=Lq5dJ0oc_6k

UT2004: https://www.youtube.com/watch?v=4VOAeOQcrdo

[+] spijdar|5 years ago|reply
Another fun thing about box86 is it isn't specifically limited to ARM. Its JIT translator is ARM-specific, but it includes a pure emulator which will work on any CPU. There's additional work to be done for each port, but I got it working on 32 bit PowerPC LE, allowing one to run x86 apps on IBM's POWER processors. For all the few dozens of people this may be relevant to :-)
[+] dleslie|5 years ago|reply
Sadly, box86 doesn't support aarch64.
[+] johndoe0815|5 years ago|reply
An interesting excerpt from the article:

"ExaGear does not follow TSO completely by default, using heuristics instead." TSO emulation can be enabled fully, using heuristics, or turned off using a configuration option. It would be interesting to see benchmarks that analyze the performance (and correctness) impact of full TSO emulation vs. heuristics.

Another interesting bit that is mentioned is that like Apple's M1, NVidia's Tegra K1 64-bit and Tegra Xavier support sequential consistency as the memory model.

[+] my123|5 years ago|reply
Apple M1 has togglable TSO with ACTLR_EL1, not sequential consistency.

You also don't run as TSO by default, has to be toggled on by the kernel when context switching to a given task.

[+] willxinc|5 years ago|reply
This would make sense, as Eltech's engine was used extensively across multiple ports done by Nvidia for their Shield platform (RE5, MGRR)
[+] Klasiaster|5 years ago|reply
What qemu-user makes so special for me is that is can be pre-loaded by the kernel, allowing any foreign arch chroot to directly work, nice for containers¹. I've not read if this here does support it, too.

¹ Once `qemu-user-static` is installed on your system, try `docker run --rm -ti docker.io/arm64v8/alpine` on amd64 or vice versa

[+] my123|5 years ago|reply
This supports it too. See the ExaGear4Docker folder in the install archive.
[+] throwaway4good|5 years ago|reply
I wonder if this is related to Huawei's effort to bring forth desktop PCs and laptops based on their Kirin/Kunpeng ARM CPUs? Running a desktop version of their HarmonyOS with x86 apps in a compability layer.
[+] FooBarWidget|5 years ago|reply
Any solutions for doing the reverse, namely running arm64 binaries on x86_64? Use case: building ARM software packages (like Docker containers) on x86_64 CI servers.
[+] obilgic|5 years ago|reply
Every time I travel abroad, I'm amazed by how much Huawei has penetrated every major market except U.S.
[+] coliveira|5 years ago|reply
The reason is obvious: the US is enacting barriers to the internal market. But Huawei is developing all kinds of technology around the world.
[+] mlacks|5 years ago|reply
I wonder if it’s partly due to the US being able to afford alternatives, wether they are cost effective or not.

For many installments, the Huawei option is just cheaper.

Keep in mind China does the same for US technology companies.

[+] the_duke|5 years ago|reply
And Europe.

Sure, there are some Huawei phones and other devices around, but they are not very common.

(mobile phone market share in Europe is ~ 15%, and lower in the western Europe)

[+] selfhoster11|5 years ago|reply
Anybody know why this is showing up with Huawei branding after Eltechs shut down? I presume this must be because ExaGear was acquired, but I cannot find any information online about this, at least in English.
[+] paddim8|5 years ago|reply
This is really interesting.

"ExaGear is a dynamic binary translation layer to run x86_32 and x86_64 applications on Arm 64-bit Linux systems."

Couldn't this eventually be used in combination with Asahi Linux (project aiming to run Linux on Apple M1)? That would be incredible. Too bad it's from Huawei and doesn't seem to be open source though? I'm unable to find any additional information about this.

[+] StillBored|5 years ago|reply
That is possible today with qemu/TCG. The assumption with exagear and some of these other JITs is that they are faster.
[+] pabs3|5 years ago|reply
I wonder if Huawei plan to open source this? That they make it publicly available makes it seem like they don't plan to monetise it, so the next step would be to open source it, unless patents or third-party code prevent that.
[+] woodruffw|5 years ago|reply
This is the first I'm hearing of a dynamic binary translation tool from Huawei. This link only has a binary download and search results are scant; does anybody know any more about ExaGear?
[+] selfhoster11|5 years ago|reply
ExaGear was originally developed by a company called Eltechs. I presume this must have been somehow acquired by Huawei.
[+] danielEM|5 years ago|reply
Does it really matter for Linux world where you jest compile software from open sources anyway?
[+] HideousKojima|5 years ago|reply
There's plenty of software where the source isn't available, and plenty of open source software where it won't compile for a different architecture without significant work because of runtimes or other dependencies