wok rev 7134

Up: catalyst to 10.10.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Nov 05 18:33:30 2010 +0000 (2010-11-05)
parents 83c2ce802833
children 778986b73eb9
files catalyst/receipt catalyst/stuff/catalyst-2.6.33.4.patch catalyst/stuff/catalyst-2.6.36.patch catalyst/stuff/makefile_compat.patch
line diff
     1.1 --- a/catalyst/receipt	Fri Nov 05 18:27:04 2010 +0000
     1.2 +++ b/catalyst/receipt	Fri Nov 05 18:33:30 2010 +0000
     1.3 @@ -1,13 +1,13 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="catalyst"
     1.7 -VERSION="10.7"
     1.8 +VERSION="10.10"
     1.9  CATEGORY="x-window"
    1.10  MAINTAINER="jozee@slitaz.org"
    1.11  SHORT_DESC="AMD/ATI beta drivers (non-free) for Radeon brand cards "
    1.12  WEB_SITE="http://www.ati.amd.com"
    1.13  DEPENDS="xorg-server mesa mesa-dri libdrm linux-drm fontconfig linux-agp xorg-libSM xorg-libXi xorg-libXcursor"
    1.14 -BUILD_DEPENDS="linux xorg-server"
    1.15 +BUILD_DEPENDS="linux xorg-server linux-module-headers"
    1.16  TARBALL="ati-driver-installer-${VERSION/./-}-x86.x86_64.run"
    1.17  WGET_URL="http://www2.ati.com/drivers/linux/$TARBALL"
    1.18  TAGS="drivers graphic video"
    1.19 @@ -17,9 +17,6 @@
    1.20  compile_rules() {
    1.21  
    1.22  	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.23 -	
    1.24 -	
    1.25 -	[ -d $WOK/linux/taz ] || tazwok cook linux
    1.26     
    1.27  	cd $WOK/$PACKAGE
    1.28  	[ -f $SOURCES_REPOSITORY/$TARBALL ] && cp $SOURCES_REPOSITORY/$TARBALL .
    1.29 @@ -35,11 +32,12 @@
    1.30  		grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
    1.31  	done
    1.32  	cd $src
    1.33 +	patch -Np1 -i ../stuff/makefile_compat.patch
    1.34  	patch -Np1 -i ../stuff/$PACKAGE-${KERNEL_VERSION}.patch
    1.35  	cd $src/common/lib/modules/fglrx/build_mod
    1.36  	cp $src/arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 . 
    1.37  	cp 2.6.x/Makefile .
    1.38 -	make -C $WOK/linux/linux-$KERNEL_VERSION SUBDIRS="`pwd`" modules 
    1.39 +	make -C /usr/src/linux SUBDIRS="`pwd`" modules 
    1.40  }	
    1.41  
    1.42  # Rules to gen a SliTaz package suitable for Tazpkg.
     2.1 --- a/catalyst/stuff/catalyst-2.6.33.4.patch	Fri Nov 05 18:27:04 2010 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,228 +0,0 @@
     2.4 -Index: ati10.1/common/lib/modules/fglrx/build_mod/drmP.h
     2.5 -===================================================================
     2.6 ---- ati10.1/common/lib/modules/fglrx/build_mod/drmP.h
     2.7 -+++ ati10.1/common/lib/modules/fglrx/build_mod/drmP.h	2010-01-28 19:57:07.562644291 +0200
     2.8 -@@ -42,7 +42,12 @@
     2.9 -  * can build the DRM (part of PI DRI). 4/21/2000 S + B */
    2.10 - #include <asm/current.h>
    2.11 - #endif /* __alpha__ */
    2.12 -+#include <linux/version.h>
    2.13 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
    2.14 -+#include <generated/autoconf.h>
    2.15 -+#else
    2.16 - #include <generated/autoconf.h>
    2.17 -+#endif
    2.18 - #include <linux/module.h>
    2.19 - #include <linux/kernel.h>
    2.20 - #include <linux/miscdevice.h>
    2.21 -@@ -51,7 +56,6 @@
    2.22 - #include <linux/init.h>
    2.23 - #include <linux/file.h>
    2.24 - #include <linux/pci.h>
    2.25 --#include <linux/version.h>
    2.26 - #include <linux/sched.h>
    2.27 - #include <linux/smp_lock.h>	/* For (un)lock_kernel */
    2.28 - #include <linux/mm.h>
    2.29 -Index: ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c
    2.30 -===================================================================
    2.31 ---- ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c
    2.32 -+++ ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-01-29 14:21:58.687999115 +0200
    2.33 -@@ -28,7 +28,11 @@
    2.34 - #error Kernel versions older than 2.6.0 are no longer supported by this module.
    2.35 - #endif 
    2.36 - 
    2.37 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
    2.38 -+#include <generated/autoconf.h>
    2.39 -+#else
    2.40 - #include <generated/autoconf.h>
    2.41 -+#endif
    2.42 - 
    2.43 - #if !defined(CONFIG_X86) 
    2.44 - #if !defined(CONFIG_X86_PC) 
    2.45 -@@ -163,8 +167,12 @@
    2.46 - 
    2.47 - //  For 2.6.18 or higher, the UTS_RELEASE is defined in the generated/utsrelease.h. 
    2.48 - #ifndef UTS_RELEASE 
    2.49 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
    2.50 -+#include <generated/utsrelease.h>
    2.51 -+#else
    2.52 - #include <generated/utsrelease.h>
    2.53 - #endif
    2.54 -+#endif
    2.55 - 
    2.56 - #if defined(__i386__)
    2.57 - #ifndef do_div
    2.58 -@@ -1472,7 +1472,16 @@
    2.59 - #ifndef __HAVE_ARCH_CMPXCHG
    2.60 -     return __fgl_cmpxchg(ptr,old,new,size);
    2.61 - #else
    2.62 --    return __cmpxchg(ptr,old,new,size);
    2.63 -+    switch (size) {
    2.64 -+    case 1: { volatile u8 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
    2.65 -+    case 2: { volatile u16 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
    2.66 -+    case 4: { volatile u32 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
    2.67 -+#ifdef __x86_64__
    2.68 -+    case 8: { volatile u64 *_ptr = ptr; return cmpxchg(_ptr, old, new); }
    2.69 -+#endif
    2.70 -+    default:
    2.71 -+        return old;
    2.72 -+    }
    2.73 - #endif
    2.74 - }
    2.75 -
    2.76 - 
    2.77 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c
    2.78 -===================================================================
    2.79 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c
    2.80 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2010-01-28 19:57:17.897225045 +0200
    2.81 -@@ -15,7 +15,11 @@
    2.82 -  ****************************************************************************/
    2.83 - 
    2.84 - #include <linux/version.h>
    2.85 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
    2.86 -+#include <generated/autoconf.h>
    2.87 -+#else
    2.88 - #include <generated/autoconf.h>
    2.89 -+#endif
    2.90 - #include <linux/acpi.h>
    2.91 - 
    2.92 - #include "kcl_config.h"
    2.93 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c
    2.94 -===================================================================
    2.95 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c
    2.96 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c	2010-01-28 19:57:26.104892082 +0200
    2.97 -@@ -31,7 +31,11 @@
    2.98 -  */
    2.99 - 
   2.100 - #include <linux/version.h>
   2.101 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
   2.102 -+#include <generated/autoconf.h>
   2.103 -+#else
   2.104 - #include <generated/autoconf.h>
   2.105 -+#endif
   2.106 - #include <linux/pci.h>
   2.107 - #include <linux/agp_backend.h>
   2.108 - #include <linux/string.h>
   2.109 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c
   2.110 -===================================================================
   2.111 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c
   2.112 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c	2010-01-28 19:57:34.337558105 +0200
   2.113 -@@ -37,7 +37,11 @@
   2.114 -  */
   2.115 - 
   2.116 - #include <linux/version.h>
   2.117 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
   2.118 -+#include <generated/autoconf.h>
   2.119 -+#else
   2.120 - #include <generated/autoconf.h>
   2.121 -+#endif
   2.122 - #include <linux/poll.h>
   2.123 - #include <linux/signal.h>
   2.124 - #include <asm/io.h>
   2.125 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
   2.126 -===================================================================
   2.127 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h
   2.128 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h	2010-01-28 19:57:43.599182385 +0200
   2.129 -@@ -20,7 +20,11 @@
   2.130 - #define KCL_OSCONFIG_H
   2.131 - 
   2.132 - #include <linux/version.h>
   2.133 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
   2.134 -+#include <generated/autoconf.h>
   2.135 -+#else
   2.136 - #include <generated/autoconf.h>
   2.137 -+#endif
   2.138 - 
   2.139 - // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel
   2.140 - #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
   2.141 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c
   2.142 -===================================================================
   2.143 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c
   2.144 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c	2010-01-28 19:57:51.295870149 +0200
   2.145 -@@ -31,7 +31,11 @@
   2.146 -  */
   2.147 - 
   2.148 - #include <linux/version.h>
   2.149 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
   2.150 -+#include <generated/autoconf.h>
   2.151 -+#else
   2.152 - #include <generated/autoconf.h>
   2.153 -+#endif
   2.154 - #include <linux/pci.h>
   2.155 - 
   2.156 - #include "kcl_config.h"
   2.157 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c
   2.158 -===================================================================
   2.159 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c
   2.160 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c	2010-01-28 19:57:59.728528058 +0200
   2.161 -@@ -30,7 +30,12 @@
   2.162 -  *
   2.163 -  */
   2.164 - 
   2.165 -+#include <linux/version.h>
   2.166 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
   2.167 -+#include <generated/autoconf.h>
   2.168 -+#else
   2.169 - #include <generated/autoconf.h>
   2.170 -+#endif
   2.171 - #include <linux/string.h>
   2.172 - #include <linux/module.h>
   2.173 - 
   2.174 -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c
   2.175 -===================================================================
   2.176 ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c
   2.177 -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c	2010-01-28 19:58:08.936154527 +0200
   2.178 -@@ -31,7 +31,11 @@
   2.179 -  */
   2.180 - 
   2.181 - #include <linux/version.h>
   2.182 -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
   2.183 -+#include <generated/autoconf.h>
   2.184 -+#else
   2.185 - #include <generated/autoconf.h>
   2.186 -+#endif
   2.187 - #include <linux/wait.h>
   2.188 - #include <linux/highmem.h>
   2.189 - #include <linux/sched.h>
   2.190 -Index: ati10.1/common/lib/modules/fglrx/build_mod/make.sh
   2.191 -===================================================================
   2.192 ---- ati10.1/common/lib/modules/fglrx/build_mod/make.sh
   2.193 -+++ ati10.1/common/lib/modules/fglrx/build_mod/make.sh	2010-01-28 19:55:10.849378991 +0200
   2.194 -@@ -218,8 +218,15 @@
   2.195 -         # UTS-define is in external version-*.h files, i.e. linux-2.2.14-5.0-RedHat does this flaw
   2.196 -         kernel_release=`cat $linuxincludes/linux/version-*.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` 
   2.197 -     else
   2.198 --        # For 2.6.18 or higher, UTS-define is defined in utsrelease.h.
   2.199 --        kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` 
   2.200 -+        UTS_REL_COUNT=`cat $linuxincludes/generated/utsrelease.h 2>/dev/null | grep UTS_RELEASE -c`
   2.201 -+
   2.202 -+	if [ $UTS_REL_COUNT -gt 0 ]; then
   2.203 -+	    # 2.6.33+
   2.204 -+	    kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2`
   2.205 -+	else
   2.206 -+            # For 2.6.18 to 2.6.32, UTS-define is defined in utsrelease.h.
   2.207 -+            kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2`
   2.208 -+	fi
   2.209 -     fi
   2.210 -   fi
   2.211 - fi
   2.212 -@@ -302,7 +309,8 @@
   2.213 - # 3
   2.214 - # generated/autoconf.h may contain this: #define CONFIG_SMP 1
   2.215 - 
   2.216 --src_file=$linuxincludes/generated/autoconf.h
   2.217 -+src_file=$linuxincludes/generated/autoconf.h
   2.218 -+[ -e $src_file ] || src_file=$linuxincludes/generated/autoconf.h
   2.219 - 
   2.220 - if [ ! -e $src_file ]; then
   2.221 -   echo "Warning:"                                                  >> $logfile
   2.222 -@@ -355,7 +363,8 @@
   2.223 - MODVERSIONS=0
   2.224 - 
   2.225 - # generated/autoconf.h may contain this: #define CONFIG_MODVERSIONS 1
   2.226 --src_file=$linuxincludes/generated/autoconf.h
   2.227 -+src_file=$linuxincludes/generated/autoconf.h
   2.228 -+[ -e $src_file ] || src_file=$linuxincludes/generated/autoconf.h
   2.229 - if [ ! -e $src_file ];
   2.230 - then
   2.231 -   echo "Warning:"                                                  >> $logfile
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/catalyst/stuff/catalyst-2.6.36.patch	Fri Nov 05 18:33:30 2010 +0000
     3.3 @@ -0,0 +1,26 @@
     3.4 +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-08-20 21:51:48.000000000 +0200
     3.5 ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c	2010-08-20 23:46:37.000000000 +0200
     3.6 +@@ -320,7 +320,11 @@
     3.7 +     return firegl_release((KCL_IO_FILE_Handle)filp);
     3.8 + }
     3.9 +
    3.10 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
    3.11 ++int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg)
    3.12 ++#else
    3.13 + int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg)
    3.14 ++#endif
    3.15 + {
    3.16 +     return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg);
    3.17 + }
    3.18 +@@ -407,7 +411,11 @@
    3.19 + #endif
    3.20 +     open:    ip_firegl_open,
    3.21 +     release: ip_firegl_release,
    3.22 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
    3.23 ++    unlocked_ioctl:   ip_firegl_ioctl,
    3.24 ++#else
    3.25 +     ioctl:   ip_firegl_ioctl,
    3.26 ++#endif
    3.27 +     mmap:    ip_firegl_mmap,
    3.28 +
    3.29 +     write:   ip_firegl_write,
    3.30 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/catalyst/stuff/makefile_compat.patch	Fri Nov 05 18:33:30 2010 +0000
     4.3 @@ -0,0 +1,10 @@
     4.4 +--- 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile	2010-09-22 09:15:33.000000000 +0200
     4.5 ++++ 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile	2010-10-01 17:57:21.057820899 +0200
     4.6 +@@ -66,6 +66,7 @@
     4.7 +                 -DFGL_GART_RESERVED_SLOT \
     4.8 +                 -DFGL_LINUX253P1_VMA_API \
     4.9 +                 -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
    4.10 ++                -DCOMPAT_ALLOC_USER_SPACE=$(COMPAT_ALLOC_USER_SPACE) \
    4.11 + 
    4.12 + ifeq ($(KERNELRELEASE),)
    4.13 + # on first call from remote location we get into this path