Bug#793160: nvidia-graphics-drivers: nvidia-kernel-dkms fails to build due to missing nvidia-uvm.ko on i386/armhf

Raphael Hertzog hertzog at debian.org
Tue Jul 21 20:43:51 UTC 2015


Source: nvidia-graphics-drivers
Version: 352.21-1
Severity: important
Tags: patch
User: devel at kali.org
Usertags: origin-kali kali-patch

When you install nvidia-kernel-dkms on i386 (or armhf), it will fail to
compile because it tries to build the non-existing nvidia-uvm.ko module.

Same goes when you rebuild nvidia-kernel-modules for this version of
nvidia-graphics-drivers.

You will find attached a patch (tested in Kali).

You might want to harmonize the test made in debian/rules with the one
made in debian/module/debian/rules.in by checking whether $(wildcard
NVIDIA-Linux/kernel/uvm) is empty instead of hardcoding the knowledge that
only amd64 has the uvm module.

Cheers,
  Raphaël Hertzog.

-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/
-------------- next part --------------
diff -Nru nvidia-graphics-drivers-352.21/debian/module/debian/rules.in nvidia-graphics-drivers-352.21/debian/module/debian/rules.in
--- nvidia-graphics-drivers-352.21/debian/module/debian/rules.in	2015-07-21 09:05:30.000000000 +0200
+++ nvidia-graphics-drivers-352.21/debian/module/debian/rules.in	2015-07-21 22:08:00.000000000 +0200
@@ -39,6 +39,9 @@
 	fi
 	sh debian/prep-modules $(KSRC)
 	sed 's/#KVERS#/$(KVERS)/g' debian/install.template > debian/install
+ifneq (1,$(WITH_UVM))
+	sed -i -e '/nvidia-uvm.ko/d' debian/install
+endif
 	touch $@
 
 build: build-arch build-indep
diff -Nru nvidia-graphics-drivers-352.21/debian/rules nvidia-graphics-drivers-352.21/debian/rules
--- nvidia-graphics-drivers-352.21/debian/rules	2015-07-21 11:41:38.000000000 +0200
+++ nvidia-graphics-drivers-352.21/debian/rules	2015-07-21 21:42:24.000000000 +0200
@@ -259,6 +259,10 @@
 	dh_installchangelogs debian/tmp/NVIDIA_Changelog
 
 override_dh_dkms:
+	# UVM module only available on amd64
+	if [ "$(DEB_HOST_ARCH)" != "amd64" ]; then \
+		sed -i -e '/BUILT_MODULE_NAME\[1\]="nvidia-uvm"/,$$d' debian/$(nvidia)-kernel-dkms.dkms; \
+	fi
 	dh_dkms -V $(version)
 
 override_dh_bugfiles:


More information about the pkg-nvidia-devel mailing list