debian/daedalus-v4l2: new package — userspace daemon + tools
Mirror of arch/daedalus-v4l2 into the Debian tree. Same pin (f04d700, Phase 8.13 close), same install layout. Output as arm64 .deb. Build path: CMake for daemon (build via ninja); in-tree Makefile for tools. No debhelper; standalone dpkg-deb so it builds on the non-Debian runner. Depends on ffmpeg (libavformat/libavcodec/libavutil 7.1+) at runtime, libdrm2. Recommends daedalus-v4l2-dkms (the kernel module). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+106
@@ -0,0 +1,106 @@
|
||||
#!/bin/bash
|
||||
# Build daedalus-v4l2_<ver>_arm64.deb (userspace daemon + test tools).
|
||||
#
|
||||
# Mirrors arch/daedalus-v4l2 (Arch Linux build). The companion DKMS
|
||||
# package (debian/daedalus-v4l2-dkms) carries the kernel module
|
||||
# separately so apt/dpkg can split kernel-version-tied and userspace
|
||||
# upgrade cadence.
|
||||
#
|
||||
# Sibling Arch package: ../../arch/daedalus-v4l2/PKGBUILD
|
||||
# Sibling DKMS package: ../daedalus-v4l2-dkms/build-deb.sh
|
||||
# Upstream repo: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
set -euo pipefail
|
||||
|
||||
# Same pin as the Arch PKGBUILD. f04d700 = "Phase 8.13: byte-exact
|
||||
# end-to-end via libva (consumer target hit)" — first commit where the
|
||||
# full ffmpeg -hwaccel vaapi → libva → /dev/video0 → daemon path lands
|
||||
# a pixel-correct decoded frame back in ffmpeg.
|
||||
UPSTREAM_COMMIT=f04d7000f858fe51d867aba14a529d3aef4fbd54
|
||||
PKGVER=0.1.0+r15+gf04d700
|
||||
PKGREL=1
|
||||
|
||||
HERE=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# Reproducible build. 2026-05-18 23:00 UTC — Phase 8.13 close.
|
||||
export SOURCE_DATE_EPOCH=1779231600
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap "rm -rf $work" EXIT
|
||||
|
||||
cd "$work"
|
||||
curl -sSLfo daedalus-v4l2.tar.gz \
|
||||
"https://git.reauktion.de/reauktion/daedalus-v4l2/archive/${UPSTREAM_COMMIT}.tar.gz"
|
||||
tar xzf daedalus-v4l2.tar.gz
|
||||
SRCDIR=daedalus-v4l2
|
||||
|
||||
# Build daemon (CMake)
|
||||
cd "$SRCDIR/daemon"
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build
|
||||
|
||||
# Build test tools (in-tree Makefile)
|
||||
cd "$work/$SRCDIR/tools"
|
||||
make
|
||||
|
||||
# Stage
|
||||
ROOT="$work/pkgroot"
|
||||
mkdir -p "$ROOT/DEBIAN" \
|
||||
"$ROOT/usr/bin" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2" \
|
||||
"$ROOT/usr/include" \
|
||||
"$ROOT/usr/share/doc/daedalus-v4l2"
|
||||
|
||||
install -m 755 "$work/$SRCDIR/daemon/build/daedalus_v4l2_daemon" \
|
||||
"$ROOT/usr/bin/daedalus_v4l2_daemon"
|
||||
|
||||
install -m 755 "$work/$SRCDIR/tools/test_chardev_pingpong" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2/test_chardev_pingpong"
|
||||
install -m 755 "$work/$SRCDIR/tools/test_m2m_decode" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2/test_m2m_decode"
|
||||
install -m 755 "$work/$SRCDIR/tools/test_m2m_stream" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2/test_m2m_stream"
|
||||
|
||||
install -m 644 "$work/$SRCDIR/include/daedalus_v4l2_proto.h" \
|
||||
"$ROOT/usr/include/daedalus_v4l2_proto.h"
|
||||
|
||||
install -m 644 "$work/$SRCDIR/README.md" \
|
||||
"$ROOT/usr/share/doc/daedalus-v4l2/README.md"
|
||||
for d in "$work/$SRCDIR/docs/"*.md; do
|
||||
install -m 644 "$d" "$ROOT/usr/share/doc/daedalus-v4l2/$(basename "$d")"
|
||||
done
|
||||
|
||||
install -Dm644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/daedalus-v4l2/copyright"
|
||||
install -Dm644 "$HERE/debian/changelog" "$ROOT/usr/share/doc/daedalus-v4l2/changelog.Debian"
|
||||
gzip -9 -n "$ROOT/usr/share/doc/daedalus-v4l2/changelog.Debian"
|
||||
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: daedalus-v4l2
|
||||
Version: ${PKGVER}-${PKGREL}
|
||||
Section: video
|
||||
Priority: optional
|
||||
Architecture: arm64
|
||||
Depends: ffmpeg (>= 7.1), libdrm2
|
||||
Recommends: daedalus-v4l2-dkms
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Homepage: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
Description: Userspace daemon for the daedalus_v4l2 stateless decoder shim
|
||||
daedalus-v4l2 ships the userspace daemon that backs the daedalus_v4l2
|
||||
out-of-tree V4L2 kernel module on Raspberry Pi 5 / CM5. Together they
|
||||
expose /dev/videoNN + /dev/mediaNN as a V4L2 stateless decoder for
|
||||
VP9, AV1, and H.264 — actual decoding happens in this single-threaded
|
||||
daemon via dlopen'd FFmpeg, with decoded NV12 / P010 frames shipped
|
||||
back through dmabuf.
|
||||
.
|
||||
Consumed end-to-end by libva-v4l2-request-fourier (>= 1.0.0+r376) so
|
||||
that 'ffmpeg -hwaccel vaapi' against vp9_small.ivf produces a
|
||||
byte-exact NV12 frame.
|
||||
.
|
||||
The kernel module ships separately in daedalus-v4l2-dkms; install
|
||||
both to actually serve V4L2 clients.
|
||||
EOF
|
||||
|
||||
DEB_OUT="daedalus-v4l2_${PKGVER}-${PKGREL}_arm64.deb"
|
||||
dpkg-deb --root-owner-group --build "$ROOT" "$HERE/$DEB_OUT"
|
||||
echo "built: $HERE/$DEB_OUT"
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
daedalus-v4l2 (0.1.0+r15+gf04d700-1) bookworm trixie; urgency=medium
|
||||
|
||||
* Initial Debian packaging for the daedalus-v4l2 userspace daemon.
|
||||
* Pinned to f04d700 (Phase 8.13 close): first commit where the full
|
||||
ffmpeg -hwaccel vaapi → libva-v4l2-request-fourier → /dev/video0
|
||||
→ daemon path lands a pixel-correct decoded NV12 frame back in
|
||||
ffmpeg.
|
||||
* Codecs: VP9, AV1, H.264 (all via dlopen'd FFmpeg 7.1.3).
|
||||
* Capture formats: NV12M (2 plane), NV12 (1 plane, for libva),
|
||||
P010 (10-bit single plane).
|
||||
* Companion package: daedalus-v4l2-dkms (kernel module).
|
||||
|
||||
-- Markus Fritsche <mfritsche@reauktion.de> Mon, 18 May 2026 23:00:00 +0000
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
Source: daedalus-v4l2
|
||||
Section: video
|
||||
Priority: optional
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
cmake,
|
||||
ninja-build,
|
||||
pkg-config,
|
||||
libavformat-dev (>= 7.1),
|
||||
libavcodec-dev (>= 7.1),
|
||||
libavutil-dev (>= 7.1)
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
|
||||
Package: daedalus-v4l2
|
||||
Architecture: arm64
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends},
|
||||
ffmpeg (>= 7.1),
|
||||
libdrm2
|
||||
Recommends: daedalus-v4l2-dkms
|
||||
Description: Userspace daemon for the daedalus_v4l2 stateless decoder shim
|
||||
daedalus-v4l2 ships the userspace daemon that backs the daedalus_v4l2
|
||||
out-of-tree V4L2 kernel module on Raspberry Pi 5 / CM5. Together they
|
||||
expose /dev/videoNN + /dev/mediaNN as a V4L2 stateless decoder for
|
||||
VP9, AV1, and H.264 — actual decoding happens in this single-threaded
|
||||
daemon via dlopen'd FFmpeg, with decoded NV12 / P010 frames shipped
|
||||
back through dmabuf.
|
||||
.
|
||||
Consumed end-to-end by libva-v4l2-request-fourier (>= 1.0.0+r376) so
|
||||
that 'ffmpeg -hwaccel vaapi' against vp9_small.ivf produces a
|
||||
byte-exact NV12 frame.
|
||||
.
|
||||
The kernel module ships separately in daedalus-v4l2-dkms; install
|
||||
both to actually serve V4L2 clients.
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: daedalus-v4l2
|
||||
Upstream-Contact: Markus Fritsche <fritsche.markus@gmail.com>
|
||||
Source: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
|
||||
Files: *
|
||||
Copyright: 2026 Markus Fritsche <fritsche.markus@gmail.com>
|
||||
License: BSD-2-Clause
|
||||
|
||||
Files: include/daedalus_v4l2_proto.h
|
||||
Copyright: 2026 Markus Fritsche <fritsche.markus@gmail.com>
|
||||
License: GPL-2.0-or-later WITH Linux-syscall-note
|
||||
Comment:
|
||||
Shared kernel↔daemon wire-protocol header. GPL-2.0-or-later (matches
|
||||
the kernel module that includes it) with the standard
|
||||
Linux-syscall-note exception so userspace inclusion is BSD-clean.
|
||||
|
||||
License: BSD-2-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
.
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED.
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License v2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
Reference in New Issue
Block a user