mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
- Setup: 'Mali bridge' switch on the GPU row (non-Adreno only); the non-Adreno gate relaxes when on - VkBridgeComponent starts libvkbridge_server.so before the guest and waits for its socket - session script points the loader at the bridge ICD and logs the self-test + vulkaninfo - Flatpak sandboxes get the bridge ICD and socket; the compositor uses the system driver without KGSL - Gradle builds the server with the NDK; CI/build_local cross-build the ICD + smoke test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
22 lines
1.2 KiB
Bash
Executable File
22 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Builds the bridge server for the device (bionic, arm64-v8a, API 26) with the NDK's clang:
|
|
# tools/vkbridge/build-server-android.sh <ndk-dir> <jniLibs-out-dir>
|
|
# The output is an executable named like a library (libvkbridge_server.so) so that Android
|
|
# extracts it into the native library directory, the one place an app may exec from.
|
|
set -euo pipefail
|
|
ndk=$1
|
|
out=$2/arm64-v8a
|
|
here=$(cd "$(dirname "$0")" && pwd)
|
|
srv=$(cd "$here/../../app/src/main/cpp/vkbridge" && pwd)
|
|
cc=$(ls -d "$ndk"/toolchains/llvm/prebuilt/*/bin/aarch64-linux-android26-clang | head -1)
|
|
[ -x "$cc" ] || { echo "no NDK clang under $ndk" >&2; exit 1; }
|
|
mkdir -p "$out"
|
|
"$cc" -O2 -g0 -fPIE -pie -Wall -Wno-unused-parameter -Wno-missing-field-initializers \
|
|
-I"$here/third_party/Vulkan-Headers-1.3.247/include" -I"$here/common" -I"$here/common/gen" -I"$srv" \
|
|
-Wl,-z,max-page-size=16384 -Wl,--build-id=none \
|
|
-o "$out/libvkbridge_server.so" \
|
|
"$srv"/*.c "$here/common/vkb_wire.c" "$here/common/gen/vkb_gen_structs.c" "$here/common/gen/vkb_gen_server.c" \
|
|
-ldl -llog -lm
|
|
"$(dirname "$cc")/llvm-strip" --strip-unneeded "$out/libvkbridge_server.so"
|
|
echo "built $out/libvkbridge_server.so"
|