Hello,
i have an problem with modprobe command...i compiled the hello world module and inserted using "insmod" command...and its working..when i see "lsmod" its in that list...but when i insert this module using "modprobe" i am getting the FATAL error....that is
root@okapi:/home/ravi# modprobe ./hello.ko
FATAL: Module ./hello.ko not found.
root@okapi:/home/ravi#
Here is the code of the module
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
{
printk(KERN_ALERT "Hello, world\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}
module_init(hello_init);
module_exit(hello_exit);
and Makefile
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean