diff yportenv.h @ 80:82fbfedb0261

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.
author marty <marty>
date Sun, 18 Sep 2005 05:31:26 +0000
parents 794fd064bd36
children 59da3290b07c
line wrap: on
line diff
--- a/yportenv.h
+++ b/yportenv.h
@@ -15,7 +15,7 @@
  *
  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  *
- * $Id: yportenv.h,v 1.7 2005-08-11 02:33:03 marty Exp $
+ * $Id: yportenv.h,v 1.8 2005-09-18 05:31:26 marty Exp $
  *
  */
 
@@ -28,6 +28,8 @@
 
 #elif  defined __KERNEL__
 
+#include "moduleconfig.h"
+
 /* Linux kernel */
 #include <linux/config.h>
 #include <linux/kernel.h>