Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 08-10-2006, 12:58 AM   #1
LQ Newbie
Registered: Feb 2006
Posts: 15

Rep: Reputation: 0
make only specific module is kernel source tree

I wish to make only a particular module in the kernel source tree.

Say for example, i want to build only drivers/net/e100 module.
how i can do with existing makefiles(default)

Is there any way to mention only to build e100 module while building modules.

Distribution: fedora core 2

Old 08-10-2006, 02:52 AM   #2
Senior Member
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,013

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
If the module is part of your current kernel's tree you can run:

insmod <>

And insert the module into the running kernel. But, you can't take modules that are from a different kernel tree than your running kernel. I shouldn't say "can't". You can try. You need to compile the module with gcc:

gcc -DMODULE -D__KERNEL__ -c e100.c -I/usr/src/linux-uname -r/include

Then, you have to insert the module into the running kernel with:

insmod e100.o (or e100.ko for 2.6 kernels)

If this is a network card module you need to do:

ifup eth0

and then you should have network access.
Old 08-16-2006, 10:05 AM   #3
LQ Newbie
Registered: Feb 2006
Posts: 15

Original Poster
Rep: Reputation: 0
make only specific module in kernel tree

i got the answer.
go to the kernel source tree and have

make modules SUBDIRS=drivers/net/e100

it will make only e100 driver
replace e100 with the directry name U want to build.

Thanks for your replies.


make, module, modules, specific

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel source tree? nmainak Linux - Kernel 1 05-05-2006 12:35 AM
single module compile in clean source tree henryquinn Linux - Software 3 02-15-2006 03:38 AM
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
which source tree to choose for module compilation ? roemisch Linux - Hardware 4 03-31-2005 04:03 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration