Results 1 to 5 of 5
Hi, i just upgraded from 2.6.16.19 to 2.6.20.
I noticed that a couple of things have changed, rtsrelease is now in linux/rtsrelease.h instead of linux/version.h and linux/config.h has been replaced ...
- 03-04-2007 #1
ATi Fglrx and Kernel module problem
Hi, i just upgraded from 2.6.16.19 to 2.6.20.
I noticed that a couple of things have changed, rtsrelease is now in linux/rtsrelease.h instead of linux/version.h and linux/config.h has been replaced with linux/autoconf.h
I looked through the sources for the fglrx driver, and saw that ati have in fact updated their driver for this.
I rolled my own kernel, from 2.6.20 pulled from kernel.org
i used :
make-kpkg --initrd linux-image linux-headers
and installed them.
Now i booted the ned kernel, removed the fglrx driver (with the uninstall script)
but when trying to build new module this is what i get in /usr/share/ati/fglrx-install.log
Now im no coder, but from where im sitting, that looks like some headerfile does not contain the declerations that it should.Code:[Message] Kernel Module : Trying to install a precompiled kernel module. [Message] Kernel Module : Precompiled kernel module version mismatched. [Message] Kernel Module : Found kernel module build environment, generating kernel module now. ATI module generator V 2.0 ========================== initializing... cleaning... patching 'highmem.h'... assuming new VMA API since we do have kernel 2.6.x... Assuming default VMAP API Assuming default munmap API doing Makefile based build for kernel 2.6.x and higher make -C /lib/modules/2.6.20/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules make[1]: Går til katalog '/usr/src/linux-2.6.20' CC [M] /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:204: error: expected declaration specifiers or ‘...’ before ‘mlock’ /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:204: error: expected declaration specifiers or ‘...’ before ‘addr’ /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:204: error: expected declaration specifiers or ‘...’ before ‘len’ /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:206: warning: return type defaults to ‘int’ /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘_syscall2’: /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:206: error: expected declaration specifiers before ‘_syscall2’ /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:239: error: parameter ‘__ke_debuglevel’ is initialized /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:240: error: parameter ‘__ke_moduleflags’ is initialized /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:243: error: storage class specified for parameter ‘__mod_author243’ /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:243: error: parameter ‘__mod_author243’ is initialized -- SNIP -- Text too long -- /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5688: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5694: error: old-style parameter declarations in prototyped function definition /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:204: error: parameter name omitted /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:204: error: parameter name omitted /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:204: error: parameter name omitted /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5694: error: expected ‘{’ at end of input make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1 make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2 make[1]: Forlader katalog '/usr/src/linux-2.6.20' make: *** [kmod_build] Error 2 build failed with return value 2 [Error] Kernel Module : Failed to compile kernel module - please consult readme. The full file is here: http://www.dusted.dk/pub/fglrx-install.log
Can anybody please help me here? im so totally lost, i have been working on this for hours to no avail.
Thank you very much in advance.
- 03-04-2007 #2
Fixed!
Hi, i just wanna tell that i got the module compiled.
Here is what i did.
Clean up:
Make a mess:sh /usr/share/ati/fglrx-uninstall.sh
(this fails)sh ati-driver-installer-VERSION.run
But left something to work with:
get the patch:cd /lib/modules/fglrx/build_mod/
appy the patch:
build the module:patch -p6 < fglrx-2.6.20.patch
install the modue:./make.sh
Great Success!cd ..
./make_install.sh
In case the patch should go offline here it is:
Code:--- ATi/common/lib/modules/fglrx/build_mod/firegl_public.c 2006-12-18 10:58:15.000000000 -0500 +++ common/lib/modules/fglrx/build_mod/firegl_public.c 2006-12-18 11:14:04.000000000 -0500 @@ -181,6 +181,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); --- ATi/common/lib/modules/fglrx/build_mod/firegl_public.c 2007-02-20 19:23:07.000000000 +0100 +++ ATi/common/lib/modules/fglrx/build_mod/firegl_public.c.new 2007-02-21 23:36:19.000000000 +0100 @@ -5265,7 +5265,7 @@ kasThread_t* thread_obj = (kasThread_t*)hThread; init_MUTEX(&(thread_obj->sleep_finished)); init_waitqueue_head(&(thread_obj->wq_head)); - INIT_WORK(&(thread_obj->work), routine, pcontext); + INIT_WORK(&(thread_obj->work), routine); schedule_work(&(thread_obj->work)); return 1; }
- 03-04-2007 #3
Great, that's nice of you to post the solution.
Is that with the latest 8.34.8 ATI drivers ? On a Linux Kernel 2.6.20 from Vanilla sources ?"To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."
-Bruce Lee
- 03-04-2007 #4Yes, thats the ATI driver version, and if the kernels from kernel.org is vanilla, then yes
Originally Posted by antidrugue
- 03-16-2007 #5Just Joined!
- Join Date
- Mar 2007
- Posts
- 1
OMFG... Thank you - thank you - thank you! That patch and your instructions worked perfectly. FWIW, my system is running Fedora Core 5, 2.6.20-1.2300 on a Dell Optiplex GX620 with a X600.
God I hate upgrading my kernel.


Reply With Quote
