* kernel modules
@ 2004-09-07 11:30 rinku rathore
2004-09-07 15:07 ` Randy.Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: rinku rathore @ 2004-09-07 11:30 UTC (permalink / raw)
To: Dirk Bergmann, gcc, gcc-help, Eljay Love-Jensen, lrtaylor,
Majordomo, Matthias Stein, Zack Weinberg
Hello,
I am trying to build a kernel module that is:-
/*module name is "hello.c"*/
#include <linux/module.h>// Needed by all
modules
#include <linux/kernel.h>
int init_module(void)
{
printk("<1>Hello world 1.\n");
// A non 0 return means init_module failed;
module can't be loaded.
return 0;
}
void cleanup_module(void)
{
printk("<1>Goodbye world 1.\n");
}
And then compiling it with the command:-
gcc -c hello.c
it get successfully compiled and then I am trying to
insert it with command
insmod ./hello.o
An error as followed is arived how can I remove this
error:-
error: ./hell.o: couldn't find the kernel version the
module was compiled for
Thanx Rinku Rathore
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel modules
2004-09-07 11:30 kernel modules rinku rathore
@ 2004-09-07 15:07 ` Randy.Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2004-09-07 15:07 UTC (permalink / raw)
To: rinku rathore
Cc: D.Bergmann, gcc, gcc-help, eljay, lrtaylor, majordomo, M.Stein, zack
On Tue, 7 Sep 2004 04:30:19 -0700 (PDT) rinku rathore wrote:
| Hello,
|
| I am trying to build a kernel module that is:-
|
| /*module name is "hello.c"*/
|
...
|
| And then compiling it with the command:-
| gcc -c hello.c
|
| it get successfully compiled and then I am trying to
| insert it with command
| insmod ./hello.o
|
| An error as followed is arived how can I remove this
| error:-
|
| error: ./hell.o: couldn't find the kernel version the
| module was compiled for
Interesting object file name.
Wrong mailing list. Please try the kernelnewbies mailing list,
kernelnewbies irc (see http://kernelnewbies.org/),
or lkml (linux-kernel mailing list: linux-kernel@vger.kernel.org).
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-07 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-07 11:30 kernel modules rinku rathore
2004-09-07 15:07 ` Randy.Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).