Errore durante la compilazione del mio primo modulo del kernel in Fedora linux.fedora linux --- compilazione del primo modulo linux
Codice sorgente: -
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
static int __init hello_start(void)
{
printk(KERN_INFO "Loading hello module...\n");
printk(KERN_INFO "Hello world\n");
return 0;
}
static void __exit hello_end(void)
{
printk(KERN_INFO "Goodbye Mr.\n");
}
module_init(hello_start);
module_exit(hello_end);
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
errore in fase di make: -
$ make
make -C /lib/modules/3.8.6-203.fc18.x86_64/build M=/home/dinesh/development/linux/kernel_modules/hello modules
make: *** /lib/modules/3.8.6-203.fc18.x86_64/build: No such file or directory. Stop.
make: *** [default] Error 2
Ora, se vedo build è lì oppure no, seguo o/p. Scorte è indicata con un link simbolico: ---
$ ls -l /lib/modules/3.8.6-203.fc18.x86_64/
total 2632
lrwxrwxrwx. 1 root root 38 Apr 15 21:32 build -> /usr/src/kernels/3.8.6-203.fc18.x86_64
drwxr-xr-x.
I got same error even after installing, kernel-devel :--
mio makefile è corretta si ha scheda corretto prima regola. Si prega di suggerire come risolvere questo errore?
Esiste '/ usr/src/kernel/3.8.6-203.fc18.x86_64'? –
Esistono solo queste due cartelle ----> /usr/src/kernels/3.8.7-201.fc18.x86_64 --- & --- /usr/src/kernels/3.9.4-200.fc18.x86_64 ----> softlink non esiste – Katoch
Ora cosa fare? – Katoch