Ich habe ein Problem mit modprobe
Befehl ... Ich kompiliert das Hallo Welt-Modul und lud es mit insmod
, es funktioniert gut und wenn ich tun lsmod
, kann ich es in der sehen Ausgabeliste. Aber wenn ich dieses Modul eines mit modprobe
ich einen fatalen Fehler bin immer:"FATAL: Modul nicht gefunden Fehler" mit modprobe
[email protected]:/home/ravi# modprobe ./hello.ko
FATAL: Module ./hello.ko not found.
[email protected]:/home/ravi#
Hier ist der Modulcode:
#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);
und 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
also, wenn ich mein Modul in '/ lib/modules/$ (uname -r)' Verzeichnis dann wird es funktionieren? –
@Ravi Gupta: Das wäre meine beste Schätzung. – che
versuchen, es in/lib/modules/$ (uname -r)/misc/ –