Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/local/Makefile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
SRC_DIR := src

debuild: build

.PHONY: pre_build_dep
pre_build_dep:
sudo apt-get update
sudo apt-get install -y --no-install-recommends docker.io

.PHONY: main_build
main_build: build-qcom

# ===== Qualcomm Snapdragon (Hexagon DSP) =====
PKG_QCOM := llama.cpp-qcom
BUILD_QCOM := $(SRC_DIR)/build-qcom
INSTALL_QCOM := $(SRC_DIR)/install-qcom
DOCKER_QCOM := ghcr.io/snapdragon-toolchain/arm64-linux:v0.1

.PHONY: build-qcom
build-qcom:
cp $(SRC_DIR)/docs/backend/snapdragon/CMakeUserPresets.json $(SRC_DIR)/
sed -i 's/"version": 5/"version": 4/' $(SRC_DIR)/CMakeUserPresets.json
# Create container and copy source (docker cp avoids Docker-in-Docker volume mount issue)
docker create --name qcom-build --platform linux/amd64 $(DOCKER_QCOM) \
/bin/bash -c ' \
set -euo pipefail; \
cd /workspace; \
cmake --preset arm64-linux-snapdragon-release -B build-qcom; \
cmake --build build-qcom -j $$(nproc); \
cmake --install build-qcom --prefix install-qcom \
'
docker cp $(SRC_DIR)/. qcom-build:/workspace/
docker start -a qcom-build
rm -rf $(INSTALL_QCOM)
docker cp qcom-build:/workspace/install-qcom/. $(INSTALL_QCOM)/
docker rm qcom-build
rm -rf $(PKG_QCOM)
mkdir -p $(PKG_QCOM)/usr
cp -a $(INSTALL_QCOM)/* $(PKG_QCOM)/usr/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src"]
path = src
url = https://github.com/ggml-org/llama.cpp.git
8 changes: 4 additions & 4 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
llama.cpp (0.1.0-1) UNRELEASED; urgency=medium
llama.cpp (0.0.9861-1) UNRELEASED; urgency=medium

* Add initial Debian packaging support

-- "Radxa Computer Co., Ltd" <dev@radxa.com> Thu, 01 Jan 1970 08:00:00 +0800
* Initial Debian packaging for Snapdragon Linux
* Based on upstream tag b9861

-- "Radxa Computer Co., Ltd" <dev@radxa.com> Fri, 03 Jul 2026 08:00:00 +0800
7 changes: 4 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ Build-Depends: debhelper-compat (= 13),
dh-exec,
pandoc,

Package: llama.cpp
Package: llama.cpp-qcom
Architecture: all
Section: admin
Priority: optional
Depends: ${misc:Depends},
Description: llama.cpp
This package provides the llama.cpp.
fastrpc,
Description: llama.cpp for Qualcomm Snapdragon
llama.cpp with Hexagon DSP backend for Qualcomm Snapdragon devices.

1 change: 1 addition & 0 deletions debian/llama.cpp-qcom.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
llama.cpp-qcom/usr /
13 changes: 13 additions & 0 deletions debian/llama.cpp-qcom.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
undeclared-elf-prerequisites
pkg-config-unavailable-for-cross-compilation
shared-library-lacks-version
link-to-shared-library-in-wrong-package
no-manual-page
arch-independent-package-contains-binary-or-object
lacks-ldconfig-trigger
library-not-linked-against-libc
no-shlibs
shared-library-lacks-stack-section
unstripped-binary-or-object
package-name-doesnt-match-sonames
missing-dependency-on-libc
20 changes: 2 additions & 18 deletions pkg.conf.template
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
{
"*": {
"Releases": [
"buster",
"buster-test",
"bullseye",
"bullseye-test",
"bookworm",
"bookworm-test",
"trixie",
"trixie-test",
"sid",
"sid-test",
"focal",
"focal-test",
"jammy",
"jammy-test",
"noble",
"noble-test",
"resolute",
"resolute-test"
"qcs9075-noble",
"qcs9075-noble-test"
]
}
}
Expand Down
1 change: 1 addition & 0 deletions src
Submodule src added at c8ae9a