As some of you know, ATI dropped support for some older chipsets/cards in their later driver releases for Linux. Specifically:

Radeon 8500/9000/9100/9200/9250
ATI Mobility Radeon 9000/9100/9200
Radeon IGP 9000/9100/9200

I have an IBM Thinkpad T42 which has the Radeon 9000(FireGL). The last release that supported these chipsets was 8.28.8. The problem is that this release will only build on kernel 2.6.12(I believe) and no later. So, after slogging through numerous posts, I found a patch (http://aur.archlinux.org/packages/at...l-2.6.20.patch) which patches firegl_public.c. I added a couple of more patches and combined it into one patch which builds on BT.

Note:
I have only been running this for a day or so with some light testing, so proceed with caution

Q. Why would I want this?
A. If you are running an older ATI chipset chances are OpenGL is handled by the Mesa Project OpenGL libraries. Using the proprietary ATI driver enables the hardware handling of OpenGL and enables hardware acceleration.

Q. Are there any benefits?
A. I have noticed a slight increase in KDE performance in respect to some styles that use OpenGL

1. Download the 8.28.8 driver from ATI's website:
http://ati.amd.com/support/drivers/l...-r-8-28-8.html

You want the driver installer package(first choice).

2. Set the execute permission on the package and install the it.

3. The Patch

Copy and paste this into a new file, save it as fglrx-2.6.20.patch

Code:
 
Common subdirectories: ./build_mod.back/2.6.x and ./build_mod/2.6.x
diff -uN ./build_mod.back/agp3.c ./build_mod/agp3.c
--- ./build_mod.back/agp3.c	2006-08-17 16:10:12.000000000 +0000
+++ ./build_mod/agp3.c	2007-10-18 23:19:38.000000000 +0000
@@ -55,13 +55,13 @@
  *
  */
 
+#include <linux/utsrelease.h>
 #include <linux/version.h>
 #ifdef MODVERSIONS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
 #include <linux/modversions.h>
 #endif
 #endif
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/init.h>
diff -uN ./build_mod.back/agpgart_be.c ./build_mod/agpgart_be.c
--- ./build_mod.back/agpgart_be.c	2006-08-17 16:10:12.000000000 +0000
+++ ./build_mod/agpgart_be.c	2007-10-18 23:20:23.000000000 +0000
@@ -92,6 +92,7 @@
 #define EXPORT_SYMTAB 
 #endif /* Original AGPGART module */
 
+#include <linux/utsrelease.h>
 #include <linux/version.h>
 #ifdef MODVERSIONS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
@@ -99,7 +100,6 @@
 #endif
 #endif
 
-#include <linux/config.h>
 
 
 #include <linux/module.h>
diff -uN ./build_mod.back/drm.h ./build_mod/drm.h
--- ./build_mod.back/drm.h	2006-08-17 16:10:12.000000000 +0000
+++ ./build_mod/drm.h	2007-10-18 23:18:17.000000000 +0000
@@ -38,7 +38,6 @@
 #define _DRM_H_
 
 #if defined(__linux__)
-#include <linux/config.h>
 #include <asm/ioctl.h>		/* For _IO* macros */
 #define DRM_IOCTL_NR(n)		_IOC_NR(n)
 #define DRM_IOC_VOID		_IOC_NONE
diff -uN ./build_mod.back/drmP.h ./build_mod/drmP.h
--- ./build_mod.back/drmP.h	2006-08-17 16:10:13.000000000 +0000
+++ ./build_mod/drmP.h	2007-10-18 23:20:50.000000000 +0000
@@ -42,7 +42,6 @@
  * can build the DRM (part of PI DRI). 4/21/2000 S + B */
 #include <asm/current.h>
 #endif /* __alpha__ */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
@@ -51,6 +50,7 @@
 #include <linux/init.h>
 #include <linux/file.h>
 #include <linux/pci.h>
+#include <linux/utsrelease.h>
 #include <linux/version.h>
 #include <linux/sched.h>
 #include <linux/smp_lock.h>	/* For (un)lock_kernel */
diff -uN ./build_mod.back/firegl_public.c ./build_mod/firegl_public.c
--- ./build_mod.back/firegl_public.c	2006-08-17 16:10:13.000000000 +0000
+++ ./build_mod/firegl_public.c	2007-10-18 23:21:18.000000000 +0000
@@ -22,6 +22,7 @@
 #endif /* !MODULE */
 
 // ============================================================
+#include <linux/utsrelease.h>
 #include <linux/version.h>
 #ifdef MODVERSIONS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
@@ -69,7 +70,6 @@
 #ifdef CONFIG_MEM_MIRROR
 /* Prevent linux/config.h from being included again in subsequent
  * kernel headers as that would redefine CONFIG_MEM_MIRROR. */
-#include <linux/config.h>
 #warning "Disabling CONFIG_MEM_MIRROR because it does not work with non-GPL modules."
 #warning "This will break page tracking when the fglrx kernel module is used."
 #undef CONFIG_MEM_MIRROR
@@ -86,7 +86,6 @@
 #include <asm/unistd.h> /* for installing the patch wrapper */
 #include <linux/module.h>
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
@@ -176,6 +175,70 @@
 int errno;
 #endif // __ia64__
 
+#if defined(__i386__)
+#define __syscall_return(type, res) \
+do { \
+        if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
+                errno = -(res); \
+                res = -1; \
+        } \
+        return (type) (res); \
+} while (0)
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+long __res; \
+__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
+        : "memory"); \
+__syscall_return(type,__res); \
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+long __res; \
+__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
+                  "d" ((long)(arg3)) : "memory"); \
+__syscall_return(type,__res); \
+}
+#elif defined(__x86_64__)
+#define __syscall_clobber "r11","rcx","memory" 
+#define __syscall "syscall"
+
+#define __syscall_return(type, res) \
+do { \
+        if ((unsigned long)(res) >= (unsigned long)(-127)) { \
+                errno = -(res); \
+                res = -1; \
+        } \
+        return (type) (res); \
+} while (0)
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{ \
+long __res; \
+__asm__ volatile (__syscall \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \
+__syscall_return(type,__res); \
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+long __res; \
+__asm__ volatile (__syscall \
+        : "=a" (__res) \
+        : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)), \
+                  "d" ((long)(arg3)) : __syscall_clobber); \
+__syscall_return(type,__res); \
+}
+#endif
+
 // int mlock(const void *addr, size_t len);
 _syscall2(int, mlock, const void *, addr, size_t, len )
 // int munlock(const void *addr, size_t len);
@@ -1585,7 +1648,7 @@
 // To enable serial port debug message dumping,just define _KE_SERIAL_DEBUG in firegl_public.h file. 
 // Connect two PC with a null modern serial cable. run Hyper ternimal on the remote machine. 
 // It's useful to debug resume if network not works properly and serial port is not recovered 
-// properly when fglrx resume hook is called...
+// properly when fglrx resume hook is called...
  
  
 #define SER_DATA_PORT       0x3f8
diff -uN ./build_mod.back/i7505-agp.c ./build_mod/i7505-agp.c
--- ./build_mod.back/i7505-agp.c	2006-08-17 16:10:12.000000000 +0000
+++ ./build_mod/i7505-agp.c	2007-10-18 23:21:35.000000000 +0000
@@ -28,6 +28,7 @@
  * - Allocate more than order 0 pages to avoid too much linear map splitting.
  */
 
+#include <linux/utsrelease.h>
 #include <linux/version.h>
 #ifdef MODVERSIONS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
diff -uN ./build_mod.back/make.sh ./build_mod/make.sh
--- ./build_mod.back/make.sh	2006-08-17 16:10:12.000000000 +0000
+++ ./build_mod/make.sh	2007-10-18 23:18:17.000000000 +0000
@@ -203,9 +203,9 @@
 # ==============================================================
 # locate and verify contents of kernel include file path
 
-# verify match with respective line in linux/version.h
+# verify match with respective line in linux/utsrelease.h
 # sample: #define UTS_RELEASE "2.4.0-test7"
-src_file=$linuxincludes/linux/version.h
+src_file=$linuxincludes/linux/utsrelease.h
 if [ ! -e $src_file ];
 then
   echo "kernel includes at $linuxincludes not found or incomplete" | tee -a $logfile
diff -uN ./build_mod.back/nvidia-agp.c ./build_mod/nvidia-agp.c
--- ./build_mod.back/nvidia-agp.c	2006-08-17 16:10:12.000000000 +0000
+++ ./build_mod/nvidia-agp.c	2007-10-18 23:21:54.000000000 +0000
@@ -5,6 +5,7 @@
  * generci back port to 2.4 and module embedding by Alexander Stohr.
  */
 
+#include <linux/utsrelease.h>
 #include <linux/version.h>
 #ifdef MODVERSIONS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71)
4. Copy the patch to /lib/modules/fglrx/build_mod

5. Patch the files

Code:
patch -b -i fglrx-2.6.20.patch
6. Before we build it, we need to add a line to an include. Locate mm.h in /lib/modules/2.6.20-BT.../build/include/linux/ and add the following line to the top:

Code:
#define VM_SHM             0x00000000      /* Means nothing: delete it later */
7. Set the execute permission on make.sh and run it. It will complain about some stuff but it will build the module.

8. Now, the module is in the 2.6.x directory under build_mod. I did not use the installer script, instead, I copied the module to /lib/modules/2.6.20-BT.../extra. You can do as you wish.

9. Logout of KDE and run aticonfig --initial.

10. Reboot.

11. startx will load the kernel module, however, from what I have read, it is preferable to load it when the system boots(rc.local etc).