diff options
Diffstat (limited to 'testing/nouveau-drm-lts')
-rw-r--r-- | testing/nouveau-drm-lts/COPYING | 48 | ||||
-rw-r--r-- | testing/nouveau-drm-lts/Makefile | 102 | ||||
-rw-r--r-- | testing/nouveau-drm-lts/PKGBUILD | 47 | ||||
-rw-r--r-- | testing/nouveau-drm-lts/dont_check_for_pthread.patch | 49 | ||||
-rw-r--r-- | testing/nouveau-drm-lts/nouveau-drm.install | 16 |
5 files changed, 262 insertions, 0 deletions
diff --git a/testing/nouveau-drm-lts/COPYING b/testing/nouveau-drm-lts/COPYING new file mode 100644 index 000000000..6e74c337c --- /dev/null +++ b/testing/nouveau-drm-lts/COPYING @@ -0,0 +1,48 @@ + Copyright 2005 Adam Jackson. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation on the rights to use, copy, modify, merge, + publish, distribute, sub license, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NON-INFRINGEMENT. IN NO EVENT SHALL ADAM JACKSON BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------------ + + Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. + All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS + SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. diff --git a/testing/nouveau-drm-lts/Makefile b/testing/nouveau-drm-lts/Makefile new file mode 100644 index 000000000..123bc5339 --- /dev/null +++ b/testing/nouveau-drm-lts/Makefile @@ -0,0 +1,102 @@ +# This Makefile is loosely based on the drm.git/linux-core/Makefile and +# the preliminary work by Christopher James Halse Rogers. +# Edited by Pekka Paalanen <pq@iki.fi> + +# By default, the build is done against the running linux kernel source. +# To build against a different kernel source tree, set LINUXDIR: +# +# make LINUXDIR=/path/to/kernel/source + +# By default, it is assumed the Nouveau kernel tree is found in $PWD/../. +# To use a different path to the Nouveau kernel tree, set NOUVEAUROOTDIR: +# +# make NOUVEAUROOTDIR=/path/to/nouveau/linux-2.6 + + +ifndef LINUXDIR +RUNNING_REL := $(shell uname -r) + +LINUXDIR := $(shell if [ -e /lib/modules/$(RUNNING_REL)/source ]; then \ + echo /lib/modules/$(RUNNING_REL)/source; \ + else echo /lib/modules/$(RUNNING_REL)/build; fi) +endif + +NOUVEAUGITREMOTE ?= origin +NOUVEAUROOTDIR ?= $(CURDIR)/.. +override NOUVEAUROOTDIR := $(abspath $(NOUVEAUROOTDIR)) + +TESTFILE := include/drm/nouveau_drm.h +ifeq ($(wildcard $(NOUVEAUROOTDIR)/$(TESTFILE)),) +$(error $(NOUVEAUROOTDIR) does not look like the right kernel tree, \ + please set NOUVEAUROOTDIR) +endif + +GIT_REVISION := $(shell GIT_DIR=$(NOUVEAUROOTDIR)/.git \ + git describe --always --abbrev=17 2> /dev/null) + +DRMINC := -I$(NOUVEAUROOTDIR)/include/drm +DRMDIR := $(NOUVEAUROOTDIR)/drivers/gpu/drm +DRMCFG := \ + CONFIG_DRM=m \ + CONFIG_DRM_KMS_HELPER=m \ + CONFIG_DRM_TTM=m \ + CONFIG_DRM_NOUVEAU=m \ + CONFIG_DRM_NOUVEAU_KMS=n \ + CONFIG_DRM_NOUVEAU_BACKLIGHT=y \ + CONFIG_DRM_NOUVEAU_DEBUG=y \ + CONFIG_DRM_I2C_CH7006=m \ + CONFIG_DRM_TDFX=n \ + CONFIG_DRM_R128=n \ + CONFIG_DRM_RADEON=n \ + CONFIG_DRM_MGA=n \ + CONFIG_DRM_I810=n \ + CONFIG_DRM_I830=n \ + CONFIG_DRM_I915=n \ + CONFIG_DRM_SIS=n \ + CONFIG_DRM_SAVAGE=n \ + CONFIG_DRM_VIA=n + +EXTRA_CFLAGS := +MYEXTRA_CFLAGS := +MYEXTRA_CFLAGS += -DCONFIG_DRM_NOUVEAU_BACKLIGHT +MYEXTRA_CFLAGS += -DCONFIG_DRM_NOUVEAU_DEBUG + +ifneq ($(GIT_REVISION),) +MYEXTRA_CFLAGS += '-DGIT_REVISION=\"$(GIT_REVISION)\"' +endif + +MYPARMS := -C $(LINUXDIR) KCPPFLAGS="$(DRMINC)" SUBDIRS="$(DRMDIR)" $(DRMCFG) + +MYEXTRA_CFLAGS += $(EXTRA_CFLAGS) +ifneq ($(MYEXTRA_CFLAGS),) +MYPARMS += EXTRA_CFLAGS="$(MYEXTRA_CFLAGS)" +endif + +.PHONY: all modules install clean archive FORCE + +all: modules +FORCE: + +modules: + $(MAKE) $(MYPARMS) modules + +install: + $(MAKE) $(MYPARMS) modules_install + +clean: + $(MAKE) $(MYPARMS) clean + +archive: newttm-devel-compat.tar.gz newttm-devel.tar.gz master.tar.gz + +newttm-devel-compat.tar.gz: EXTRAS=nouveau README-nouveau + +%.tar: FORCE + GIT_DIR=$(NOUVEAUROOTDIR)/.git \ + git archive --format=tar --prefix=$*/ $(NOUVEAUGITREMOTE)/$* \ + drivers/gpu/drm include/drm $(EXTRAS) > $@ + +%.tar.gz: %.tar + gzip -9 -c $< > $@ + +# The commit id of the archive can be read with +# $ zcat foo.tar.gz | git get-tar-commit-id diff --git a/testing/nouveau-drm-lts/PKGBUILD b/testing/nouveau-drm-lts/PKGBUILD new file mode 100644 index 000000000..1284563f4 --- /dev/null +++ b/testing/nouveau-drm-lts/PKGBUILD @@ -0,0 +1,47 @@ +# $Id: PKGBUILD 126820 2011-06-07 13:57:50Z tpowa $ +# Maintainer: Andreas Radke <andyrtr@archlinux.org> +# Contributor: buddabrod <buddabrod@gmail.com> + +pkgname=nouveau-drm-lts +_snapdate=20100313 +pkgver=0.0.16_${_snapdate} # see master/drivers/gpu/drm/nouveau/nouveau_drv.h for version +_kernver='2.6.32-lts' +pkgrel=6 +pkgdesc="nvidia opensource X driver" +arch=('i686' 'x86_64') +url="http://nouveau.freedesktop.org/" +depends=("kernel26-lts>=2.6.32" "kernel26-lts<2.6.33") +makedepends=("kernel26-lts-headers>=2.6.32" "kernel26-lts-headers<2.6.33") +# http://nouveau.freedesktop.org/wiki/InstallDRM#head-771a47a133fba6a5a70253656e76c61e9bff93bd +optdepends=('nouveau-firmware: needed for very new card (NV50 family and above) to work properly where the OSS replacement does not work well') +#makedepends=('git' 'autoconf' 'pkgconfig') +install=nouveau-drm.install +license=('GPL') +options=('!strip') +source=(ftp://ftp.archlinux.org/other/${pkgname/-lts//}/master-${_snapdate}.tar.gz + # http://people.freedesktop.org/~pq/nouveau-drm/master.tar.gz + # get the Makefile from http://cgit.freedesktop.org/nouveau/linux-2.6/plain/nouveau/Makefile?h=master-compat + Makefile) +md5sums=('ad7ad0fb73d56bcff3d2b54a70c3d511' + 'e7d5df80186d5c736e82b0a7d46216bc') + +build() { + cd ${srcdir}/master + mkdir nouveau + cp $srcdir/Makefile ${srcdir}/master/nouveau/ + cd nouveau + make LINUXDIR=/lib/modules/${_kernver}/build DRM_MODULES="nouveau" +} + +package() { + install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/drm.ko ${pkgdir}/lib/modules/${_kernver}/updates/drm.ko + install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/drm_kms_helper.ko ${pkgdir}/lib/modules/${_kernver}/updates/drm_kms_helper.ko + install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/nouveau/nouveau.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/video/nouveau.ko + install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/ttm/ttm.ko ${pkgdir}/lib/modules/${_kernver}/updates/ttm.ko + install -D -m 0644 ${srcdir}/master/drivers/gpu/drm/i2c/ch7006.ko ${pkgdir}/lib/modules/${_kernver}/updates/ch7006.ko + + # install script + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" ${startdir}/nouveau-drm.install + # gzip -9 modules + find "$pkgdir" -name '*.ko' -exec gzip -9 {} \; +} diff --git a/testing/nouveau-drm-lts/dont_check_for_pthread.patch b/testing/nouveau-drm-lts/dont_check_for_pthread.patch new file mode 100644 index 000000000..050f55767 --- /dev/null +++ b/testing/nouveau-drm-lts/dont_check_for_pthread.patch @@ -0,0 +1,49 @@ +diff -ru libdrm-2.4.0/configure.ac libdrm-2.4.0-nostubs/configure.ac +--- libdrm-2.4.0/configure.ac 2008-10-09 21:57:09.000000000 +0200 ++++ libdrm-2.4.0-nostubs/configure.ac 2008-10-21 10:48:24.000000000 +0200 +@@ -32,10 +32,6 @@ + AC_HEADER_STDC + AC_SYS_LARGEFILE + +-PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs) +-AC_SUBST(PTHREADSTUBS_CFLAGS) +-AC_SUBST(PTHREADSTUBS_LIBS) +- + pkgconfigdir=${libdir}/pkgconfig + AC_SUBST(pkgconfigdir) + AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev], +diff -ru libdrm-2.4.0/libdrm/intel/Makefile.am libdrm-2.4.0-nostubs/libdrm/intel/Makefile.am +--- libdrm-2.4.0/libdrm/intel/Makefile.am 2008-10-14 01:39:32.000000000 +0200 ++++ libdrm-2.4.0-nostubs/libdrm/intel/Makefile.am 2008-10-21 10:49:00.000000000 +0200 +@@ -26,13 +26,12 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir)/libdrm \ + -I$(top_srcdir)/libdrm/intel \ +- $(PTHREADSTUBS_CFLAGS) \ + -I$(top_srcdir)/shared-core + + libdrm_intel_la_LTLIBRARIES = libdrm_intel.la + libdrm_intel_ladir = $(libdir) + libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined +-libdrm_intel_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++libdrm_intel_la_LIBADD = ../libdrm.la + + libdrm_intel_la_SOURCES = \ + intel_bufmgr.c \ +--- libdrm-2.4.5/libdrm/nouveau/Makefile.am.orig 2009-02-28 19:06:24.000000000 +0000 ++++ libdrm-2.4.5/libdrm/nouveau/Makefile.am 2009-02-28 19:06:33.000000000 +0000 +@@ -2,13 +2,12 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir)/libdrm \ + -I$(top_srcdir)/libdrm/nouveau \ +- $(PTHREADSTUBS_CFLAGS) \ + -I$(top_srcdir)/shared-core + + libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la + libdrm_nouveau_ladir = $(libdir) + libdrm_nouveau_la_LDFLAGS = -version-number 1:0:0 -no-undefined +-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++libdrm_nouveau_la_LIBADD = ../libdrm.la + + libdrm_nouveau_la_SOURCES = \ + nouveau_device.c \ diff --git a/testing/nouveau-drm-lts/nouveau-drm.install b/testing/nouveau-drm-lts/nouveau-drm.install new file mode 100644 index 000000000..beadaa563 --- /dev/null +++ b/testing/nouveau-drm-lts/nouveau-drm.install @@ -0,0 +1,16 @@ +post_install() { + KERNEL_VERSION='2.6.32-lts' + depmod -v $KERNEL_VERSION > /dev/null 2>&1 + echo "if you are running kms in early mode please rebuild your initrd" +} + +post_upgrade() { + post_install $1 + rmmod nouveau || echo 'In order to use the new nouveau module, exit Xserver and unload it manually.' +} + +post_remove() { + KERNEL_VERSION='2.6.32-lts' + depmod -v $KERNEL_VERSION > /dev/null 2>&1 +} + |