new package: add package 'xf86-video-nvidia-legacy' to support GF6 and GF7 GPUs too, thanks to 'chewitt'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2012-11-26 18:27:02 +01:00
parent 212ecfa98e
commit 53e8e35c3c
8 changed files with 226 additions and 1 deletions

View File

@ -74,6 +74,11 @@ get_graphicdrivers() {
XINERAMA_SUPPORT="yes"
fi
if [ "$drv" = "nvidia-legacy" ]; then
XORG_DRIVERS="$XORG_DRIVERS nvidia-legacy"
XINERAMA_SUPPORT="yes"
fi
if [ "$drv" = "virtualbox" ]; then
DRI_DRIVERS="$DRI_DRIVERS,swrast"
XORG_DRIVERS="$XORG_DRIVERS virtualbox"

View File

@ -0,0 +1,30 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD/kernel
LDFLAGS="" make module CC=$CC SYSSRC=$(kernel_path) SYSOUT=$(kernel_path)
cd ..
# linking libnvidia-ml.so.$PKG_VERSION to libnvidia-ml.so.1
ln -sf libnvidia-ml.so.$PKG_VERSION libnvidia-ml.so.1

View File

@ -0,0 +1,34 @@
Section "Device"
Identifier "nvidia"
Driver "nvidia"
Option "DynamicTwinView" "False"
Option "NoFlip" "false"
Option "NoLogo" "true"
Option "ConnectToAcpid" "0"
Option "FlatPanelProperties" "Scaling = Native"
Option "ModeValidation" "NoVesaModes, NoXServerModes"
Option "HWCursor" "false"
# To put Xorg in debug mode change "false" to "true" in the line below:
Option "ModeDebug" "false"
# To use a local edid.bin file uncomment the 4 lines below (change DFP-0 to match your card)
# Option "ConnectedMonitor" "DFP-0"
# Option "CustomEDID" "DFP-0:/storage/.config/edid.bin"
# Option "IgnoreEDID" "false"
# Option "UseEDID" "true"
EndSection
Section "Screen"
Identifier "screen"
Device "nvidia"
DefaultDepth 24
Option "ColorRange" "Full"
# Option "ColorRange" "Limited"
# Option "ColorSpace" "RGB"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "false"
EndSection

View File

@ -0,0 +1,48 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
VER=`ls $BUILD/linux*/modules/lib/modules`
mkdir -p $INSTALL/$XORG_PATH_MODULES/drivers
cp -P $PKG_BUILD/nvidia_drv.so $INSTALL/$XORG_PATH_MODULES/drivers
mkdir -p $INSTALL/$XORG_PATH_MODULES/extensions
# rename to not conflicting with Mesa libGL.so
cp -P $PKG_BUILD/libglx.so* $INSTALL/$XORG_PATH_MODULES/extensions/libglx_nvidia.so
mkdir -p $INSTALL/etc/X11
cp $PKG_DIR/config/*.conf $INSTALL/etc/X11
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/libnvidia-glcore.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/libnvidia-ml.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/tls/libnvidia-tls.so* $INSTALL/usr/lib
# rename to not conflicting with Mesa libGL.so
cp -P $PKG_BUILD/libGL.so* $INSTALL/usr/lib/libGL_nvidia.so.1
mkdir -p $INSTALL/lib/modules/$VER/nvidia
cp $PKG_BUILD/kernel/nvidia.ko $INSTALL/lib/modules/$VER/nvidia
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/nvidia-smi $INSTALL/usr/bin

View File

@ -0,0 +1,37 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="xf86-video-nvidia-legacy"
PKG_VERSION="304.64"
PKG_REV="1"
PKG_ARCH="i386 x86_64"
PKG_LICENSE="nonfree"
PKG_SITE="http://www.nvidia.com/"
[ "$TARGET_ARCH" = "i386" ] && PKG_URL="http://download.nvidia.com/XFree86/Linux-x86/$PKG_VERSION/NVIDIA-Linux-x86-$PKG_VERSION.run"
[ "$TARGET_ARCH" = "x86_64" ] && PKG_URL="http://download.nvidia.com/XFree86/Linux-x86_64/$PKG_VERSION/NVIDIA-Linux-x86_64-$PKG_VERSION-no-compat32.run"
PKG_DEPENDS="linux libXinerama"
PKG_BUILD_DEPENDS="toolchain util-macros linux xorg-server"
PKG_PRIORITY="optional"
PKG_SECTION="x11/driver"
PKG_SHORTDESC="xf86-video-nvidia-legacy: The Xorg driver for NVIDIA video chips supporting Geforce 6 and Geforce 7 devices too"
PKG_LONGDESC="These binary drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out and flat panel displays are also supported. This version only supports GeForce 6xxx and higher of the Geforce GPUs plus complimentary Quadros and nforce."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,31 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
STAMP=$STAMPS/$1/unpack
test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \
$PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \
$PKG_DIR/url -nt $STAMP && rm -f $STAMP
exit 0

View File

@ -0,0 +1,40 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
require_eglibc $1
NV_ARCH=x86
[ "$TARGET_ARCH" = x86_64 ] && NV_ARCH=x86_64
NV_PKG="`echo $PKG_URL | sed 's%.*/\(.*\)$%\1%'`"
[ -d $PKG_BUILD ] && rm -rf $PKG_BUILD
sh $SOURCES/$1/$NV_PKG --extract-only --target $BUILD/$PKG_NAME-$PKG_VERSION
echo "### Applying upstream patches ###"
for patch in `ls $PKG_DIR/patches.upstream/*.patch`; do
cat $patch | patch -d \
`echo $BUILD/$PKG_NAME-$PKG_VERSION | cut -f1 -d\ ` -p1
done

View File

@ -31,7 +31,7 @@ PKG_BUILD_DEPENDS="toolchain util-macros linux xorg-server"
PKG_PRIORITY="optional"
PKG_SECTION="x11/driver"
PKG_SHORTDESC="xf86-video-nvidia: The Xorg driver for NVIDIA video chips"
PKG_LONGDESC="These binary drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out and flat panel displays are also supported. This version only supports GeForce 6xxx and higher of the Geforce GPUs plus complimentary Quadros and nforce."
PKG_LONGDESC="These binary drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out and flat panel displays are also supported. This version only supports GeForce 8xxx and higher of the Geforce GPUs plus complimentary Quadros and nforce."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"