tag 425127 + patch
thanks

Hi,

I attach a modified version of Michael Gilbert's patch that uses the kernel version we are compiling for instead of the running one. Requires the kernel we are compiling for to be installed, not only the headers. But that's usually the case when using module-assistant.


Andreas
#! /bin/sh /usr/share/dpatch/dpatch-run
## 05_paravirt_ops.dpatch by Andreas Beckmann <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Work around bug #425127: "modpost: GPL-incompatible module nvidia.ko
## DP: uses GPL-only symbol 'paravirt_ops'"

@DPATCH@
diff -urNad nvidia-kernel-legacy-96xx~/nv/Makefile.kbuild 
nvidia-kernel-legacy-96xx/nv/Makefile.kbuild
--- nvidia-kernel-legacy-96xx~/nv/Makefile.kbuild       2007-06-18 
03:05:49.000000000 +0200
+++ nvidia-kernel-legacy-96xx/nv/Makefile.kbuild        2007-07-14 
18:20:53.391747709 +0200
@@ -125,6 +125,15 @@
 MODULE_ROOT  := /lib/modules/$(KERNEL_UNAME)/kernel/drivers
 
 #
+# fix paravirt_ops problem occurring on 2.6.20, 2.6.21 (see #425127)
+#
+
+ifneq (,$(strip $(foreach v, 2.6.20 2.6.21, $(findstring $v,$(KERNEL_UNAME)))))
+PARAVIRT_OPS := $(shell grep "D paravirt_ops" /boot/System.map-$(KERNEL_UNAME) 
| cut -c 1-8)
+EXTRA_LDFLAGS += --defsym paravirt_ops=0x$(PARAVIRT_OPS)
+endif
+
+#
 # Sets any internal variables left unset by KBUILD (e.g. this happens during
 # a top-level run).
 #

Reply via email to