problems compiling module
Hello, i am new to linux, C, and this forum, but i was hoping to get some help. Im trying to learn how to create kernel modules, its for a school project as well. I got the simple hello world module working, so i tried to make one that took parameters from terminal. It looks like this #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/kernel.h> static char name[] = "name"; module_param(name, char, 0); MODULE_PARM_DESC(name, "The name of the person being greeted); int init_module(void) { printk(KERN_INFO "Hello %s\n", name); return 0; } void cleanup_module(void) { printk(KERN_INFO "Goodbye %s\n", name); } the Makefile looks like this bj -m += hello3.o all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules clean: make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean when i run the make command i get no errors, but when i ls the dir afterwards i only see modules.order and Module.symvers. This is my problem, where is the .ko file? What did i do wrong? |
No comments:
Post a Comment