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 Wed 30 Jul 2014, 07:27
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 [5 Posts]  
Author Message
gemera

Joined: 17 Feb 2012
Posts: 14

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

Hi,

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 
amigo

Joined: 02 Apr 2007
Posts: 2226

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 
technosaurus


Joined: 18 May 2008
Posts: 4284

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 
amigo

Joined: 02 Apr 2007
Posts: 2226

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: 3956
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 poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0474s ][ Queries: 12 (0.0043s) ][ GZIP on ]