Problem in compiling modules
I am tring to compile a module, but the computer tells me about missing header files. So I have copied some from the source into /usr/include/linux and /usr/include/asm. Now it wants generated/bounds.h, and I don't know where from and into where to copy this. I have tryed some things, and the last one was to create "generated" library but it tells me that there is already a file that is called "generated" in the library. Please help me. Thank you.
Please provide more info on what you are trying to compile and the exact error messages.
/* * hello−1.c − The simplest kernel module. */
include <linux/module.h>
/* Needed by all modules */
include <linux/kernel.h>
/* Needed for KERNINFO */ int initmodule(void) { printk(KERNINFO "Hello world 1.\n"); /* * A non 0 return means initmodule failed; module can't be loaded. */ return 0; } void cleanupmodule(void) { printk(KERNINFO "Goodbye world 1.\n"); }
The compilation report : (the problem is first in the end:
/usr/include/linux/nodemask.h:325:35: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h: In function ‘noderemap’: /usr/include/linux/nodemask.h:333:37: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h:333:49: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h: In function ‘nodesremap’: /usr/include/linux/nodemask.h:341:19: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h:341:31: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h:341:43: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h:341:55: error: ‘nodemaskt’ has no member named ‘bits’ /usr/include/linux/nodemask.h: In function ‘nodesonto’: /usr/include/linux/nodemask.h:349:18: error ...(more)
I think youre compiling it the wrong way please read this link http://tldp.org/LDP/lkmpg/2.6/html/