Problem with writing module
|
2005-10-15, 07:05 PM,
ارسال : #1
|
|||
|
|||
Problem with writing module
Hello
I am new in making module in linux ,I treid the first module programming as you see as follows /* * hello-1.c - The simplest kernel module. */ #include <linux/module.h> /* Needed by all modules */ #include <linux/kernel.h> /* Needed for KERN_INFO */ 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"); } Then the tutorials told me for comoling the module I should use the following commands obj-m += hello-1.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 would you please explain me what is $(sehll uname –r) and M=$(PWD) Sincerely yours Mohsena |
|||
|
پيام هاي اين موضوع |
Problem with writing module - توسط مهمان - 2005-10-15, 07:05 PM
[بدون عنوان] - توسط مهمان - 2005-10-17, 07:59 AM,
[بدون عنوان] - توسط Saied - 2005-10-17, 06:20 PM,
|