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 Mon 22 Dec 2014, 00:09
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Distinction between internal and external kernel modules
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 17 Feb 2012
Posts: 14

PostPosted: Tue 08 Apr 2014, 16:17    Post_subject:  Distinction between internal and external kernel modules  


I'm currently going through the usual beginner "Hello World" type loadable kernel module tutorials.

What I'm unsure of is the distinction between this type of kernel module and what they encompass - which is described as out-of-tree - and in-tree modules which are also described as internal modules.

Am I right in thinking internal modules are the type compiled using obj-y in the Makefile and require re-compiling the kernel as opposed to the external which are compiled with obj-m and which are loadable and unloadable.

Also I'm unsure when the one would be used rather than the other.

e.g. in Puppy are the Device Drivers external and loaded at boot or are they compiled with the kernel?
Back to top
View user's profile Send_private_message 

Joined: 02 Apr 2007
Posts: 2294

PostPosted: Wed 09 Apr 2014, 00:35    Post_subject:  

In kernel simply means that the sources are part of the normal linux kernel sources. out-of-tree means any module whose sources are not part of the normal kernel sources.
Back to top
View user's profile Send_private_message 

Joined: 18 May 2008
Posts: 4425

PostPosted: Thu 10 Apr 2014, 11:22    Post_subject:  

CONFIG_XXX=M ... module is built as a dynamically loadable XXX.ko (may have .ko.gz if compressed)
CONFIG_XXX=Y ... "module" is builtin to the kernel image => no need to modprobe it.
By design each out of tree builds is built as if it were CONFIG_XXX=M because it is built for the existing kernel image

Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 

Joined: 02 Apr 2007
Posts: 2294

PostPosted: Thu 10 Apr 2014, 14:36    Post_subject:  

The OP specifically mentions 'out-of-tree', so this is not about the difference between code fragments which are built as 'kernel modules' which can be dynamically inserted and removed, or alternately, 'hard-linked' into the kernel so they are always available. Rather, he asks about kernel modules which are not included in the un-patched original kernel sources.
Back to top
View user's profile Send_private_message 
Karl Godt

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

PostPosted: Tue 06 May 2014, 20:10    Post_subject:  

Since around kernel 2.6.34 the
# depmod
command line utility creates a modules.builtin file in the /lib/modules/`uname -r` directory.

Device drivers are usually compiled into the kernel , since device drivers are hard disk drivers .
Same with common file system drivers ie ext2-4, reiserfs .

In a full installation it is neccessary to compile such drivers into the kernel,
since PUPPY does not use an initrd for full installs that could load the drivers .

I for myself compile even the IDE and SCSI drivers into the kernel .
That gave problems with some scripts back then I remember, but Barry or I fixed these .
My kernels are around 7-10 MB instead of 2-5 MB .
I even compile AUFS into it - if I feel for adding the AUFS driver .
Same with the SQUASHFS driver .

For other information about kernel features, I visit http://kernelnewbies.org/

«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot attach files in this forum
You can download files in this forum

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