Development:Setting up FEX
Build Configuration
- Ensure release mode is enabled
- Enable LTO
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=True -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 and old handler even if the executable has been updated.
sudo ninja binfmt_misc_32 sudo ninja binfmt_misc_64
Runtime Configuration
FEXConfig is the application to use for runtime configuration setup.
CTRL+SHIFT+O will open default "global" configuration. CTLR+S saves it.
Things to ensure to set
On AArch64 host, a rootfs path is mandatory, while it is optional on x86-64 host
- Core: JIT
- RootFS
- Silent Logging (Useful to get FEX information spam out of the way)
- Block Size (500 is a good default. Optimization passes may break things though)
- Multiblock: enabled (Can cause more stuttering)
- Emulated CPU Cores: 1 (threading bugs cause issues with more)
RootFS generation
Needs to be migrated https://github.com/FEX-Emu/FEX/wiki/Creating-x86-64-Linux-RootFS