I ran
make cloneconfig
make oldconfig
to generate a new .config file.
Then I noticed this in the Makefile
Code:
# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
-include .kconfig.d
include .config
# If .config needs to be updated, it will be done via the dependency
# that autoconf has on .config.
# To avoid any implicit rule to kick in, define an empty command
.config .kconfig.d: ;
# If .config is newer than include/linux/autoconf.h, someone tinkered
# with it and forgot to run make oldconfig.
# If kconfig.d is missing then we are probarly in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
$(objtree)/include/linux/autoconf.h: .kconfig.d .config
$(Q)mkdir -p include/linux
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
# Dummy target needed, because used as prerequisite
$(objtree)/include/linux/autoconf.h: ;
endif
I also looked in the kernels Documentation directory:
/usr/src/linux-2.6.16.13-4/Documentation/kbuild/modules.txt
/usr/src/linux-2.6.16.13-4/Documentation/HOWTO
/usr/src/linux-2.6.16.13-4/Documentation/kernel-docs.txt
After running "make pdfdocs"
/usr/src/linux-2.6.16.13-4/Documentation/DocBook/kernel-hacking.pdf
Be sure to work in a copy of the kernel source before you do your hacking. However, why not look at how ndiswrapper or nvidia produces externel loadable modules in the /lib/modules/ tree if your kernel module could be a loadable module using the standard kernel.
I hope I made at least some sense.