Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98144 - updated ebuild & eclass for mtxdrivers-1.4.1
Summary: updated ebuild & eclass for mtxdrivers-1.4.1
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: X11 External Driver Maintainers
URL:
Whiteboard:
Keywords: Inclusion
: 68874 (view as bug list)
Depends on: 165898
Blocks:
  Show dependency tree
 
Reported: 2005-07-06 11:23 UTC by Martijn Meijers
Modified: 2007-06-24 17:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Updated eclass for matrox (matrox.eclass,3.40 KB, text/plain)
2005-07-06 11:24 UTC, Martijn Meijers
Details
mtxdrivers-pro-1.4.0.ebuild (mtxdrivers-pro-1.4.0.ebuild,2.17 KB, text/plain)
2005-07-06 11:24 UTC, Martijn Meijers
Details
fglrx-2.6.12-new-agpgart.patch (fglrx-2.6.12-new-agpgart.patch,2.53 KB, patch)
2005-07-11 21:27 UTC, Donnie Berkholz (RETIRED)
Details | Diff
Diff for AGP related changes to 2.6.12 (mtx-1.4.1-2.6.12.diff,7.54 KB, patch)
2005-07-14 09:01 UTC, Timm Helbig
Details | Diff
matrox.eclass for mtxdrivers-1.4.1 (matrox.eclass,4.22 KB, text/plain)
2005-07-16 08:28 UTC, Timm Helbig
Details
ebuild for mtxdrivers-1.4.1 (mtxdrivers-pro-1.4.1.ebuild,2.01 KB, text/plain)
2005-07-16 08:29 UTC, Timm Helbig
Details
Modified ebuild for 1.4.1 (mtxdrivers-pro-1.4.1-r1.ebuild,2.00 KB, text/plain)
2005-07-31 13:34 UTC, Stephan R. Palm
Details
mtxdrivers-pro-1.4.1-kernel-2.6.12.patch (mtxdrivers-pro-1.4.1-kernel-2.6.12.patch,7.54 KB, patch)
2005-08-09 08:42 UTC, Timm Helbig
Details | Diff
mtxdrivers-pro-1.4.1-r2.ebuild (mtxdrivers-pro-1.4.1-r2.ebuild,2.26 KB, text/plain)
2005-08-09 08:44 UTC, Timm Helbig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn Meijers 2005-07-06 11:23:06 UTC
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.
Comment 1 Martijn Meijers 2005-07-06 11:24:02 UTC
Created attachment 62785 [details]
Updated eclass for matrox
Comment 2 Martijn Meijers 2005-07-06 11:24:57 UTC
Created attachment 62786 [details]
mtxdrivers-pro-1.4.0.ebuild
Comment 3 Martijn Meijers 2005-07-06 11:40:05 UTC
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
Comment 4 Martijn Meijers 2005-07-07 11:46:39 UTC
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
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-11 21:27:17 UTC
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.
Comment 6 Timm Helbig 2005-07-14 09:01:19 UTC
Created attachment 63402 [details, diff]
Diff for AGP related changes to 2.6.12
Comment 7 Timm Helbig 2005-07-14 09:02:17 UTC
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.
Comment 8 Timm Helbig 2005-07-14 09:03:00 UTC
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.

Comment 9 Timm Helbig 2005-07-16 08:27:52 UTC
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.
Comment 10 Timm Helbig 2005-07-16 08:28:47 UTC
Created attachment 63536 [details]
matrox.eclass for mtxdrivers-1.4.1
Comment 11 Timm Helbig 2005-07-16 08:29:26 UTC
Created attachment 63537 [details]
ebuild for mtxdrivers-1.4.1
Comment 12 Stephan R. Palm 2005-07-31 13:34:40 UTC
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
Comment 13 Timm Helbig 2005-08-09 08:42:53 UTC
Created attachment 65536 [details, diff]
mtxdrivers-pro-1.4.1-kernel-2.6.12.patch

Patch for the AGP changes in Kernel 2.612
Comment 14 Timm Helbig 2005-08-09 08:44:52 UTC
Created attachment 65537 [details]
mtxdrivers-pro-1.4.1-r2.ebuild

New ebuild that uses the patch above.
Comment 15 Timm Helbig 2005-08-09 08:48:25 UTC
It incorporates the patch from #12

Comment 16 Arthur I. 2005-12-13 06:21:36 UTC
why this ebuild still not applied in portage? 
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2005-12-13 06:52:47 UTC
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.
Comment 18 Arthur I. 2005-12-13 08:38:15 UTC
when i update to 2.6.14, mtx kernel mode fail to load ... 
pci_pretty_name unresolved when modprobe ... 
Comment 19 Arthur I. 2005-12-13 09:21:42 UTC
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 #


Comment 20 grischa 2006-03-13 14:01:02 UTC
Can you please provide an ebuild for the actual 1.4.3 drivers?
Comment 21 Donnie Berkholz (RETIRED) gentoo-dev 2006-03-13 14:03:36 UTC
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.
Comment 22 grischa 2006-03-14 09:08:40 UTC
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.
Comment 23 Martijn Meijers 2006-03-14 11:19:43 UTC
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
Comment 24 Arthur I. 2006-07-27 07:16:50 UTC
how about 1.4.4 ??
Comment 25 Jakub Moc (RETIRED) gentoo-dev 2007-04-01 17:03:46 UTC
*** Bug 68874 has been marked as a duplicate of this bug. ***
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2007-06-24 17:21:45 UTC
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.