nvidia: patched for building with linux 3.11, removed Makefile patch, added OpenCL ICD

This commit is contained in:
Matt Housh 2013-09-19 18:58:53 -05:00
parent 2c3b5deae4
commit d5c2debeb8
5 changed files with 27 additions and 45 deletions

View File

@ -1,3 +1,7 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/OpenCL/
drwxr-xr-x root/root etc/OpenCL/vendors/
-rw-r--r-- root/root etc/OpenCL/vendors/nvidia.icd
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/modules/
drwxr-xr-x root/root lib/modules/<kernel-version>/

View File

@ -1,2 +1,2 @@
d9d7ead9c472e2b1b18679700feeaadf NVIDIA-Linux-x86_64-319.49-no-compat32.run
f651b6b17f2a89bbe029abbf2e04f790 nvidia-makefile.patch
1eff45ce5cfd36cf7c5f8690d4c1a0e0 nvidia-kernel311.patch

View File

@ -5,9 +5,8 @@
name=nvidia
version=319.49
release=1
source=(ftp://download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version-no-compat32.run
$name-makefile.patch)
release=2
source=(ftp://download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version-no-compat32.run $name-kernel311.patch)
build() {
sh NVIDIA-Linux-x86_64-$version-no-compat32.run --extract-only
@ -56,9 +55,12 @@ build() {
ln -s libGL.so.$version $PKG/usr/lib/libGL_so_1_2_nvidia
ln -s libglx.so.$version $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia
# kernel module, patch Makefile.kbuild for normal users and no load during build
# opencl icd file
install -m 0644 -D nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd
# kernel module
patch -p1 -i $SRC/$name-kernel311.patch
cd kernel
patch -p0 -i $SRC/$name-makefile.patch
ln -s Makefile.kbuild Makefile
IGNORE_CC_MISMATCH=1 make module
install -D -m 0644 nvidia.ko $PKG/lib/modules/`uname -r`/extra/nvidia.ko

View File

@ -0,0 +1,15 @@
diff -urN NVIDIA-Linux-x86_64-319.49-no-compat32.orig/kernel/nv-linux.h NVIDIA-Linux-x86_64-319.49-no-compat32/kernel/nv-linux.h
--- NVIDIA-Linux-x86_64-319.49-no-compat32.orig/kernel/nv-linux.h 2013-08-13 21:33:23.000000000 -0500
+++ NVIDIA-Linux-x86_64-319.49-no-compat32/kernel/nv-linux.h 2013-09-17 11:13:44.959178433 -0500
@@ -1037,7 +1037,11 @@
#endif
#if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
#define NV_NUM_PHYSPAGES num_physpages
+#else
+#define NV_NUM_PHYSPAGES get_num_physpages()
+#endif
#define NV_GET_CURRENT_PROCESS() current->tgid
#define NV_IN_ATOMIC() in_atomic()
#define NV_LOCAL_BH_DISABLE() local_bh_disable()

View File

@ -1,39 +0,0 @@
--- Makefile.kbuild.orig 2012-11-16 09:43:12.797295508 -0600
+++ Makefile.kbuild 2012-11-16 09:44:24.831263378 -0600
@@ -223,10 +223,10 @@
.PHONY: suser-sanity-check rmmod-sanity-check build-sanity-checks
suser-sanity-check:
- @if ! $(CONFTEST) suser_sanity_check; then exit 1; fi
+ #@if ! $(CONFTEST) suser_sanity_check; then exit 1; fi
rmmod-sanity-check:
- @if ! $(CONFTEST) rmmod_sanity_check; then exit 1; fi
+ #@if ! $(CONFTEST) rmmod_sanity_check; then exit 1; fi
build-sanity-checks:
@if ! $(CONFTEST) cc_version_check full_output; then exit 1; fi
@@ -256,9 +256,9 @@
#
module-install: suser-sanity-check module
- @mkdir -p $(MODULE_ROOT)/video; \
- install -m 0664 -o root -g root $(MODULE_OBJECT) $(MODULE_ROOT)/video; \
- PATH="$(PATH):/bin:/sbin" depmod -a
+ #@mkdir -p $(MODULE_ROOT)/video; \
+ #install -m 0664 -o root -g root $(MODULE_OBJECT) $(MODULE_ROOT)/video; \
+ #PATH="$(PATH):/bin:/sbin" depmod -a
#
# This target builds, then installs, then creates device nodes and inserts
@@ -266,8 +266,8 @@
#
package-install: module-install rmmod-sanity-check
- @PATH="$(PATH):/bin:/sbin" modprobe $(MODULE_NAME) && \
- echo "$(MODULE_OBJECT) installed successfully.";
+ #@PATH="$(PATH):/bin:/sbin" modprobe $(MODULE_NAME) && \
+ #echo "$(MODULE_OBJECT) installed successfully.";
#
# Build an object file suitable for further processing by the installer