-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Thunderbolt/USB4 enables access to many new devices, including USB4 networking or Thunderbolt<=>RJ45 adapters. Closes #165 Signed-off-by: Igor Rzegocki <igor@rzegocki.pl> Signed-off-by: Noel Georgi <git@frezbo.dev>
- Loading branch information
Showing
7 changed files
with
110 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# thunderbolt-drivers extension | ||
|
||
## Installation | ||
|
||
Add the extension to your machine config and enable the `thunderbolt` module. If you need Thunderbolt/USB4 networking, | ||
enable `thunderbolt_net` module as well. | ||
|
||
```yaml | ||
machine: | ||
install: | ||
extensions: | ||
- image: ghcr.io/siderolabs/thunderbolt:<VERSION> | ||
kernel: | ||
modules: | ||
- name: thunderbolt | ||
- name: thunderbolt_net | ||
``` | ||
## Verifiying | ||
You can verify the modules are enabled by reading the `/proc/modules` where it _should_ show the module is live. | ||
|
||
For example: | ||
|
||
``` | ||
❯ talosctl -n 192.168.42.15 read /proc/modules | ||
thunderbolt_net 24576 - - Live 0xffffffffc0414000 | ||
thunderbolt 299008 - - Live 0xffffffffc03ca00 | ||
``` | ||
|
||
In addition, if you're using networking, you should be able to verify presence of the network interfaces, checking `/sys/class/net` directory. | ||
|
||
For example: | ||
|
||
``` | ||
❯ talosctl -n 192.168.42.15 ls /sys/class/net/ | grep -E 'NODE|thunderbolt' | ||
NODE NAME | ||
192.168.42.15 thunderbolt0 | ||
192.168.42.15 thunderbolt1 | ||
``` | ||
|
||
You can also verify everything in dmesg: | ||
|
||
``` | ||
❯ talosctl -n 192.168.42.15 dmesg | ||
# look for lines like these: | ||
10.100.52.1: kern: info: [2023-07-23T16:47:28.22083266Z]: ACPI: bus type thunderbolt registered | ||
10.100.52.1: kern: info: [2023-07-23T16:47:30.48512066Z]: thunderbolt 0-0:1.1: new retimer found, vendor=0x8087 device=0x15ee | ||
SUBSYSTEM=thunderbolt | ||
DEVICE=+thunderbolt:0-0:1.1 | ||
10.100.52.1: kern: info: [2023-07-23T16:47:32.76328066Z]: thunderbolt 1-0:1.1: new retimer found, vendor=0x8087 device=0x15ee | ||
SUBSYSTEM=thunderbolt | ||
DEVICE=+thunderbolt:1-0:1.1 | ||
10.100.52.1: kern: info: [2023-07-23T16:47:37.34770966Z]: thunderbolt 0-1: new host found, vendor=0x8086 device=0x1 | ||
SUBSYSTEM=thunderbolt | ||
DEVICE=+thunderbolt:0-1 | ||
10.100.52.1: kern: info: [2023-07-23T16:47:37.34917566Z]: thunderbolt 0-1: Intel Corp. talos-node-2 | ||
SUBSYSTEM=thunderbolt | ||
DEVICE=+thunderbolt:0-1 | ||
10.100.52.1: kern: info: [2023-07-23T16:47:39.74636466Z]: thunderbolt 1-1: new host found, vendor=0x8086 device=0x1 | ||
SUBSYSTEM=thunderbolt | ||
DEVICE=+thunderbolt:1-1 | ||
10.100.52.1: kern: info: [2023-07-23T16:47:39.74767966Z]: thunderbolt 1-1: Intel Corp. talos-node-3 | ||
SUBSYSTEM=thunderbolt | ||
DEVICE=+thunderbolt:1-1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: v1alpha1 | ||
metadata: | ||
name: thunderbolt | ||
version: "$VERSION" | ||
author: Igor Rzegocki | ||
description: | | ||
This system extension provides Thunderbolt/USB4 drivers kernel modules built against a specific Talos version. | ||
This driver enables Thunderbolg/USB4 devices, including networking. | ||
compatibility: | ||
talos: | ||
version: ">= v1.5.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: thunderbolt | ||
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 }}/thunderbolt-pkg:{{ .BUILD_ARG_PKGS }}" | ||
steps: | ||
- prepare: | ||
- | | ||
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml | ||
- install: | ||
- | | ||
mkdir -p /rootfs/lib/modules | ||
cp -R /lib/modules/* /rootfs/lib/modules | ||
finalize: | ||
- from: /rootfs | ||
to: /rootfs | ||
- from: /pkg/manifest.yaml | ||
to: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VERSION: "{{ .BUILD_ARG_TAG }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters