feat: add vc4 extension

Use v3d and vc4 kernel module.

Fixes: #636

Signed-off-by: jvanthienen-gluo <jorn.vanthienen@gluo.be>
Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
jvanthienen-gluo 2025-03-31 18:50:51 +02:00 committed by Noel Georgi
parent d3e2b733dc
commit 21ef90aef2
No known key found for this signature in database
GPG Key ID: 21A9F444075C9E36
9 changed files with 86 additions and 1 deletions

View File

@ -54,6 +54,7 @@ spec:
- usb-modem-drivers
- util-linux-tools
- v4l-uvc-drivers
- vc4
- vmtoolsd-guest-agent
- wasmedge
- xen-guest-agent

View File

@ -60,6 +60,7 @@ If the field is marked as `Needs Maintainer`, it means that the package is curre
| usb-modem-drivers | Sidero Labs | NA |
| util-linux-tools | Sidero Labs | NA |
| v4l-uvc-drivers | Jacob McSwain | [USA-RedDragon](https://github.com/USA-RedDragon) |
| vc4 | Jorn Vanthienen | [Jorn Vanthienen](https://github.com/jvanthienen-gluo) |
| vmtoolsd-guest-agent | Robin Elfrink | [robinelfrink](https://github.com/robinelfrink) |
| wasmedge | Sidero Labs | NA |
| xen-guest-agent | Jerwin NJ | [j3rwin](https://github.com/j3rwin) |

View File

@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2025-03-31T15:56:51Z by kres d903dae.
# Generated on 2025-03-31T09:46:13Z by kres d903dae.
# common variables
@ -109,6 +109,7 @@ TARGETS += uinput
TARGETS += usb-modem-drivers
TARGETS += util-linux-tools
TARGETS += v4l-uvc-drivers
TARGETS += vc4
TARGETS += vmtoolsd-guest-agent
TARGETS += wasmedge
TARGETS += xen-guest-agent

View File

@ -69,6 +69,7 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| [amdgpu](drm/amdgpu/) | [ghcr.io/siderolabs/amdgpu](https://github.com/siderolabs/extensions/pkgs/container/amdgpu) | AMD GPU firmware and drivers | `linux firmware version`-`talos version` |
| [i915](drm/i915/) | [ghcr.io/siderolabs/i915](https://github.com/siderolabs/extensions/pkgs/container/i915) | Intel GPU firmware and drivers | `linux firmware version`-`talos version` |
| [panfrost](drm/panfrost) | [ghcr.io/siderolabs/panfrost](https://github.com/siderolabs/extensions/pkgs/container/panfrost) | Panfrost GPU firmware and drivers | `linux firmware version`-`talos version` |
| [vc4](drm/vc4) | [ghcr.io/siderolabs/vc4](https://github.com/siderolabs/extensions/pkgs/container/vc4) | Broadcom VideoCore GPU drivers | `talos version` |
### Drivers

12
drm/vc4/files/modules.txt Normal file
View File

@ -0,0 +1,12 @@
modules.order
modules.builtin
modules.builtin.modinfo
kernel/drivers/gpu/drm/v3d/v3d.ko
kernel/drivers/gpu/drm/vc4/vc4.ko
kernel/sound/soundcore.ko
kernel/sound/core/snd.ko
kernel/sound/core/snd-timer.ko
kernel/sound/core/snd-pcm.ko
kernel/sound/core/snd-pcm-dmaengine.ko
kernel/sound/soc/snd-soc-core.ko
kernel/sound/soc/codecs/snd-soc-hdmi-codec.ko

10
drm/vc4/manifest.yaml Normal file
View File

@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: vc4
version: "$VERSION"
author: Gluo NV
description: |
This system extension provides kernel modules for Broadcom VideoCore GPU.
compatibility:
talos:
version: ">= v1.10.0"

52
drm/vc4/pkg.yaml Normal file
View File

@ -0,0 +1,52 @@
name: vc4
variant: scratch
shell: /bin/bash
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
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:
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
mkdir -p /rootfs
- install:
- |
export KERNELRELEASE=$(find /usr/lib/modules -type d -name "*-talos" -exec basename {} \+)
mkdir -p /rootfs
xargs -a /pkg/files/modules.txt -I {} install -D /usr/lib/modules/${KERNELRELEASE}/{} /rootfs/usr/lib/modules/${KERNELRELEASE}/{}
depmod -b /rootfs/usr ${KERNELRELEASE}
- test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
find /rootfs/usr/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: /
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr
dependencies:
- stage: base
steps:
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- |
mkdir /rootfs
finalize:
- from: /pkg/manifest.yaml
to: /manifest.yaml
- from: /rootfs
to: /rootfs
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr

1
drm/vc4/vars.yaml Normal file
View File

@ -0,0 +1 @@
VERSION: "{{ .BUILD_ARG_TAG }}"

View File

@ -61,6 +61,12 @@ The containerd CLI (ctr) is now supported as a system extension.
title = "Amazon ENA"
description = """\
The Amazon Elastic Network Adapter (ENA) driver is now supported as a system extension.
"""
[notes.vc4]
title = "vc4"
description = """\
The Broadcom VideoCore GPU kernel modules (vc4) are now supported as a system extension.
"""
[make_deps]