A fast usermode x86 and x86-64 emulator for Arm64 Linux
Go to file
Ryan Houdek ebd0edbab7
Merge pull request #1632 from FEX-Emu/skmp/flush-test-harness
TestHarnessRunner: Flush log on asserts
2022-03-21 12:50:43 -07:00
.github Adds an option to disable the IR interpreter 2022-02-01 13:00:29 -08:00
CPack CPack: Add an ldconfig trigger 2021-11-21 10:38:56 -08:00
Data jit/arm64: COND_FGT should map to gt, not hi, as it is not FGTU 2021-11-25 22:32:02 +02:00
docs docs: Update Readme_CN.md 2022-03-08 18:10:08 +08:00
External Merge pull request #1628 from Sonicadvance1/fix_finit 2022-03-17 20:37:57 -07:00
FEXHeaderUtils Change page define usages over to self-defined 2022-03-06 07:33:10 -08:00
include Adds Config.h generated file 2021-03-23 19:12:18 -07:00
Scripts Scripts: Stop using deprecated Distutils 2022-03-01 07:10:41 -08:00
Source TestHarnessRunner: Flush log on asserts 2022-03-21 21:32:35 +02:00
ThunkLibs Fixes Host and guest thunks install path 2022-02-15 15:36:31 -08:00
unittests OpcodeDispatcher: Fixes FNINIT 2022-03-17 20:27:22 -07:00
.gitignore Add MemoryData to IR and ASM Tests 2020-08-21 01:29:37 +12:00
.gitmodules Adds tsl::robin_map 2022-02-26 00:43:43 -08:00
CMakeLists.txt Adds a cmake option for forcing a termux build 2022-03-06 12:56:25 -08:00
CMakeSettings.json EnvironmentLoader, clean merge 2020-04-24 19:25:57 -04:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md 2020-12-25 01:57:09 -08:00
Dockerfile Removes more libnuma references 2021-06-12 18:28:08 -07:00
LICENSE Initial Commit 2020-03-06 09:08:13 +02:00
Readme.md Docs: Add Chinese README 2022-03-08 18:04:09 +08:00

中文

FEX - Fast x86 emulation frontend

FEX allows you to run x86 and x86-64 binaries on an AArch64 host, similar to qemu-user and box86. It has native support for a rootfs overlay, so you don't need to chroot, as well as some thunklibs so it can forward things like GL to the host. FEX presents a Linux 5.0 interface to the guest, and supports both AArch64 and x86-64 as hosts. FEX is very much work in progress, so expect things to change.

Quick start guide

For Ubuntu 20.04, 21.04, 21.10, 22.04

Execute the following command in the terminal to install FEX through a PPA.

curl --silent https://raw.githubusercontent.com/FEX-Emu/FEX/main/Scripts/InstallFEX.py --output /tmp/InstallFEX.py && python3 /tmp/InstallFEX.py && rm /tmp/InstallFEX.py

This command will walk you through installing FEX through a PPA, and downloading a RootFS for use with FEX.

Ubuntu PPA is updated with our monthly releases.

For everyone else

Follow the guide on the official FEX-Emu Wiki Here

Getting Started

FEX has been tested to build and run on ARMv8.0, ARMv8.1+, and x86-64(AVX or newer) hardware. ARMv7 and older x86 hardware will not work. Expected operating system usage is Linux. FEX has been tested with Ubuntu 20.04, 20.10, and 21.04. Also Arch Linux.

On AArch64 hosts the user MUST have an x86-64 RootFS Creating a RootFS.

Navigating the Source

See the Source Outline for more information.

Dependencies

  • cmake (version 3.14 minimum)
  • ninja-build
  • clang (version 10 minimum for C++20)
  • libglfw3-dev (For GUI)
  • libsdl2-dev (For GUI)
  • libepoxy-dev (For GUI)
  • g++-x86-64-linux-gnu (For building thunks)
  • nasm (only if building tests)

Building FEX

After installing the dependencies you can now build FEX.

git clone https://github.com/FEX-Emu/FEX.git
cd FEX
git submodule update --init
mkdir Build
cd Build
CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=True -DBUILD_TESTS=False -G Ninja ..
ninja

Installation

sudo ninja install

On AArch64 Hosts

You can install a binfmt_misc handler for both 32bit and 64bit x86 execution directly from the environment. If you already have box86's 32bit binfmt_misc handler installed then I don't recommend installing FEX's until it is useful. Make sure to have run install prior to this, otherwise binfmt_misc will install an old handler even if the executable has been updated.

sudo ninja binfmt_misc_32
sudo ninja binfmt_misc_64

More information

This wiki page can contain more information about setting up FEX on your device https://wiki.fex-emu.org/index.php/Development:Setting_up_FEX

RootFS generation

AArch64 hosts require a rootfs for running applications. Follow the guide on the wiki page for seeing how to set up the rootfs from scratch https://wiki.fex-emu.org/index.php/Development:Setting_up_RootFS

FEX diagram