From: Satish Eerpini <eerpini@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: building custom module on 2.6.28 fails
Date: Sun, 25 Jan 2009 10:27:43 +0530 [thread overview]
Message-ID: <93655eb70901242057n7e0e3757p467f91352cbae932@mail.gmail.com> (raw)
Hi everyone,
I tried to compile build the following sample kernel module on 2.6.28 :
______________________________________________________________________
#include <linux/module.h>
/* Defines the license for this LKM */
MODULE_LICENSE("GPL");
/* Init function called on module entry */
int my_module_init( void )
{
printk(KERN_INFO "my_module_init called. Module is now loaded.\n");
return 0;
}
/* Cleanup function called on module exit */
void my_module_cleanup( void )
{
printk(KERN_INFO "my_module_cleanup called. Module is now unloaded.\n");
return;
}
/* Declare entry and exit functions */
module_init( my_module_init );
module_exit( my_module_cleanup );
____________________________________________________________________
but it fails with the following error :
_____________________________________________________________________
make -C /lib/modules/`uname -r`/build
SUBDIRS=/home/satish/prog/kernel/modules modules
make[1]: Entering directory `/usr/src/kernels/linux-2.6.28'
CC [M] /home/satish/prog/kernel/modules/simple-mod.o
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/satish/prog/kernel/modules/simple-mod.c:1:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:256:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/satish/prog/kernel/modules/simple-mod.c:1:
include/linux/mmzone.h:277: error: 'MAX_NR_ZONES' undeclared here (not
in a function)
make[2]: *** [/home/satish/prog/kernel/modules/simple-mod.o] Error 1
make[1]: *** [_module_/home/satish/prog/kernel/modules] Error 2
make[1]: Leaving directory `/usr/src/kernels/linux-2.6.28'
make: *** [all] Error 2
__________________________________________________________________
any hints what could be wrong ?
Thanks
Satish
--
http://satish.playdrupal.com
next reply other threads:[~2009-01-25 4:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-25 4:57 Satish Eerpini [this message]
2009-01-25 6:49 ` Jaswinder Singh Rajput
2009-01-25 8:37 ` Satish Eerpini
2009-01-25 10:30 ` Jaswinder Singh Rajput
2009-01-25 10:40 ` Jaswinder Singh Rajput
2009-01-25 11:19 ` Satish Eerpini
2009-01-25 13:47 ` Sam Ravnborg
2009-01-25 14:27 ` Jaswinder Singh Rajput
2009-01-25 19:18 ` Sam Ravnborg
2009-01-25 19:32 ` Jaswinder Singh Rajput
2009-01-25 15:51 ` Satish Eerpini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=93655eb70901242057n7e0e3757p467f91352cbae932@mail.gmail.com \
--to=eerpini@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®