Now do a gcc -D__KERNEL__ -I/lib/modules/$(uname -r)/build/include -DMODULE -Wall -c hello.c -o hello.o
Next do a insmod hello.o
dmesg | tail -n1 will show you your message
lsmod will show you all of the loaded modules
rmmod will take out any module you want
April 29th, 2002, 06:41 PM
souleman
You know, you can always delete your old posts ;) And there is always a cut and paste by writing it in vi first.
Anyway, never wrote my own kernal mod, but I have installed them a few times. This was a really good, basic tut....
April 29th, 2002, 07:26 PM
linuxcomando
But i think having 2 half completed posts adds character to my posts ;)
Funny enough my last one i did exactly that wrote it in vi and pasted it .
But im glad you liked my tut. It really is an intro into in to LKM.
Im getting a little better at writing them but they can be punks !
June 5th, 2004, 08:45 AM
pooh sun tzu
er, it seems there were a few typos in the code, so I fixed them?
#include <linux/module.h>
#if defined(CONFIG_SMP)
#define __SMP__
#endif
#if defined (CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#endif