Modified Makefile to allow 'out of kernel tree' module building for 2.6.x
authormarty <marty>
Sun, 18 Sep 2005 05:31:26 +0000 (05:31 +0000)
committermarty <marty>
Sun, 18 Sep 2005 05:31:26 +0000 (05:31 +0000)
commit3fb421aeda96d281918eeae5f4ac46eb685cc4d0
treee92a5416cffc45724f988ff74ebdf0d37f6a4ddd
parent102ee9ef7f61177ab100570809d9dbde888e3904
Modified Makefile to allow 'out of kernel tree' module building for 2.6.x
kernels.  (See Documentation/kbuild for details on how to do this).

Modified yportenv.h to include moduleconfig.h

Added new file moduleconfig.h.  This is the compromise that makes it
possible to build yaffs in any of three ways:

1) in-kernel, in the kernel source tree.  You put yaffs into the
   kernel source tree using patch-ker.sh
2) as-module, in the kernel source tree.
3) as-module, out of the kernel source tree.

Because modules built outside of the kernel source tree can't use the
kconfig tool to add their CONFIG_ variable to <linux/config.h>,
moduleconfig.h is a compromise that gathers all of the CONFIG_
variables in one place.

The CONFIG_ variables in moduleconfig.h are protected by
KBUILD_MODNAME, a variable that is only set when a module is built
outside of the kernel source tree.

The CONFIG_ variables are all on by default -- this is probably not
what you want.  Comment out the ones that you don't want enabled.

NOTE: Not all of the CONFIG_ variables used in yaffs2 are in
moduleconfig.h.  Those that are not relevant to Linux are missing.
Makefile
moduleconfig.h [new file with mode: 0644]
yportenv.h