LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   fglrx 9.3 patch for 2.6.29.x kernel (https://www.linuxquestions.org/questions/linux-hardware-18/fglrx-9-3-patch-for-2-6-29-x-kernel-722858/)

esom 05-01-2009 12:04 AM

fglrx 9.3 patch for 2.6.29.x kernel
 
I've made a quick fglrx 9.3 patch for 2.6.29 kernel, already tested under 2.6.29.2 kernel.

to install fglrx:
1. download and install ati 9.3 driver, you will see fglrx errors during "post processing kernel modules ..."
2. put install_patch.sh and 2.6.29.x_fglrx-9.3.patch somewhere in a diretory
3. sh install_patch.sh


2.6.29.x_fglrx-9.3.patch:

Code:

--- build_mod/firegl_public.c        2009-03-18 23:07:22.000000000 +0800
+++ build_mod_new/firegl_public.c        2009-05-01 12:21:32.000000000 +0800
@@ -225,7 +225,7 @@
 #endif
 
 #ifdef MODULE_LICENSE
-MODULE_LICENSE("Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY");
+MODULE_LICENSE("GPL");
 #endif
 #ifdef MODULE_DEVICE_TABLE
 MODULE_DEVICE_TABLE(pci, fglrx_pci_table);
@@ -1402,7 +1402,7 @@
  */
 KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
 {
-    return current->euid;
+    return current->cred->euid;
 }
 
 /** /brief Delay execution for the specified number of microseconds
@@ -1776,11 +1776,11 @@
 {
    if (lock == 0 )
    {
-        cap_lower(current->cap_effective, CAP_IPC_LOCK);
+        cap_lower(*(kernel_cap_t *)&current->cred->cap_effective, CAP_IPC_LOCK);
    }
    else
    {
-        cap_raise(current->cap_effective, CAP_IPC_LOCK);
+        cap_raise(*(kernel_cap_t *)&current->cred->cap_effective, CAP_IPC_LOCK);
    }   
    return;
 }
--- build_mod/kcl_acpi.c        2009-03-18 23:07:22.000000000 +0800
+++ build_mod_new/kcl_acpi.c        2009-05-01 12:21:32.000000000 +0800
@@ -21,6 +21,9 @@
 #include "kcl_config.h"
 #include "kcl_type.h"
 #include "kcl_acpi.h"
+#include "../acconfig.h"
+#include "../aclocal.h"
+#include "../acobject.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)

install_patch.sh:

Code:

#!/bin/bash

PATCHPATH=$(pwd)
KERNV=$(uname -r)
MODPATH=/lib/modules
KERNPATH=/usr/src/linux

echo -e "Installing patch ..."

cd $MODPATH/fglrx
cp $KERNPATH/drivers/acpi/acpica/{acconfig.h,aclocal.h,acobject.h} build_mod/

patch -Np0 < $PATCHPATH/2.6.29.x_fglrx-9.3.patch

cd $MODPATH/fglrx/build_mod
sh make.sh
cd ..
sh make_install.sh


jelezarov 05-02-2009 12:42 AM

I've tried the patch with fglrx-9.4 on 2.6.29.2 and all works fine! Thanks a lot

rbergen 05-03-2009 10:56 AM

Works like a charm on 2.6.29-gentoo-r2 with ATI Catalyst 9.3.

And, as support for my Mobility Radeon X1600 is dropped after version 9.3, I am very grateful for this patch!

Ryuu 05-27-2009 05:46 AM

works perfectly on Slackware64, thanks a lot ;)

Raynus 06-12-2009 10:30 PM

Ati catalyse 9.3 come with this error

Error: ./default_policy.sh does not support version
default:v2:i686:lib::none:2.6.29-2-686; make sure that the version is being
correctly set by --iscurrentdistro

on Debian Sid : 2.6.29 :P

How can ur guys install it on 2.6.29 anyway?

mysql_connect 09-06-2009 11:45 AM

Quote:

Originally Posted by Raynus (Post 3572351)
Ati catalyse 9.3 come with this error

Error: ./default_policy.sh does not support version
default:v2:i686:lib::none:2.6.29-2-686; make sure that the version is being
correctly set by --iscurrentdistro

on Debian Sid : 2.6.29 :P

How can ur guys install it on 2.6.29 anyway?

Same error on Slackware 13 with 2.6.29.6 .

shelleywang 09-07-2009 12:39 AM

Quote:

Originally Posted by mysql_connect (Post 3671975)
Same error on Slackware 13 with 2.6.29.6 .

me 2 on Slackware 13 with 2.6.29.6

cg132 09-11-2009 04:16 AM

close but no cigar :(
 
1 Attachment(s)
Ah man, it got soooo close I almost shat myself xD
evil slack13, xorg w/o 3d accel, and ati for not supporting their own hardware D:<

Code:

bash-3.1$ sudo sh ./install_patch.sh
Installing patch ...
patching file build_mod/firegl_public.c
patching file build_mod/kcl_acpi.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 21 with fuzz 2.
AMD kernel module generator version 2.1
make.sh: line 368: [: =: unary operator expected
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.GCC* .??* *.symvers
make -C /lib/modules/2.6.29.6-smp/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.29.6'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
In file included from /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:169:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.h:164:1: warning: "PM_EVENT_SUSPEND" redefined
In file included from /usr/src/linux-2.6.29.6/arch/x86/include/asm/apic.h:4,
                from /usr/src/linux-2.6.29.6/arch/x86/include/asm/smp.h:13,
                from include/linux/smp.h:36,
                from include/linux/topology.h:33,
                from include/linux/mmzone.h:767,
                from include/linux/gfp.h:4,
                from include/linux/kmod.h:22,
                from include/linux/module.h:13,
                from /lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:91:
include/linux/pm.h:241:1: warning: this is the location of the previous definition
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_MEM_VM_GetRegionPhysAddrStr':
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3223: warning: return makes pointer from integer without a cast
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3224: warning: return makes pointer from integer without a cast
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3225: warning: return makes pointer from integer without a cast
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3227: warning: return makes pointer from integer without a cast
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_io.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_str.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o
  LD [M]  /lib/modules/fglrx/build_mod/2.6.x/fglrx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o
  LD [M]  /lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
make[1]: Leaving directory `/usr/src/linux-2.6.29.6'
build succeeded with return value 0
duplicating results into driver repository...
done.
You must change your working directory to /lib/modules/fglrx
and then call ./make_install.sh in order to install the built module.
- recreating module dependency list
- trying a sample load of the kernel modules
- done.

so it ran fine...but then...
then I start X and get
Code:

(EE) Failed to load module "fglrx" (module does not exist, 0)
lol where did I go wrong?

Gorthaur 09-16-2009 03:32 PM

There is always hope
 
I was passing by and stop to read this thread, but I think i can give you some help, such as these, cg132.
Compiling was fine, and that was the hard time of it. Xorg simply did not find the module, and mainly that means it is not loaded, no that it doesn't exist.
Check
Code:

lsmod |grep fglrx
to see if it is loaded. If it isn't, don't surprise Xorg does not find it! But by staying calm and sober, you still can do
Code:

modprobe fglrx
to load it.
Hope this help you.
Regards,


Quote:

Originally Posted by cg132 (Post 3678419)
Ah man, it got soooo close I almost shat myself xD
evil slack13, xorg w/o 3d accel, and ati for not supporting their own hardware D:<

so it ran fine...but then...
then I start X and get
Code:

(EE) Failed to load module "fglrx" (module does not exist, 0)
lol where did I go wrong?


cg132 09-17-2009 08:46 AM

Quote:

Originally Posted by Gorthaur (Post 3685781)
If it isn't, don't surprise Xorg does not find it! But by staying calm and sober, you still can do
Code:

modprobe fglrx
to load it.

Well this is interesting! I did modprobe fglrx and then I get...

Code:

bash-3.1$ lsmod |grep fglrx
fglrx                2054980  0
agpgart                29256  2 fglrx,via_agp

Well its loaded but still not working properly. I continue to get
Code:

(EE) Failed to load module "fglrx" (module does not exist, 0)
when I startx
:'(
i'm sorry, i really must be more nubbish than i though. loaded mod still wont work D: this is after an aticonfig --initial of course.

proveyourselfthom 10-01-2009 06:11 PM

Does it work with Debian Squeeze Xorg 7.4 and 2.6.30 kernel? I have a ATI Radeon X700...
Thank's

cg132 11-25-2009 03:06 AM

poke
 
can anyone tell me why X doesn't see the loaded mod?
is it my via agpgart? is it improper xorg.conf?
is it missing links? is it god hate me?
help!

shadyboy 12-21-2009 09:05 PM

so wait? what is the "default" kernel that comes along with Slackware 13 64-bit version?

This possible to use?
Ati Radeon x1100 card I want to install, by using this file :ati-driver-installer-9-3-x86.x86_64.run

But I am kinda getting the feeling that I have to something that a n00b like me have never done, mess around with the kernel.....

So my questions is, can I use this method to install ati-driver-installer-9-3-x86.x86_64.run on my slackware labtop WITHOUT messing around with the kernel?

adamk75 12-22-2009 06:37 AM

Quote:

Originally Posted by shadyboy (Post 3800670)
so wait? what is the "default" kernel that comes along with Slackware 13 64-bit version?

This possible to use?
Ati Radeon x1100 card I want to install, by using this file :ati-driver-installer-9-3-x86.x86_64.run

But I am kinda getting the feeling that I have to something that a n00b like me have never done, mess around with the kernel.....

So my questions is, can I use this method to install ati-driver-installer-9-3-x86.x86_64.run on my slackware labtop WITHOUT messing around with the kernel?

Since Slackware 13.0 comes with the 2.6.29.6 kernel, the patch in this thread *should* work. However, you would need to downgrade your entire Xorg stack to get catalyst 9.3 working on Slackware 13.0. You should probably either stick with the open source drivers or, if you *must* use the proprietary driver, you probably want to use an older version of Slackware.

Adam

loudness 02-27-2010 02:34 AM

hi....i have slackware 13 and ati x550 ...opengl and desktop effects are on and work by default but i play enemy territory and there i have in the best moments 20fps....so i need ati proprietary drivers ....i search on google 1 week to find 1 solution and only this patch seems to be solution ....im total newbie and pls....can someone explain ..step by step how to... use this patch???
tks...


All times are GMT -5. The time now is 06:55 AM.