फेडोरा लिनक्स में अपना पहला कर्नेल मॉड्यूल संकलित करते समय त्रुटि प्राप्त करना।फेडोरा लिनक्स --- पहले लिनक्स मॉड्यूल संकलित
स्रोत कोड: -
#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
मेकअप समय में त्रुटि: -
$ 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
अब अगर मैं देख निर्माण है वहाँ या नहीं, मुझे निम्नलिखित ओ/पी मिलता है। बिल्ड एक Softlink के रूप में दिखाया गया है: ---
$ 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 :--
मेरे makefile सही है यह नियम पहले सही टैब की है। कृपया इस त्रुटि को हल करने का सुझाव दें?
क्या/usr/src/kernels/3.8.6-203.fc18.x86_64' मौजूद है? –
केवल इन दो फ़ोल्डर्स मौजूद हैं ----> /usr/src/kernels/3.8.7-201.fc18.x86_64 --- & --- /usr/src/kernels/3.9.4-200.fc18.x86_64 ----> सॉफ्टलिंक एक मौजूद नहीं है – Katoch
अब क्या करना है? – Katoch