2 réponses
Je suppose que tu suis ce tutoriel ?
https://broux.developpez.com/articles/c/driver-c-linux/
Dans ton makefile, tu as bien penser à mettre un caractère de tabulation devant "make -C..." ?
https://broux.developpez.com/articles/c/driver-c-linux/
Dans ton makefile, tu as bien penser à mettre un caractère de tabulation devant "make -C..." ?
Peux-tu mettre tes sources dans une archive (par exemple un fichier tgz) et la mettre en partage par exemple sur rapidshare pour qu'on puisse voir ce qui cloche ?
j'ai déjà mis le programme et le makefile SVP esaayez les chez toi :) et merci
le prog
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");
/*
* * A non 0 return means init_module failed; module can't be loaded.
* */
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}
2======> le makefile
obj-m = hello.o
KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
le prog
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");
/*
* * A non 0 return means init_module failed; module can't be loaded.
* */
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}
2======> le makefile
obj-m = hello.o
KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
Tu vois la touche Tabulation de ton clavier ? (a coté de la touche A) qui sert a mettre "un gros espace", c'est ça une tabulation.