Bug#628925: nvidia-kernel-dkms: Make nvidia module compile with linux-3.0.0

Antonio Ospite ospite at studenti.unina.it
Thu Jun 2 13:17:06 UTC 2011


Package: nvidia-kernel-dkms
Version: 270.41.19-1
Severity: normal
Tags: upstream patch

Hi,

here is a quick patch attached to make the module compile with linux-3.0.0 and 
its rc versions.

Regards,
   Antonio Ospite
   http://ao2.it

-- Package-specific info:
uname -a:
Linux jcn 3.0.0-rc1-ao2 #1 SMP Wed Jun 1 18:07:49 CEST 2011 x86_64 GNU/Linux

/proc/version:
Linux version 3.0.0-rc1-ao2 (ao2 at jcn) (gcc version 4.6.1 20110526 (prerelease) (Debian 4.6.0-10) ) #1 SMP Wed Jun 1 18:07:49 CEST 2011

/proc/driver/nvidia/version:
NVRM version: NVIDIA UNIX x86_64 Kernel Module  270.41.19  Mon May 16 23:32:08 PDT 2011
GCC version:  gcc version 4.6.1 20110526 (prerelease) (Debian 4.6.0-10) 

lspci 'VGA compatible controller [0300]':
02:00.0 VGA compatible controller [0300]: nVidia Corporation C77 [GeForce 8200] [10de:0849] (rev a2) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device [1043:82f2]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 20
	Region 0: Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
	Region 1: Memory at f0000000 (64-bit, prefetchable) [size=128M]
	Region 3: Memory at fa000000 (64-bit, prefetchable) [size=32M]
	Region 5: I/O ports at ec00 [size=128]
	[virtual] Expansion ROM at febe0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia

OpenGL and NVIDIA library files installed:
lrwxrwxrwx 1 root root       35 Feb 16 19:42 /etc/alternatives/libGL.so -> /usr/lib/nvidia/diversions/libGL.so
lrwxrwxrwx 1 root root       26 Feb 16 19:42 /etc/alternatives/libGL.so.1 -> /usr/lib/nvidia/libGL.so.1
lrwxrwxrwx 1 root root       26 Feb 16 19:42 /usr/lib/libGL.so -> /etc/alternatives/libGL.so
lrwxrwxrwx 1 root root       28 Feb 16 19:42 /usr/lib/libGL.so.1 -> /etc/alternatives/libGL.so.1
lrwxrwxrwx 1 root root       26 May 25 08:52 /usr/lib/libnvidia-cfg.so.1 -> libnvidia-cfg.so.270.41.19
-rw-r--r-- 1 root root   133064 May 17 08:52 /usr/lib/libnvidia-cfg.so.270.41.19
-rw-r--r-- 1 root root 27484752 May 17 08:47 /usr/lib/libnvidia-glcore.so.270.41.19
-rw-r--r-- 1 root root     6008 May 17 08:51 /usr/lib/libnvidia-tls.so.270.41.19
lrwxrwxrwx 1 root root       12 Mar 19 23:24 /usr/lib32/libGL.so.1 -> libGL.so.1.2
-rw-r--r-- 1 root root   401528 Jul 15  2010 /usr/lib32/libGL.so.1.2

/usr/lib/nvidia:
total 7328
drwxr-xr-x   3 root root    4096 May 28 10:32 .
drwxr-xr-x 267 root root  126976 Jun  2 09:49 ..
-rwxr-xr-x   1 root root    1338 May 16 03:01 check-for-conflicting-opengl-libraries
drwxr-xr-x   2 root root    4096 Jun  1 11:01 diversions
lrwxrwxrwx   1 root root      18 May 25 08:52 libGL.so.1 -> libGL.so.270.41.19
-rw-r--r--   1 root root 1008272 May 17 08:48 libGL.so.270.41.19
lrwxrwxrwx   1 root root      19 May 25 08:52 libglx.so -> libglx.so.270.41.19
-rw-r--r--   1 root root 6327720 May 17 08:51 libglx.so.270.41.19
-rwxr-xr-x   1 root root     441 May 16 03:01 pre-install

/usr/lib/nvidia/diversions:
total 784
drwxr-xr-x 2 root root   4096 Jun  1 11:01 .
drwxr-xr-x 3 root root   4096 May 28 10:32 ..
-rw-r--r-- 1 root root    189 Mar 22 07:38 dummy.txt
lrwxrwxrwx 1 root root     10 May 31 17:57 libGL.so -> libGL.so.1
lrwxrwxrwx 1 root root     12 May 31 17:57 libGL.so.1 -> libGL.so.1.2
-rw-r--r-- 1 root root 474024 May 31 17:57 libGL.so.1.2
-rw-r--r-- 1 root root 305800 May 30 12:25 libglx.so

