Hi, I've prepared the new upstream release, 8.34.8, it fails in the same way. Does someone know how to workaround this?
I've attached the diff for 8.34.8 with updated patches. @Flavio: could you please merge this (even if it's not for .20)? I can upload to experimental if you like. Bye, -- Loïc Minier <[EMAIL PROTECTED]>
--- fglrx-driver-8.31.5/debian/changelog +++ fglrx-driver-8.34.8/debian/changelog @@ -1,3 +1,22 @@ +fglrx-driver (8.34.8-0.1) experimental; urgency=low + + * New upstream release + - Update patches 00-make.sh, 02-Makefile, 10-CONFIG_SMP.patch, + 14_2.6.20-i386-syscalls. + - Drop patch 13-config_h-is-gone, merged upstream. + + -- Loic Minier <[EMAIL PROTECTED]> Tue, 27 Feb 2007 15:08:11 +0100 + +fglrx-driver (8.31.5-1.1) experimental; urgency=low + + * Non-maintainer upload. + * New patch, 14_2.6.20-i386-syscalls, to support 2.6.20 kernels on x86; + backported from + <http://whoopie.gmxhome.de/linux/patches/2.6.20/fglrx-8.34.8-for-2.6.20.patch>; + closes: #410111. + + -- Loic Minier <[EMAIL PROTECTED]> Tue, 27 Feb 2007 14:24:28 +0100 + fglrx-driver (8.31.5-1) experimental; urgency=low * New upstream version. (Closes: #399136, #399301) --- fglrx-driver-8.31.5/debian/patches/00-make.sh +++ fglrx-driver-8.34.8/debian/patches/00-make.sh @@ -1,5 +1,5 @@ ---- make.sh-orig -+++ make.sh +--- make.sh.orig 2007-02-20 19:23:07.000000000 +0100 ++++ make.sh 2007-02-27 15:07:17.000000000 +0100 @@ -19,7 +19,6 @@ # package defaults @@ -371,7 +371,7 @@ +# assume PAGE_ATTR_FIX=1 +PAGE_ATTR_FIX=1 - if [ $SMP = 0 ] + if [ "$SMP" = 0 ] then @@ -466,60 +220,10 @@ @@ -494,14 +494,17 @@ def_machine="-ffixed-r13 -mfixed-range=f12-f15,f32-f127" fi -@@ -891,49 +594,15 @@ +@@ -934,52 +637,15 @@ if [ $kernel_is_26x -gt 0 ]; then echo "doing Makefile based build for kernel 2.6.x and higher" | tee -a $logfile - cd 2.6.x V=${V:-0} - #tlog is a temporary file that will be deleted -- make CC=${CC} V=${V} MODFLAGS="-DMODULE $def_for_all $def_smp $def_modversions" PAGE_ATTR_FIX=$PAGE_ATTR_FIX > tlog 2>&1 +- make CC=${CC} V=${V} \ +- LIBIP_PREFIX=$(echo "$LIBIP_PREFIX" | sed -e 's|^\([^/]\)|../\1|') \ +- MODFLAGS="-DMODULE $def_for_all $def_smp $def_modversions" \ +- PAGE_ATTR_FIX=$PAGE_ATTR_FIX > tlog 2>&1 - res=$? - tee -a $logfile < tlog - #delete tlog @@ -546,7 +549,7 @@ else echo "doing script based build for kernel 2.4.x and similar" | tee -a $logfile -@@ -1062,54 +731,6 @@ +@@ -1108,66 +774,6 @@ # ============================================================== @@ -571,6 +574,18 @@ - mkdir $target_dir | tee -a $logfile - fi - +- which strip > /dev/null 2>&1 +- if test $? = 0; then +- strip -g ${MODULE}${kmod_extension} > /dev/null 2>&1 +- if test $? = 0; then +- echo "stripping the debug info of kernel module" >> $logfile +- else +- echo "could not strip the debug info of kernel module" >> $logfile +- fi +- else +- echo "could not find the strip utility on your system" >> $logfile +- fi +- - # for fglrx and fglrx_agp - echo "copying ${MODULE}${kmod_extension}" >> $logfile - if [ $INSTALL_MODULE_SUBDIRS -eq 1 ]; @@ -601,7 +616,7 @@ # ============================================================== # finale -@@ -1119,12 +740,9 @@ +@@ -1177,12 +783,9 @@ if [ $OPTIONS_HINTS -ne 0 ]; then --- fglrx-driver-8.31.5/debian/patches/02-Makefile +++ fglrx-driver-8.34.8/debian/patches/02-Makefile @@ -1,12 +1,12 @@ ---- Makefile-orig -+++ Makefile +--- Makefile.orig 2007-02-20 19:23:07.000000000 +0100 ++++ Makefile 2007-02-27 15:10:27.000000000 +0100 @@ -1,4 +1,4 @@ -GCC_VER_MAJ = $(shell $(CC) --version | head -n 1 | sed -e 's/[^0-9. ]//g;s/^ *//;s/^\(.\)\..*$$/\1/') +GCC_VER_MAJ = $(shell $(CC) -dumpversion | cut -f1 -d.) - obj-m += fglrx.o - fglrx-libs += libfglrx_ip.a.GCC$(GCC_VER_MAJ) -@@ -23,36 +23,18 @@ + LIBIP_PREFIX ?= .. + +@@ -25,36 +25,18 @@ # on first call from remote location we get into this path # whilst on second call all is managed by the embedding kernel makefile @@ -34,7 +34,7 @@ - @ln -s ../$@ - -%.GCC$(GCC_VER_MAJ): -- @ln -s ../$@ +- @ln -s $(LIBIP_PREFIX)/$@ + $(MAKE) -C $(KDIR) SUBDIRS=$(CURDIR) modules # distclean:: clean --- fglrx-driver-8.31.5/debian/patches/10-CONFIG_SMP.patch +++ fglrx-driver-8.34.8/debian/patches/10-CONFIG_SMP.patch @@ -1,6 +1,6 @@ ---- firegl_public.c-orig -+++ firegl_public.c -@@ -254,7 +254,7 @@ const unsigned long __ke_MODVERSIONS_Sta +--- firegl_public.c.orig 2007-02-20 19:23:07.000000000 +0100 ++++ firegl_public.c 2007-02-27 15:11:30.000000000 +0100 +@@ -269,7 +269,7 @@ const char BUILD_KERNEL_HAS_MODVERSIONS_CLEARED; #endif @@ -9,7 +9,7 @@ const unsigned long __ke_SMP_State = 1; const char BUILD_KERNEL_HAS_SMP_SET; #else -@@ -2270,7 +2270,7 @@ int ATI_API_CALL __ke_test_and_change_bi +@@ -2414,7 +2414,7 @@ /*****************************************************************************/ @@ -18,7 +18,7 @@ static atomic_t cpus_waiting; static void deferred_flush(void* contextp) -@@ -2286,11 +2286,11 @@ static void deferred_flush(void* context +@@ -2430,11 +2430,11 @@ while (atomic_read(&cpus_waiting) > 0) barrier(); } @@ -32,7 +32,7 @@ #if LINUX_VERSION_CODE < 0x020501 atomic_set(&cpus_waiting, smp_num_cpus - 1); #endif -@@ -2310,7 +2310,7 @@ int ATI_API_CALL __ke_flush_cache(void) +@@ -2454,7 +2454,7 @@ while (atomic_read(&cpus_waiting) > 0) barrier(); @@ -41,7 +41,7 @@ #if defined(__i386__) || defined(__x86_64__) asm volatile ("wbinvd":::"memory"); #elif defined(__alpha__) || defined(__ia64__) || defined(__sparc__) -@@ -2318,7 +2318,7 @@ int ATI_API_CALL __ke_flush_cache(void) +@@ -2462,7 +2462,7 @@ #else #error "Please define flush_cache for your architecture." #endif --- fglrx-driver-8.31.5/debian/patches/13-config_h-is-gone.patch +++ fglrx-driver-8.31.5.orig/debian/patches/13-config_h-is-gone.patch @@ -1,70 +0,0 @@ -linux/config.h is no longer generated starting with linux 2.6.19-rc2. -(thanks to Julien BLACHE <[EMAIL PROTECTED]>) - ---- agp3.c.orig -+++ agp3.c -@@ -61,7 +61,7 @@ - #include <linux/modversions.h> - #endif - #endif --#include <linux/config.h> -+#include <linux/autoconf.h> - #include <linux/module.h> - #include <linux/pci.h> - #include <linux/init.h> ---- agpgart_be.c.orig -+++ agpgart_be.c -@@ -99,7 +99,7 @@ - #endif - #endif - --#include <linux/config.h> -+#include <linux/autoconf.h> - - - #include <linux/module.h> ---- drm.h.orig -+++ drm.h -@@ -38,7 +38,7 @@ - #define _DRM_H_ - - #if defined(__linux__) --#include <linux/config.h> -+#include <linux/autoconf.h> - #include <asm/ioctl.h> /* For _IO* macros */ - #define DRM_IOCTL_NR(n) _IOC_NR(n) - #define DRM_IOC_VOID _IOC_NONE ---- drmP.h.orig -+++ drmP.h -@@ -42,7 +42,7 @@ - * 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/autoconf.h> - #include <linux/module.h> - #include <linux/kernel.h> - #include <linux/miscdevice.h> ---- firegl_public.c.orig -+++ firegl_public.c -@@ -69,9 +69,9 @@ - * for example for CPU hot-plugging. I wonder why a desktop - * distribution would even include such a kernel patch. */ - #ifdef CONFIG_MEM_MIRROR --/* Prevent linux/config.h from being included again in subsequent -+/* Prevent linux/autoconf.h from being included again in subsequent - * kernel headers as that would redefine CONFIG_MEM_MIRROR. */ --#include <linux/config.h> -+#include <linux/autoconf.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 -@@ -88,7 +88,7 @@ - #include <asm/unistd.h> /* for installing the patch wrapper */ - #include <linux/module.h> - --#include <linux/config.h> -+#include <linux/autoconf.h> - #include <linux/kernel.h> - #include <linux/fs.h> - #include <linux/proc_fs.h> --- fglrx-driver-8.34.8.orig/debian/patches/14_2.6.20-i386-syscalls.patch +++ fglrx-driver-8.34.8/debian/patches/14_2.6.20-i386-syscalls.patch @@ -0,0 +1,121 @@ +--- firegl_public.c.orig 2007-02-27 15:13:03.000000000 +0100 ++++ firegl_public.c 2007-02-27 15:14:38.000000000 +0100 +@@ -202,6 +202,82 @@ + int errno; + #endif // __ia64__ + ++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19) ++#if defined(__i386__) ++ ++#define __syscall_return(type, res) \ ++do { \ ++ if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ ++ 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_return(type, res) \ ++do { \ ++ if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ ++ errno = -(res); \ ++ res = -1; \ ++ } \ ++ return (type) (res); \ ++} while (0) ++ ++#define __syscall "syscall" ++ ++#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); \ ++} ++ ++#else ++ ++#error "please fix the fglrx syscall mess" ++ ++#endif /* __i386__ */ ++#endif /* 2.6.19 */ ++ + // 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); +@@ -2658,11 +2734,23 @@ + #else + static void ATI_API_CALL (*irq_handler_func)(int, void*, void*); /* function pointer variable */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) + static irqreturn_t ke_irq_handler_wrap(int irq, void *arg1, struct pt_regs *regs) + { + irq_handler_func(irq, arg1, regs); + return IRQ_HANDLED; + } ++#else ++static irqreturn_t ke_irq_handler_wrap(int irq, void *arg1) ++{ ++ irq_handler_func(irq, arg1, get_irq_regs()); ++ return IRQ_HANDLED; ++} ++#endif ++ ++#ifndef SA_SHIRQ ++#define SA_SHIRQ IRQF_SHARED ++#endif + + int ATI_API_CALL __ke_request_irq(unsigned int irq, + void (*ATI_API_CALL handler)(int, void *, void *), +@@ -5267,7 +5355,11 @@ + kasThread_t* thread_obj = (kasThread_t*)hThread; + init_MUTEX(&(thread_obj->sleep_finished)); + init_waitqueue_head(&(thread_obj->wq_head)); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) + INIT_WORK(&(thread_obj->work), routine, pcontext); ++#else ++ INIT_WORK(&(thread_obj->work), routine); ++#endif + schedule_work(&(thread_obj->work)); + return 1; + }

