Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
So the offending function was actually posted by dmesg, as I eventually realized after I put the module into /lib/modules to use modprobe.
Problem is, it's two functions (usb_register and usb_deregister) which are extern'd in KERNELSRC/include/linux/usb/usb.h, but actually defined in KERNELSRC/drivers/usb/core/driver.c. Which for some reason is not included by usb.h, and can't be included by me.
Other in tree drivers seem to get away with just normative includes, but who knows what rules apply to them...
to your driver. They kernel devs implemented a DRM scheme whereby certain symbols are only available if you advertise a GPL license in your driver.
Hey wow, you actually got it. What clued me in was noticing that dmesg had explained the error ;( And stupid me for not paying attention...BUT (paltry defense) only the first time I tried to load it did I get "module license 'unspecified' taints kernel" in dmesg, and of course I didn't read dmesg! (like I said, real new to this kernel stuff) -- which is to say, I tried a few times before finally checking, chopping sections (it's only 65 lines)out and looking at objdump thinking that would help, so by the time I gathered the brains to examine /var/log/messages I didn't notice the taint warning 30 lines up.
Fortunately this is not quite the first module I've written and I eventually looked up, so that rang bells. But I'm becoming increasing afraid of this task I'm fainting already...
Thanks for your astuteness. Great sig! Can I steal it?
But I'm becoming increasing afraid of this task I'm fainting already...
Don't faint now! Writing kernel drivers is a lot easier than it used to be!
Quote:
Originally Posted by mk27
Thanks for your astuteness. Great sig! Can I steal it?
My "astuteness" comes from occasionally reading the LKML. There were some interesting posts a couple of years ago related the the problem you had. And of course, they don't make it easy for you by printing anything useful from "insmod". Like you said, you have to dig through "dmesg" and "/var/log/messages" and figure out what it means to have your kernel tainted.
As far as the sig goes, steal away. The more people who wake up and realize that you can't draw meaningful conclusions from a single story, the better off our society will be.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.