module.ko: make, install & used many times. Suddenly modprobe=invalid module format??
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
module.ko: make, install & used many times. Suddenly modprobe=invalid module format??
OK, a week or so ago, I finally located a new driver for my Intel 536ep PCI modem. Until now, there have been none available that worked for the 2.6 kernel.
So, I 'make 536', then 'make install' and manually create a symlink to /dev/modem as well as a /dev/ppp node, and presto, the thing worked like a charm all week, not a single bit of screwing around to make it work. I have the symlink and node being made in rc.local on bootup, so it's ready to roll when my desktop comes online.
Now, the past 2 days, I have been tweaking my kernel a little bit (2.6.20) and there are a mere tiny handful of things I have specifically changed in the kernel over the last 24 hours. Not one single other thing has changed on my system. I haven't downloaded, installed, or updated anything else anywhere. Suddenly today, I recompile my kernel, reboot, re-install the nvidia driver for my video-card, telinit 4, log into my desktop, locate the Intel driver folder where it's been all week, I enter it, make 536, make install, done! Same as always. Except that now, when I try to modprobe it, it tells me:
Stupid thing LOL.. Here are the things I have been changing within the kernel ( this list is accurate, as I wrote down the changes on paper as I did them, so I would have a diff from the last kernel version to this one )
1 - Changed from Deadline(default) & CFQ schedulers to AS(default) & CFQ schedulers.
2 - De-selected 'Word93 Validation bits' on the IDE bus.
3 - Changed from 8 blocks of R/W IO buffer to 16 blocks (CD/DVD write cache)
4 - Selected 'Preemtible Kernel' instead of 'Voluntary Preemption'
And that's it! Now where in there did I select 'prevent modem module from installing properly'?? Any suggestions or other ideas of any sort regarding why/what/how/whatever that this module suddenly has become an invalid format, are surely welcome.
I have tried recompiling the kernel a number of times since the first episode if this; I've recompiled a previous version, I've tried copying another build of the module from another compile, and still nothing---same result. Obviously it isn't *exactly* the module itself that is the problem. It's **something** to do with the kernel or something very closely related TO the kernel.
Thank you all very much for input..
Have you tried doing an insmod from wherever the .ko sits after the make? If it's in your kernel tree then you should be able to do "make M=directory" to recompile it after you touch it.
I enter it, make 536, make install, done! Same as always.
Although I'm not sure what kind of difference it would make, but your first step should be 'make clean', followed by 'export MODEM_TYPE=536EP' before 'make'.
I only have Mandrake 10.2 for 32bit OS, so it is the only one I can install my best modem in. Usually I do not have to modprobe, after 'make install' I lsmod and it is loaded. I have to enter it in etc/modprobe.preload to load it upon reboot. This is 537EP, but the latest source is the same for both apparently.
Hiya guys, thanks for this input...
re Post #2 - Quakeboy - I tried insmodding it from where it was after MAKE (in the driver's source directory) but FWIW it does the exact same thing as when I modprobe it. And sorry but I don't understand that bit about 'M=directory' and then recompile it after touching it?
@ Junior Hacker - Thank you but make clean doesn't do much on this one. Yes, I have done it countless times, but it isn't fixing anything. And, I have never ever ever had to export ANYTHING before making anything, including previous versions of similar modem drivers for 2 other of 3 modems I have here, for the 2.4 kernel. I will however give it a try after I finish this reply--- It can't hurt anything...
I appreciate the suggestions Keep them coming, but nothing explains why I have compiled this driver module a whole whack of times since I first got it, without incident, and all of a sudden, out of the blue, for absolutely no reason, it suddenly is telling me it's incompatible.. I am baffled.
Anyhow, If I haven't posted here within the next 3 minutes, safely assume EXPORT didn't do anything.
Thanks again guys
Yes
Some of the source packages did not require the export, but others did, producing an error telling me to export it. If you were not told to export, you probably don't need to. I have used many different source packages from linmodems.org as Philippe has been making modifications in the past little while. The one that works for me is intel-537EP-2.60.80.1_12_06_2006.tar of which I had to export for this one. But the 'make clean' is recommended if you used the source in the folder before.
Have you seen their little collection in the 536 directory? http://phep2.technion.ac.il/linmodem...ges/intel/536/
Last edited by Junior Hacker; 04-24-2007 at 10:06 PM.
Hmm yes I have been there many times.. LOL, I've prolly been to ALL of the Intel536 driver sites, though there aren't very many of them. This was the first driver I have actually got to compile completely with no errors on a 2.6 kernel. I have a rather large folder full of all different ones I have tried, probably over a dozen of them..
This one's name is: intel-536EP-2.56.76.0_23_02_2007.tgz and it was released in/about Feb/March 2007
UPDATE - downloading another one as we speak.. the #453 model.. Fingers crossed.. But I am still mystified as to what happened.
UPDATE - Well, that was useless about 2 dozen errors during compile, and finish on ERROR.. Ahh well, back like before with all the other ones
Last edited by GrapefruiTgirl; 04-24-2007 at 10:15 PM.
OK yep, I just went there. That is exactly where I got this driver that worked. It's the newest one there.
ACK Yes I likely did LOL, these stupid modems are a curse.. Luckily I am on a LAN right now, but if/when the WinXP machine on the other end of the wire croaks again, I'll be doomed.
What a pain in the bum.
Last edited by GrapefruiTgirl; 04-24-2007 at 10:18 PM.
One of the biggest problems I had with these sources is that my kernel in Mandrake (2.6.11), would not have anything to do with the word "Proprietary" in the coredrv.c and softserial.c files. I had to edit it to say "GPL" instead.
I would use this command from within the Intel folder to find it and edit it (if I remember correctly):
e Post #2 - Quakeboy - I tried insmodding it from where it was after MAKE (in the driver's source directory) but FWIW it does the exact same thing as when I modprobe it. And sorry but I don't understand that bit about 'M=directory' and then recompile it after touching it?
Here's an example from something I've been messing with.
Code:
cd /data/src/linux-2.6.20.6
touch drivers/ata/sata_inic162x.c (updates file date/time so make will make an new obj)
make M=drivers/ata (makes only the stuff in drivers/ata)
rmmod sata_inic162x
insmod drivers/ata/sata_inic162x.ko
LOL .. OK, you guys have been great but now it's time for me to say " I'm a moron "..
Here's what happened-- Ok, everytime I make a kernel, even with a tiny change, I save a newly named config file, like 'kconf-2620-0f0' in this case.. So, At some point earlier today, I went to make some change or another, and I must have forgotten to LOAD the config I wanted to use, and so instead I started xconfig and merrily went on to do my 'one little adjustment' on an otherwise totally default kernel. (Yes, you can kick me now!).. So, from that point onwards, I was saving STOCK configs as my custom-named serialized config files ... Leaving me with a string of basically stock configs with neat names.
SH*T! Hahah.... What the heck was I doing that was so distracting that I managed to do this? I don't know, but it finally dawned on me when I rebooted half an hour ago and found that my firewall told me my kernel didn't support IPtables, My scanner modules weren't anywhere to be found, and a bunch of other weird crap wasn't working.. LOL..
Well, I went back a few configs to one that actually is one I made which works, recompiled THAT one after doing a make clean and make mrproper, and rebooted, and lo and behold, there was a damned modem module already sitting pretty in the modules folder and happily plugged itself in without issue.
Guys, sorry for having taken up your time trying to help me with this apparent mystery.. But it is all good now and I'mma take a break until tomorrow before I make another kernel
Have a great night, and thanks again for helping!
Sasha
Last edited by GrapefruiTgirl; 04-24-2007 at 11:16 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.