Files
marfrit-packages/arch/daedalus-v4l2-dkms/PKGBUILD
T
marfrit e7e79e5a76 daedalus-v4l2{,-dkms}: 462aa4b -> f0d4186 — per-ctx vb2 lock
Upstream PR #3 — kernel per-context vb2_queue lock so concurrent
clients of /dev/video0 don't serialise on a device-wide mutex.
Pi 5 Firefox VAAPI playback (RDD + content + GPU processes each
opening the device) now works without S_FMT EBUSY collisions.

Verified on higgs: YouTube playback engages daedalus at sustained
~230 fps decode through the libavcodec dlopen path, ~7× headroom
over the 30fps@1080p Pi 5 Fourier target.

Both packages: pkgver 0.1.0.r24.f0d4186, pkgrel reset to 1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 21:26:16 +02:00

72 lines
2.7 KiB
Bash

# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
#
# daedalus-v4l2-dkms — DKMS package for the daedalus_v4l2 out-of-tree
# kernel module (V4L2 stateless decoder shim for Pi 5 / CM5).
#
# Pair to daedalus-v4l2 (userspace daemon). When loaded, the module
# registers /dev/videoNN (V4L2 m2m) + /dev/mediaNN (media controller) +
# /dev/daedalus-v4l2 (chardev to the userspace daemon). Userspace
# clients drive the V4L2 m2m + request API path; the daemon does the
# actual FFmpeg-backed decode on /dev/daedalus-v4l2.
#
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
# Sibling userspace package: daedalus-v4l2
# Sibling consumer: libva-v4l2-request-fourier
pkgname=daedalus-v4l2-dkms
_module=daedalus_v4l2
# Same pin as arch/daedalus-v4l2 — keep kernel module + daemon
# bit-versioned together so the chardev wire protocol stays in sync.
_commit=f0d41867f60f5bf8dbfcc6cc16404d7d7eb90014
pkgver=0.1.0.r24.f0d4186
pkgrel=1 # reset for new upstream pin (3dd0eb0 — DAEMON-PPS H.264 SPS/PPS NAL synth)
pkgdesc="V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5"
arch=('any')
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
license=('GPL-2.0-or-later')
depends=('dkms')
makedepends=('git')
install="${pkgname}.install"
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
"dkms.conf"
"${pkgname}.install")
sha256sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
cd "${srcdir}/daedalus-v4l2"
printf '0.1.0.r%s.%s' \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
}
package() {
local _src="${pkgdir}/usr/src/${_module}-${pkgver}"
install -dm755 "${_src}"
# Install the kernel/ subdir and embed the shared proto header in
# the same tree. The in-tree Makefile uses
# `ccflags-y += -I$(src)/../include` (assuming the parent
# daedalus-v4l2 layout); for DKMS we flatten by copying the header
# into kernel/include/ and patching the Makefile to point there.
cp -r "${srcdir}/daedalus-v4l2/kernel/." "${_src}/"
install -Dm644 "${srcdir}/daedalus-v4l2/include/daedalus_v4l2_proto.h" \
"${_src}/include/daedalus_v4l2_proto.h"
sed -i 's|-I\$(src)/\.\./include|-I$(src)/include|' "${_src}/Makefile"
# dkms.conf at the root of the source tree (DKMS convention).
# Substitute #MODULE_VERSION# placeholder with the actual pkgver
# so dkms install/uninstall match what's on disk.
install -Dm644 "${srcdir}/dkms.conf" "${_src}/dkms.conf"
sed -i "s/#MODULE_VERSION#/${pkgver}/" "${_src}/dkms.conf"
# License
install -Dm644 "${srcdir}/daedalus-v4l2/kernel/daedalus_v4l2_main.c" \
"${pkgdir}/usr/share/licenses/${pkgname}/SPDX-HEADER"
}