This script will “attempt” to build mesa-turnip-kgsl. Suitable for Ubuntu. Ubuntu 24 or higher is preferred.
- Build script mesa-turnip-kgsl for Qualcomm Adreno GPU
- Build and install
- Tested environment
- Latest tested Mesa Config
- Optimization
- Thanks
For convenience, run from the root account.
sudo apt install git
git clone https://github.com/DvaMishkiLapa/mesa-turnip-kgsl-build.git
cd mesa-turnip-kgsl-build
sudo ./build_mesaIf you want to build and install in a system, then:
sudo ./build_mesa installThe process may take about 20-30 minutes, will take about 300 mb of internal memory.
- Samsung Galaxy Tab A9+ 5G (SM6375)
- Chroot Ubuntu 24.04 via chroot-distro on Android 14 OneUI6.1 + Root with Apatch.
mesa 25.2.0-devel
Directories
prefix : /usr
libdir : lib/aarch64-linux-gnu
includedir : include
Common C and C++ arguments
c_cpp_args : -mtls-dialect=desc
OpenGL
OpenGL : YES
ES1 : YES
ES2 : YES
GLVND : YES
DRI
Platform : drm
Driver dir : /usr/lib/aarch64-linux-gnu/dri
GLX
Enabled : YES
Provider : dri
EGL
Enabled : YES
Drivers : builtin:egl_dri2 builtin:egl_dri3
Platforms : x11 surfaceless drm xcb
GBM
Enabled : YES
External libgbm : NO
Backends path : /usr/lib/aarch64-linux-gnu/gbm
Vulkan
Drivers : freedreno
Platforms : x11 surfaceless drm xcb
ICD dir : share/vulkan/icd.d
Intel Ray tracing: NO
Video
Codecs : all_free av1dec av1enc vp9dec
APIs : vulkan xa
LLVM
Enabled : NO
Gallium
Enabled : YES
Drivers : freedreno
Platforms : x11 surfaceless drm xcb
Frontends : mesa xa
HUD lm-sensors : YES
Perfetto
Enabled : NO
Teflon (TensorFlow Lite delegate)
Enabled : NO
User defined options
Cross files : /root/mesa-build/cross_aarch64.txt
buildtype : release
libdir : lib/aarch64-linux-gnu
prefix : /usr
wrap_mode : nofallback
b_lto : true
egl : enabled
freedreno-kmds : kgsl
gallium-drivers : freedreno
gbm : enabled
gles1 : enabled
gles2 : enabled
glx : dri
platforms : x11
vulkan-drivers : freedrenoYou can put together a package with optimizations for your SoC if you're not lazy. Example for SM6375:
# cross_aarch64.txt
c_args = ['-O3',
'-mcpu=cortex-a78',
'-mtune=cortex-a78',
'-fomit-frame-pointer',
'-ffunction-sections',
'-fdata-sections']# cross_armhf.txt
c_args = ['-O3',
'-mcpu=cortex-a55',
'-mfpu=neon',
'-fomit-frame-pointer',
'-ffunction-sections',
'-fdata-sections']Universal options (for any arch):
c_args = ['-O3',
'-fomit-frame-pointer',
'-ffunction-sections',
'-fdata-sections']