* (no subject)
@ 2004-02-22 17:51 redzic fadil
2004-02-22 18:48 ` Larry Reaves
2004-02-22 20:54 ` No Subject Ludootje
0 siblings, 2 replies; 3+ messages in thread
From: redzic fadil @ 2004-02-22 17:51 UTC (permalink / raw)
To: linux-kernel
hello
I hope I don't disturb,
I have tried to compile the hello.c module under kernel 2.6.3.
And I'd like to insert the hello.o module in the kernel.
But this doesn't work with kernel 2.6.3 .
I have compiled this module with kernel 2.4.* and it is well.
Also I cannot include the header file module.h, because I get error
messages.
my module:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
int initial_module (void)
{
printk("\ninitial module\n");
return (0);
}
void delete_module (void)
{
printk("\ndelete module\n");
}
module_init(initial_module);
module_exit(delete_module);
my Makefile:
CC=gcc
CFLAGS=-isystem /lib/modules/`uname -r`/build/include -O2 -D__KERNEL__
-DMODULE
all: hello.o
If you have any idea please send an E-Mail: redzic_fadil@hotmail.com
thanks
_________________________________________________________________
Die ultimative Fan-Seite für den MSN Messenger http://www.ilovemessenger.de
Emoticons und Hintergründe kostenlos downloaden!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:
2004-02-22 17:51 redzic fadil
@ 2004-02-22 18:48 ` Larry Reaves
2004-02-22 20:54 ` No Subject Ludootje
1 sibling, 0 replies; 3+ messages in thread
From: Larry Reaves @ 2004-02-22 18:48 UTC (permalink / raw)
To: redzic fadil
I suggest that you read
http://linuxdevices.com/articles/AT4389927951.html it is an article
about the differences between modules for 2.4 and 2.6. Basically all
you need to do to get it to work is delete your Makefile and create a
new one with only this line:
obj-m := hello.o
and then issue the following command:
make -C /usr/src/linux-2.6.3 SUBDIRS=$PWD modules
your module compiles fine on my box using this method
On Sun, 2004-02-22 at 12:51, redzic fadil wrote:
> hello
>
>
> I hope I don't disturb,
>
>
> I have tried to compile the hello.c module under kernel 2.6.3.
> And I'd like to insert the hello.o module in the kernel.
> But this doesn't work with kernel 2.6.3 .
>
> I have compiled this module with kernel 2.4.* and it is well.
>
> Also I cannot include the header file module.h, because I get error
> messages.
>
> my module:
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/init.h>
>
>
> int initial_module (void)
> {
> printk("\ninitial module\n");
> return (0);
> }
>
> void delete_module (void)
> {
> printk("\ndelete module\n");
> }
>
> module_init(initial_module);
> module_exit(delete_module);
>
>
> my Makefile:
> CC=gcc
> CFLAGS=-isystem /lib/modules/`uname -r`/build/include -O2 -D__KERNEL__
> -DMODULE
> all: hello.o
>
> If you have any idea please send an E-Mail: redzic_fadil@hotmail.com
>
> thanks
>
> _________________________________________________________________
> Die ultimative Fan-Seite für den MSN Messenger http://www.ilovemessenger.de
> Emoticons und Hintergründe kostenlos downloaden!
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Larry Reaves <larry@moonshinecomputers.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No Subject
2004-02-22 17:51 redzic fadil
2004-02-22 18:48 ` Larry Reaves
@ 2004-02-22 20:54 ` Ludootje
1 sibling, 0 replies; 3+ messages in thread
From: Ludootje @ 2004-02-22 20:54 UTC (permalink / raw)
To: redzic fadil; +Cc: linux-kernel
On Sun, 2004-02-22 at 17:51, redzic fadil wrote:
> hello
>
>
> I hope I don't disturb,
>
>
> I have tried to compile the hello.c module under kernel 2.6.3.
> And I'd like to insert the hello.o module in the kernel.
> But this doesn't work with kernel 2.6.3 .
>
> I have compiled this module with kernel 2.4.* and it is well.
See http://lwn.net/Articles/21817 for porting hello world.
(or http://lwn.net/Articles/driver-porting for the entire article)
Ludootje
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-22 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-22 17:51 redzic fadil
2004-02-22 18:48 ` Larry Reaves
2004-02-22 20:54 ` No Subject Ludootje
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 NNTP newsgroup(s).