Skip to content

Commit

Permalink
feat: add thunderbolt/USB4 module
Browse files Browse the repository at this point in the history
Support for Thunderbolt/USB4 enables access to many new devices,
including USB4 networking or Thunderbolt<=>RJ45 adapters.

Signed-off-by: Igor Rzegocki <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
ajgon authored and frezbo committed Jul 24, 2023
1 parent 17d5b94 commit fedfafa
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ TARGETS += \
drbd-pkg \
gasket-driver-pkg \
nvidia-open-gpu-kernel-modules-pkg \
thunderbolt-pkg \
zfs-pkg \

# Temporarily disabled until mellanox builds with Linux 6.1
Expand Down
8 changes: 6 additions & 2 deletions kernel/build/config-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,8 @@ CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFI_TEST is not set
# CONFIG_APPLE_PROPERTIES is not set
CONFIG_EFI_DEV_PATH_PARSER=y
CONFIG_APPLE_PROPERTIES=y
# CONFIG_RESET_ATTACK_MITIGATION is not set
# CONFIG_EFI_RCI2_TABLE is not set
# CONFIG_EFI_DISABLE_PCI_DMA is not set
Expand Down Expand Up @@ -2794,6 +2795,7 @@ CONFIG_IEEE802154_DRIVERS=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_VMXNET3=y
# CONFIG_FUJITSU_ES is not set
CONFIG_USB4_NET=m
CONFIG_HYPERV_NET=y
# CONFIG_NETDEVSIM is not set
CONFIG_NET_FAILOVER=y
Expand Down Expand Up @@ -4872,7 +4874,9 @@ CONFIG_PWM_SYSFS=y
# end of Performance monitor support

CONFIG_RAS=y
# CONFIG_USB4 is not set
CONFIG_USB4=m
# CONFIG_USB4_DEBUGFS_WRITE is not set
# CONFIG_USB4_DMA_TEST is not set

#
# Android
Expand Down
5 changes: 4 additions & 1 deletion kernel/build/config-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -3177,6 +3177,7 @@ CONFIG_IEEE802154_DRIVERS=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_VMXNET3=y
# CONFIG_FUJITSU_ES is not set
CONFIG_USB4_NET=m
CONFIG_HYPERV_NET=y
# CONFIG_NETDEVSIM is not set
CONFIG_NET_FAILOVER=y
Expand Down Expand Up @@ -7364,7 +7365,9 @@ CONFIG_THUNDERX2_PMU=y
# end of Performance monitor support

CONFIG_RAS=y
# CONFIG_USB4 is not set
CONFIG_USB4=m
# CONFIG_USB4_DEBUGFS_WRITE is not set
# CONFIG_USB4_DMA_TEST is not set

#
# Android
Expand Down
5 changes: 5 additions & 0 deletions thunderbolt/files/modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
modules.order
modules.builtin
modules.builtin.modinfo
kernel/drivers/thunderbolt/thunderbolt.ko
kernel/drivers/net/thunderbolt-net.ko
23 changes: 23 additions & 0 deletions thunderbolt/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: thunderbolt-pkg
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
runtime: true
- stage: kernel
steps:
- env:
ARCH: {{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }}
install:
- |
export KERNELRELEASE="{{ .linux_version }}-talos"
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: /

0 comments on commit fedfafa

Please sign in to comment.