Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2.6.26 + fglrx
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Jun 12, 2008 5:42 pm    Post subject: 2.6.26 + fglrx Reply with quote

Anyone know if its possible to use the fglrx driver with such a recent kernel? I did not find anything, maybe my google skills suck atm 8)
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Thu Jun 12, 2008 9:13 pm    Post subject: Reply with quote

I'm not 100% sure, but the 8.493 release solved the problems with deprecated kernel symbols between 2.6.24 and 2.6.25. You just have to hope that no such big changes were introduced in 2.6.26. Hopefully fglrx should work without much hassle on 2.6.26 also. Anyway, it's impossible to know without testing. So let others test for you or test yourself :)

Cheers
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Jun 12, 2008 9:41 pm    Post subject: Reply with quote

Neo2 wrote:
I'm not 100% sure, but the 8.493 release solved the problems with deprecated kernel symbols between 2.6.24 and 2.6.25. You just have to hope that no such big changes were introduced in 2.6.26. Hopefully fglrx should work without much hassle on 2.6.26 also. Anyway, it's impossible to know without testing. So let others test for you or test yourself :)

Cheers


Code:
 * Preparing fglrx module                                                                                                                             
make HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.26-rc5-zen2-IBM-T43 KDIR=/usr/src/linux kmod_build         
/usr/bin/make -C /usr/src/linux M=/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x modules           
make[1]: Entering directory `/usr/src/zen-git-sources/kernel'                                                                                         
  CC [M]  /tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o                           
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:889: warning: function declaration isn't a prototype                                                                                                                                       
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_pci_enable_device_bars':                                                                                                                                                 
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1684: warning: passing argument 1 of 'pci_read_config_word' from incompatible pointer type                                                                                                 
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1696: warning: passing argument 1 of 'pci_write_config_word' from incompatible pointer type                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function '__ke_get_vm_phys_addr':
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2563: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)                                                                                                                       
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2563: error: (Each undeclared identifier is reported only once                                                                                                                             
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2563: error: for each function it appears in.)                                                                                                                                             
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function '__ke_get_vm_page_table':                                                                                                                                                     
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2611: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)                                                                                                                       
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_TestAndClearPageDirtyFlag':                                                                                                                                             
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2739: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)                                                                                                                       
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level:                       
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3776: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3776: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3794: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3794: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3801: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3801: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3808: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3808: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3815: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3815: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3822: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3822: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3829: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3829: warning: initialization from incompatible pointer type                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3838: error: unknown field 'nopage' specified in initializer                                                                                                                               
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3838: warning: initialization from incompatible pointer type                                                                                                                               
make[2]: *** [/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1               
make[1]: *** [_module_/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.493/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2                       
make[1]: Leaving directory `/usr/src/zen-git-sources/kernel'                                                                                         
make: *** [kmod_build] Error 2                                                                                                                       

!!! ERROR in x11-drivers/ati-drivers-8.493:
!!! In linux-mod_src_compile at line 3533 
!!! Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  GCC_VER_MAJ=4 KVER=2.6.26-rc5-zen2-IBM-T43 KDIR=/usr/src/linux kmod_build       


Does not look good :)
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Fri Jun 13, 2008 12:24 pm    Post subject: Reply with quote

Of course it doesn't :) The closest match (to your errors) I've found while googling is at the end of this page: http://gentoo-wiki.com/Zen-Sources
It seems that zen-sources removes the error return code "NOPAGE_SIGBUS" for the *_nopage functions, which is required for fglrx to work properly.
That line of code is actually referenced in 2.6.25-r4
Code:
fabio@gentoo-node1 /usr/src $ sieve_files.sh '*.h' 'NOPAGE_SIGBUS'
----------------------------------
Found in:       ./linux-2.6.25-reiser4-r4/include/linux/mm.h
#define NOPAGE_SIGBUS   (NULL)


You may want to redefine both error codes by manually editing /usr/src/linux/include/linux/mm.h (around line ~650, out of any function):
Code:
/*
 * Error return values for the *_nopage functions
 */
#define NOPAGE_SIGBUS   (NULL)
#define NOPAGE_OOM      ((struct page *) (-1))


About the 2nd error, searching through kernel sources reveals that structure field nopage is declared in structure vm_operations_struct in /usr/src/linux/include/linux/mm.h (around line ~167, still out of any function):
Code:
/*
 * These are the virtual MM functions - opening of an area, closing and
 * unmapping it (needed to keep files on disk up-to-date etc), pointer
 * to the functions called when a no-page or a wp-page exception occurs.
 */
struct vm_operations_struct {
        void (*open)(struct vm_area_struct * area);
        void (*close)(struct vm_area_struct * area);
        int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
        struct page *(*nopage)(struct vm_area_struct *area,
                        unsigned long address, int *type);
        unsigned long (*nopfn)(struct vm_area_struct *area,
                        unsigned long address);

        /* notification that a previously read-only page is about to become
         * writable, if an error is returned it will cause a SIGBUS */
        int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
#ifdef CONFIG_NUMA
        int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
        struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
                                        unsigned long addr);
        int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from,
                const nodemask_t *to, unsigned long flags);
#endif
};

You may want to re-add them as well, and then recompile your kernel. Anyway, I think that's not a good way to go. It seems that a lot of memory management structures have been removed in favor of newer/custom ones (which are part of the zen-sources patches if I'm right). Re-adding them manually would mean to also re-add dependencies if needed, turning into an endless work. The bottom of the wiki page linked above suggests to check the zen-overlay for the patched ebuild of the nvidia-drivers. Hopefully you'll find patches ati-drivers as well. If you can't find them, you could try to contact the mantainers of zen-sources asking which are the equivalents of the missing code and go for a custom ati-drivers ebuild with a properly written patch to rebind NOPAGE_SIGBUS and nopage references.
This is as far as I can go since I'm not using zen-sources :)
Hope to have helped :wink: Good luck!


Cheers
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Fri Jun 13, 2008 12:57 pm    Post subject: Reply with quote

Thanks a lot for your post. So this basically means that its a problem of zen sources not .26 itself. Thats bad.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Jun 26, 2008 6:42 pm    Post subject: Reply with quote

Code:
  CC [M]  /tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function '__ke_get_ke_pte':
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2610: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2610: error: (Each undeclared identifier is reported only once
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2610: error: for each function it appears in.)
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function '__ke_get_vm_phys_addr':
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2638: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function '__ke_get_vm_page_table':
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2660: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_TestAndClearPageDirtyFlag':
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2788: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level:
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3833: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3833: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3851: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3851: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3858: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3858: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3865: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3865: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3872: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3872: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3879: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3879: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3886: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3886: warning: initialization from incompatible pointer type
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3895: error: unknown field 'nopage' specified in initializer
/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3895: warning: initialization from incompatible pointer type
make[2]: *** [/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/tmp/PALUDIS/var_tmp/x11-drivers-ati-drivers-8.501/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/zen-sources-9999/kernel'


Thats the current output with new driver. Anyone knows an easy way to fix that?
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu Jun 26, 2008 6:48 pm    Post subject: Reply with quote

Phlogiston wrote:
Thanks a lot for your post. So this basically means that its a problem of zen sources not .26 itself. Thats bad.

have u tried a vanilla kernel yet?
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Jun 26, 2008 7:31 pm    Post subject: Reply with quote

rmh3093 wrote:
Phlogiston wrote:
Thanks a lot for your post. So this basically means that its a problem of zen sources not .26 itself. Thats bad.

have u tried a vanilla kernel yet?


yes, its the same :?
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
a.b.
Apprentice
Apprentice


Joined: 23 Mar 2008
Posts: 218
Location: Anus Mundi, Germany

PostPosted: Thu Jun 26, 2008 7:38 pm    Post subject: Reply with quote

https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.24/+bug/239967

These patches might help.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Jun 26, 2008 8:10 pm    Post subject: Reply with quote

a.b. wrote:
https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.24/+bug/239967

These patches might help.


Yes, an ebuild for it would be awesome... I didn't succeed when I tried.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu Jun 26, 2008 9:55 pm    Post subject: Reply with quote

Phlogiston wrote:
a.b. wrote:
https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.24/+bug/239967

These patches might help.


Yes, an ebuild for it would be awesome... I didn't succeed when I tried.


u have almost 1700 posts now... and you can make an ebuild?
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Jun 26, 2008 10:21 pm    Post subject: Reply with quote

rmh3093 wrote:
Phlogiston wrote:
a.b. wrote:
https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.24/+bug/239967

These patches might help.


Yes, an ebuild for it would be awesome... I didn't succeed when I tried.


u have almost 1700 posts now... and you can make an ebuild?


--> Call it lazyness, the age or whatever 8)

Anyway why does gentoo not care about that? The driver is in portage and does not even complain about the kernel version.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu Jun 26, 2008 11:03 pm    Post subject: Reply with quote

Phlogiston wrote:
rmh3093 wrote:
Phlogiston wrote:
a.b. wrote:
https://bugs.launchpad.net/ubuntu/+source/linux-restricted-modules-2.6.24/+bug/239967

These patches might help.


Yes, an ebuild for it would be awesome... I didn't succeed when I tried.


u have almost 1700 posts now... and you can make an ebuild?


--> Call it lazyness, the age or whatever 8)

Anyway why does gentoo not care about that? The driver is in portage and does not even complain about the kernel version.


cause the gento devs are lazy shits to and dont seem to care about anything
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sat Jun 28, 2008 10:33 pm    Post subject: Reply with quote

i got fglrx working with 2.6.26
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
a.b.
Apprentice
Apprentice


Joined: 23 Mar 2008
Posts: 218
Location: Anus Mundi, Germany

PostPosted: Sun Jun 29, 2008 8:27 am    Post subject: Reply with quote

rmh3093 wrote:
i got fglrx working with 2.6.26

Zen or Vanilla? How did you do it? 32 or 64 bit?
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Jun 29, 2008 3:11 pm    Post subject: Reply with quote

a.b. wrote:
rmh3093 wrote:
i got fglrx working with 2.6.26

Zen or Vanilla? How did you do it? 32 or 64 bit?


i have a patch that applies to the latest ati-drivers, which makes it compile (but it complains about using a symbol that is EXPORT_SYMBOL_GPL'd) so I had to also tweak the kernel, which im not happy about, i though I disabled the option in menuconfig which should cause that but it did not go away, annway the module loads and everything but when I go to X I get a blank screen, that could have to do with some of the libs im using on my box, I just did a stage1 so shit might need to be rebuilt still or it could be because I have some parts of Xorg from the x11 overlay using the 9999 ebuilds, i will look into it some more in the next few days
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Sun Jun 29, 2008 4:44 pm    Post subject: Reply with quote

Can you provide your patche(s) please?
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Jun 29, 2008 5:24 pm    Post subject: Reply with quote

here is the fglrx patch:
Code:
Index: work/common/lib/modules/fglrx/build_mod/firegl_public.c
===================================================================
--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c
+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c
@@ -93,7 +93,7 @@
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
-#include <linux/init.h>
+//#include <linux/init.h>
 #include <linux/file.h>
 #include <linux/pci.h>
 #include <linux/wait.h>
@@ -3274,19 +3274,9 @@ void ATI_API_CALL __ke_agp_memory_get_me
 
 /*****************************************************************************/
 
-#ifndef NOPAGE_SIGBUS
-#define NOPAGE_SIGBUS 0
-#endif /* !NOPAGE_SIGBUS */
-
 typedef struct page mem_map_t;
 typedef mem_map_t *vm_nopage_ret_t;
 
-static __inline__ vm_nopage_ret_t do_vm_nopage(struct vm_area_struct* vma,
-                                                     unsigned long address)
-{
-    return 0;   /* Disallow mremap */
-}
-
 #ifdef __AGP__BUILTIN__
 #ifdef __ia64__
 static __inline__ vm_nopage_ret_t do_vm_cant_nopage(struct vm_area_struct* vma,
@@ -3310,19 +3300,19 @@ static __inline__ vm_nopage_ret_t do_vm_
          return page;
       }
    }
-   return NOPAGE_SIGBUS;      /* Disallow mremap */
+   return VM_FAULT_SIGBUS;      /* Disallow mremap */
 }
 
 #endif /* __ia64__ */
 #endif /* __AGP__BUILTIN__ */
 
-
-static __inline__ vm_nopage_ret_t do_vm_shm_nopage(struct vm_area_struct* vma,
-                                                   unsigned long address)
+static __inline__ int do_vm_shm_nopage(struct vm_area_struct* vma,
+                   struct vm_fault *vmf)
 {
     pgd_t* pgd_p;
     pmd_t* pmd_p;
     pte_t  pte;
+    unsigned long address = (unsigned long)vmf->virtual_address;
     unsigned long vma_offset;
     unsigned long pte_linear;
     mem_map_t* pMmPage;
@@ -3351,7 +3341,7 @@ static __inline__ vm_nopage_ret_t do_vm_
             (unsigned long)__ke_vm_offset(vma));
 
     if (address > vma->vm_end)
-        return NOPAGE_SIGBUS; /* address is out of range */
+        return VM_FAULT_SIGBUS; /* address is out of range */
 
     /*  Calculate offset into VMA */
     vma_offset = address - vma->vm_start;
@@ -3363,7 +3353,7 @@ static __inline__ vm_nopage_ret_t do_vm_
     pte_linear = firegl_get_addr_from_vm(vma);
     if (!pte_linear)
     {
-        return NOPAGE_SIGBUS; /* bad address */
+        return VM_FAULT_SIGBUS; /* bad address */
     }
     pte_linear += vma_offset;
 
@@ -3391,7 +3381,9 @@ static __inline__ vm_nopage_ret_t do_vm_
 
     //  __KE_DEBUG3("vm-address 0x%08lx => kernel-page-address 0x%p\n",
     //    address, page_address(pMmPage));
-    return pMmPage;
+    vmf->page = pMmPage;
+
+    return 0;
 }
 
 /*
@@ -3400,8 +3392,10 @@ static __inline__ vm_nopage_ret_t do_vm_
       (which is one ore more pages in size)
 
 */
-static __inline__ vm_nopage_ret_t do_vm_dma_nopage(struct vm_area_struct* vma, unsigned long address)
+static __inline__ int do_vm_dma_nopage(struct vm_area_struct* vma,
+                   struct vm_fault *vmf)
 {
+    unsigned long address = (unsigned long) vmf->virtual_address;
     unsigned long kaddr;
     mem_map_t* pMmPage;
 
@@ -3417,7 +3411,7 @@ static __inline__ vm_nopage_ret_t do_vm_
     kaddr = firegl_get_addr_from_vm(vma);
     if (!kaddr)
     {
-        return NOPAGE_SIGBUS; /* bad address */
+        return VM_FAULT_SIGBUS; /* bad address */
     }
     kaddr += (address - vma->vm_start);
 
@@ -3440,8 +3434,10 @@ static __inline__ vm_nopage_ret_t do_vm_
     return pMmPage;
 }
 
-static __inline__ vm_nopage_ret_t do_vm_kmap_nopage(struct vm_area_struct* vma, unsigned long address)
+static __inline__ int do_vm_kmap_nopage(struct vm_area_struct* vma,
+               struct vm_fault *vmf)
 {
+    unsigned long address = (unsigned long) vmf->virtual_address;
     unsigned long kaddr;
     mem_map_t* pMmPage;
 
@@ -3451,13 +3447,14 @@ static __inline__ vm_nopage_ret_t do_vm_
     if ((pMmPage = (mem_map_t*) firegl_get_pagetable_page_from_vm(vma)))
     {
         get_page(pMmPage);
-        return pMmPage;
+   vmf->page = pMmPage;
+        return 0;
     }
 
     kaddr = firegl_get_addr_from_vm(vma);
     if (!kaddr)
     {
-        return NOPAGE_SIGBUS; /* bad address */
+        return VM_FAULT_SIGBUS; /* bad address */
     }
     kaddr += (address - vma->vm_start);
 
@@ -3470,7 +3467,8 @@ static __inline__ vm_nopage_ret_t do_vm_
 
     __KE_DEBUG3("vm-address 0x%08lx => kernel-page-address 0x%p\n", address, page_address(pMmPage));
 
-    return pMmPage;
+    vmf->page = pMmPage;
+    return 0;
 }
 
 /**
@@ -3478,10 +3476,11 @@ static __inline__ vm_nopage_ret_t do_vm_
  **  This routine is intented to locate the page table through the
  **  pagelist table created earlier in dev-> pcie
  **/
-static __inline__ vm_nopage_ret_t do_vm_pcie_nopage(struct vm_area_struct* vma,
-                                                         unsigned long address)
+static __inline__ int do_vm_pcie_nopage(struct vm_area_struct* vma,
+               struct vm_fault *vmf)
 {
 
+    unsigned long address = (unsigned long)vmf->virtual_address;
     unsigned long vma_offset;
     unsigned long i;
     mem_map_t* pMmPage;
@@ -3492,26 +3491,26 @@ static __inline__ vm_nopage_ret_t do_vm_
     if (dev == NULL)
     {
         __KE_ERROR("dev is NULL\n");
-        return NOPAGE_SIGBUS;
+        return VM_FAULT_SIGBUS;
     }
 
     if (address > vma->vm_end)
     {
         __KE_ERROR("address out of range\n");
-        return NOPAGE_SIGBUS; /* address is out of range */
+        return VM_FAULT_SIGBUS; /* address is out of range */
     }
     pciemem = firegl_get_pciemem_from_addr ( vma, address);
     if (pciemem == NULL)
     {
         __KE_ERROR("No pciemem found! \n");
-        return NOPAGE_SIGBUS;
+        return VM_FAULT_SIGBUS;
     }   
     pagelist = firegl_get_pagelist_from_vm(vma);
 
     if (pagelist == NULL)
     {
         __KE_ERROR("No pagelist! \n");
-        return NOPAGE_SIGBUS;
+        return VM_FAULT_SIGBUS;
     }
     
     /** Find offset in  vma */
@@ -3525,15 +3524,18 @@ static __inline__ vm_nopage_ret_t do_vm_
     if (page_address(pMmPage) == 0x0)
     {
         __KE_ERROR("Invalid page address\n");
-        return NOPAGE_SIGBUS;
+        return VM_FAULT_SIGBUS;
     }
-    return pMmPage;
+
+    vmf->page = pMmPage;
+    return 0;
 }
 
-static __inline__ vm_nopage_ret_t do_vm_gart_nopage(struct vm_area_struct* vma,
-                                                    unsigned long address)
+static __inline__ int do_vm_gart_nopage(struct vm_area_struct* vma,
+               struct vm_fault *vmf)
 {
 
+    unsigned long address = (unsigned long) vmf->virtual_address;
     unsigned long page_addr;
     unsigned long offset;
     struct page *page;
@@ -3541,7 +3543,7 @@ static __inline__ vm_nopage_ret_t do_vm_
     if (address > vma->vm_end)
     {
         __KE_ERROR("Invalid virtual address\n");
-        return NOPAGE_SIGBUS;   /* Disallow mremap */
+        return VM_FAULT_SIGBUS;   /* Disallow mremap */
     }         
 
     offset      = address - vma->vm_start;
@@ -3553,24 +3555,21 @@ static __inline__ vm_nopage_ret_t do_vm_
     if( !page_addr)
     {
         __KE_ERROR("Invalid page address\n");
-        return NOPAGE_SIGBUS;   /* Disallow mremap */
+        return VM_FAULT_SIGBUS;   /* Disallow mremap */
     }
     page        = virt_to_page(page_addr);
     get_page(page);
 
-    return page;
+    vmf->page = page;
+    return 0;
 }
 
 
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
-
-static vm_nopage_ret_t vm_nopage(struct vm_area_struct* vma,
-                                 unsigned long address,
-                                 int *type)
+static int vm_nopage(struct vm_area_struct* vma,
+           struct vm_fault *vmf)
 {
-    if (type) *type = VM_FAULT_MINOR;
-        return do_vm_nopage(vma, address);
+   return VM_FAULT_SIGBUS;
 }
 
 #ifdef __AGP__BUILTIN__
@@ -3602,91 +3601,11 @@ static vm_nopage_ret_t vm_cant_nopage(st
     (which is one or more pages in size)
 
  */
-static vm_nopage_ret_t vm_shm_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int *type)
-{
-    if (type) *type = VM_FAULT_MINOR;
-        return do_vm_shm_nopage(vma, address);
-}
-
-/*
-
-    This routine is intended to remap addresses of a OpenGL context
-      (which is one ore more pages in size)
-
-*/
-static vm_nopage_ret_t vm_dma_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int *type)
-{
-    if (type) *type = VM_FAULT_MINOR;
-        return do_vm_dma_nopage(vma, address);
-}
 
-static vm_nopage_ret_t vm_kmap_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int *type)
+static int vm_shm_nopage(struct vm_area_struct* vma,
+          struct vm_fault *vmf)
 {
-    if (type) *type = VM_FAULT_MINOR;
-        return do_vm_kmap_nopage(vma, address);
-}
-
-static vm_nopage_ret_t vm_pcie_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int *type)
-{ 
-       return do_vm_pcie_nopage(vma, address);
-}
-
-static vm_nopage_ret_t vm_gart_nopage(struct vm_area_struct* vma,
-                                      unsigned long address,
-                                      int *type)
-{
-       return do_vm_gart_nopage(vma, address);
-}
-
-#else   /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0) */
-
-static vm_nopage_ret_t vm_nopage(struct vm_area_struct* vma,
-                                 unsigned long address,
-                                 int write_access)
-{
-    return do_vm_nopage(vma, address);
-}
-
-#ifdef __AGP__BUILTIN__
-#ifdef __ia64__
-
-
-static vm_nopage_ret_t vm_cant_nopage(struct vm_area_struct* vma,
-                                 unsigned long address,
-                                 int write_access)
-{
-    return do_vm_cant_nopage(vma, address);
-}
-#endif /* __ia64__ */
-#endif /* __AGP__BUILTIN__ */
-
-/*
-
-    This function is called when a page of a mmap()'ed area is not currently
-    visible in the specified VMA.
-    Return value is the associated physical address for the requested page.
-    (If not implemented, then the kernel default routine would allocate a new,
-     zeroed page for servicing us)
-
-    Possible errors: SIGBUS, OutOfMem
-
-    This routine is intended to remap addresses of SHM SAREA
-    (which is one or more pages in size)
-
- */
-static vm_nopage_ret_t vm_shm_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int write_access)
-{
-    return do_vm_shm_nopage(vma, address);
+        return do_vm_shm_nopage(vma, vmf);
 }
 
 /*
@@ -3695,37 +3614,30 @@ static vm_nopage_ret_t vm_shm_nopage(str
       (which is one ore more pages in size)
 
 */
-static vm_nopage_ret_t vm_dma_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int write_access)
+static int vm_dma_nopage(struct vm_area_struct* vma,
+          struct vm_fault *vmf)
 {
-     return do_vm_dma_nopage(vma, address);
+        return do_vm_dma_nopage(vma, vmf);
 }
 
-static vm_nopage_ret_t vm_kmap_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int write_access)
+static int vm_kmap_nopage(struct vm_area_struct* vma,
+           struct vm_fault *vmf)
 {
-     return do_vm_kmap_nopage(vma, address);
+        return do_vm_kmap_nopage(vma, vmf);
 }
 
-static vm_nopage_ret_t vm_pcie_nopage(struct vm_area_struct* vma,
-                                     unsigned long address,
-                                     int write_access)
+static int vm_pcie_nopage(struct vm_area_struct* vma,
+           struct vm_fault *vmf)
 {
-        return do_vm_pcie_nopage(vma, address);
+   return do_vm_pcie_nopage(vma, vmf);
 }
 
-static vm_nopage_ret_t vm_gart_nopage(struct vm_area_struct* vma,
-                                      unsigned long address,
-                                      int *type)
+static int vm_gart_nopage(struct vm_area_struct* vma,
+           struct vm_fault *vmf)
 {
-       return do_vm_gart_nopage(vma, address);
+       return do_vm_gart_nopage(vma, vmf);
 }
 
-
-#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) */
-
 void* ATI_API_CALL __ke_vma_file_priv(struct vm_area_struct* vma)
 {
     return vma->vm_file->private_data;
@@ -3830,7 +3742,7 @@ void ip_drm_vm_close(struct vm_area_stru
 
 static struct vm_operations_struct vm_ops =
 {
-    nopage:  vm_nopage,
+    fault:   vm_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
@@ -3839,7 +3751,7 @@ static struct vm_operations_struct vm_op
 #ifdef __ia64__
 static struct vm_operations_struct vm_cant_ops =
 {
-    nopage:  vm_cant_nopage,
+    fault:   vm_cant_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
@@ -3848,42 +3760,42 @@ static struct vm_operations_struct vm_ca
 
 static struct vm_operations_struct vm_shm_ops =
 {
-    nopage:  vm_shm_nopage,
+    fault:   vm_shm_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
 
 static struct vm_operations_struct vm_pci_bq_ops =
 {
-    nopage:  vm_dma_nopage,
+    fault:   vm_dma_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
 
 static struct vm_operations_struct vm_ctx_ops =
 {
-    nopage:  vm_dma_nopage,
+    fault:   vm_dma_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
 
 static struct vm_operations_struct vm_pcie_ops =
 {
-    nopage:  vm_pcie_nopage,
+    fault:   vm_pcie_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
 
 static struct vm_operations_struct vm_kmap_ops =
 {
-    nopage:  vm_kmap_nopage,
+    fault:   vm_kmap_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
 
 static struct vm_operations_struct vm_gart_ops =
 {
-    nopage:  vm_gart_nopage,
+    fault:   vm_gart_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
@@ -3892,14 +3804,14 @@ static struct vm_operations_struct vm_ga
 #ifndef __ia64__
 static struct vm_operations_struct vm_agp_bq_ops =
 {
-    nopage:  vm_nopage,
+    fault:   vm_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
 #else      
 static struct vm_operations_struct vm_cant_agp_bq_ops =
 {
-    nopage:  vm_cant_nopage,
+    fault:   vm_cant_nopage,
     open:    ip_drm_vm_open,
     close:   ip_drm_vm_close,
 };
Index: work/common/lib/modules/fglrx/build_mod/firegl_public.h
===================================================================
--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.h
+++ work/common/lib/modules/fglrx/build_mod/firegl_public.h
@@ -78,7 +78,7 @@ do { \
     if (!pgd_present(*(pgd_p)))   \
     { \
         __KE_ERROR("FATAL ERROR: User queue buffer not present! (pgd)\n"); \
-        return (unsigned long)NOPAGE_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
+        return VM_FAULT_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
         /* alternatively we could generate a NOPAGE_OOM "out of memory" */ \
     } \
 } while(0)
@@ -91,7 +91,7 @@ do { \
     if (!pud_present(*(pud_p)))   \
     { \
         __KE_ERROR("FATAL ERROR: User queue buffer not present! (pud)\n"); \
-        return (unsigned long)NOPAGE_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
+        return VM_FAULT_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
         /* alternatively we could generate a NOPAGE_OOM "out of memory" */ \
     } \
     pmd_p = pmd_offset(pud_p, pte_linear); \
@@ -111,7 +111,7 @@ do { \
     if (!pmd_present(*(pmd_p)))   \
     { \
         __KE_ERROR("FATAL ERROR: User queue buffer not present! (pmd)\n"); \
-        return (unsigned long)NOPAGE_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
+        return VM_FAULT_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
         /* alternatively we could generate a NOPAGE_OOM "out of memory" */ \
     } \
 } while(0)
@@ -157,7 +157,7 @@ do { \
     if (!pte_present(pte)) \
     { \
         __KE_ERROR("FATAL ERROR: User queue buffer not present! (pte)\n"); \
-        return (unsigned long)NOPAGE_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
+        return VM_FAULT_SIGBUS;   /* Something bad happened; generate SIGBUS */ \
         /* alternatively we could generate a NOPAGE_OOM "out of memory" */ \
     } \
 } while(0)

_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7694
Location: Pelotas, BR

PostPosted: Fri Jul 04, 2008 5:26 pm    Post subject: Reply with quote

rmh3093 wrote:

cause the gento devs are lazy shits to and dont seem to care about anything


Not the kind of comment that we are waiting for from veterans. Banned.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Sun Jul 20, 2008 1:07 pm    Post subject: Reply with quote

any updates on the topic? ati released a new driver - but that one still does not support 2.6.26
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Sun Jul 20, 2008 1:36 pm    Post subject: Reply with quote

Phlogiston wrote:
any updates on the topic? ati released a new driver - but that one still does not support 2.6.26


did anyone try the patch and see what happens?
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Sun Jul 20, 2008 1:44 pm    Post subject: Reply with quote

rmh3093 wrote:
Phlogiston wrote:
any updates on the topic? ati released a new driver - but that one still does not support 2.6.26


did anyone try the patch and see what happens?


I can't even apply the patch cleanly. What other patches do I need before?
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
khane96
n00b
n00b


Joined: 21 Jul 2008
Posts: 1

PostPosted: Mon Jul 21, 2008 12:41 am    Post subject: I do not know how to make a proper ebuild but... Reply with quote

This worked for me :

If you do not have a local package overlay create one (cf http://gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild)

ok then
Code:
mkdir -p /usr/local/portage/x11-drivers/ati-drivers
cp -R /usr/portage/x11-drivers/ati-drivers/ /usr/local/portage/x11-drivers/ati-drivers
nano -w /usr/local/portage/x11-drivers/ati-drivers/files/firegl_public.patch


now cut and paste the patch provided above inside the file nano created. save and then

Code:
nano /usr/local/portage/x11-drivers/ati-drivers/ati-drivers-8.501.ebuild


and replace the content by
Code:

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.501.ebuild,v 1.3 2008/07/09 22:33:19 opfer Exp $

IUSE="acpi debug"

inherit eutils multilib linux-mod toolchain-funcs versionator

DESCRIPTION="Ati precompiled drivers for recent chipsets"
HOMEPAGE="http://www.ati.com"
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/"
SRC_URI="${ATI_URL}/ati-driver-installer-8-6-x86.x86_64.run"

LICENSE="AMD GPL-2 QPL-1.0 as-is"
KEYWORDS="~amd64 x86"

# The portage dep is for COLON_SEPARATED support in env-update.
# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update.
RDEPEND="x11-base/xorg-server
   !x11-apps/ati-drivers-extra
   >=app-admin/eselect-1.0.9
   app-admin/eselect-opengl
   amd64? ( app-emulation/emul-linux-x86-xlibs )
   acpi? (
      x11-apps/xauth
      sys-power/acpid
   )
   x11-libs/libXrandr
   >=sys-apps/portage-2.1.1-r1"

DEPEND="${RDEPEND}
   x11-proto/xf86miscproto
   x11-proto/xf86vidmodeproto
   x11-proto/inputproto"

EMULTILIB_PKG="true"

QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so
   usr/lib/opengl/ati/lib/libGL.so.1.2
   opt/bin/amdcccle"
QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so
   usr/lib32/dri/fglrx_dri.so
   usr/lib64/opengl/ati/lib/libGL.so.1.2
   usr/lib32/opengl/ati/lib/libGL.so.1.2
   opt/bin/amdcccle"
QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so
   usr/lib/xorg/modules/drivers/fglrx_drv.so
   usr/lib/opengl/ati/lib/libGL.so.1.2
   usr/lib/xorg/modules/glesx.so
   usr/lib/xorg/modules/amdxmm.so"
QA_TEXTRELS_amd64="
   usr/lib64/opengl/ati/lib/libGL.so.1.2
   usr/lib32/opengl/ati/lib/libGL.so.1.2
   usr/lib64/dri/fglrx_dri.so
   usr/lib32/dri/fglrx_dri.so
   usr/lib32/xorg/modules/glesx.so
   usr/lib64/xorg/modules/glesx.so"

S="${WORKDIR}"

pkg_setup() {

   # Define module dir.
   MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod"

   #check kernel and sets up KV_OBJ
   MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)"
   BUILD_TARGETS="kmod_build"
   linux-mod_pkg_setup
   BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}"

   if ! kernel_is 2 6; then
      eerror "Need a 2.6 kernel to compile against!"
      die "Need a 2.6 kernel to compile against!"
   fi

   if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then
      die "${P} is not compatible RCU Preemption, please disable it"
   fi

   if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
      eerror "${P} requires support for pci_find_slot."
      die "${P} requires support for pci_find_slot."
   fi

   if ! linux_chkconfig_present MTRR; then
      ewarn "You don't have MTRR support enabled, the direct rendering will not work."
   fi

   if linux_chkconfig_builtin DRM; then
      ewarn "You have DRM support enabled builtin, the direct rendering will not work."
   fi

   if ! linux_chkconfig_present AGP && \
      ! linux_chkconfig_present PCIEPORTBUS; then
      ewarn "You need AGP and/or PCI Express support for direct rendering to work."
   fi

   if linux_chkconfig_present PARAVIRT; then
      eerror "The current ati-drivers don't compile when having"
      eerror "paravirtualization active due to GPL symbol export"
      eerror "restrictions."
      eerror "Please disable it:"
      eerror "   CONFIG_PARAVIRT=n"
      eerror "in /usr/src/linux/.config or"
      eerror "   Processor type and features -->"
      eerror "      [ ] Paravirtualization support (EXPERIMENTAL)"
      eerror "in 'menuconfig'"
      die "CONFIG_PARAVIRT enabled"
   fi

   # Only support xorg-server >=1.1
   BASE_DIR="${S}/x710"

   # This is used like $(get_libdir) for paths in ati's package.
   if use amd64 ; then
      BASE_DIR="${BASE_DIR}_64a"
      PKG_LIBDIR=lib64
      ARCH_DIR="${S}/arch/x86_64"
   else
      PKG_LIBDIR=lib
      ARCH_DIR="${S}/arch/x86"
   fi
}

src_unpack() {
   #Switching to a standard way to extract the files since otherwise no signature file
   #would be created
   local src="${DISTDIR}/${A}"
   sh "${src}" --extract "${S}"  2&>1 /dev/null

   # These are the userspace utilities that we also have source for.
   # We rebuild these later.
   rm \
      "${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \
      "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \
      || die "bin rm failed"

   #if the kernel >= 2.6.25
   if kernel_is ge 2 6 25; then
      #apply firegl_public patch
      cd "${MODULE_DIR}"
      epatch "${FILESDIR}"/firegl_public.patch
      cd "$S"
   fi

   if use debug; then
      # Enable debug mode in the Source Code.
      sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
         "${MODULE_DIR}/firegl_public.c" \
         || die "Failed to enable debug output."
   fi

   if use acpi; then
      sed -i \
         -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
         -e "s:/var/lib/gdm/:/var/gdm/:" \
         "${S}/common/etc/ati/authatieventsd.sh" \
         || die "sed failed."

      # Since "who" is in coreutils, we're using that one instead of "finger".
      sed -i -e 's:finger:who:' \
         "${S}/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
         || die "Replacing 'finger' with 'who' failed."
      # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
      # add funktion to detect default state.
      epatch "${FILESDIR}"/8.476/ati-powermode-opt-path-2.patch
   fi

   pushd ${MODULE_DIR} >/dev/null
   ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
      || die "symlinking precompiled core failed"

   convert_to_m 2.6.x/Makefile || die "convert_to_m failed"

   # When built with ati's make.sh it defines a bunch of macros if
   # certain .config values are set, falling back to less reliable
   # detection methods if linux/autoconf.h is not available. We
   # simply use the linux/autoconf.h settings directly, bypassing the
   # detection script.
   sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
   sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
      || die "MODVERSIONS sed failed"
   popd >/dev/null

   mkdir extra || die "mkdir failed"
   cd extra
   unpack ./../common/usr/src/ati/fglrx_sample_source.tgz
   sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \
      lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed"
   # Add a category.
   mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed"
   cd ..
}

src_compile() {
   linux-mod_src_compile

   einfo "Building fgl_glxgears"
   cd "${S}"/extra/fgl_glxgears
   # These extra libs/utils either have an Imakefile that does not
   # work very well without tweaking or a Makefile ignoring CFLAGS
   # and the like. We bypass those.

   # The -DUSE_GLU is needed to compile using nvidia headers
   # according to a comment in ati-drivers-extra-8.33.6.ebuild.
   "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
      -I"${S}"/common/usr/include fgl_glxgears.c \
      -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"

   einfo "Building fglrx_gamma lib"
   cd "${S}"/extra/lib/fglrx_gamma
   "$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \
      -DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \
      -lXext || die "fglrx_gamma lib build failed"
   ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed"
   ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed"

   einfo "Building fglrx_gamma util"
   cd "${S}"/extra/programs/fglrx_gamma
   "$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \
      -I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \
      fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \
      || die "fglrx_gamma util build failed"

}

src_install() {
   linux-mod_src_install

   # We can do two things here, and neither of them is very nice.

   # For direct rendering libGL has to be able to load one or more
   # dri modules (files ending in _dri.so, like fglrx_dri.so).
   # Gentoo's mesa looks for these files in the location specified by
   # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
   # location /usr/$(get_libdir)/dri. Ati's libGL does the same
   # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
   # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
   # 64bit. So we can either put the .so files in that (unusual,
   # compared to "normal" mesa libGL) location or set
   # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
   # 101539.

   # The problem with this approach is that LIBGL_DRIVERS_PATH
   # *overrides* the default hardcoded location, it does not extend
   # it. So if ati-drivers is merged but a non-ati libGL is selected
   # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
   # (because it changed in a newer mesa or because it was compiled
   # for a different set of multilib abis than we are) stuff breaks.

   # We create one file per ABI to work with "native" multilib, see
   # below.

   echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
   doenvd "${T}/03ati-colon-sep"

   # All libraries that we have a 32 bit and 64 bit version of on
   # amd64 are installed in src_install-libs. Everything else
   # (including libraries only available in native 64bit on amd64)
   # goes in here.

   # There used to be some code here that tried to detect running
   # under a "native multilib" portage ((precursor of)
   # http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it
   # should just work (only doing some duplicate work). --marienz
   if has_multilib_profile; then
      local OABI=${ABI}
      for ABI in $(get_install_abis); do
         src_install-libs
      done
      ABI=${OABI}
      unset OABI
   else
      src_install-libs
   fi

   # This is sorted by the order the files occur in the source tree.

   # X modules.
   exeinto /usr/$(get_libdir)/xorg/modules/drivers
   doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
   exeinto /usr/$(get_libdir)/xorg/modules/linux
   doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
   exeinto /usr/$(get_libdir)/xorg/modules
   doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so,amdxmm.so}

   # Arch-specific files.
   # (s)bin.
   into /opt
   if use acpi; then
      dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
   fi
   # We cleaned out the compilable stuff in src_unpack
   dobin "${ARCH_DIR}"/usr/X11R6/bin/*

   # lib.
   exeinto /usr/$(get_libdir)
   # Everything except for the libGL.so installed in src_install-libs.
   doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
      -maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*')
   insinto /usr/$(get_libdir)
   doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \
      -maxdepth 1 -type f -not -name '*.so*')

   # Common files.
   # etc.
   insinto /etc/ati
   # Everything except for the authatieventsd.sh script.
   doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default}
   if use acpi; then
      doins common/etc/ati/authatieventsd.sh
   fi

   # include.
   insinto /usr
   doins -r common/usr/include
   insinto /usr/include/X11/extensions
   doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h

   # Just the atigetsysteminfo.sh script.
   into /usr
   dosbin common/usr/sbin/*

   # data files for the control panel.
   insinto /usr/share
   doins -r common/usr/share/ati
   insinto /usr/share/pixmaps
   doins common/usr/share/icons/ccc_{large,small}.xpm
   make_desktop_entry amdcccle 'ATI Catalyst Control Center' \
      ccc_large System

   # doc.
   dohtml -r common/usr/share/doc/fglrx

   if use acpi; then
      doman common/usr/share/man/man8/atieventsd.8

      pushd common/usr/share/doc/fglrx/examples/etc/acpi >/dev/null

      exeinto /etc/acpi
      doexe ati-powermode.sh
      insinto /etc/acpi/events
      doins events/*

      popd >/dev/null
   fi

   # Done with the "source" tree. Install tools we rebuilt:
   dobin extra/fgl_glxgears/fgl_glxgears
   newdoc extra/fgl_glxgears/README README.fgl_glxgears

   dolib extra/lib/fglrx_gamma/*so*
   newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma

   dobin extra/programs/fglrx_gamma/fglrx_xgamma
   doman extra/programs/fglrx_gamma/fglrx_xgamma.1
   newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma

   # Gentoo-specific stuff:
   if use acpi; then
      newinitd "${FILESDIR}"/atieventsd.init atieventsd \
         || die "Failed to install atieventsd.init.d"
      echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
      newconfd "${T}"/atieventsd.conf atieventsd
   fi
}

src_install-libs() {
   if [[ "${ABI}" == "amd64" ]]; then
      local pkglibdir=lib64
      local MY_ARCH_DIR="${S}/arch/x86_64"
   else
      local pkglibdir=lib
      local MY_ARCH_DIR="${S}/arch/x86"
   fi
   einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"

   local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
   # To make sure we do not miss a spot when these change.
   local libmajor=1 libminor=2
   local libver=${libmajor}.${libminor}

   # The GLX libraries
   # (yes, this really is "lib" even on amd64/multilib --marienz)
   exeinto ${ATI_ROOT}/lib
   doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver}
   dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
   dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so

   # Same as the xorg implementation (eselect opengl does not fall
   # back to xorg-x11 if we omit this symlink, meaning no glx).
   dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions

   # DRI modules, installed into the path used by recent versions of mesa.
   exeinto /usr/$(get_libdir)/dri
   doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so

   # Make up a libGL.la. Ati does not provide one, but mesa does. If
   # a (libtool-based) libfoo is built with libGL.la present a
   # reference to it is put into libfoo.la, and compiling
   # (libtool-based) things that link too libfoo.la will complain if
   # libGL.la disappears. So if we do not make up a libGL.la
   # switching between mesa and ati becomes painful.
   local revision=$(printf '%d%02d%02d' $(get_version_components))
   sed -e "s:\${libmajor}:${libmajor}:g" \
      -e "s:\${libminor}:${libminor}:g" \
      -e "s:\${libdir}:$(get_libdir):g" \
      -e "s:\${revision}:${revision}:g" \
      "${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \
      || die "sed failed to make libGL.la"

   local envname="${T}"/04ati-dri-path
   if [[ -n ${ABI} ]]; then
      envname="${envname}-${ABI}"
   fi
   echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
   doenvd "${envname}"
}

pkg_postinst() {
   /usr/bin/eselect opengl set --use-old ati

   elog "To switch to ATI OpenGL, run \"eselect opengl set ati\""
   elog "To change your xorg.conf you can use the bundled \"aticonfig\""
   elog
   elog "If you experience unexplained segmentation faults and kernel crashes"
   elog "with this driver and multi-threaded applications such as wine,"
   elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
   elog
   elog "You will have to source /etc/profile (or logout and back in) for dri"
   elog "to work, unless you previously had ati-drivers installed."

   # Workaroud screen corruption
   ewarn "If you experience screen corruption with this driver, try putting"
   ewarn '         Option "XAANoOffscreenPixmaps" "true"'
   ewarn "in the Device Section of /etc/X11/xorg.conf."

   linux-mod_pkg_postinst
}

pkg_postrm() {
   linux-mod_pkg_postrm
   /usr/bin/eselect opengl set --use-old xorg-x11
}


N.B : Yes I know how to use diff, and yes I am lazy.

then
Code:

ebuild /usr/local/portage/x11-drivers/ati-drivers/ati-drivers-8.501.ebuild digest
echo "x11-drivers/ati-drivers ~x86" >> /etc/portage/package.keywords
emerge ati-drivers


everything should work OK.

I leave it to people with a more profound ebuild knowledge than I have to correct/enhance/submit to dev this patch.
This is my first ebuild and first contribution to gentoo, so if you feel like bursting out laughing by looking at it please tell me.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Mon Jul 21, 2008 7:17 am    Post subject: Re: I do not know how to make a proper ebuild but... Reply with quote

khane96 wrote:



I leave it to people with a more profound ebuild knowledge than I have to correct/enhance/submit to dev this patch.
This is my first ebuild and first contribution to gentoo, so if you feel like bursting out laughing by looking at it please tell me.


That depends on what you changed in the ebuild. But I don't think you changed much, apart from adding the patch did you?

/edit: There is a new fglrx out btw.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Mon Jul 21, 2008 7:37 am    Post subject: Reply with quote

Code:
***** firegl_public.patch *****                                                                                                                       

===============================

PATCH COMMAND:   patch -p0 -g0 -E --no-backup-if-mismatch < /usr/local/portage-overlays/personal/x11-drivers/ati-drivers/files/firegl_public.patch

===============================
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:               
--------------------------                     
|Index: work/common/lib/modules/fglrx/build_mod/firegl_public.c
|===================================================================
|--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.c   
|+++ work/common/lib/modules/fglrx/build_mod/firegl_public.c       
--------------------------                                         
No file to patch.  Skipping patch.                                 
22 out of 22 hunks ignored                                         
can't find file to patch at input line 488                         
Perhaps you used the wrong -p or --strip option?                   
The text leading up to this was:                                   
--------------------------                                         
|Index: work/common/lib/modules/fglrx/build_mod/firegl_public.h     
|===================================================================
|--- work.orig/common/lib/modules/fglrx/build_mod/firegl_public.h   
|+++ work/common/lib/modules/fglrx/build_mod/firegl_public.h       
--------------------------                                         
No file to patch.  Skipping patch.                                 
4 out of 4 hunks ignored                                           
===============================                                     

PATCH COMMAND:   patch -p1 -g0 -E --no-backup-if-mismatch < /usr/local/portage-overlays/personal/x11-drivers/ati-drivers/files/firegl_public.patch


and so on...

/edit: This happens because the index / directory is wrong, but anyway the patch does not apply cleanly.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum