Makefile for kernel module -
Hi, I'm trying to write a 'Hello World' kernel module. I have written the following code: Module514.c
# include & lt; linux / module.h & gt; #lt contains &; linux / kernel.h & gt; #lt contains &; linux / init.h & gt; MODULE_LICENSE ("GPL"); MODULE_AUTHOR ("BMC") MODULE_DESCRIPTION ("My Module)") Static Int __Inte Module 514 (Zero) {printk (KERN_INFO "Hello World"); Return 0; } Fixed zero __ext module 514_clannup (zero) {printk (KERN_INFO "unloaded")} module_init (module 514); module_exit (module514_cleanup); The following Makefile has been created
obj-m + = Module514.o all: make -C / lib / modules / $ (shell uname - r) / Build M = $ (PWD) module: Make-C / Lib / Module / $ (Shell Unpum-R) / Build M = $ (PWD) Clean But When I get the following message to me
create: nothing should be done for `all ' what I'm doing wrong
The problem here is due to my Vim configuration. When I inserted the tab, the Mayfile spaces were inserted instead of the tab. Once I am fixing it using a different editor, all files are getting.
PS: Also make the Makefile Capital M = Makefile
Comments
Post a Comment