Commit 4e68a43e authored by Samir's avatar Samir

update nvidia

parent 51b58a4f
......@@ -6,7 +6,7 @@
pkgname=dkms-nvidia
_pkgname=nvidia
pkgver=304.30
pkgver=304.32
pkgrel=1
pkgdesc="NVIDIA dynamic kernel module (DKMS) drivers for kernel26."
arch=(i686 x86_64)
......@@ -27,7 +27,7 @@ elif [ "$CARCH" = "x86_64" ]; then
_arch='x86_64'
_pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
md5sums=('780561a808dffbfc74be84547733f30f')
md5sums=('e6d9d1f73196d5f7ea110fef59bd466e')
fi
source[1]="dkms.conf"
......
......@@ -3,10 +3,11 @@ post_install()
DKMS=`which dkms 2>/dev/null`
echo ">>> DKMS: Module add, build, and install "
_pkgver="${1%-*}"
$DKMS add -m nvidia -v '302.17'
$DKMS build -m nvidia -v '302.17'
$DKMS install -m nvidia -v '302.17'
$DKMS add -m nvidia -v "$_pkgver"
$DKMS build -m nvidia -v "$_pkgver"
$DKMS install -m nvidia -v "$_pkgver"
/sbin/depmod -a
}
......@@ -26,11 +27,8 @@ pre_remove()
DKMS=`which dkms 2>/dev/null`
echo ">>> DKMS: Module uninstall "
line=`$DKMS status -m nvidia`
if echo "$line" | grep -E 'added|built|installed'; then
version=`echo "$line" | sed "s/nvidia,\([^,]*\)[,:].*/\1/;t;d"`
$DKMS remove -m nvidia -v $version --all
fi
_pkgver="${1%-*}"
$DKMS remove -m nvidia -v $_pkgver --all
}
......
......@@ -8,12 +8,12 @@ _extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts
_kver="$(cat /lib/modules/${_extramodules}/version)"
pkgname=nvidia-lts
pkgver=304.30
pkgver=304.32
pkgrel=1
pkgdesc="NVIDIA drivers for linux."
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
depends=('linux-lts>=3.0' 'linux-lts<3.1' "nvidia-utils=${pkgver}")
depends=('linux-lts' "nvidia-utils=${pkgver}")
makedepends=('linux-lts-headers')
conflicts=('nvidia-96xx-lts' 'nvidia-173xx-lts')
license=('custom')
......@@ -28,7 +28,7 @@ elif [ "$CARCH" = "x86_64" ]; then
_ARCH='x86_64'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums=('780561a808dffbfc74be84547733f30f')
md5sums=('e6d9d1f73196d5f7ea110fef59bd466e')
fi
build() {
......
......@@ -11,7 +11,7 @@ pkgname=nvidia-utils-bumblebee
# pacman --print --print-format $1 -S nvidia-utils | grep nvidia-utils
#}
pkgver=304.30
pkgver=304.32
pkgrel=1
pkgdesc="NVIDIA drivers utilities and libraries. Repacked and installed in different folder to be used simultaneously with libgl."
arch=('i686' 'x86_64')
......@@ -32,7 +32,7 @@ elif [ "$CARCH" = "x86_64" ]; then
_carch='x86_64'
_pkg="NVIDIA-Linux-${_carch}-${pkgver}-no-compat32"
source=("ftp://download.nvidia.com/XFree86/Linux-${_carch}/${pkgver}/${_pkg}.run")
md5sums=('780561a808dffbfc74be84547733f30f')
md5sums=('e6d9d1f73196d5f7ea110fef59bd466e')
fi
create_links() {
......
......@@ -6,7 +6,7 @@
pkgbase=nvidia-utils
pkgname=('nvidia-utils' 'opencl-nvidia' 'libcl' 'nvidia-settings')
# Edit chakra-hardware-detection/hooks/hwdetect_7_graphics on version jump from 3xx.xx
pkgver=304.30
pkgver=304.32
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
......
......@@ -7,25 +7,25 @@ _extramodules=extramodules-3.4-CHAKRA
_kver="$(cat /lib/modules/${_extramodules}/version)"
pkgname=('nvidia' 'chd-nvidia')
pkgver=304.30
pkgver=304.32
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
makedepends=('linux-headers' 'linux>=3.4' 'linux<3.5' "nvidia-utils=${pkgver}")
license=('custom')
source=(nvidia_supported) # change this to url when git repo for chd is up
source=("https://gitorious.org/chakra/chakra-hardware-detection/blobs/raw/master/hwdb/nvidia_supported")
md5sums=('62d0cdb856cfae64753c0f3acf729d47')
if [ "$CARCH" = "i686" ]; then
_ARCH='x86'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}"
source+=("http://us.download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
source+=("ftp://download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums+=('b7f908ea08218df08db06026215ec419')
elif [ "$CARCH" = "x86_64" ]; then
_ARCH='x86_64'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
source+=("http://us.download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums+=('780561a808dffbfc74be84547733f30f')
source+=("ftp://download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums+=('e6d9d1f73196d5f7ea110fef59bd466e')
fi
build() {
......
#!/bin/sh
set -e
# This is a nasty kluge, but it seems to work. Better check the output when
# upgrading to a new release of the nvidia driver, though.
# To make it somehwat work, until someone knows a better way, copy /usr/share/doc/nvidia/README
# to the same dir as this script, then run.
if [ "$#" -ne 2 ]; then
>&2 printf 'USAGE: %s README.txt nv-kernel.o\n' "$0"
exit 1
fi
device_ids() {
local readme="$1"; shift
local object="$1"; shift
local ret=1
local symbols="$(mktemp)"
local readme_list="$(mktemp)"
local object_list="$(mktemp)"
local diff="$(mktemp)"
sed -nr '/^Appendix .\. Supported NVIDIA /,/legacy/ {
s/.* 0x([0-9a-fA-F]{4})( .*|$)/\1/p
}' "$readme" | tr A-F a-f | sort | uniq >"$readme_list"
local readme_length="$(grep -Ec . "$readme_list")"
objdump --section=.rodata --syms "$object" |
sed -nr '/SYMBOL TABLE/,/^$/ {
s/^([0-9a-f]+)\s+l\s+O\s+\S+\s+([0-9a-f]+)\s+\S+.*/\2 \1/p
}' |
sort -nr >"$symbols" # The list is probably among the larger symbols.
while read length start; do
[ "$((0x$length))" -gt 0 ] || continue
objdump --section=.rodata --full-contents \
--start-address="0x$start" \
--stop-address="$((0x$start+0x$length))" "$object" |
sed -nr 's/^ [0-9a-f]+ ([0-9a-f]{2})([0-9a-f]{2}).*/\2\1/p' |
sort | uniq | (grep -vx 0000 || :) >"$object_list"
local object_length="$(grep -Ec . "$object_list")"
diff -u "$readme_list" "$object_list" | tail -n +3 >"$diff"
local num_deletions="$(grep -Ec '^-' "$diff")"
local num_additions="$(grep -Ec '^\+' "$diff")"
# Some thresholds for now.
if [ "$num_deletions" -eq 0 ] &&
[ "$num_additions" -le "$(($readme_length*3/2))" ]; then
>&2 printf 'DEBUG: readme:%d object:%d deletions:%d additions:%d\n' \
"$readme_length" "$object_length" "$num_deletions" "$num_additions"
ret=0
break
fi
done <"$symbols"
if [ "$ret" -eq 0 ]; then
printf '%s\n' '# List generated by nvidia_supported. Do not edit manually.'
while read id; do
printf '%s\n' \
"0x$id"
done <"$object_list"
else
>&2 printf '%s\n' 'Failed to find the list. Using README.txt to get the list'
# We failed to extract the ids from the blob. Use the ones in README.txt
# as a fallback
printf '%s\n' '# List generated by nvidia_supported. Do not edit manually.'
while read id; do
printf '%s\n' \
"0x$id"
done <"$readme_list"
ret=0
fi
rm -f "$symbols" "$readme_list" "$object_list" "$diff"
return "$ret"
}
device_ids "$@"
# vim:set et sw=2 sts=2:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment