J'ai un problème avec la commande modprobe
... J'ai compilé le module hello world et l'ai chargé avec insmod
, ça marche bien et quand je fais lsmod
, je peux le voir dans le liste de sortie. Mais quand j'insérer ce module à l'aide modprobe
Je reçois une erreur FATAL:"FATAL: Erreur module introuvable" en utilisant modprobe
[email protected]:/home/ravi# modprobe ./hello.ko
FATAL: Module ./hello.ko not found.
[email protected]:/home/ravi#
Voici le code du 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);
et 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
donc si je mets mon module dans le répertoire '/ lib/modules/$ (uname -r)' alors ça marchera? –
@Ravi Gupta: Ce serait ma meilleure estimation. – che
essayez de le placer dans/lib/modules/$ (uname -r)/misc/ –