Well I thought I had modules sussed but apparently not.
A couple of days ago I compiled the module for my RTL8168 Gigabit ethernet interfaces and it worked fine. I did what the README said and it all worked.
Now it doesn't work any more and my system denies all knowledge of the r1000.ko module.
Why are modules so ?^!$%^"$%&^ recalcitrant?
How do I get it to work now? All the 'bits' must be there but none of the module commands give me any help to find them.
Hheellpp!!
On Tue, Oct 17, 2006 at 09:54:45PM +0100, cl@isbd.net wrote:
Well I thought I had modules sussed but apparently not.
A couple of days ago I compiled the module for my RTL8168 Gigabit ethernet interfaces and it worked fine. I did what the README said and it all worked.
Now it doesn't work any more and my system denies all knowledge of the r1000.ko module.
Why are modules so ?^!$%^"$%&^ recalcitrant?
How do I get it to work now? All the 'bits' must be there but none of the module commands give me any help to find them.
Hheellpp!!
Sorry to answer my own question (partly anyway) but I have it working now.
However I'm still unclear how it's *supposed* to work.
I have compiled the new module and have produced a new driver called r1000.ko.
The instructions say just:-
make clean modules (as root or with sudo) make install depmod -a
Which is a fat lot of good as it doesn't actually make the module do anything.
If I do:- insmod ./src/r1000.ko
then the module works, but of course it only works if I happen to be in the directory where I unpacked and built the module.
The "make install" doesn't appear to have put the module anywhere sensible so that I can 'run' it at startup.
How do I find out how to actually get the module to be part of my installation and run when I start the system up? I can muddle my way there no doubt but surely there should be a relatively easy way to find out.
Sorry about the rant but every time I [re]-install Linux I have this stupid game with modules.
On Tue, Oct 17, 2006 at 10:07:40PM +0100, chris@isbd.co.uk wrote:
However I'm still unclear how it's *supposed* to work.
I have compiled the new module and have produced a new driver called r1000.ko.
The instructions say just:-
make clean modules (as root or with sudo) make install depmod -a
Which is a fat lot of good as it doesn't actually make the module do anything.
The make install should have copied it in the /lib/modules/<kernel-version>/someplace, try doing: find /lib/modules -name r1000.ko
And see where it put it. You should also be able to just use modprobe r1000 To load the module, assuming that it has actually put it in the right place in the make install.
If I do:- insmod ./src/r1000.ko
then the module works, but of course it only works if I happen to be in the directory where I unpacked and built the module.
The "make install" doesn't appear to have put the module anywhere sensible so that I can 'run' it at startup.
How do I find out how to actually get the module to be part of my installation and run when I start the system up? I can muddle my way there no doubt but surely there should be a relatively easy way to find out.
Sorry about the rant but every time I [re]-install Linux I have this stupid game with modules.
This is where debian's module-assisstant is really nice. You end up with a packaged version of the module for the current kernel, you install the package and it just works.
Oops, this popped out of moderation a bit late because I sent it from the wrong address.
On Fri, Oct 20, 2006 at 09:19:16AM +0100, Brett Parker wrote:
On Tue, Oct 17, 2006 at 10:07:40PM +0100, chris@isbd.co.uk wrote:
However I'm still unclear how it's *supposed* to work.
I have compiled the new module and have produced a new driver called r1000.ko.
The instructions say just:-
make clean modules (as root or with sudo) make install depmod -a
Which is a fat lot of good as it doesn't actually make the module do anything.
The make install should have copied it in the /lib/modules/<kernel-version>/someplace, try doing: find /lib/modules -name r1000.ko
I *think* this was probably my problem, I think using the /test kernel meant that my 'make install' didn;t put it in the right place. A later 'make install' put it in the right place though and I'm not quite sure what changed in the interim.
And see where it put it. You should also be able to just use modprobe r1000 To load the module, assuming that it has actually put it in the right place in the make install.
But this *isn't* necessary when I reboot, the kernel somehow automagically finds that it needs the r1000 module and loads it. It's this that I find a bit disconcerting.
This is where debian's module-assisstant is really nice. You end up with a packaged version of the module for the current kernel, you install the package and it just works.
It would appear that this is what happens by default with any distro, just do the required make and depmod and then "it just works", assuming that one's system is set up correctly for the given kernel (which mine wasn't quite).
On Fri, Oct 20, 2006 at 10:25:10AM +0100, cl@isbd.net wrote:
Oops, this popped out of moderation a bit late because I sent it from the wrong address.
On Fri, Oct 20, 2006 at 09:19:16AM +0100, Brett Parker wrote: But this *isn't* necessary when I reboot, the kernel somehow automagically finds that it needs the r1000 module and loads it. It's this that I find a bit disconcerting.
That suggests that you've got either discover or udev installed. It's not magic, they go off and look through the hardware and then load the modules associated with it.
It would appear that this is what happens by default with any distro, just do the required make and depmod and then "it just works", assuming that one's system is set up correctly for the given kernel (which mine wasn't quite).
m-a builds against packaged kernel source, so it becomes rather easier to build new modules, and the same source can be used for multiple kernels easily.
On Fri, Oct 20, 2006 at 11:03:29AM +0100, Brett Parker wrote:
On Fri, Oct 20, 2006 at 10:25:10AM +0100, cl@isbd.net wrote:
Oops, this popped out of moderation a bit late because I sent it from the wrong address.
On Fri, Oct 20, 2006 at 09:19:16AM +0100, Brett Parker wrote: But this *isn't* necessary when I reboot, the kernel somehow automagically finds that it needs the r1000 module and loads it. It's this that I find a bit disconcerting.
That suggests that you've got either discover or udev installed. It's not magic, they go off and look through the hardware and then load the modules associated with it.
Yes, I seem to have udev. The trouble is that other documentation (i.e. that about modules and kernel building for example) doesn't keep up with these changes so they still tell you how to add the module manually.
I'm not too worried, it all works now, the real trouble is that I do this infrequently enough that I've usually forgotten all I learnt the previous time I did it. Not to mention that the rules change subtly! :-)
On 20 Oct 2006, at 11:45 am, cl@isbd.net wrote:
I'm not too worried, it all works now, the real trouble is that I do this infrequently enough that I've usually forgotten all I learnt the previous time I did it. Not to mention that the rules change subtly! :-)
I think you've pretty much documented it on here, so you should be able to look up what you need, next time you do it ;)
Dave
On Fri, Oct 20, 2006 at 12:53:16PM +0100, David Reynolds wrote:
On 20 Oct 2006, at 11:45 am, cl@isbd.net wrote:
I'm not too worried, it all works now, the real trouble is that I do this infrequently enough that I've usually forgotten all I learnt the previous time I did it. Not to mention that the rules change subtly! :-)
I think you've pretty much documented it on here, so you should be able to look up what you need, next time you do it ;)
Ah, but I need to know that this is the place to look too! :-)
Actually I'm being a bit cleverer than usual, I'm recording much of what I do on my wiki. This will be useful both for remembering what the configuration is and also for the next time I build soemthing new.