From 4cd5ff6bd9a56140caefa00ada3a69f8d265110c Mon Sep 17 00:00:00 2001 From: BadStorm Date: Wed, 15 Jul 2026 18:46:44 +0200 Subject: [PATCH] Improve ardeno --- containers/llamacpp/build-mesa.sh | 25 +++++++++++++------ .../llamacpp/llamacpp-adreno.Containerfile | 4 +-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/containers/llamacpp/build-mesa.sh b/containers/llamacpp/build-mesa.sh index 8e9c069..02863ab 100644 --- a/containers/llamacpp/build-mesa.sh +++ b/containers/llamacpp/build-mesa.sh @@ -72,11 +72,11 @@ if [ -z "${MESA_SRC:-}" ]; then else echo "=== ${CLONE_DIR} esiste ma punta a un remote diverso, rifaccio il clone ===" rm -rf "${CLONE_DIR}" - git clone "${CLONE_URL}" "${CLONE_DIR}" + git clone --filter=blob:none --single-branch --branch main "${CLONE_URL}" "${CLONE_DIR}" fi else - echo "=== Clono ${CLONE_URL} in ${CLONE_DIR} ===" - git clone "${CLONE_URL}" "${CLONE_DIR}" + echo "=== Clono ${CLONE_URL} in ${CLONE_DIR} (partial clone, filter=blob:none) ===" + git clone --filter=blob:none --single-branch --branch main "${CLONE_URL}" "${CLONE_DIR}" fi MESA_SRC="${CLONE_DIR}" @@ -113,7 +113,7 @@ meson setup "${BUILD_DIR}" "${MESA_SRC}" \ -Dprefix=/usr \ -Dsysconfdir=/etc \ -Dgallium-drivers=freedreno \ - -Dvulkan-drivers= \ + -Dvulkan-drivers=freedreno \ -Dgallium-rusticl=true \ -Dgallium-rusticl-enable-drivers=freedreno \ -Dbuildtype=release \ @@ -162,8 +162,12 @@ Description: Mesa build from local fork with Freedreno subgroup support subgroup ops", non ancora presente in alcuna release stabile 26.1.x, disponibile solo su trunk verso 26.2). . - Sostituisce i file installati da mesa-libgallium / mesa-opencl-icd - di Debian con la build patchata. Da usare solo per test. + Include anche il driver Vulkan Turnip per Freedreno (-Dvulkan-drivers= + freedreno), buildato dallo stesso checkout main upstream cosi' da restare + alla stessa versione/patchset del resto dello stack (GL/EGL/GBM/rusticl). + . + Sostituisce i file installati da mesa-libgallium / mesa-opencl-icd / + mesa-vulkan-drivers di Debian con la build patchata. Da usare solo per test. EOF cat > "${PKG_DIR}/DEBIAN/README-patch.md" << 'EOF' @@ -186,8 +190,13 @@ Verificato (vedi indagine precedente): questo fix e HEAD: e' completo e autosufficiente, non un WIP parziale. Questo pacchetto installa i file prodotti da una build meson/ninja pulita -di questo checkout, con gallium-drivers=freedreno e rusticl abilitato per -freedreno. Non tocca Vulkan/Turnip. +di questo checkout, con gallium-drivers=freedreno, vulkan-drivers=freedreno +(Turnip) e rusticl abilitato per freedreno. + +Nota: il pacchetto include il driver ICD Vulkan (libvulkan_freedreno.so + +freedreno_icd.json) ma NON il Vulkan loader (libvulkan.so.1), che resta +il pacchetto standard Debian "libvulkan1" installato separatamente nel +Containerfile. EOF dpkg-deb --build --root-owner-group "${PKG_DIR}" "${DEB_OUT_DIR}/${PKG_NAME}_${PKG_VERSION}_${PKG_ARCH}.deb" diff --git a/containers/llamacpp/llamacpp-adreno.Containerfile b/containers/llamacpp/llamacpp-adreno.Containerfile index 76e91ac..e94f32d 100644 --- a/containers/llamacpp/llamacpp-adreno.Containerfile +++ b/containers/llamacpp/llamacpp-adreno.Containerfile @@ -32,7 +32,7 @@ RUN apt-get update \ && apt-get remove -y --allow-remove-essential libgl1-mesa-dri libglx-mesa0 libglx0 mesa-opencl-icd || true \ && dpkg --force-overwrite --install /tmp/mesa-freedreno-subgroups_*.deb \ && rm /tmp/mesa-freedreno-subgroups_*.deb \ - && apt-get install -y --no-install-recommends libvulkan1 mesa-vulkan-drivers \ + && apt-get install -y --no-install-recommends libvulkan1 \ && apt autoremove -y \ && apt clean -y \ && rm -rf /var/lib/apt/lists/* @@ -53,7 +53,7 @@ ENV PATH=/app:$PATH ENV LD_LIBRARY_PATH=/app:/usr/lib/aarch64-linux-gnu:/usr/lib/arm-linux-gnueabihf:$LD_LIBRARY_PATH ENV HF_HUB_ENABLE_HF_TRANSFER=1 # Adreno-specific environment variables -ENV VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.aarch64.json +ENV VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.json ENV MESA_GL_VERSION_OVERRIDE=4.6 ENV MESA_GLSL_VERSION_OVERRIDE=460 #ENV HF_HOME=