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
83 changes: 83 additions & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Debian packages

on:
push:
branches: ['**']
tags: ['v*']
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
include:
- suite: trixie
image: debian:trixie
- suite: noble
image: ubuntu:noble
- suite: resolute
image: ubuntu:resolute
container: ${{ matrix.image }}
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install packaging tools
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates git build-essential devscripts equivs lintian
- uses: actions/checkout@v4
- name: Install build dependencies
run: mk-build-deps --install --remove --tool 'apt-get -y --no-install-recommends' debian/control
- name: Build binary packages
env:
SUITE: ${{ matrix.suite }}
run: |
version=$(dpkg-parsechangelog -S Version)
if [ "$GITHUB_REF_TYPE" = tag ]; then
test "$GITHUB_REF_NAME" = "v$version"
fi
DEBFULLNAME='libva-v4l2 CI' DEBEMAIL='noreply@github.com' \
dch --newversion "$version+$SUITE" --distribution "$SUITE" 'Build for the target distribution.'
dpkg-buildpackage -us -uc -b
mkdir -p artifacts
for artifact in ../*.deb ../*.ddeb ../*.buildinfo ../*.changes; do
if [ -f "$artifact" ]; then
cp "$artifact" artifacts/
fi
done
- name: Inspect packages
run: |
lintian --fail-on error artifacts/*.changes
dpkg-deb --contents artifacts/libva-v4l2_*.deb
apt-get install -y ./artifacts/libva-v4l2_*.deb
test "$(readlink /usr/lib/aarch64-linux-gnu/dri/msm_drv_video.so)" = v4l2_drv_video.so
cmp packaging/environment/60-libva-v4l2.conf /usr/lib/environment.d/60-libva-v4l2.conf
cmp packaging/environment/libva-v4l2.sh /etc/profile.d/libva-v4l2.sh
- uses: actions/upload-artifact@v4
with:
name: libva-v4l2-${{ matrix.suite }}-arm64
path: artifacts/*
if-no-files-found: error

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: libva-v4l2-*-arm64
path: artifacts
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
draft: true
files: artifacts/*
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ __pycache__/
/packaging/arch/pkg/
/packaging/arch/*.tar.gz
/packaging/arch/*.pkg.tar.zst

# Debian packaging artifacts.
/obj-*/
/debian/.debhelper/
/debian/libva-v4l2/
/debian/*.debhelper
/debian/*.substvars
/debian/files
/artifacts/
/*-build-deps_*.deb
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ meson compile -C build
sudo meson install -C build
```

FastCV VPP defaults to `-Dfastcv=auto` (enabled when dependencies are available).
Use `-Dfastcv=disabled` to disable it or `-Dfastcv=enabled` to require build dependencies.
FastCV VPP defaults to `-Dfastcv=disabled`. Use `-Dfastcv=auto` to enable it
when dependencies are available or `-Dfastcv=enabled` to require build dependencies.
Debian / Ubuntu packages explicitly disable FastCV for consistent distribution builds.
FastCV is loaded dynamically; missing runtime libraries disable only VPP.

Adjust `libdir` if your system uses a driver directory other than `/usr/lib/dri`.
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
libva-v4l2 (0.1.0-1) unstable; urgency=medium

* Initial Debian packaging for RadxaOS.
* Disable FastCV and retain GStreamer VA session configuration.

-- Xilin Wu <sophon@radxa.com> Thu, 10 Sep 2026 16:00:00 +0800
23 changes: 23 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Source: libva-v4l2
Section: video
Priority: optional
Maintainer: Xilin Wu <sophon@radxa.com>
Build-Depends: debhelper-compat (= 13), meson (>= 0.61), ninja-build, pkg-config,
libva-dev, libdrm-dev, libegl-dev, libgles-dev, libgbm-dev
Standards-Version: 4.7.0
Rules-Requires-Root: no
Homepage: https://github.com/strongtz/libva-v4l2
Vcs-Git: https://github.com/strongtz/libva-v4l2.git
Vcs-Browser: https://github.com/strongtz/libva-v4l2

Package: libva-v4l2
Architecture: arm64
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: va-driver
Description: VA-API backend for Qualcomm Iris stateful V4L2 devices
Hardware video decoding and H.264/HEVC encoding through the Qualcomm Iris
stateful V4L2 M2M interface. This experimental driver targets SC8280XP,
including Radxa Dragon Q8B, and requires a compatible kernel and firmware.
.
Includes the MSM driver alias and GStreamer VA environment configuration.
FastCV video processing is disabled in distribution builds.
31 changes: 31 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libva-v4l2
Source: https://github.com/strongtz/libva-v4l2

Files: *
Copyright: 2026 libva-v4l2 contributors
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Files: patches/*
Copyright: 2026 Xilin Wu <sophon@radxa.com>
Linux kernel contributors
License: GPL-2.0-only
On Debian systems the full text of the GNU General Public License version 2
can be found in /usr/share/common-licenses/GPL-2.
2 changes: 2 additions & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packaging/environment/60-libva-v4l2.conf usr/lib/environment.d
packaging/environment/libva-v4l2.sh etc/profile.d
13 changes: 13 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
dh $@ --buildsystem=meson

override_dh_auto_configure:
dh_auto_configure -- -Dfastcv=disabled

override_dh_auto_install:
dh_auto_install
rm -rf debian/libva-v4l2/usr/share/licenses
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
option('fastcv', type: 'feature', value: 'auto', description: 'VA-API scaling with FastCV on CDSP')
option('fastcv', type: 'feature', value: 'disabled', description: 'VA-API scaling with FastCV on CDSP')
2 changes: 2 additions & 0 deletions packaging/environment/60-libva-v4l2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GST_VA_ALL_DRIVERS=1
GST_PLUGIN_FEATURE_RANK=vah264dec:1000,vah264enc:1000,vah265dec:1000,vah265enc:1000,vavp9dec:1000
2 changes: 2 additions & 0 deletions packaging/environment/libva-v4l2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export GST_VA_ALL_DRIVERS=1
export GST_PLUGIN_FEATURE_RANK=vah264dec:1000,vah264enc:1000,vah265dec:1000,vah265enc:1000,vavp9dec:1000
Loading