Kernel Notes
Updated December 19, 2002
Created December 19, 2002


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

prev next index
The main kernel building notes are located here: kernel.html. This page gives extra kernel information as I find it.

The following question was posed:

What I'm looking for is how to only recompile the module that I need if I want to add some new module to the kernel. I understand that the first pass at kernel recompilation might require the complete generation of all the modules but then after this first pass, only the modified modules should require a recompilation, right?


And here are some of the answers - use them at your own risk:

One method is to take the .config file and do:
cat .config | sed -e 's/^\(.*\)=m/# \1 is not set/' > .config.new
mv -i .config .config.orig
mv .config.new .config
This will turn off all modules without changing the kernel. Then go in
with "make menuconfig" and turn on the module you wish to build. Then
save and exit from "make menuconfig" . This action of saving and exiting
from "make menuconfig" should actually resolve any dependencies that your
module may need -- so it is important to save and exit.

The base problem is caused by running "make clean" each time; that step
deletes ALL object files and other intermediate files.

After you've done the primary build, avoid running "make clean."

The other problem that will bite you sometimes: the kernel make files
ignore many dependencies on include files, such as those generated in
the "make dep" phase. Thus, if you're trying to do something more
complex than simply adding a module for a new driver, you might get
bitten if you don't do a complete build.

Try in the linux kernel source

make SUBDIRS=drivers/net/ modules

ie
# cd /usr/src/linux
# make SUBDIRS=drivers/net/ modules ==> to build modules inside drivers/net

prev next index
Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html