Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to recompile binaries from x86 to ARM on linux?

I'd like to collect some ideas about the solution of following problem. I've got a TOF camera, and its driver for linux x86/64. It works fine. But in fact the camera would be used on an ARM based embedded device if that's possible.

Questions:

  • should I have to decompile the driver binaries and recompile with ARM compiler? is there any available decompiler tool?
  • is there any ARM>>x86 emulator which is available?
  • any other ideas?

ps: the pure source is very expensive, so I don't like to purchase it anyway :)

like image 644
brx Avatar asked Jan 08 '13 16:01

brx


People also ask

Can you run x86 apps on ARM Linux?

Box86 and Box64 are emulators that can be used to run traditional x86 apps in ARM.

Does x86 work on Arm64?

The WOW64 layer of Windows allows x86 code to run on the Arm64 version of Windows. x86 emulation works by compiling blocks of x86 instructions into Arm64 instructions with optimizations to improve performance.


1 Answers

  1. AFAIK, as of today, there's no such decompiler that will generate compilable code from machine code. You will have to manually fix (usually a LOT of fixes) the generated code. You can check this question for Linux decompilers.
  2. Check QEmu. Underlying architecture is not relevant as long as you can execute it ;)
  3. There's not much besides what you've stated.

What you're attempting is (in part) reverse engineering. RE is a complex process and requires great knowledge in the thing you're attempting to reverse; in your case camera drivers. If you have knowledge in this area, go ahead. If you don't, I wouldn't waste my time on it (or get the knowledge first ;))

like image 119
m0skit0 Avatar answered Nov 14 '22 23:11

m0skit0