Files from nvidia-installer:



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (600, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-rc1-ao2 (SMP w/1 CPU core)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nvidia-kernel-dkms depends on:
ii  dkms                          2.1.1.2-6  Dynamic Kernel Module Support Fram
ii  nvidia-kernel-common          20110515+1 NVIDIA binary kernel module suppor

Versions of packages nvidia-kernel-dkms recommends:
ii  nvidia-glx [nvidia-glx]      270.41.19-1 NVIDIA binary Xorg driver

nvidia-kernel-dkms suggests no packages.

Versions of packages nvidia-glx depends on:
ii  dpkg                         1.16.0.3    Debian package management system
ii  libc6                        2.13-4      Embedded GNU C Library: Shared lib
ii  libgl1-nvidia-glx [libgl1-nv 270.41.19-1 NVIDIA binary OpenGL libraries
ii  libglx-nvidia-alternatives   270.41.19-1 simplifies replacing Xorg module l
ii  nvidia-installer-cleanup     20110515+1  Cleanup after driver installation 
ii  nvidia-kernel-dkms [nvidia-k 270.41.19-1 NVIDIA binary kernel module DKMS s
ii  nvidia-support               20110515+1  NVIDIA binary graphics driver supp
ii  xserver-xorg-core [xorg-vide 2:1.10.2-1  Xorg X server - core server

Versions of packages nvidia-glx recommends:
ii  nvidia-vdpau-driver          270.41.19-1 NVIDIA vdpau driver

Versions of packages nvidia-glx suggests:
ii  nvidia-settings              270.41.06-1 Tool for configuring the NVIDIA gr

Versions of packages nvidia-kernel-source depends on:
ii  debhelper                     8.1.6      helper programs for debian/rules
ii  make                          3.81-8.1   An utility for Directing compilati
ii  quilt                         0.48-7     Tool to work with series of patche

Versions of packages nvidia-kernel-source recommends:
ii  kernel-package               12.036+nmu1 A utility for building Linux kerne
ii  module-assistant             0.11.3      tool to make module package creati
ii  nvidia-kernel-common         20110515+1  NVIDIA binary kernel module suppor

Versions of packages nvidia-kernel-source suggests:
ii  nvidia-glx [nvidia-glx]      270.41.19-1 NVIDIA binary Xorg driver

Versions of packages nvidia-kernel-dkms is related to:
ii  linux-headers-2.6-amd64  2.6.39+35       Header files for Linux 2.6-amd64 (
ii  linux-headers-2.6.38.2-a 2.6.38.2-ao2-1  Linux kernel headers for 2.6.38.2-
ii  linux-headers-2.6.39-1-a 2.6.39-1+b1     Header files for Linux 2.6.39-1-am
ii  linux-headers-3.0.0-rc1- 3.0.0-rc1-ao2-1 Linux kernel headers for 3.0.0-rc1
ii  nvidia-glx [nvidia-glx]  270.41.19-1     NVIDIA binary Xorg driver
ii  nvidia-kernel-common     20110515+1      NVIDIA binary kernel module suppor
ii  nvidia-kernel-dkms [nvid 270.41.19-1     NVIDIA binary kernel module DKMS s
ii  nvidia-kernel-source     270.41.19-1     NVIDIA binary kernel module source
ii  xserver-xorg             1:7.6+6         the X.Org X server
ii  xserver-xorg-core        2:1.10.2-1      Xorg X server - core server

-- no debconf information
-------------- next part --------------
Make the nvidia module build on linux-3.0.0

Signed-off-by: Antonio Ospite <ospite at studenti.unina.it>

Index: nvidia-270.41.19/Makefile
===================================================================
--- nvidia-270.41.19.orig/Makefile	2011-06-02 09:58:55.000000000 +0200
+++ nvidia-270.41.19/Makefile	2011-06-02 09:59:17.000000000 +0200
@@ -158,7 +158,7 @@
 
 # Check for kernel versions that we don't support.
 
-BELOW26 := $(shell if [ $(VERSION) -lt 2 -o $(PATCHLEVEL) -lt 6 ]; then \
+BELOW26 := $(shell if [ $(VERSION) -lt 2 -a $(PATCHLEVEL) -lt 6 ]; then \
 		echo y; fi)
 
 ifeq ($(BELOW26),y)
Index: nvidia-270.41.19/nv-linux.h
===================================================================
--- nvidia-270.41.19.orig/nv-linux.h	2011-06-02 09:59:29.000000000 +0200
+++ nvidia-270.41.19/nv-linux.h	2011-06-02 10:00:11.000000000 +0200
@@ -34,7 +34,7 @@
 #  define KERNEL_2_4
 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  error This driver does not support 2.5 kernels!
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
 #  define KERNEL_2_6
 #else
 #  error This driver does not support development kernels!


More information about the pkg-nvidia-devel mailing list