-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support lts and production nvidia modules
Support LTS and production versions of NVIDIA kernel modules as per https://docs.nvidia.com/datacenter/tesla/drivers/index.html#lifecycle Part of: siderolabs/talos#9086 Signed-off-by: Noel Georgi <git@frezbo.dev>
- Loading branch information
Showing
10 changed files
with
165 additions
and
72 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
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
30 changes: 12 additions & 18 deletions
30
nonfree/kmod-nvidia/pkg.yaml → nonfree/kmod-nvidia/lts/pkg.yaml
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,41 @@ | ||
name: nonfree-kmod-nvidia-production-pkg | ||
variant: scratch | ||
shell: /toolchain/bin/bash | ||
dependencies: | ||
- stage: kernel-build | ||
steps: | ||
- sources: | ||
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
- url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/linux-sbsa/nvidia_driver-linux-sbsa-{{ .nvidia_driver_version_production }}-archive.tar.xz | ||
destination: nvidia.tar.xz | ||
sha256: b39a8cb837fe3846284d89ab2202e93b14804349d3fc9aa8a8384fd2759ec2f5 | ||
sha512: 164636addea50d4d28c4630bf7eaf6060c6392b4aac670c0f5e43996fb309203efc1fa95d464eed8a9d3a22fa2aa5f446195c0f3e4dafa9e32a532447810a2d7 | ||
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
- url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/linux-x86_64/nvidia_driver-linux-x86_64-{{ .nvidia_driver_version_production }}-archive.tar.xz | ||
destination: nvidia.tar.xz | ||
sha256: e1416ebc1e7b4a14d393ca584e3f9c5e22f9750f4ba502a8ba2c5c5ad943bbb5 | ||
sha512: 188e742796ace5a48b6cdbedae0943c2be593f9e48fb3107ac9f844ed443369cbe977aa084abf17604dd789f475633cd419ad80d63c27429d2760a4018c57586 | ||
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
env: | ||
ARCH: {{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }} | ||
prepare: | ||
- | | ||
tar xf nvidia.tar.xz --strip-components=1 | ||
build: | ||
- | | ||
cd kernel | ||
make -j $(nproc) SYSSRC=/src | ||
install: | ||
- | | ||
cd kernel | ||
mkdir -p /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.order /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras INSTALL_MOD_STRIP=1 | ||
finalize: | ||
- from: /rootfs | ||
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,45 @@ | ||
name: nvidia-open-gpu-kernel-modules-lts-pkg | ||
variant: scratch | ||
shell: /toolchain/bin/bash | ||
dependencies: | ||
- stage: kernel-build | ||
steps: | ||
- sources: | ||
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
- url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/linux-sbsa/nvidia_driver-linux-sbsa-{{ .nvidia_driver_version_lts }}-archive.tar.xz | ||
destination: nvidia.tar.xz | ||
sha256: eb089f52ddda09f4b2bcf0eb661d0bb7881a3d63cbca558c9530ab50b4ef84ee | ||
sha512: cbc575b8f72211c54b962c3c12a671d4b993436f5c292181c5db098a5b5fe909ca3e001e679430dfa393cd63a626d4c2cee1c2dd3e2b79464eea4d72fc06a3ff | ||
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
- url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/linux-x86_64/nvidia_driver-linux-x86_64-{{ .nvidia_driver_version_lts }}-archive.tar.xz | ||
destination: nvidia.tar.xz | ||
sha256: f19c11dfda9e1e5c3e0a2ca775cdaa851431648540f4e8e2916c53735debd450 | ||
sha512: 7505eda598719325b757375e25a98b17fb0e31d355e42277c32897648f63769222ac32a50f7ae89998fea52bd858160c83114e473e36cd36cfef17d57f8fdde6 | ||
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
env: | ||
ARCH: {{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }} | ||
prepare: | ||
- | | ||
tar xf nvidia.tar.xz --strip-components=1 | ||
build: | ||
- | | ||
cd kernel-open | ||
make -j $(nproc) SYSSRC=/src | ||
install: | ||
- | | ||
cd kernel-open | ||
mkdir -p /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.order /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_STRIP=1 | ||
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: / |
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
name: nvidia-open-gpu-kernel-modules-production-pkg | ||
variant: scratch | ||
shell: /toolchain/bin/bash | ||
dependencies: | ||
- stage: kernel-build | ||
steps: | ||
- sources: | ||
# {{ if eq .ARCH "aarch64" }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
- url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/linux-sbsa/nvidia_driver-linux-sbsa-{{ .nvidia_driver_version_production }}-archive.tar.xz | ||
destination: nvidia.tar.xz | ||
sha256: b39a8cb837fe3846284d89ab2202e93b14804349d3fc9aa8a8384fd2759ec2f5 | ||
sha512: 164636addea50d4d28c4630bf7eaf6060c6392b4aac670c0f5e43996fb309203efc1fa95d464eed8a9d3a22fa2aa5f446195c0f3e4dafa9e32a532447810a2d7 | ||
# {{ else }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
- url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/linux-x86_64/nvidia_driver-linux-x86_64-{{ .nvidia_driver_version_production }}-archive.tar.xz | ||
destination: nvidia.tar.xz | ||
sha256: e1416ebc1e7b4a14d393ca584e3f9c5e22f9750f4ba502a8ba2c5c5ad943bbb5 | ||
sha512: 188e742796ace5a48b6cdbedae0943c2be593f9e48fb3107ac9f844ed443369cbe977aa084abf17604dd789f475633cd419ad80d63c27429d2760a4018c57586 | ||
# {{ end }} This in fact is YAML comment, but Go templating instruction is evaluated by bldr | ||
env: | ||
ARCH: {{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }} | ||
prepare: | ||
- | | ||
tar xf nvidia.tar.xz --strip-components=1 | ||
build: | ||
- | | ||
cd kernel-open | ||
make -j $(nproc) SYSSRC=/src | ||
install: | ||
- | | ||
cd kernel-open | ||
mkdir -p /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.order /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/ | ||
make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs INSTALL_MOD_STRIP=1 | ||
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: / |