Skip to content

Commit

Permalink
feat: add dvb-cx23885 extension
Browse files Browse the repository at this point in the history
This allows for using the Hauppage WinTV-quadHD PCIe tuner, and this bundles the firmware for the tuner as well.

Signed-off-by: Skyler Mäntysaari <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
samip5 authored and frezbo committed Dec 10, 2024
1 parent 4462437 commit 4477231
Show file tree
Hide file tree
Showing 12 changed files with 220 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-25T14:13:25Z by kres b9ed228.
# Generated on 2024-12-10T13:30:19Z by kres 8183c20.

name: default
concurrency:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
labels: ${{ steps.retrieve-pr-labels.outputs.result }}
services:
buildkitd:
image: moby/buildkit:v0.17.2
image: moby/buildkit:v0.18.1
options: --privileged
ports:
- 1234:1234
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
- default
services:
buildkitd:
image: moby/buildkit:v0.17.2
image: moby/buildkit:v0.18.1
options: --privileged
ports:
- 1234:1234
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-25T14:13:25Z by kres b9ed228.
# Generated on 2024-12-10T13:30:19Z by kres 8183c20.

name: weekly
concurrency:
Expand All @@ -16,7 +16,7 @@ jobs:
- pkgs
services:
buildkitd:
image: moby/buildkit:v0.17.2
image: moby/buildkit:v0.18.1
options: --privileged
ports:
- 1234:1234
Expand Down
3 changes: 2 additions & 1 deletion .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
- chelsio-firmware
- crun
- drbd
- dvb-cx23885
- ecr-credential-provider
- fuse3
- gasket-driver
Expand Down Expand Up @@ -63,7 +64,7 @@ spec:
- name: EXTENSIONS_IMAGE_REF
defaultValue: $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
- name: PKGS
defaultValue: v1.9.0-alpha.0-52-g2abcd4b
defaultValue: v1.10.0-alpha.0-6-g1a55529
- name: PKGS_PREFIX
defaultValue: ghcr.io/siderolabs
useBldrPkgTagResolver: true
Expand Down
5 changes: 3 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If the field is marked as `Needs Maintainer`, it means that the package is curre

