Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 01 Nov 2014, 04:22
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Kernel recompile or LKMs?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
Dave_G


Joined: 21 Jul 2011
Posts: 459

PostPosted: Sat 28 Jul 2012, 04:08    Post subject:  Kernel recompile or LKMs?  

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.
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Sat 28 Jul 2012, 05:00    Post subject: Kernel recompile or LKMs?  

Hi Dave,

Wow... you're asking this kind of question in the Beginners Help section? Shocked It would appear that the Puppy Community is ascending to a higher plain of existence... Cool

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/linux-general-1/installing-driver-modules-without-recompiling-stock-kernels-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 username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
Dave_G


Joined: 21 Jul 2011
Posts: 459

PostPosted: Sat 28 Jul 2012, 05:44    Post subject:  

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. Smile

Of course I could be totally wrong and will await input from the experts.

Dave.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sat 28 Jul 2012, 14:23    Post subject:  

Dave_G wrote:


Of course I could be totally wrong and will await input from the experts.

Dave.

Experts hanging around somewhere making money, not here .

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 :
kernel_make_menu_config_enable_loadable_module_support.jpg
 Description   
 Filesize   72.99 KB
 Viewed   162 Time(s)

kernel_make_menu_config_enable_loadable_module_support.jpg

Back to top
View user's profile Send private message Visit poster's website 
Dave_G


Joined: 21 Jul 2011
Posts: 459

PostPosted: Sat 28 Jul 2012, 14:35    Post subject:  

Hi Karl, thanks for your input.

You are correct in saying that some modules make life difficult when
trying to unload them but luckily in this case I'm writing them so will
make sure they are well behaved Wink
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Sat 28 Jul 2012, 15:54    Post subject: 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. Smile

Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
Dave_G


Joined: 21 Jul 2011
Posts: 459

PostPosted: Sat 28 Jul 2012, 16:04    Post subject:  

Nice find Monsie it's made me a bit more receptive to the possibility of a kernel compilation.
Up to now my response would have been exactly the same as the OP
of the thread you posted a link to, namely, Ooooo Nnooooo !!!!!! Shocked
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0573s ][ Queries: 12 (0.0049s) ][ GZIP on ]