Difference between revisions of "Development:Setting up FEX"
Line 11: | Line 11: | ||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=True -DBUILD_TESTS=False -G Ninja .. | cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=True -DBUILD_TESTS=False -G Ninja .. | ||
+ | |||
ninja | ninja | ||
Line 44: | Line 45: | ||
== RootFS generation == | == RootFS generation == | ||
Needs to be migrated | Needs to be migrated | ||
+ | |||
https://github.com/FEX-Emu/FEX/wiki/Creating-x86-64-Linux-RootFS | https://github.com/FEX-Emu/FEX/wiki/Creating-x86-64-Linux-RootFS | ||
Revision as of 00:02, 15 January 2021
Build dependencies
- clang
- !!! Insert remaining libraries here !!!
- x86_64-linux-gnu-g++ (For building thunks)
- nasm (only if building tests)
Build Configuration
- Ensure release mode is enabled
- Enable LTO
- Disable test building
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 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
Installing Thunks
Only if you want
https://github.com/FEX-Emu/FEX/blob/main/ThunkLibs/README.md