| Name | Maintainer | Github ID |
| ----------------------------------------- | -------------------- | -------------------------------------------------------------------- |
| amdgpu-firmware | Sidero Labs | NA |
| amdgpu | Sidero Labs | NA |
| amd-ucode | Sidero Labs | NA |
| binfmt-misc | Serge Logvinov | [sergelogvinov](https://github.com/sergelogvinov) |
| bnx2-bnx2x | Sidero Labs | NA |
Expand All @@ -19,13 +19,14 @@ If the field is marked as `Needs Maintainer`, it means that the package is curre
| chelsio-firmware | Sidero Labs | NA |
| crun | Henrik Gerdes | [hegerdes](https://github.com/hegerdes) |
| drbd | Needs Maintainer | NA |
| dvb-cx23885 | Skyler Mäntysaari | [samip5](https://github.com/samip5) |
| ecr-credential-provider | Florian Ströger | [Preisschild](https://github.com/Preisschild) |
| fuse3 | Sidero Labs | NA |
| gasket-driver | Sidero Labs | NA |
| gvisor | Sidero Labs | NA |
| gvisor-debug | Sidero Labs | NA |
| hello-world-service | Sidero Labs | NA |
| i915-ucode | Sidero Labs | NA |
| i915 | Sidero Labs | NA |
| intel-ice-firmware | Sidero Labs | NA |
| intel-ucode | Sidero Labs | NA |
| iscsi-tools | Sidero Labs | NA |
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-11-28T16:58:10Z by kres 232fe63.
# Generated on 2024-12-10T13:30:19Z by kres 8183c20.

# common variables

Expand Down Expand Up @@ -50,7 +50,7 @@ COMMON_ARGS += --build-arg=PKGS_PREFIX="$(PKGS_PREFIX)"
# extra variables

EXTENSIONS_IMAGE_REF ?= $(REGISTRY_AND_USERNAME)/extensions:$(TAG)
PKGS ?= v1.9.0-alpha.0-52-g2abcd4b
PKGS ?= v1.10.0-alpha.0-6-g1a55529
PKGS_PREFIX ?= ghcr.io/siderolabs

# targets defines all the available targets
Expand All @@ -64,6 +64,7 @@ TARGETS += chelsio-drivers
TARGETS += chelsio-firmware
TARGETS += crun
TARGETS += drbd
TARGETS += dvb-cx23885
TARGETS += ecr-credential-provider
TARGETS += fuse3
TARGETS += gasket-driver
Expand Down Expand Up @@ -174,7 +175,7 @@ local-%: ## Builds the specified target defined in the Pkgfile using the local
echo $$platform; \
directory="$${platform//\//_}"; \
if [[ -d "$$DEST/$$directory" ]]; then \
mv "$$DEST/$$directory/"* $$DEST; \
mv -f "$$DEST/$$directory/"* $$DEST; \
rmdir "$$DEST/$$directory/"; \
fi; \
done'
Expand Down
2 changes: 2 additions & 0 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ vars:
LIBTIRPC_VERSION: 1-3-3
# renovate: datasource=github-tags extractVersion=^v(?<version>.*)$ depName=madler/zlib
ZLIB_VERSION: 1.3.1
# renovate: datasource=github-tags depName=OpenELEC/dvb-firmware
LINUX_DVB_FIRMWARE: 0.0.51

labels:
org.opencontainers.image.source: https://github.com/siderolabs/extensions
16 changes: 16 additions & 0 deletions drivers/dvb-cx23885/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# dvb-cx23885 system extension

## Installation

See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions).

## Usage

Enable the `cx23885` module in Talos machine config to enable the tuner.

```yaml
machine:
kernel:
modules:
- name: cx23885
```
123 changes: 123 additions & 0 deletions drivers/dvb-cx23885/files/modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
modules.order
modules.builtin
modules.builtin.modinfo
kernel/drivers/media/i2c/cs3308.ko
kernel/drivers/media/i2c/cx25840/cx25840.ko
kernel/drivers/media/tuners/si2157.ko
kernel/drivers/media/tuners/tuner-simple.ko
kernel/drivers/media/tuners/tuner-types.ko
kernel/drivers/media/rc/rc-core.ko
kernel/drivers/media/common/videobuf2/videobuf2-dma-sg.ko
kernel/drivers/media/common/videobuf2/videobuf2-dvb.ko
kernel/drivers/media/common/cx2341x.ko
kernel/drivers/media/common/tveeprom.ko
kernel/drivers/media/pci/cx23885/cx23885.ko
kernel/drivers/media/dvb-frontends/a8293.ko
kernel/drivers/media/dvb-frontends/af9033.ko
kernel/drivers/media/dvb-frontends/ascot2e.ko
kernel/drivers/media/dvb-frontends/atbm8830.ko
kernel/drivers/media/dvb-frontends/au8522_common.ko
kernel/drivers/media/dvb-frontends/au8522_dig.ko
kernel/drivers/media/dvb-frontends/au8522_decoder.ko
kernel/drivers/media/dvb-frontends/bcm3510.ko
kernel/drivers/media/dvb-frontends/cx22700.ko
kernel/drivers/media/dvb-frontends/cx22702.ko
kernel/drivers/media/dvb-frontends/cx24110.ko
kernel/drivers/media/dvb-frontends/cx24116.ko
kernel/drivers/media/dvb-frontends/cx24117.ko
kernel/drivers/media/dvb-frontends/cx24120.ko
kernel/drivers/media/dvb-frontends/cx24123.ko
kernel/drivers/media/dvb-frontends/cxd2099.ko
kernel/drivers/media/dvb-frontends/cxd2820r.ko
kernel/drivers/media/dvb-frontends/cxd2841er.ko
kernel/drivers/media/dvb-frontends/dib3000mb.ko
kernel/drivers/media/dvb-frontends/dib3000mc.ko
kernel/drivers/media/dvb-frontends/dibx000_common.ko
kernel/drivers/media/dvb-frontends/dib7000m.ko
kernel/drivers/media/dvb-frontends/dib7000p.ko
kernel/drivers/media/dvb-frontends/dib8000.ko
kernel/drivers/media/dvb-frontends/dib9000.ko
kernel/drivers/media/dvb-frontends/drx39xyj/drx39xyj.ko
kernel/drivers/media/dvb-frontends/drxd.ko
kernel/drivers/media/dvb-frontends/drxk.ko
kernel/drivers/media/dvb-frontends/ds3000.ko
kernel/drivers/media/dvb-frontends/ec100.ko
kernel/drivers/media/dvb-frontends/helene.ko
kernel/drivers/media/dvb-frontends/horus3a.ko
kernel/drivers/media/dvb-frontends/isl6405.ko
kernel/drivers/media/dvb-frontends/isl6421.ko
kernel/drivers/media/dvb-frontends/isl6423.ko
kernel/drivers/media/dvb-frontends/ix2505v.ko
kernel/drivers/media/dvb-frontends/l64781.ko
kernel/drivers/media/dvb-frontends/lg2160.ko
kernel/drivers/media/dvb-frontends/lgdt3305.ko
kernel/drivers/media/dvb-frontends/lgdt330x.ko
kernel/drivers/media/dvb-frontends/lgs8gl5.ko
kernel/drivers/media/dvb-frontends/lgs8gxx.ko
kernel/drivers/media/dvb-frontends/lnbh25.ko
kernel/drivers/media/dvb-frontends/lnbh29.ko
kernel/drivers/media/dvb-frontends/lnbp21.ko
kernel/drivers/media/dvb-frontends/lnbp22.ko
kernel/drivers/media/dvb-frontends/m88rs2000.ko
kernel/drivers/media/dvb-frontends/mb86a16.ko
kernel/drivers/media/dvb-frontends/mb86a20s.ko
kernel/drivers/media/dvb-frontends/mn88443x.ko
kernel/drivers/media/dvb-frontends/mn88472.ko
kernel/drivers/media/dvb-frontends/mn88473.ko
kernel/drivers/media/dvb-frontends/mt312.ko
kernel/drivers/media/dvb-frontends/mt352.ko
kernel/drivers/media/dvb-frontends/mxl5xx.ko
kernel/drivers/media/dvb-frontends/mxl692.ko
kernel/drivers/media/dvb-frontends/nxt200x.ko
kernel/drivers/media/dvb-frontends/nxt6000.ko
kernel/drivers/media/dvb-frontends/or51132.ko
kernel/drivers/media/dvb-frontends/or51211.ko
kernel/drivers/media/dvb-frontends/dvb-pll.ko
kernel/drivers/media/dvb-frontends/s5h1409.ko
kernel/drivers/media/dvb-frontends/s5h1411.ko
kernel/drivers/media/dvb-frontends/s5h1420.ko
kernel/drivers/media/dvb-frontends/s5h1432.ko
kernel/drivers/media/dvb-frontends/s921.ko
kernel/drivers/media/dvb-frontends/si2165.ko
kernel/drivers/media/dvb-frontends/si21xx.ko
kernel/drivers/media/dvb-frontends/sp2.ko
kernel/drivers/media/dvb-frontends/sp887x.ko
kernel/drivers/media/dvb-frontends/stb0899.ko
kernel/drivers/media/dvb-frontends/stb6000.ko
kernel/drivers/media/dvb-frontends/stb6100.ko
kernel/drivers/media/dvb-frontends/stv0288.ko
kernel/drivers/media/dvb-frontends/stv0297.ko
kernel/drivers/media/dvb-frontends/stv0299.ko
kernel/drivers/media/dvb-frontends/stv0367.ko
kernel/drivers/media/dvb-frontends/stv0900.ko
kernel/drivers/media/dvb-frontends/stv090x.ko
kernel/drivers/media/dvb-frontends/stv0910.ko
kernel/drivers/media/dvb-frontends/stv6110.ko
kernel/drivers/media/dvb-frontends/stv6110x.ko
kernel/drivers/media/dvb-frontends/stv6111.ko
kernel/drivers/media/dvb-frontends/tc90522.ko
kernel/drivers/media/dvb-frontends/tda10021.ko
kernel/drivers/media/dvb-frontends/tda10023.ko
kernel/drivers/media/dvb-frontends/tda10048.ko
kernel/drivers/media/dvb-frontends/tda1004x.ko
kernel/drivers/media/dvb-frontends/tda10071.ko
kernel/drivers/media/dvb-frontends/tda10086.ko
kernel/drivers/media/dvb-frontends/tda18271c2dd.ko
kernel/drivers/media/dvb-frontends/tda665x.ko
kernel/drivers/media/dvb-frontends/tda8083.ko
kernel/drivers/media/dvb-frontends/tda8261.ko
kernel/drivers/media/dvb-frontends/tda826x.ko
kernel/drivers/media/dvb-frontends/ts2020.ko
kernel/drivers/media/dvb-frontends/tua6100.ko
kernel/drivers/media/dvb-frontends/cx24113.ko
kernel/drivers/media/dvb-frontends/dib0070.ko
kernel/drivers/media/dvb-frontends/dib0090.ko
kernel/drivers/media/dvb-frontends/itd1000.ko
kernel/drivers/media/dvb-frontends/ves1820.ko
kernel/drivers/media/dvb-frontends/ves1x93.ko
kernel/drivers/media/dvb-frontends/zd1301_demod.ko
kernel/drivers/media/dvb-frontends/zl10036.ko
kernel/drivers/media/dvb-frontends/zl10039.ko
kernel/drivers/media/dvb-frontends/zl10353.ko
kernel/drivers/media/v4l2-core/tuner.ko
kernel/drivers/media/dvb-core/dvb-core.ko
11 changes: 11 additions & 0 deletions drivers/dvb-cx23885/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: v1alpha1
metadata:
name: dvb-cx23885
version: "$VERSION"
author: Skyler Mäntysaari
description: |
This system extension provides the dvb kernel modules required for Hauppage WinTV-quadHD PCIe tuner built against a specific Talos version.
Includes the firmware required.
compatibility:
talos:
version: ">= v1.9.0"
47 changes: 47 additions & 0 deletions drivers/dvb-cx23885/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: dvb-cx23885
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
# The pkgs version for a particular release of Talos as defined in
# https://github.com/siderolabs/talos/blob/<talos version>/pkg/machinery/gendata/data/pkgs
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/kernel:{{ .BUILD_ARG_PKGS }}"
steps:
- sources:
- url: https://github.com/OpenELEC/dvb-firmware/archive/refs/tags/{{ .LINUX_DVB_FIRMWARE }}.tar.gz
destination: dvb-firmware.tar.gz
sha256: cef3ce537d213e020af794cecf9de207e2882c375ceda39102eb6fa2580bad8d
sha512: 2372dba98083c76865f5f0f8101b1160888e03cdbe911dd08621e7b6f38e8a25ae5d56eefc21728bf65fd09ea613b53606df4021d3972b0bc9d2bd8b6cbe20a1
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
tar -xvf dvb-firmware.tar.gz
rm dvb-firmware.tar.gz
- install:
- |
export KERNELRELEASE=$(find /lib/modules -type d -name "*-talos" -exec basename {} \+)
mkdir -p /rootfs
xargs -a /pkg/files/modules.txt -I {} install -D /lib/modules/${KERNELRELEASE}/{} /rootfs/lib/modules/${KERNELRELEASE}/{}
depmod -b /rootfs ${KERNELRELEASE}
- |
mkdir -p /rootfs/lib/firmware
cp dvb-firmware-{{ .LINUX_DVB_FIRMWARE }}/firmware/dvb-demod-si2168-02.fw /rootfs/lib/firmware
cp dvb-firmware-{{ .LINUX_DVB_FIRMWARE }}/firmware/dvb-demod-si2168-b40-01.fw /rootfs/lib/firmware
cp dvb-firmware-{{ .LINUX_DVB_FIRMWARE }}/firmware/v4l-cx23885-avcore-01.fw /rootfs/lib/firmware
- test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
find /rootfs/lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
1 change: 1 addition & 0 deletions drivers/dvb-cx23885/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .BUILD_ARG_TAG }}"
6 changes: 6 additions & 0 deletions hack/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ See [Talos Linux documentation](https://www.talos.dev/v1.9/talos-guides/configur
title = "LLDP"
description = """\
lldpd is now available as a system extension.
"""

[notes.dvb]
title = "dvb"
description = """\
dvb drivers + firmware is now available as a system extension.
"""

[notes.drm]
Expand Down

0 comments on commit 4477231

Please sign in to comment.