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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -