Skip to content

Commit

Permalink
feat: add chelsio drivers and firmware
Browse files Browse the repository at this point in the history
Add Chelsio drivers and firmware.

Ref: siderolabs/pkgs#810

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Sep 18, 2023
1 parent 1c94a09 commit 336397b
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif

# keep in sync with Pkgfile
BLDR_RELEASE ?= v0.2.1
PKGS ?= v1.6.0-alpha.0-11-g7d9e60e
PKGS ?= v1.6.0-alpha.0-17-g1d16fd2

BUILD := docker buildx build
PLATFORM ?= linux/amd64,linux/arm64
Expand All @@ -44,6 +44,8 @@ TARGETS = \
amd-ucode \
bnx2-bnx2x \
btrfs \
chelsio-drivers \
chelsio-firmware \
drbd \
gasket-driver \
gvisor \
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ All system extensions provided by Sidero Labs can be found in the [ghcr.io regis

### Firmware

| Name | Image | Description | Version Format |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------ |
| [amd-ucode](firmware/amd-ucode/) | [ghcr.io/siderolabs/amd-ucode](https://github.com/siderolabs/extensions/pkgs/container/amd-ucode) | AMD CPU microcode updates | `linux firmware version` |
| [i915-ucode](firmware/i915-ucode/) | [ghcr.io/siderolabs/i915-ucode](https://github.com/siderolabs/extensions/pkgs/container/i915-ucode) | Intel GPU firmware | `linux firmware version` |
| [bnx2-bnx2x](firmware/bnx2-bnx2x/) | [ghcr.io/siderolabs/bnx2-bnx2x](https://github.com/siderolabs/extensions/pkgs/container/bnx2-bnx2x) | Broadcom NetXtreme firmware | `linux firmware version` |
| [intel-ucode](firmware/intel-ucode/) | [ghcr.io/siderolabs/intel-ucode](https://github.com/siderolabs/extensions/pkgs/container/intel-ucode) | Intel CPU microcode updates | `upstream version` |
| Name | Image | Description | Version Format |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------ |
| [amd-ucode](firmware/amd-ucode/) | [ghcr.io/siderolabs/amd-ucode](https://github.com/siderolabs/extensions/pkgs/container/amd-ucode) | AMD CPU microcode updates | `linux firmware version` |
| [amdgpu-firmware](firmware/amdgpu-firmware/) | [ghcr.io/siderolabs/amdgpu-firmware](https://github.com/siderolabs/extensions/pkgs/container/amdgpu-firmware) | AMD GPU firmware | `linux firmware version` |
| [bnx2-bnx2x](firmware/bnx2-bnx2x/) | [ghcr.io/siderolabs/bnx2-bnx2x](https://github.com/siderolabs/extensions/pkgs/container/bnx2-bnx2x) | Broadcom NetXtreme firmware | `linux firmware version` |
| [chelsio-firmware](firmware/chelsio-firmware/) | [ghcr.io/siderolabs/chelsio-firmware](https://github.com/siderolabs/extensions/pkgs/container/chelsio-firmware) | Chelsio NIC firmware | `linux firmware version` |
| [i915-ucode](firmware/i915-ucode/) | [ghcr.io/siderolabs/i915-ucode](https://github.com/siderolabs/extensions/pkgs/container/i915-ucode) | Intel GPU firmware | `linux firmware version` |
| [intel-ice-firmware](firmware/intel-ice-firmware/) | [ghcr.io/siderolabs/intel-ice-firmware](https://github.com/siderolabs/extensions/pkgs/container/intel-ice-firmware) | Intel ICE NIC firmware | `linux firmware version` |
| [intel-ucode](firmware/intel-ucode/) | [ghcr.io/siderolabs/intel-ucode](https://github.com/siderolabs/extensions/pkgs/container/intel-ucode) | Intel CPU microcode updates | `upstream version` |

### Drivers

| Name | Image | Description | Version Format |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------- |
| [chelsio](drivers/chelsio/) | [ghcr.io/siderolabs/chelsio-drivers](https://github.com/siderolabs/extensions/pkgs/container/chelsio-drivers) | Chelsio NIC drivers | `talos version` |
| [gasket](drivers/gasket/) | [ghcr.io/siderolabs/gasket-driver](https://github.com/siderolabs/extensions/pkgs/container/gasket-driver) | Driver for Google Coral PCIe devices | `gasket driver upstream short commit`-`talos version` |
| [nvidia](nvidia-gpu/nvidia-modules/) | [ghcr.io/siderolabs/nvidia-open-gpu-kernel-modules](https://github.com/siderolabs/extensions/pkgs/container/nvidia-open-gpu-kernel-modules) | NVIDIA OSS Driver | `nvidia driver upstream version`-`talos version` |
| [thunderbolt](drivers/thunderbolt/) | [ghcr.io/siderolabs/thunderbolt](https://github.com/siderolabs/extensions/pkgs/container/thunderbolt) | Thunderbolt drivers | `talos version` |
Expand Down
21 changes: 21 additions & 0 deletions drivers/chelsio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# chelsio-drivers extension

## Installation

Add the extension to your machine config.

Provides:

* `cxgb`
* `cxgb3`
* `cxgb4`
* `cxgb4vf`

```yaml
machine:
install:
extensions:
- image: ghcr.io/siderolabs/chelsio-drivers:<VERSION>
```
These modules should be auto-loaded by udev based on the NIC present.
8 changes: 8 additions & 0 deletions drivers/chelsio/files/modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
modules.order
modules.builtin
modules.builtin.modinfo
kernel/drivers/net/ethernet/chelsio/cxgb/cxgb.ko
kernel/drivers/net/ethernet/chelsio/cxgb3/cxgb3.ko
kernel/drivers/net/ethernet/chelsio/cxgb4/cxgb4.ko
kernel/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf.ko
kernel/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/ch_ipsec.ko
10 changes: 10 additions & 0 deletions drivers/chelsio/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: chelsio-drivers
version: "$VERSION"
author: SideroLabs
description: |
This system extension provides Chelsio network drivers.
compatibility:
talos:
version: ">= v1.5.0"
29 changes: 29 additions & 0 deletions drivers/chelsio/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: chelsio-drivers
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: "{{ .PKGS_PREFIX }}/kernel:{{ .BUILD_ARG_PKGS }}"
steps:
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- 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}
- 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~' {} \+
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
1 change: 1 addition & 0 deletions drivers/chelsio/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .BUILD_ARG_TAG }}"
10 changes: 10 additions & 0 deletions firmware/chelsio/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: chelsio-firmware
version: "$VERSION"
author: Sidero Labs
description: |
This system extension provides Chelsio NIC firmware binaries.
compatibility:
talos:
version: ">= v1.0.0"
20 changes: 20 additions & 0 deletions firmware/chelsio/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: chelsio-firmware
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- image: "{{ .PKGS_PREFIX }}/linux-firmware:{{ .BUILD_ARG_PKGS }}"
steps:
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
install:
- |
mkdir -p /rootfs/lib/firmware
cp -R -p /lib/firmware/cxgb3 /rootfs/lib/firmware
cp -R -p /lib/firmware/cxgb4 /rootfs/lib/firmware
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
1 change: 1 addition & 0 deletions firmware/chelsio/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .LINUX_FIRMWARE_VERSION }}"

0 comments on commit 336397b

Please sign in to comment.