FEX-Emu progress unblocking
FEX-Emu only cares about running a pressure-vessel built for x86/x86-64, eg, Steam Proton games.
Currently FEX-Emu has a couple of configurations used when testing pressure-vessel. Each of these running under FEX-Emu.
- x86-64 host - No FEX rootfs configured
- x86-64 host - FEX rootfs configured
- AArch64 host - FEX rootfs configured (since rootfs is required here)
Of these three configurations, only the first one works currently.
The second configuration is only useful to support as a testing configuration. The third one is the one that I care about here.
The main problems with supporting the third configuration currently is that we need to expose a couple of folders and the aarch64 dynamic linker inside of the x86 chroot that pressure-vessel generates. I have a hack change that exposes the folders but only works in configuration 1. With a rootfs configured in FEX, it looks like pressure-vessel is doing some querying of the parent directory that results in not binding these folders at all.
This can be easily tested on a debian system by adding an arm64 architecture and installing libc6:arm64
There's an additional problem of setting a graphics provider to the FEX rootfs breaking things, but that's a secondary problem
Here's my quick hack that I was messing with that gets configuration 1 working.
diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c
index 2055ede8..1acdac97 100644
--- a/pressure-vessel/runtime.c
+++ b/pressure-vessel/runtime.c
@@ -3646,6 +3646,12 @@ pv_runtime_take_ld_so_from_provider (PvRuntime *self,
/* Might be either absolute, or relative to the root */
g_debug ("Container path: %s -> %s", arch->ld_so, ld_so_in_runtime);
+ g_autoptr(GError) local_error = NULL;
+
+ pv_runtime_take_from_provider (self, bwrap, "usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1",
+ "/lib/ld-linux-aarch64.so.1",
+ TAKE_FROM_PROVIDER_FLAGS_NONE, &local_error);
+
/* If we have a mutable sysroot, we can delete the interoperable path
* and replace it with a symlink to what we want.
* For example, overwrite /lib/ld-linux.so.2 with a symlink to
@@ -4911,6 +4917,17 @@ pv_runtime_finish_libc_family (PvRuntime *self,
g_return_val_if_fail (self->provider != NULL, FALSE);
g_return_val_if_fail (bwrap != NULL || self->mutable_sysroot != NULL, FALSE);
+ {
+ g_autoptr(GError) local_error = NULL;
+ pv_runtime_take_from_provider (self, bwrap, "usr/lib/aarch64-linux-gnu",
+ "/usr/lib/aarch64-linux-gnu",
+ TAKE_FROM_PROVIDER_FLAGS_NONE, &local_error);
+ g_clear_error (&local_error);
+ pv_runtime_take_from_provider (self, bwrap, "usr/aarch64-linux-gnu",
+ "/usr/aarch64-linux-gnu",
+ TAKE_FROM_PROVIDER_FLAGS_NONE, &local_error);
+ }
+
if (self->any_libc_from_provider && !self->all_libc_from_provider)
{
/*
This would be nice to get working in a better way to allow FEX-Emu to test Proton titles directly on AArch64 platforms.
For quick start in bringing up FEX-Emu we have some links that you can follow.
Starting point on our readme here: https://github.com/FEX-Emu/FEX#quick-start-guide