x86-64 client: System V IPC shim for x86 programs, and staging

The x86 client stops at start on a tier0 assertion: semget answers ENOSYS,
as Android kernels have no System V IPC (traced with a DEBUG_STRACE FEX).
The session shim that gives the arm64 client its semaphores is now also
built as native x86-64 and preloaded through the FEX rootfs's own
ld.so.preload. SessionFiles stages it and bannerlator-steam-x64 into
installed runtimes.
This commit is contained in:
The412Banner committed 2026-10-02 15:16:24 -04:00
1 parent b3c54e6cda
commit e5145bfad5
3 files changed
+19 -4

No files matched your search

@@ -59,9 +59,15 @@ if [ ! -f "$ROOTFS/.droiddeck-complete" ]; then
rm -f "$X64_HOME/rootfs.sqsh"
touch "$ROOTFS/.droiddeck-complete"
fi
# A path missing from the rootfs falls through to the guest: without its own, the x86 loader
# reads the guest's /etc/ld.so.preload and tries to load the session's arm64 preloads.
if [ ! -e "$ROOTFS/etc/ld.so.preload" ]; then
# The rootfs's own ld.so.preload: a path missing from the rootfs falls through to the guest, whose
# list names the session's arm64 preloads. In it, the session shim built for x86-64 (System V IPC,
# which Android kernels lack: the client's tier0 gives up on start without its semaphore).
if [ -f /usr/local/lib/x86_64-linux-gnu/libblsession.so ]; then
mkdir -p "$ROOTFS/usr/local/lib"
cp -f /usr/local/lib/x86_64-linux-gnu/libblsession.so "$ROOTFS/usr/local/lib/libblsession-x86_64.so"
echo /usr/local/lib/libblsession-x86_64.so > "$ROOTFS/etc/ld.so.preload"
else
step "warning: no x86-64 session shim (/usr/local/lib/x86_64-linux-gnu/libblsession.so); the client will stop on semget"
: > "$ROOTFS/etc/ld.so.preload"
fi