Permalink
Browse files

nvidia: almost ready

  • Loading branch information...
1 parent f5e1c01 commit 8ab9bfdbfb010c2b152ed469f35a0fb1f0a2f1d2 @marcin- marcin- committed Feb 19, 2013
@@ -19,10 +19,12 @@
if get.buildTYPE() == 'emul32':
arch = "x86"
- libdir = "/usr/lib32/%s" % driver
+ nvlibdir = "/usr/lib32/%s" % driver
+ libdir = "/usr/lib32"
else:
arch = get.ARCH().replace("i686", "x86")
- libdir = "/usr/lib/%s" % driver
+ nvlibdir = "/usr/lib/%s" % driver
+ libdir = "/usr/lib"
def setup():
shelltools.system("sh NVIDIA-Linux-%s-%s.run -x --target tmp"
@@ -36,8 +38,12 @@ def setup():
# xorg-server provides libwfb.so
shelltools.unlink("libnvidia-wfb.so.*")
- shelltools.echo("ld.so.conf", libdir)
- shelltools.echo("XvMCConfig", "%s/libXvMCNVIDIA.so" % libdir)
+ shelltools.echo("ld.so.conf", nvlibdir)
+ shelltools.echo("XvMCConfig", "%s/libXvMCNVIDIA.so" % nvlibdir)
+
+ #shelltools.system("patch --remove-empty-files --no-backup-if-mismatch -p2 -i linux-3.7.6.patch")
+ #shelltools.system("patch --remove-empty-files --no-backup-if-mismatch -p1 -i nvidia-drivers-313.18-linux-3.7+.patch")
+ #shelltools.system("patch --remove-empty-files --no-backup-if-mismatch -p1 -i nvidia-drivers-313.18-builddir-config.patch")
def build():
# We don't need kernel module for emul32 build
@@ -63,8 +69,8 @@ def install():
### Libraries
# OpenGl library
- pisitools.dolib("libGL.so.%s" % version, libdir)
- pisitools.dosym("libGL.so.%s" % version, "%s/libGL.so.1.2.0" % libdir)
+ pisitools.dolib("libGL.so.%s" % version, nvlibdir)
+ pisitools.dosym("libGL.so.%s" % version, "%s/libGL.so.1.2.0" % nvlibdir)
# OpenCL
pisitools.dolib("libOpenCL.so.1.0.0", libdir)
@@ -97,13 +103,13 @@ def install():
pisitools.dolib("libnvidia-%s.so.%s" % (lib, version), libdir)
# VDPAU driver
- pisitools.dolib("libvdpau_nvidia.so.%s" % version, "%s/vdpau" % libdir)
- pisitools.dosym("../nvidia-current/vdpau/libvdpau_nvidia.so.%s" % version, "%s/vdpau/libvdpau_nvidia.so.1" % libdir.strip(driver))
+ pisitools.dolib("libvdpau_nvidia.so.%s" % version, "%s/vdpau" % nvlibdir)
+ pisitools.dosym("../nvidia-current/vdpau/libvdpau_nvidia.so.%s" % version, "%s/vdpau/libvdpau_nvidia.so.1" % nvlibdir.strip(driver))
# X modules
- pisitools.dolib("nvidia_drv.so", "%s/modules/drivers" % libdir)
- pisitools.dolib("libglx.so.%s" % version, "%s/modules/extensions" % libdir)
- pisitools.dosym("libglx.so.%s" % version, "%s/modules/extensions/libglx.so" % libdir)
+ pisitools.dolib("nvidia_drv.so", "%s/modules/drivers" % nvlibdir)
+ pisitools.dolib("libglx.so.%s" % version, "%s/modules/extensions" % nvlibdir)
+ pisitools.dosym("libglx.so.%s" % version, "%s/modules/extensions/libglx.so" % nvlibdir)
# Exit time for emul32 build
if get.buildTYPE() == 'emul32':
@@ -0,0 +1,11 @@
+--- a/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh 2013-02-04 15:10:20.669633666 -0500
++++ b/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh 2013-02-04 15:10:34.283334673 -0500
+@@ -1701,7 +1701,7 @@
+ SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
+
+ if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
+- -a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then
++ -a -n "$SUBLEVEL" -a $SUBLEVEL -le 6 ]; then
+ SELECTED_MAKEFILE=Makefile.kbuild
+ RET=0
+ fi
@@ -0,0 +1,42 @@
+the .config file is found in the output dir, not the source dir.
+search for it in the right place to fix kernels that are built
+via standard out-of-tree methods (KBUILD_OUTPUT).
+
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -63,7 +63,7 @@ test_xen() {
+ XEN_PRESENT=0
+ fi
+ else
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+ if [ -f $CONFIG ]; then
+ if [ -z "$(grep "^CONFIG_XEN=y" $CONFIG)" ]; then
+ XEN_PRESENT="0"
+@@ -1688,7 +1688,7 @@ case "$6" in
+ rm -f conftest.h
+ else
+ MAKEFILE=$HEADERS/../Makefile
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+
+ if [ -f $MAKEFILE -a -f $CONFIG ]; then
+ #
+@@ -1857,7 +1857,7 @@ case "$6" in
+ rm -f conftest$$.c conftest$$.o
+ rm -f conftest.h
+ else
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+ if [ -f $CONFIG ]; then
+ if [ -z "$(grep "^CONFIG_FB_RIVA=y" $CONFIG)" ]; then
+ RET=0
+@@ -1923,7 +1923,7 @@ case "$6" in
+ rm -f conftest$$.c conftest$$.o
+ rm -f conftest.h
+ else
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+ if [ -f $CONFIG ]; then
+ if [ -z "$(grep "^CONFIG_FB_NVIDIA=y" $CONFIG)" ]; then
+ RET=0
@@ -0,0 +1,24 @@
+the nvidia drivers are trying to test for version 2.6.6, but fail to take into
+account the first digit. so 3.7.0+ ends up failing the test.
+
+https://bugs.gentoo.org/447566
+
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -1697,13 +1697,15 @@
+ # kernel older than 2.6.6, that's all we require to
+ # build the module.
+ #
++ VERSION=$(grep "^VERSION =" $MAKEFILE | cut -d " " -f 3)
+ PATCHLEVEL=$(grep "^PATCHLEVEL =" $MAKEFILE | cut -d " " -f 3)
+ SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
+
+- if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
++ if [ -n "$VERSION" -a $VERSION -ge 3 ] || \
++ [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
+ -a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then
+ SELECTED_MAKEFILE=Makefile.kbuild
+ RET=0
+ fi
+ fi
+ fi
@@ -11,8 +11,13 @@
<License>NVIDIA</License>
<Summary>NVIDIA drivers for GeForce 6xxx and newer GPUs</Summary>
<Description>NVIDIA graphics drivers provide optimized 2D/3D performance.</Description>
- <Archive sha1sum="e46000f2b464e431f2338c632138adbe29c5ce7b" type="binary">ftp://download.nvidia.com/XFree86/Linux-x86/313.09/NVIDIA-Linux-x86-313.09.run</Archive>
- <Archive sha1sum="0baaeb125b22873e6850243bf563c1bdaa4d7a2b" type="binary">ftp://download.nvidia.com/XFree86/Linux-x86_64/313.09/NVIDIA-Linux-x86_64-313.09.run</Archive>
+ <Archive sha1sum="89fb7f687ceb294d92439122a0d3bbb9060f5259" type="binary">ftp://download.nvidia.com/XFree86/Linux-x86/310.32/NVIDIA-Linux-x86-310.32.run</Archive>
+ <Archive sha1sum="3f2b8da482175d86697041eafa7710c8aa4362ed" type="binary">ftp://download.nvidia.com/XFree86/Linux-x86_64/310.32/NVIDIA-Linux-x86_64-310.32.run</Archive>
+ <!--AdditionalFiles>
+ <AdditionalFile permission="0644" target="linux-3.7.6.patch">linux-3.7.6.patch</AdditionalFile>
+ <AdditionalFile permission="0644" target="nvidia-drivers-313.18-linux-3.7+.patch">nvidia-drivers-313.18-linux-3.7+.patch</AdditionalFile>
+ <AdditionalFile permission="0644" target="nvidia-drivers-313.18-builddir-config.patch">nvidia-drivers-313.18-builddir-config.patch</AdditionalFile>
+ </AdditionalFiles-->
<BuildDependencies>
<Dependency>kernel-module-headers</Dependency>
</BuildDependencies>
@@ -98,11 +103,11 @@
<History>
<Update release="1">
- <Date>2012-12-30</Date>
- <Version>313.09</Version>
+ <Date>2013-02-19</Date>
+ <Version>310.32</Version>
<Comment>First release</Comment>
- <Name>Idris Kalp</Name>
- <Email>yaralikurt15@hotmail.com</Email>
+ <Name>Marcin Bojara</Name>
+ <Email>marcin.bojara@gmail.com</Email>
</Update>
</History>
</PISI>

0 comments on commit 8ab9bfd

Please sign in to comment.