I tried to create an up to date ebuild for the 1.4.1 drivers that are currently availble from Matrox for the Parhelia cards. The 1.0 drivers are not even available any more from the matrox website... I started from the ebuild and eclass on Donnie Berkholz website[1] for 1.4.0. Mainly the locations of the files within the distribution of Matrox changed. There are some things to resolve still, but which I am not completely sure about: * I'm having some problems with /dev/video, which is not recreated due to the fact that I'm running udev. However, I don't know if it is still obliged to have a /dev/video directory. * I end up with two v4l_drv.o's. One native by Xorg and one from Matrox. = /usr/lib/modules/drivers/linux/v4l_drv.o = /usr/lib/modules/drivers/v4l_drv.o I don't know which one X prefers... * The permissions of the created X libs are not set to 744, instead they are 644. * There should be an einfo somewhere stating that the mtx kernel module should be loaded, by adding a line to /etc/modules.autoload.d/kernel-${KV} Reproducible: Always Steps to Reproduce: Actual Results: No accurate ebuild for Matrox drivers for Parhelia graphic card. Expected Results: Accurate ebuild for Matrox drivers for Parhelia graphic card.
Created attachment 62785 [details] Updated eclass for matrox
Created attachment 62786 [details] mtxdrivers-pro-1.4.0.ebuild
Well, there is a patch[1] that should be applied to the matrox.eclass. Then it automatically selects the right kernel module to be installed. [1] http://bugs.gentoo.org/attachment.cgi?id=44811
Hmmmz. The ebuild fails while compiling with 2.6.12, while compiling with 2.6.11 succeeded: CC [M] /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.o In file included from /lib/modules/2.6.12-gentoo-r4/build/include/linux/list.h:7, from /lib/modules/2.6.12-gentoo-r4/build/include/linux/wait.h:23, from /lib/modules/2.6.12-gentoo-r4/build/include/asm/semaphore.h:41, from /lib/modules/2.6.12-gentoo-r4/build/include/linux/sched.h:20, from /lib/modules/2.6.12-gentoo-r4/build/include/linux/module.h:10, from /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_drv.h:49, from /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c:17: /lib/modules/2.6.12-gentoo-r4/build/include/linux/prefetch.h: In function `prefetch_range': /lib/modules/2.6.12-gentoo-r4/build/include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic In file included from /lib/modules/2.6.12-gentoo-r4/build/include/linux/dmapool.h:14, from /lib/modules/2.6.12-gentoo-r4/build/include/linux/pci.h:864, from /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_drv.h:56, from /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c:17: /lib/modules/2.6.12-gentoo-r4/build/include/asm/io.h: In function `check_signature': /lib/modules/2.6.12-gentoo-r4/build/include/asm/io.h:253: warning: wrong type argument to increment /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c: At top level: /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c:31: warning: initialization makes integer from pointer without a cast /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c: In function `mtx_mem_alloc_agp': /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c:195: warning: passing arg 1 of `agp_allocate_memory' makes pointer from integer without a cast /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c:195: error: too few arguments to function `agp_allocate_memory' distcc[16730] ERROR: compile /var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.c on 192.168.1.2 failed make[2]: *** [/var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src/mtx_mem.o] Error 1 make[1]: *** [_module_/var/tmp/portage/mtxdrivers-pro-1.4.1/work/kernel/src] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.12-gentoo-r4' make: *** [default] Error 2
Created attachment 63197 [details, diff] fglrx-2.6.12-new-agpgart.patch The agpgart API changed in 2.6.12. Here's the equivalent patch to ati-drivers that ported it. You might be able to find something on matrox forums or port this over to mtx.
Created attachment 63402 [details, diff] Diff for AGP related changes to 2.6.12
I found the requested diff at http://www.tuxx-home.at/projects/mtx/mtx-1.4.1-2.6.12.diff. The announcment can be found here http://forum.matrox.com/mga/viewtopic.php?t=16096 There is also "Unofficial MTX driver 1.4.2. As far as I know a redistribution for this file is not allowed, so I only attach the diff from official version 1.4.1.
I changed the ebuild and the matrox eclass so that Xorg 6.8.2 and XFree 4.3.0 is supported and all files going to the right location. So far this ebuild will support 2.6.11-rXX. I tried the patch for 2.6.12 and at least for me the driver was quit unstable. So I added an internal check to ensure that this ebuild is only used with kernels < 2.6.12. I will attach the ebuild and the eclass file for further use.
Created attachment 63536 [details] matrox.eclass for mtxdrivers-1.4.1
Created attachment 63537 [details] ebuild for mtxdrivers-1.4.1
Created attachment 64815 [details] Modified ebuild for 1.4.1 The files "libglx.a" and "glext.h" were not created at the place where the previous ebuild expected it. Therefore I made the following changes: 50c50 < doexe opengl/${GENTOO_X_VERSION}/libglx.a --- > doexe opengl/libglx.a 53c53 < doins opengl/include/gl.h opengl/include/glx.h include/GL/glext.h --- > doins opengl/include/gl.h opengl/include/glx.h opengl/include/glext.h
Created attachment 65536 [details, diff] mtxdrivers-pro-1.4.1-kernel-2.6.12.patch Patch for the AGP changes in Kernel 2.612
Created attachment 65537 [details] mtxdrivers-pro-1.4.1-r2.ebuild New ebuild that uses the patch above.
It incorporates the patch from #12
why this ebuild still not applied in portage?
Because it's not my top priority. I've been putting hundreds of hours into getting modular X working, and this is easily usable in an overlay, whereas that is not.
when i update to 2.6.14, mtx kernel mode fail to load ... pci_pretty_name unresolved when modprobe ...
no more CONFIG_PCI_NAMES in kernel 2.6.14, pci_pretty_name always = "" there is patch to comment this stuff in mtx drivers --- matroxdriver-/kernel/src/mtx_drv.h.old 2005-12-13 19:40:02.000000000 +0300 +++ matroxdriver-/kernel/src/mtx_drv.h 2005-12-13 20:10:17.000000000 +0300 @@ -382,7 +382,7 @@ INLINE char* GetPciName(struct pci_dev* pPciDev ) { #ifdef KERNEL_2_6 - return pci_pretty_name(pPciDev); + return ""; #else return pPciDev->name; #endif ai z #
Can you please provide an ebuild for the actual 1.4.3 drivers?
Sorry to say, getting modular X into ~arch is higher on my priority list right now. I'll get to this when I can, else you can try to convince some other developer.
For all the people failing to compile the actual matrox driver: http://www.tuxx-home.at/archives/2006/02/08/T16_54_04/ there you find a workaround for the matrox driver 1.4.3 with kernel 2.6.15.
Just in case somebody is willing to update the ebuild, this is how I installed by hand: #!/bin/sh # cd /usr/src/matrox/matroxdriver-1.4.3.3 export PARHELIUX=${PWD}/kernel/src export INSTALLERBUILD=1 cd kernel/src make clean > /dev/null 2>&1 cd parhelia make clean > /dev/null 2>&1 ln -sf ../../mtx_parhelia.o . > /dev/null 2>&1 cd .. make > /tmp/make.log 2>&1 # copy compiled driver to modules dir of kernel cd /lib/modules/2.6.15-gentoo-r1/kernel/drivers/ mkdir video cd video cp /usr/src/matrox/matroxdriver-1.4.3.3/kernel/src/mtx.ko . # update modules cd / /sbin/modules-update # copy X driver cd /usr/lib/modules/drivers/ cp /usr/src/matrox/matroxdriver-1.4.3.3/xserver/6_8_2/mtx_drv.o . chmod 755 mtx_drv.o # opengl cd /usr/lib/opengl mkdir mtx cd mtx mkdir extensions mkdir include mkdir lib cp /usr/src/matrox/matroxdriver-1.4.3.3/opengl/libglx.a extensions chmod 444 extensions/* cp /usr/src/matrox/matroxdriver-1.4.3.3/opengl/libGL.so.1.3.0 lib cp ../xorg-x11/lib/libGL.la lib cp ../xorg-x11/lib/libGL.a lib chmod 755 lib/*.so* chmod 644 lib/*a cp /usr/src/matrox/matroxdriver-1.4.3.3/opengl/include/glext.h include cp /usr/src/matrox/matroxdriver-1.4.3.3/opengl/include/gl.h include cp /usr/src/matrox/matroxdriver-1.4.3.3/opengl/include/glx.h include chmod 444 include/* cd lib ln -s libGL.so.1.3.0 libGL.so.1.2 ln -s libGL.so.1.2 libGL.so.1.2.0 ln -s libGL.so.1.2.0 libGL.so.1 ln -s libGL.so.1 libGL.so /sbin/ldconfig # update modules modprobe mtx /sbin/modules-update # update opengl --> matrox opengl-update mtx echo "mtx" >> /etc/modules.autoload.d/kernel-2.6
how about 1.4.4 ??
*** Bug 68874 has been marked as a duplicate of this bug. ***
peper * gentoo-x86/profiles/ (ChangeLog package.mask): Mask x11-drivers/mtxdrivers-pro for removal. WONTFIX. If someone wants to write a new ebuild for something that can be downloaded and will work with uptodate Xorg versions, do NOT even bother using the FUBARed matrox.eclass; it needs to use linux-mod instead and the whole thing needs to be rewritten from scratch.