how to compile nvidia kernel modules on 2.6.20+ with paravirt_ops enabled

If you try to compile the nvidia kernel module on 2.6.20 or higher kernels that have paravirt_ops enabled (like the Debian kernels), you will run into a problem - it’ll complain that a non-GPL compatible license is using the GPL-only code paravirt_ops. I finally found a workaround (other than building the kernel without paravirt ops) - thanks to this page, you can just modify your kbuild source to get things to work. Here’s a quote from that site:

Delete the following two lines (1197-1198) in file modpost.c:

if (!mod->gpl_compatible)
check_for_gpl_usage(exp->export, basename, exp->name);

I rebuilt the 2.6.21 linux-kbuild package for Debian with the above changes, and lo and behold, it works! Thanks!

Leave a Reply »»

14 queries in 0.171 seconds