<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; abhishek.bist</title>
	<atom:link href="https://www.emblogic.com/blog/author/abhishek-bist/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>An Article On Character Driver</title>
		<link>https://www.emblogic.com/blog/12/an-article-on-character-driver/</link>
		<comments>https://www.emblogic.com/blog/12/an-article-on-character-driver/#comments</comments>
		<pubDate>Thu, 05 Dec 2013 19:06:53 +0000</pubDate>
		<dc:creator><![CDATA[abhishek.bist]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7677</guid>
		<description><![CDATA[The major issue faced by the kernel today is that it has become blotted. So the concept of modularity has been introduced into the kernel programming so that a required module could be loaded into it dynamically.The driver I used &#8230; <a href="https://www.emblogic.com/blog/12/an-article-on-character-driver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: medium"><strong>The major issue faced by the kernel today is that it has become blotted. So the concept of modularity has been introduced into the kernel programming so that a required module could be loaded into it dynamically.The driver I used to access a device is a character driver which has the property to access a device, character by character. A infinite stream of byte, they provide an unstructured access to the hardware. This device driver is loaded into a kernel space dynamically by using insmod command .After this a dynamic loader comes into play which links the unresolved symbol in the module to the symbol table in the kernel.</strong></span></p>
<p><span style="font-size: medium"><strong> INITIALISATION: When a new module is introduced in a kernel it does not know by itself that for what this module is for. Thereby it run it&#8217;s initializing function which is called by module_init().That allow the module to register itself to the each and every facility that the module support. In case of device driver it has to allocate , initialize and register a structure for a category of a device that it has to use, specific to character driver this is done by initializing a cdev structure and implementing a file_operations.</strong></span></p>
<p><span style="font-size: medium"><strong> EXIT: The delete_module system call calls a function name module_exit() before removing the kernel from a module. The kernel ensure that the device module is not used by any other and the allow it to get removed.</strong></span></p>
<p>&nbsp;</p>
<p><span style="font-size: medium"><strong>As each and every device in the kernel is identified by a unique number which of type dev_t and it&#8217;s an 32 bit value which enclose the (major,minor) number in itself. So,the very first task for our is to ask for a dev number from a kernel so that it could recognise our device when it is in action.</strong></span></p>
<p><span style="font-size: medium"><strong> MAJOR=Specific to driver,</strong></span></p>
<p><span style="font-size: medium"><strong> MINOR=Specific to device,</strong></span></p>
<p><span style="font-size: medium"><strong>This is fetch while registration than the second important task is to initialise our device and at this instant we can say that our device has become alive and the next is to add it to character device database.</strong></span></p>
<p><span style="font-size: medium"><strong> This is done by cdev_add. c</strong></span><span style="font-size: medium"><strong>dev_add basically adds the device to the system. What it means essentially is that after the cdev_add operation your new device will get visibility through the </strong></span><code><span style="font-size: medium"><strong>/sys/</strong></span></code><span style="font-size: medium"><strong> file system. The function does all the necessary house keeping activities related to that particularly the </strong></span><code><span style="font-size: medium"><strong>kobj</strong></span></code><span style="font-size: medium"><strong> reference to your device will get inserted at its position in the object hierarchy.</strong></span></p>
<p><span style="font-size: medium"><strong> If we have an device with you we can develop driver accordingly and as far as testing is concerned we initiated it by defining a structure named Scull_dev. That have supposed to used a memory on RAM as virtualization of device.</strong></span></p>
<p><span style="font-size: medium"><strong> The next objective is to define a device file specific operations that can be manipulated in struct file_operations:</strong></span></p>
<p><span style="font-size: medium"><strong> open: To open the device,</strong></span></p>
<p><span style="font-size: medium"><strong> close: To close the device,</strong></span></p>
<p><span style="font-size: medium"><strong> read: To do an input operations,</strong></span></p>
<p><span style="font-size: medium"><strong> write: To do write operations,</strong></span></p>
<p><span style="font-size: medium"><strong>and many more as required.</strong></span></p>
<p><span style="font-size: medium"><strong> As the device is open using a character driver node which can be consider as an </strong></span><span style="font-size: medium"><em><span style="text-decoration: underline"><strong>entry point </strong></span></em></span><span style="font-size: medium"><strong>of the device by using </strong></span><span style="font-size: medium"><em><span style="text-decoration: underline"><strong>mknod -c major minor.</strong></span></em></span><span style="font-size: medium"><strong> Now the device is accessible from the user space. And it&#8217;s different system </strong></span><span style="font-size: medium"><strong> call is mapped to our device routine for the specific device.</strong></span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/an-article-on-character-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E-12</title>
		<link>https://www.emblogic.com/blog/08/e-12-3/</link>
		<comments>https://www.emblogic.com/blog/08/e-12-3/#comments</comments>
		<pubDate>Mon, 27 Aug 2012 08:16:08 +0000</pubDate>
		<dc:creator><![CDATA[abhishek.bist]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[siddarth sir]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=5081</guid>
		<description><![CDATA[ptr is selected in vim with yellow colour by certain key combination,and can&#8217;t undo it.]]></description>
				<content:encoded><![CDATA[<p>ptr is selected in vim with yellow colour by certain key combination,and can&#8217;t undo it.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/08/e-12-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
