EmbLogic's Blog

Successfully Created Kernel Module and register the device.

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
Included the header files like linux/init.h and linux/module.h.
Gave the MODULE_LICENSE , MODULE_AUTHOR, MODULE_DESCRIPTION.
Decleared the device name.
also decleared the major no.
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 05:55:37;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: Declearation.h,v
Working file: Declearation.h
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
This is declearation file .
decleared the structure variable for the struct file_operations.
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 05:57:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
In this we have call the initialization function by using the macro module_init().
Register the device through register_chrdev().
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 06:07:42;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
In this we have call the cleanup function or we can say that exit_function by using the macro module_exit().
Unregister the device through unregister_chrdev().
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 06:11:04;  author: root;  state: Exp;
Initial revision
=============================================================================

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>