Hi,
I am running Debian Sid with 3.18.0 kernel and driver 346.16 won’t install; am I missing some set of patches ??
Error message is :
include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
# define likely(x) __builtin_expect(!!(x), 1)
^
/tmp/selfgz16841/NVIDIA-Linux-x86_64-346.16/kernel/nv.c: In function ‘nvidia_unlocked_ioctl’:
/tmp/selfgz16841/NVIDIA-Linux-x86_64-346.16/kernel/nv.c:1799:29: error: ‘struct file’ has no member named ‘f_dentry’
return nvidia_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
^
scripts/Makefile.build:257: recipe for target ‘/tmp/selfgz16841/NVIDIA-Linux-x86_64-346.16/kernel/nv.o’ failed
make[2]: *** [/tmp/selfgz16841/NVIDIA-Linux-x86_64-346.16/kernel/nv.o] Error 1
Makefile:1381: recipe for target ‘module/tmp/selfgz16841/NVIDIA-Linux-x86_64-346.16/kernel’ failed
make[1]: *** [module/tmp/selfgz16841/NVIDIA-Linux-x86_64-346.16/kernel] Error 2
make[1]: Leaving directory ‘/data/Kernel/linux-git’
NVIDIA: left KBUILD.
nvidia.ko failed to build!
nvidia-modules-common.mk:248: recipe for target ‘module’ failed
make: *** [module] Error 1
→ Error.
ERROR: Unable to build the NVIDIA kernel module.
Any tip will be welcome
mahashakti89
mlau
2
made this one for 346.22, but you get the idea:
--- kernel/nv-drm.c~ 2014-11-08 00:57:53.000000000 +0100
+++ kernel/nv-drm.c 2014-11-13 21:03:37.589650873 +0100
@@ -128,6 +128,10 @@ static struct drm_driver nv_drm_driver =
.gem_prime_vmap = nv_gem_prime_vmap,
.gem_prime_vunmap = nv_gem_prime_vunmap,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
+ .set_busid = drm_pci_set_busid,
+#endif
+
.name = "nvidia-drm",
.desc = "NVIDIA DRM driver",
.date = "20130102",
diff --git a/nv-frontend.c~ b/nv-frontend.c
index c8c8af1..00f0973 100644
--- kernel/nv-frontend.c~
+++ kernel/nv-frontend.c
@@ -327,7 +327,7 @@ long nvidia_frontend_unlocked_ioctl(
unsigned long i_arg
)
{
- return nvidia_frontend_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nvidia_frontend_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}
long nvidia_frontend_compat_ioctl(
@@ -336,7 +336,7 @@ long nvidia_frontend_compat_ioctl(
unsigned long i_arg
)
{
- return nvidia_frontend_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nvidia_frontend_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}
int nvidia_frontend_mmap(
diff --git a/nv.c~ b/nv.c
index 6b31000..3db114e 100644
--- kernel/nv.c~
+++ kernel/nv.c
@@ -1796,7 +1796,7 @@ nvidia_unlocked_ioctl(
unsigned long i_arg
)
{
- return nvidia_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+ return nvidia_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
}
/*
Hi,
Thanks for the answer. Patching the file gives following error :
mahashakti89@ishwara ~/NVIDIA-Linux-x86_64-346.22/kernel%
patch -p1 --dry-run < …/…/nv.patch
checking file nv-drm.c
Hunk #1 FAILED at 128.
1 out of 1 hunk FAILED
checking file nv-frontend.c
Hunk #1 FAILED at 327.
1 out of 2 hunks FAILED
checking file nv.c
Hunk #1 FAILED at 1796.
1 out of 1 hunk FAILED
zsh: exit 1 patch -p1 --dry-run < …/…/nv.patch
Install nvidia driver version 352 from nvidia download page, check you have linux kernel version 3.19