Raja's Exocortex

Binary Emulation

Running non-native binaries is useful because:

  1. Some x86 only binaries are unavailable on ARM, need x86 emulation on ARM - used on AWS/OCI ARM servers.
  2. ARM devices are slow, need ARM emulation on x86 - used to speed up Raspberry Pi upgrades by mounting the root file system on x86 server with ARM emulation.

Enabling Emulation on Ubuntu

qemu offers wide architecture support to run x86, ARM, SPARC, etc on any platform. Using binfmt-support registers platform support with the binfmt_misc kernel module to automatically run qemu whenever a non-native binary is run.

Once setup, non-native binaries can be run transparently on any platform.

apt-get install -y qemu qemu-user-static binfmt-support

# Now any non-native application can be run transparently
# It helps to have static binaries that do not have any library dependencies

See also

  1. compiling-static-binaries