Discussion:
Version number incorrect on debian
Reinaert Albrecht
2005-10-10 09:24:40 UTC
Permalink
Hey,

I have a kind of stupid problem with the mga_vid sources on debian. I'm using
the debian kernel image and supplied headers to build the packages. Until
recently that was no problem at all. But on 2.6.11 and 2.6.12 that doesn't seem
to work anymore because the build system puts the wrong version number in the
kernel module. This probably has nothing to do with the mga_vid sources but with
the build system in debian. Does anybody have the same problem and found a
solution or any advice as to how to change the kernel build process in order to
make it use the right version number in the kernel modules?

Kind regards,

Reinaert Albrecht
--
Reinaert Albrecht
GPG Key ID @ keyserver.net: 0xF4FC22F6
Attila Kinali
2005-10-10 09:32:31 UTC
Permalink
On Mon, 10 Oct 2005 11:24:40 +0200
Post by Reinaert Albrecht
I have a kind of stupid problem with the mga_vid sources on debian. I'm using
the debian kernel image and supplied headers to build the packages. Until
recently that was no problem at all. But on 2.6.11 and 2.6.12 that doesn't seem
to work anymore because the build system puts the wrong version number in the
kernel module. This probably has nothing to do with the mga_vid sources but with
the build system in debian. Does anybody have the same problem and found a
solution or any advice as to how to change the kernel build process in order to
make it use the right version number in the kernel modules?
Yes, this is because the kernel packages from debian are broken.
Instead of copying all needed header files into
/lib/modules/`uname -r`/build they symlink it. You need to have
the correct kernel source at the place where this symlink is pointing
to with the configuration used by the kernel you have running.

My advice is to build your own kernel package (use make-kpkg from
kernel-package) and keep the kernel sources at some common place
(like /usr/src/).


Attila Kinali
Reinaert Albrecht
2005-10-10 09:41:07 UTC
Permalink
Post by Attila Kinali
On Mon, 10 Oct 2005 11:24:40 +0200
Post by Reinaert Albrecht
I have a kind of stupid problem with the mga_vid sources on debian. I'm using
the debian kernel image and supplied headers to build the packages. Until
recently that was no problem at all. But on 2.6.11 and 2.6.12 that doesn't seem
to work anymore because the build system puts the wrong version number in the
kernel module. This probably has nothing to do with the mga_vid sources but with
the build system in debian. Does anybody have the same problem and found a
solution or any advice as to how to change the kernel build process in order to
make it use the right version number in the kernel modules?
Yes, this is because the kernel packages from debian are broken.
Instead of copying all needed header files into
/lib/modules/`uname -r`/build they symlink it. You need to have
the correct kernel source at the place where this symlink is pointing
to with the configuration used by the kernel you have running.
Imho I doubt this is the problem. With the version 2.6.8 kernels they used the same
process and I had no trouble at all. Why's that?

Kind regards,

RA
--
Reinaert Albrecht
GPG Key ID @ keyserver.net: 0xF4FC22F6
r***@wol.be
2005-10-10 17:50:21 UTC
Permalink
Post by Reinaert Albrecht
Post by Attila Kinali
On Mon, 10 Oct 2005 11:24:40 +0200
Post by Reinaert Albrecht
I have a kind of stupid problem with the mga_vid sources on debian. I'm using
the debian kernel image and supplied headers to build the packages. Until
recently that was no problem at all. But on 2.6.11 and 2.6.12 that doesn't seem
to work anymore because the build system puts the wrong version number in the
kernel module. This probably has nothing to do with the mga_vid sources but with
the build system in debian. Does anybody have the same problem and found a
solution or any advice as to how to change the kernel build process in order to
make it use the right version number in the kernel modules?
Yes, this is because the kernel packages from debian are broken.
Instead of copying all needed header files into
/lib/modules/`uname -r`/build they symlink it. You need to have
the correct kernel source at the place where this symlink is pointing
to with the configuration used by the kernel you have running.
Imho I doubt this is the problem. With the version 2.6.8 kernels they used the same
process and I had no trouble at all. Why's that?
Turns out that you are right on the issue of not working with the 2.6 series.
But the reason why it wouldn't load the module on my system had to do with the
fact that the version number was incorrect in include/linux/version.h and that I
didn't use the gcc version my kernel was compiled with. Now I have a module that
loads but that's no use. It seems to work correctly upto showing the following:

Matrox MGA G200/G400/G450/G550 YUV Video interface v2.01 (c) Aaron Holtzman & A'rpi
mga_vid: Found MGA G400/G450 at 0000:01:00.0
mga_vid: MMIO at 0xe0d18000 framebuffer: 0xE2000000
mga_vid: OPTION word: 0x400A1160 mem: 0x04 SDRAM
mga_vid: detected RAMSIZE is 16 MB
mga_vid: 1 supported cards found
mga_vid: using major: 83 (assigned or default!)

My /dev/mga_vid shows the following:
crw-r--r-- 1 root root 83, 0 Oct 10 19:37 /dev/mga_vid

so everything should work if i'm not mistaken.

Anybody any ideas?

Reinaert
--
Reinaert Albrecht
GPG Key ID @ keyserver.net: 0xF4FC22F6
Gregor Zattler
2005-10-11 14:42:00 UTC
Permalink
Hi,
Post by r***@wol.be
Now I have a module that
Matrox MGA G200/G400/G450/G550 YUV Video interface v2.01 (c) Aaron Holtzman & A'rpi
mga_vid: Found MGA G400/G450 at 0000:01:00.0
mga_vid: MMIO at 0xe0d18000 framebuffer: 0xE2000000
mga_vid: OPTION word: 0x400A1160 mem: 0x04 SDRAM
mga_vid: detected RAMSIZE is 16 MB
mga_vid: 1 supported cards found
mga_vid: using major: 83 (assigned or default!)
crw-r--r-- 1 root root 83, 0 Oct 10 19:37 /dev/mga_vid
so everything should work if i'm not mistaken.
Similar problem here.
mplayer -v film.avi

gives as last 3 lines:

vo_mga: Couldn't open /dev/mga_vid

uninit audio: libmad
vo: x11 uninit called but X11 not inited..

But permissions of /dev/mga are correct and user has group access
to /dev/mga:

$ lal /dev/mga_vid
crw-rw---- 1 root video 178, 0 2005-09-08 14:13 /dev/mga_vid
$ groups
grfz disk lp kmem dialout cdrom floppy audio dip src video staff games users


Any ideas?

Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
Michael Späth
2005-10-11 21:30:43 UTC
Permalink
Hello!
Post by Gregor Zattler
Similar problem here.
mplayer -v film.avi
vo_mga: Couldn't open /dev/mga_vid
uninit audio: libmad
vo: x11 uninit called but X11 not inited..
But permissions of /dev/mga are correct and user has group access
$ lal /dev/mga_vid
crw-rw---- 1 root video 178, 0 2005-09-08 14:13 /dev/mga_vid
$ groups
grfz disk lp kmem dialout cdrom floppy audio dip src video staff games users
I think its just the wrong major number. When I do:

ll /dev/mga_vid
crw-rw---- 1 root root 83, 0 Oct 9 23:46 /dev/mga_vid

[83 <--> 178]

Do:
rm -f /dev/mga_vid
mknod /dev/mga_vid c 83 0

and it will probably work for you. Or remove mga_vid and apply the udev
patch if you have udev, then udev can set proper permissions
automatically upon inserting the module...
--
Sincerly
Michael
Gregor Zattler
2005-10-19 18:45:49 UTC
Permalink
Hi Michael,
Post by Michael Späth
Post by Gregor Zattler
Similar problem here.
mplayer -v film.avi
vo_mga: Couldn't open /dev/mga_vid
uninit audio: libmad
vo: x11 uninit called but X11 not inited..
But permissions of /dev/mga are correct and user has group access
$ lal /dev/mga_vid
crw-rw---- 1 root video 178, 0 2005-09-08 14:13 /dev/mga_vid
$ groups
grfz disk lp kmem dialout cdrom floppy audio dip src video staff games users
ll /dev/mga_vid
crw-rw---- 1 root root 83, 0 Oct 9 23:46 /dev/mga_vid
[83 <--> 178]
rm -f /dev/mga_vid
mknod /dev/mga_vid c 83 0
and it will probably work for you. Or remove mga_vid and apply the udev
patch if you have udev, then udev can set proper permissions
automatically upon inserting the module...
You were right... I corrected the major number (as root):

rm -f /dev/mga_vid
mknod /dev/mga_vid c 83 0
chown root:video /dev/mga_vid
chmod 0660 /dev/mga_vid

and it worked. No, no udev installed because I had trouble with
it.



Thanx, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
Loading...