# HG changeset patch # User Christopher Rogers # Date 1288982010 0 # Node ID 4e1c8501de53111f714f75e89d4fab9f4772f31e # Parent 83c2ce8028330e36da77a4a3b3aaaf7f65c75a58 Up: catalyst to 10.10. diff -r 83c2ce802833 -r 4e1c8501de53 catalyst/receipt --- a/catalyst/receipt Fri Nov 05 18:27:04 2010 +0000 +++ b/catalyst/receipt Fri Nov 05 18:33:30 2010 +0000 @@ -1,13 +1,13 @@ # SliTaz package receipt. PACKAGE="catalyst" -VERSION="10.7" +VERSION="10.10" CATEGORY="x-window" MAINTAINER="jozee@slitaz.org" SHORT_DESC="AMD/ATI beta drivers (non-free) for Radeon brand cards " WEB_SITE="http://www.ati.amd.com" DEPENDS="xorg-server mesa mesa-dri libdrm linux-drm fontconfig linux-agp xorg-libSM xorg-libXi xorg-libXcursor" -BUILD_DEPENDS="linux xorg-server" +BUILD_DEPENDS="linux xorg-server linux-module-headers" TARBALL="ati-driver-installer-${VERSION/./-}-x86.x86_64.run" WGET_URL="http://www2.ati.com/drivers/linux/$TARBALL" TAGS="drivers graphic video" @@ -17,9 +17,6 @@ compile_rules() { KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` - - - [ -d $WOK/linux/taz ] || tazwok cook linux cd $WOK/$PACKAGE [ -f $SOURCES_REPOSITORY/$TARBALL ] && cp $SOURCES_REPOSITORY/$TARBALL . @@ -35,11 +32,12 @@ grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|" done cd $src + patch -Np1 -i ../stuff/makefile_compat.patch patch -Np1 -i ../stuff/$PACKAGE-${KERNEL_VERSION}.patch cd $src/common/lib/modules/fglrx/build_mod cp $src/arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 . cp 2.6.x/Makefile . - make -C $WOK/linux/linux-$KERNEL_VERSION SUBDIRS="`pwd`" modules + make -C /usr/src/linux SUBDIRS="`pwd`" modules } # Rules to gen a SliTaz package suitable for Tazpkg. diff -r 83c2ce802833 -r 4e1c8501de53 catalyst/stuff/catalyst-2.6.33.4.patch --- a/catalyst/stuff/catalyst-2.6.33.4.patch Fri Nov 05 18:27:04 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -Index: ati10.1/common/lib/modules/fglrx/build_mod/drmP.h -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/drmP.h -+++ ati10.1/common/lib/modules/fglrx/build_mod/drmP.h 2010-01-28 19:57:07.562644291 +0200 -@@ -42,7 +42,12 @@ - * can build the DRM (part of PI DRI). 4/21/2000 S + B */ - #include - #endif /* __alpha__ */ -+#include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - #include - #include -@@ -51,7 +56,6 @@ - #include - #include - #include --#include - #include - #include /* For (un)lock_kernel */ - #include -Index: ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-01-29 14:21:58.687999115 +0200 -@@ -28,7 +28,11 @@ - #error Kernel versions older than 2.6.0 are no longer supported by this module. - #endif - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - - #if !defined(CONFIG_X86) - #if !defined(CONFIG_X86_PC) -@@ -163,8 +167,12 @@ - - // For 2.6.18 or higher, the UTS_RELEASE is defined in the generated/utsrelease.h. - #ifndef UTS_RELEASE -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include - #endif -+#endif - - #if defined(__i386__) - #ifndef do_div -@@ -1472,7 +1472,16 @@ - #ifndef __HAVE_ARCH_CMPXCHG - return __fgl_cmpxchg(ptr,old,new,size); - #else -- return __cmpxchg(ptr,old,new,size); -+ switch (size) { -+ case 1: { volatile u8 *_ptr = ptr; return cmpxchg(_ptr, old, new); } -+ case 2: { volatile u16 *_ptr = ptr; return cmpxchg(_ptr, old, new); } -+ case 4: { volatile u32 *_ptr = ptr; return cmpxchg(_ptr, old, new); } -+#ifdef __x86_64__ -+ case 8: { volatile u64 *_ptr = ptr; return cmpxchg(_ptr, old, new); } -+#endif -+ default: -+ return old; -+ } - #endif - } - - -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2010-01-28 19:57:17.897225045 +0200 -@@ -15,7 +15,11 @@ - ****************************************************************************/ - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - - #include "kcl_config.h" -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_agp.c 2010-01-28 19:57:26.104892082 +0200 -@@ -31,7 +31,11 @@ - */ - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - #include - #include -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_io.c 2010-01-28 19:57:34.337558105 +0200 -@@ -37,7 +37,11 @@ - */ - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - #include - #include -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_osconfig.h 2010-01-28 19:57:43.599182385 +0200 -@@ -20,7 +20,11 @@ - #define KCL_OSCONFIG_H - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - - // Choose modern way to call 32-on-64 IOCTLs if configured in the kernel - #if defined(CONFIG_COMPAT) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_pci.c 2010-01-28 19:57:51.295870149 +0200 -@@ -31,7 +31,11 @@ - */ - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - - #include "kcl_config.h" -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_str.c 2010-01-28 19:57:59.728528058 +0200 -@@ -30,7 +30,12 @@ - * - */ - -+#include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - #include - -Index: ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c -+++ ati10.1/common/lib/modules/fglrx/build_mod/kcl_wait.c 2010-01-28 19:58:08.936154527 +0200 -@@ -31,7 +31,11 @@ - */ - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) -+#include -+#else - #include -+#endif - #include - #include - #include -Index: ati10.1/common/lib/modules/fglrx/build_mod/make.sh -=================================================================== ---- ati10.1/common/lib/modules/fglrx/build_mod/make.sh -+++ ati10.1/common/lib/modules/fglrx/build_mod/make.sh 2010-01-28 19:55:10.849378991 +0200 -@@ -218,8 +218,15 @@ - # UTS-define is in external version-*.h files, i.e. linux-2.2.14-5.0-RedHat does this flaw - kernel_release=`cat $linuxincludes/linux/version-*.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` - else -- # For 2.6.18 or higher, UTS-define is defined in utsrelease.h. -- kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` -+ UTS_REL_COUNT=`cat $linuxincludes/generated/utsrelease.h 2>/dev/null | grep UTS_RELEASE -c` -+ -+ if [ $UTS_REL_COUNT -gt 0 ]; then -+ # 2.6.33+ -+ kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` -+ else -+ # For 2.6.18 to 2.6.32, UTS-define is defined in utsrelease.h. -+ kernel_release=`cat $linuxincludes/generated/utsrelease.h | grep UTS_RELEASE | grep \"$OsRelease\" | cut -d'"' -f2` -+ fi - fi - fi - fi -@@ -302,7 +309,8 @@ - # 3 - # generated/autoconf.h may contain this: #define CONFIG_SMP 1 - --src_file=$linuxincludes/generated/autoconf.h -+src_file=$linuxincludes/generated/autoconf.h -+[ -e $src_file ] || src_file=$linuxincludes/generated/autoconf.h - - if [ ! -e $src_file ]; then - echo "Warning:" >> $logfile -@@ -355,7 +363,8 @@ - MODVERSIONS=0 - - # generated/autoconf.h may contain this: #define CONFIG_MODVERSIONS 1 --src_file=$linuxincludes/generated/autoconf.h -+src_file=$linuxincludes/generated/autoconf.h -+[ -e $src_file ] || src_file=$linuxincludes/generated/autoconf.h - if [ ! -e $src_file ]; - then - echo "Warning:" >> $logfile diff -r 83c2ce802833 -r 4e1c8501de53 catalyst/stuff/catalyst-2.6.36.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/catalyst/stuff/catalyst-2.6.36.patch Fri Nov 05 18:33:30 2010 +0000 @@ -0,0 +1,26 @@ +--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 21:51:48.000000000 +0200 ++++ work/common/lib/modules/fglrx/build_mod/firegl_public.c 2010-08-20 23:46:37.000000000 +0200 +@@ -320,7 +320,11 @@ + return firegl_release((KCL_IO_FILE_Handle)filp); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++int ip_firegl_ioctl(struct file* filp, unsigned int cmd, unsigned long arg) ++#else + int ip_firegl_ioctl(struct inode* inode, struct file* filp, unsigned int cmd, unsigned long arg) ++#endif + { + return firegl_ioctl((KCL_IO_FILE_Handle)filp, cmd, arg); + } +@@ -407,7 +411,11 @@ + #endif + open: ip_firegl_open, + release: ip_firegl_release, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ unlocked_ioctl: ip_firegl_ioctl, ++#else + ioctl: ip_firegl_ioctl, ++#endif + mmap: ip_firegl_mmap, + + write: ip_firegl_write, \ No newline at end of file diff -r 83c2ce802833 -r 4e1c8501de53 catalyst/stuff/makefile_compat.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/catalyst/stuff/makefile_compat.patch Fri Nov 05 18:33:30 2010 +0000 @@ -0,0 +1,10 @@ +--- 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-22 09:15:33.000000000 +0200 ++++ 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-10-01 17:57:21.057820899 +0200 +@@ -66,6 +66,7 @@ + -DFGL_GART_RESERVED_SLOT \ + -DFGL_LINUX253P1_VMA_API \ + -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \ ++ -DCOMPAT_ALLOC_USER_SPACE=$(COMPAT_ALLOC_USER_SPACE) \ + + ifeq ($(KERNELRELEASE),) + # on first call from remote location we get into this path