From f49c0447d15cdbe35f1a31a7cfcb0f0c3e1e6a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfonso=20S=C3=A1nchez-Beato?= Date: Tue, 29 Oct 2024 11:06:13 +0100 Subject: [PATCH] hooks: include nvidia rules only for supported arches --- hooks/001-extra-packages.chroot | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/hooks/001-extra-packages.chroot b/hooks/001-extra-packages.chroot index 9174e7c..d01035f 100755 --- a/hooks/001-extra-packages.chroot +++ b/hooks/001-extra-packages.chroot @@ -261,10 +261,15 @@ dpkg --fsys-tarfile snapd_*.deb | tar xf - ./usr/lib/systemd/system-generators/snapd-generator rm snapd_*.deb -# Copy nvidia udev rules and dependencies (sources for this come from -# Canonical, not from Nvidia, see -# https://github.com/canonical/nvidia-graphics-drivers). -nvidia_common_pkg=nvidia-kernel-common-550 -apt-get download "$nvidia_common_pkg" -dpkg --fsys-tarfile "$nvidia_common_pkg"_*.deb | - tar xf - ./sbin/ub-device-create ./lib/udev/rules.d/71-nvidia.rules + +case "$(dpkg --print-architecture)" in + amd64|arm64) + # Copy nvidia udev rules and dependencies (sources for this come from + # Canonical, not from Nvidia, see + # https://github.com/canonical/nvidia-graphics-drivers). + nvidia_common_pkg=nvidia-kernel-common-550 + apt-get download "$nvidia_common_pkg" + dpkg --fsys-tarfile "$nvidia_common_pkg"_*.deb | + tar xf - ./sbin/ub-device-create ./lib/udev/rules.d/71-nvidia.rules + ;; +esac