Hi all
Been messing about with writing kernel modules (drivers) for some
custom hardware and was wondering if anyone can give me the pros and cons
of using Loadable Kernel Modules (via insmod and rmmod) versus adding
the extra code to the kernel itself and recompiling the kernel which is something
that I would rather not do.
Any input will be greatly appreciated.
Thanks
Dave.
Kernel recompile or LKMs?
Kernel recompile or LKMs?
Hi Dave,
Wow... you're asking this kind of question in the Beginners Help section? It would appear that the Puppy Community is ascending to a higher plain of existence...
Okay.... kidding aside, I don't believe it is absolutely necessary to re-compile the kernel to install additional drivers unless you are "breaking new ground" here. You'll probably need the kernel source and header packages though.
I found this post which might help get you headed in the right direction if you haven't already seen it: http://www.linuxquestions.org/questions ... ls-334385/
Now that I've started with a reply, hopefully our "kernel experts" will see this thread and provide some extra needed input.
Monsie
Wow... you're asking this kind of question in the Beginners Help section? It would appear that the Puppy Community is ascending to a higher plain of existence...
Okay.... kidding aside, I don't believe it is absolutely necessary to re-compile the kernel to install additional drivers unless you are "breaking new ground" here. You'll probably need the kernel source and header packages though.
I found this post which might help get you headed in the right direction if you haven't already seen it: http://www.linuxquestions.org/questions ... ls-334385/
Now that I've started with a reply, hopefully our "kernel experts" will see this thread and provide some extra needed input.
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Hi Monsie and thanks for the reply.
Now that you mention it, I have posted in the wrong section, my apologies.
Perhaps one of the admins would be kind enough to move it to a more appropriate place.
Thanks for the link.
I have also been doing some research and so far I can't really find any compelling
reason/reasons to recompile the kernel and simply using a LKM is certainly
easier to achieve and also a lot easier to share the module with others and
not have them recompile the whole kernel which I suspect will make many
run for the hills, myself included.
Of course I could be totally wrong and will await input from the experts.
Dave.
Now that you mention it, I have posted in the wrong section, my apologies.
Perhaps one of the admins would be kind enough to move it to a more appropriate place.
Thanks for the link.
I have also been doing some research and so far I can't really find any compelling
reason/reasons to recompile the kernel and simply using a LKM is certainly
easier to achieve and also a lot easier to share the module with others and
not have them recompile the whole kernel which I suspect will make many
run for the hills, myself included.
Of course I could be totally wrong and will await input from the experts.
Dave.
Experts hanging around somewhere making money, not here .Dave_G wrote:
Of course I could be totally wrong and will await input from the experts.
Dave.
Writing drivers for Open Source is a good prove of your talents to employers .
It is easier as module to unload and reload at first but after the first experiences you might be firm with the driver options to put into the grub kernel line ie "my_driver=debug:1,force:off" compared to "modprobe -v --first-time my_driver debug=1 force=off" .
Some drivers make difficulties being in use and can not be unloaded that easy, but this would probably need adjustments to the src code OR the kernel can be configured with these module options :
- Attachments
-
- kernel_make_menu_config_enable_loadable_module_support.jpg
- (72.99 KiB) Downloaded 231 times
Kernel recompile or LKMs?
Dave,
Just in case you do have second thoughts about possibly recompiling the Kernel, I found an interesting thread for you over here at Linux Forums. See the post by Linux Engineer "variant" who explains how easy it can be to re-compile the kernel if you need to.
Monsie
Just in case you do have second thoughts about possibly recompiling the Kernel, I found an interesting thread for you over here at Linux Forums. See the post by Linux Engineer "variant" who explains how easy it can be to re-compile the kernel if you need to.
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.