<?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</title>
	<atom:link href="https://www.emblogic.com/blog/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>what is the compilation process in c program.</title>
		<link>https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/</link>
		<comments>https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/#comments</comments>
		<pubDate>Tue, 03 Mar 2020 12:24:50 +0000</pubDate>
		<dc:creator><![CDATA[Ritik Sharma]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20933</guid>
		<description><![CDATA[Compilation process in C program There are four phases for a c program to be execute, 1.pre-processor 2.compiler 3.assembler 4.linker let’s start with the first one, #Pre-Processor- The pre-processor removes the comments and include header files in source code, replace &#8230; <a href="https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="margin-bottom: 0in;line-height: 100%"><span style="text-decoration: underline"> <span style="font-size: xx-large"><i><b>Compilation process in C program </b></i></span></span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">There are four phases for a c program to be execute,</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">1.pre-processor</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">2.compiler</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">3.assembler</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">4.linker</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">let’s start with the first one, </span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><i><b>#P</b></i></span><span style="font-size: large"><i><b>re-</b></i></span><span style="font-size: large"><i><b>P</b></i></span><span style="font-size: large"><i><b>rocessor-</b></i></span> The pre-processor removes the comments and include header files in source code, replace macro name with code.</span></p>
<p style="margin-bottom: 0in;font-style: normal;font-weight: normal;line-height: 100%;text-decoration: none"><span style="font-size: large">Basically, it is a program that processes its input data to produce output that can be used by another program as its input. Obviously, compiler is the next one,</span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><i><b>#Compiler- </b></i><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">A compiler is a program that processes your written data which is in your language convert into machine language i.e. </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">binary form(0 &amp;</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">1).</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">B</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">asically, it generates the assembly code of the file, it converts the (.i) file into the (.s) file. </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Any file entering into compiler program </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">passes through lexical analysis, syntax analysis, intermediate code generation, code optimization, </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">object code generation. </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">And the next one is,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><i><b>#Assembler- </b></i><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">An assembler is a program that converts assembly language </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">or assembly code</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal"> into machine code </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">or object code</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">. Assemblers are similar to compilers in that they produce executable code</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">s</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">. </span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">I</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">t converts the (.s) file into the (.o) file. Finally, the last one is,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><i><b>#Linker- </b></i><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">A linker is a computer program that takes one or more object files generated by a compiler and combines them into one, executable program.</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">There are two types of linker i.e. static linking and dynamic linking.</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%"><span style="text-decoration: underline"> <span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Static linking</span></span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">is the result of the linker copying all library routines used in the program into the executable image. </span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%"><span style="font-size: large"><span style="font-style: normal"><span style="text-decoration: underline"><span style="font-weight: normal">Dynamic linking </span></span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal"> is done during load or run-time and not when the exe is created. </span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">I</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">t converts the (.o) file into the executable file for example (.elf) file.</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Now let’s create a simple program,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">First we write our program in the vim editor* *(you can use any editor)</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">#include&lt;stdio.h&gt;</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">int main()</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">{</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">printf(“Hello, This is Ritik Sharma\n”);</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">return 0;</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">}</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">save the file with a name and (.c) extension </span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">and then exit from the vim editor</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">now compile the file with the compiler for example gcc,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">then execute the file which is ./a.out and you can see the output as given below,</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">Hello, This is Ritik Sharma</span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">nice! You got the output. If any error occurred during compiling the program then note that error and try to correct th</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">at</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal"> error. </span></span></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%;text-decoration: none"><span style="font-size: large"><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">_</span></span></span><span style="font-size: large"><span style="font-style: normal"><span style="font-weight: normal">THANK YOU_</span></span></span></span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/what-is-the-compilation-process-in-c-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic of c language</title>
		<link>https://www.emblogic.com/blog/02/basic-of-c-language-2/</link>
		<comments>https://www.emblogic.com/blog/02/basic-of-c-language-2/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 07:20:07 +0000</pubDate>
		<dc:creator><![CDATA[Dhirendra chaurasia]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20924</guid>
		<description><![CDATA[Introduction to C:- C is a general purpose high level programming language used to develop portable applications and firmware. It is originally designed to develop system software and operating systems. C was invented by Dennis&#8217;s Ritchie at bell labs in &#8230; <a href="https://www.emblogic.com/blog/02/basic-of-c-language-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="margin-bottom: 0in;line-height: 100%"><b>Introduction to C:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">C is a general purpose high level programming language used to develop portable applications and firmware. It is originally designed to develop system software and operating systems. C was invented by Dennis&#8217;s Ritchie at bell labs in the 1972s. C has a primary application of Unix operating system. C have a main features low-level access to memory, simple set of keywords and clean style. Because of these features, this language is a suitable language for operating system development. After C, I follow the syntax of many developed language PHP, Java, Java script etc. C was initially used for system development work, particularly program of the system operating system. C was adopted a system language because it produce code that runs nearly as fast as the written code of assembly language.</p>
<p style="margin-bottom: 0in;line-height: 100%">Developing programs using c requires software called integrated development environment (IDE) such as turbo c, codeblocks, visiual studio etc. the integrated development environment mainly three <b>programs</b>:</p>
<p style="margin-bottom: 0in;line-height: 100%">1. Text editor 2. Compiler 3.Debugger.</p>
<p style="margin-bottom: 0in;line-height: 100%">1 .<b> Text editor </b>:- it is used to type of instructions of program which is called of source code. Source code is stored in c file.</p>
<p style="margin-bottom: 0in;line-height: 100%">2. <b>compiler</b>:- it is used to translate instructions of program into machine language which is called binary code.</p>
<p style="margin-bottom: 0in;line-height: 100%">3. <b>Debugger</b>:- it is used to find bugs(errors) within programs.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Keyword</b>:- keywords are p redefined word for performing various type of c. there are total 32 keywords</p>
<p style="margin-bottom: 0in;line-height: 100%">available in c. example :- char,float,int etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Variable</b>:- variable are new words created by us for storing data. Its value changes during execution programs. Example :-a,b,c, num, sum etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Constant</b>:- Constant refer to the fixed value of that does not change during execution of program. No matter where we use it in program, it meaning always remains same. Example :-5, 34.33, -71 etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Operator</b> :- symbols that are used to perform operations between variable are called operators. Example:- +,-,*, / = etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Application and Uses Language:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">C is mainly used to develop system software such as operating system, compiler etc. But it can also be used for developing and kind of application software such as commercial, scientific, games etc.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Advantage of C Language:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">1. C language is a building block for many other currently known language. C language has variety of data types and powerful operator. Due to this, program written in c language are efficient,fast and easy to understand.</p>
<p style="margin-bottom: 0in;line-height: 100%">2. C is highly portable language. This means that c programs written for one computer can easily run on another computer without any change or by doing a little change.</p>
<p style="margin-bottom: 0in;line-height: 100%">3. There are only 32 keywords in ANSI c and its strength in built in functions,several standard functions are available which can be used for developing program.</p>
<p style="margin-bottom: 0in;line-height: 100%"><b>Disadvantage of C:-</b></p>
<p style="margin-bottom: 0in;line-height: 100%">1. C does not have concept of oops, that’s why c++ is developed.</p>
<p style="margin-bottom: 0in;line-height: 100%">2. there is no run time checking in c language.</p>
<p style="margin-bottom: 0in;line-height: 100%">3. there is no strict type checking.</p>
<p style="margin-bottom: 0in;line-height: 100%">4. C does not have the concept of name space.</p>
<p style="margin-bottom: 0in;line-height: 100%">5. C does not have the concept of constructor or destructor.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/basic-of-c-language-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell &amp; Shell Scripting</title>
		<link>https://www.emblogic.com/blog/02/20913/</link>
		<comments>https://www.emblogic.com/blog/02/20913/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 07:16:01 +0000</pubDate>
		<dc:creator><![CDATA[Saurabh Singh]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20913</guid>
		<description><![CDATA[Shell &#38; Shell Scripting Shell is the medium or intermediator between the user and computer and act as an form of wrapper around the Operating system hence termed Shell. It helps the user to connect with the system kernels to &#8230; <a href="https://www.emblogic.com/blog/02/20913/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="margin-bottom: 0cm;line-height: 100%" align="center"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: x-large"><i><span style="text-decoration: underline"><b>Shell &amp; Shell Scripting</b></span></i></span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell is the medium or intermediator between the user and computer and act as an form of wrapper around the Operating system hence termed Shell. It helps the user to connect with the system kernels to perform huge and various task hence the shell scripting is needed. Shell interpret the commands that acts as an interface for the access to operating system services such as Unix, Linux, Windows etc. Shell is the layer of programing on the outermost layer of the operating system which interprets commands and send necessary system calls to the kernel for execution of program. Today, there are many shells avavilable like bash, bsh, ksh, csh, zsh powershell etc. Among all the shells “bash” is the most and frequently used shell world wide. Shell is capable of automate very complex sequences of commands and most linux system are designed to be updated from typed in commands i.e. from shell. Shell also powers many of graphical commands that is run by users. Shell plays the most important role to better understand the computer. See below figure to better understand.</span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><a href="http://www.emblogic.com/blog/wp-content/uploads/2020/02/Shell-figure.png"><img class="wp-image-20915 size-full aligncenter" src="http://www.emblogic.com/blog/wp-content/uploads/2020/02/Shell-figure.png" alt="Shell figure" width="300" height="291" /></a></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="center"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: medium"><span style="text-decoration: underline">Linux Shell</span></span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="center">
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell classified in two categories.</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Command Line Shell</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Graphical shell</span></span></p>
</li>
</ul>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="text-decoration: underline"><b><span style="font-size: large">Command Line Shell:- </span></b></span><span style="font-size: large"><span style="text-decoration: none"><span style="font-weight: normal">Shell can be accessed by user using command line interface i.e. called Terminal in linux or Unix operating System. And Command Prompt in Windows operating System. </span></span></span><span style="font-size: large"><span style="text-decoration: none"><span style="font-weight: normal">Shell takes commands by user and call operating system to run those commands.</span></span></span></span></p>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">For Example: ls, ls -a, cat, etc.</span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large"><span style="text-decoration: underline"><b>Graphical Shell:-</b></span></span><span style="font-size: large"><span style="text-decoration: none"><span style="font-weight: normal">Graphical shells provide means for manipulating programs based on graphical user interface (GUI), by allowing for operations such as opening, closing, moving and resizing.</span></span></span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="center"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large"><span style="text-decoration: underline"><b>Shell Scripting</b></span></span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Usually, shells accepts commands as input from users and execute them. But sometimes we need to perform multiple operations using several commands hence to perform these operations we have to type all commands one by one to get the result.</span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">So to avoid repetitive work and run all commands at once we need <b>Shell </b><b>S</b><b>cripting</b>. In Shell scipting we group number of commands in a file, and when you run shell script file, shell will executes the commands in the script file order. A shell script have syntax just like any other programming language.</span></span></p>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell scripts consist below mention elements:-</span></span></p>
<ul>
<li>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell Keywords</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell commands</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Functions</span></span></p>
</li>
</ul>
<p style="margin-bottom: 0cm;line-height: 100%" align="center"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large"><span style="text-decoration: underline"><b>Advantages of Shell &amp; Shell Scripting</b></span></span></span></p>
<ul>
<li>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell can automate very complex sequences of commands.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Shell allows you to create new commands using other commands.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Scripting helps you to add new functions easily to the shell.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Writing shell scripts are much quicker and easier.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Interactive Debugging.</span></span></p>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left">
</li>
</ul>
<p style="margin-bottom: 0cm;line-height: 100%" align="center"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large"><span style="text-decoration: underline"><b>Disadvantages of Shell &amp;Shell Scripting</b></span></span></span></p>
<ul>
<li>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">Graphical environment is not userfriendly which is why scripting is being used less.</span></span></p>
</li>
<li>
<p style="margin-bottom: 0cm;line-height: 100%" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large"><span style="text-decoration: none"><span style="font-weight: normal">Provide minimal</span></span><span style="text-decoration: none"><span style="font-weight: normal"> data Structures.</span></span></span></span></p>
</li>
</ul>
<p style="margin-bottom: 0cm;font-weight: normal;line-height: 100%;text-decoration: none" align="left"><span style="font-family: Noto Serif CJK KR, serif"><span style="font-size: large">At last we must say, learning the Shell Scripting can help you better understand your computer.</span></span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/20913/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation to Fedora 29</title>
		<link>https://www.emblogic.com/blog/02/installation-to-fedora-29-4/</link>
		<comments>https://www.emblogic.com/blog/02/installation-to-fedora-29-4/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 07:10:02 +0000</pubDate>
		<dc:creator><![CDATA[Aakash Verma]]></dc:creator>
				<category><![CDATA[Project 00: Linux System / Network Administration]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20914</guid>
		<description><![CDATA[Installation to Fedora 29 Following are the minimum requirements for Fedora 29 workstation :- Recommended 2 GHz Dual Core processor. 2 GB RAM. 15 GB unallocated Hard Disk. Bootable Media (USB / DVD). Installation steps :- (Step1) :- Download the &#8230; <a href="https://www.emblogic.com/blog/02/installation-to-fedora-29-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="color: #000000" align="center"><span style="text-decoration: underline"><b>Installation to Fedora 29</b></span></p>
<ul style="color: #000000">
<li>
<p align="left"><span style="font-family: 'PT Sans', sans-serif"><b>Following are the minimum requirements for Fedora 29 workstation </b></span><span style="font-family: 'PT Sans', sans-serif"><b>:-</b></span></p>
</li>
<li>
<p align="left">Recommended 2 GHz Dual Core processor.</p>
</li>
<li>
<p align="left">2 GB RAM.</p>
</li>
<li>
<p align="left">15 GB unallocated Hard Disk.</p>
</li>
<li>
<p align="left">Bootable Media (USB / DVD).</p>
</li>
</ul>
<ul style="color: #000000">
<li>
<p align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Installation steps :-</b></span></span></p>
</li>
</ul>
<p style="color: #000000" align="left"><i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">(Step1) :- </span></span></i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Download the fedora 29 workstation ISO file :</b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>&#8211;</b></span></span></p>
<p style="color: #000000" align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Once the ISO file is downloaded ,then burn it either in USB or DVD and make it bootable.</span></span></p>
<p style="color: #000000" align="left"><i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">(Step2) :- </span></span></i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Boot your system with bootable media (USB or DVD) :&#8211;</b></span></span></p>
<p style="color: #000000" align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Reboot your system.Set the boot medium as USB or DVD from Bios settings so system boots up with bootable media.</span></span></p>
<p style="color: #000000" align="left"><i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">(Step3) :- </span></span></i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Choose Start Fedora-Workstation-Live- 29 :&#8211;</b></span></span></p>
<p style="color: #000000" align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">When the system boots up with bootable media then to begin with installation on your system’s hard disk, choose “</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b><strong>Start Fedora-Workstation-29 Live</strong></b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">“</span></span></p>
<p style="color: #000000" align="left"><i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">(Step4) :-</span></span></i><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Select Install to hard drive option :&#8211;</b></span></span></p>
<p style="color: #000000" align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Select “</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b><strong>Install to Hard Drive</strong></b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">” option to install Fedora 29 on your system’s hard disk, you can also try Fedora on your system without installing it, for that select “</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b><strong>Try Fedora</strong></b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">” Option.</span></span></p>
<p style="color: #000000" align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>(Step5) :- </i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Choose appropriate language for your Fedora 29 Installation :&#8211;</b></span></span></p>
<p style="color: #000000" align="left"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">In this step choose your language which will be used during Fedora 29 Installation.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>(Step</i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>6</i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>) :- </i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Choose Installation destination and partition scheme :&#8211;</b></span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">In this step we will choose our installation destination, means on which hard disk we will do installation.</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">In the next screen we will see the local available hard disk, select the disk that suits your installation and then choose how you want to create partitions.</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">If you choose “</span></span><span style="color: #000000"><span style="font-family: inherit"><b><strong>Automatic</strong></b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">” partition scheme, then installer will create the necessary partition for your system automatically but if you want to create your own customize partition scheme then choose “</span></span><span style="color: #000000"><span style="font-family: inherit"><b><strong>Custom</strong></b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">” option.</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">CLICK ON DONE !</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Now I show u that how to create LVM(Local Volume Manager) based custom partitions :&#8211;</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">In my case,</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">I have around 779 GiB unallocated hard drive, so I will be creating following partitions on it :-</span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">/home         &gt;&gt;&gt; 450 GiB</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">/</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">(root)</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">        &gt;&gt;&gt; 240 GiB</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>boot</i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">/efi     &gt;&gt;&gt;</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">2 GiB</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">/boot         &gt;&gt;&gt; 2 GiB</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">/var           &gt;&gt;&gt; 50 GiB</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">swap         &gt;&gt;&gt; 24 GiB</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">CLICK ON DONE ! AND CHOOSE “ACCEPT CHANGES”.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>(Step</i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>7</i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>) :-</i></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b> Select</b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b> the time zone and begin installation :&#8211;</b></span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">H</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">ere you can select the time zone which suits to your system and click on “</span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><b>Begin Installation</b></span></span><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">”.</span></span></li>
</ul>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">In this step we can see Fedora 29 Installation has been started and it is in progress.</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Once the Installation is completed, you will be prompted to restart your system.</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Click on Quit and reboot your system.</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Don’t forget the Change boot medium from Bios settings so your system boots up with hard disk.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif"><i>(Step8) :- </i><b>Set User name and Password and Start using Fedora 29.</b><b> :&#8211;</b></span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"> <span style="font-family: 'Open Sans', Arial, sans-serif">Now specify the local account (user name) and its password, later this account will be used to login to the system.</span></span></li>
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Click on Next</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">And finally, we will get below screen which confirms that we are ready to use Fedora 29.</span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: 'Open Sans', Arial, sans-serif">Click on “<strong>Start Using Fedora</strong>”</span></span></li>
</ul>
<p style="color: #000000">
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/installation-to-fedora-29-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C Language</title>
		<link>https://www.emblogic.com/blog/02/c-language/</link>
		<comments>https://www.emblogic.com/blog/02/c-language/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:57:07 +0000</pubDate>
		<dc:creator><![CDATA[Ankit Vats]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20865</guid>
		<description><![CDATA[Basic of C language C is a general-purpose programming language. It is extremely popular, simple and flexible. It is machine-independent, structured programming language which is used extensively in various applications.C is the basics language to write everything from operating systems &#8230; <a href="https://www.emblogic.com/blog/02/c-language/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="margin-bottom: 0cm; line-height: 100%; text-align: center;"><span style="font-size: xx-large;"><b>Basic of C language</b></span></p>
<p style="text-align: left;" align="left"><span style="font-size: large;">C is a general-purpose programming language. </span><span style="font-size: large;">It </span><span style="font-size: large;">is extremely popular, simple and flexible. It is machine-independent, structured programming language which is used extensively in various applications.</span><span style="font-size: large;">C </span><span style="font-size: large;">is</span><span style="font-size: large;"> the basics language to write everything from operating systems (Windows and many others) to complex programs like Oracle database, Git, Python interpreter and more. </span></p>
<h2 class="western" style="text-align: left;"><strong><span style="font-size: large;">Where is C used? </span><span style="font-size: large;">And k</span><span style="font-size: large;">ey Applications&#8230;.</span></strong></h2>
<ol style="text-align: left;">
<li><span style="font-size: large;">Most of the applications by Adobe are developed using &#8216;C&#8217; programming language.</span></li>
<li><span style="font-size: large;">It is used to develop databases. MySQL is the most popular database software which is built using &#8216;C&#8217;.</span></li>
<li>
<p align="justify"><span style="font-size: large;">It is used in developing an operating system. Operating systems such as Apple&#8217;s OS Microsoft&#8217;s Windows, and Symbian are developed using &#8216;C&#8217; language. It is used for developing desktop as well as mobile phone&#8217;s operating system.</span></p>
</li>
<li>
<p align="justify"><span style="font-size: large;">C&#8217; language is widely used in embedded systems.</span></p>
</li>
<li>
<p align="justify"><span style="font-size: large;">It is used for developing system applications</span>.</p>
</li>
</ol>
<p style="text-align: left;" align="justify"><span style="font-size: large;"><b>why </b></span><span style="font-size: large;"><b>it is necessary to learn C language first ??</b></span></p>
<ol style="text-align: left;">
<li>
<p style="font-weight: normal;" align="justify"><span style="font-size: large;">It is mother language of all other language like Pyhton , Java,PHP etc &#8230;..</span></p>
</li>
<li>
<p style="font-weight: normal;" align="justify"><span style="font-size: large;">It is low programming level language close to machine language.</span></p>
</li>
<li>
<p style="font-weight: normal;" align="justify"><span style="font-size: large;">It is procedure and structure oriented language.</span></p>
</li>
<li>
<p style="font-weight: normal;" align="justify"><span style="font-size: large;">With the help of C language hardware resources most efficiently used because it is highly compatible </span><span style="font-size: large;">with hardware..</span></p>
</li>
<li>
<p style="font-weight: normal;" align="justify"><span style="font-size: large;">It is highly portable. So it can be used more than one hardware with same source code.</span></p>
</li>
</ol>
<p style="text-align: left;" align="left"><span style="font-size: large;"><b>Best carrier option : -</b></span></p>
<p style="text-align: left;" align="left"><span style="font-size: large;"><span style="font-weight: normal;">The career in C programming is good. Mainly the programmers need the technical skill in C programming to write and develop the software programs that can be used across different platforms to control the flow of data to retrieve or store. C programming has a very good career like opportunities in different field like </span></span><span style="color: #ce181e;"><span style="font-size: large;"><span style="font-weight: normal;">robotics, Artificial intelligence, Machine learning etc</span></span></span><span style="font-size: large;"><span style="font-weight: normal;"> .The C programmers not only work in the field of computer only, but they can also pursue their career in Education, teaching, Government sectors, etc. as some of the programmers have a different specialization like in system analysis, project management, information systems, etc. The career </span></span><span style="font-size: large;"><span style="font-weight: normal;">in</span></span><span style="font-size: large;"><span style="font-weight: normal;"> C programmers is continuously growing because of the rapid social, business and technology changes.</span></span></p>
<p style="text-align: left;" align="left"><span style="font-size: large;"><b>Real life application of C language</b></span></p>
<p style="font-weight: normal; text-align: left;" align="left"><span style="font-size: large;">If you buy a feature loaded car then </span></p>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">tire pressure detection systems </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">sensors (oxygen, temperature, oil level, etc.) </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">memory for seats and mirror settings. </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">dashboard display </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">anti-lock brakes </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li><span style="font-size: large;">automatic stability control<b> </b></span></li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">climate control </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">child-proof locks </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">keyless entry </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li>
<p style="margin-bottom: 0cm;"><span style="font-size: large;">heated seats </span></p>
</li>
</ul>
<ul style="text-align: left;">
<li><span style="font-size: large;">airbag control</span></li>
</ul>
<p style="text-align: left;" align="left"><span style="font-size: large;"><span style="font-weight: normal;">A</span></span><span style="font-size: large;"><span style="font-weight: normal;">ll these lies under embebbed system programmed in </span></span><span style="color: #ce181e;"><span style="font-size: large;"><span style="font-weight: normal;">Embedded C language.</span></span></span></p>
<p style="text-align: left;"><span style="font-size: large;"><b>Conclusion: -</b></span></p>
<p style="font-weight: normal; text-align: left;"><span style="font-size: large;">The world is running on C-powered devices. Its versatility, efficiency and good performance makes it an excellent choice for high complexity data manipulation software.It’s closeness to the hardware, great portability and deterministic usage of resources makes it ideal for low level development for such things as operating system kernels and embedded software. The C programming language doesn’t seem to have an expiration date.</span></p>
<p style="font-weight: normal; text-align: left;"><span style="font-size: large;">The fact that many programming languages today are better than C for their intended use doesn’t mean that they beat C in all areas. C is still unsurpassed when performance is the priority.</span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/c-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Memory Allocation</title>
		<link>https://www.emblogic.com/blog/02/dynamic-memory-allocation/</link>
		<comments>https://www.emblogic.com/blog/02/dynamic-memory-allocation/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:46:54 +0000</pubDate>
		<dc:creator><![CDATA[Dhannajay Verma]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20900</guid>
		<description><![CDATA[DYNAMIC MEMORY ALLOCATION In industry memory management is very important. There are two types of memory which is used by the program, one is Stack segment and another is Heap segment. Stack is a special area of Computer’s memory which &#8230; <a href="https://www.emblogic.com/blog/02/dynamic-memory-allocation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p align="center"><span style="font-size: x-large"><b>DYNAMIC MEMORY ALLOCATION</b></span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">In industry memory management is very important.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">There are two types of memory which is used by the program, one is<b> Stack segment</b> and another is <b>H</b><b>eap segment.</b></span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large"><b>Stack</b> is a special area of <b>Computer’s</b> memory which stores the temporary variables created by the functions. In stack variables are stored in run time. It is a temporary storage memory.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large"><b>Heap</b> is a memory used to store global variables. Heap is not managed by the <b>CPU</b> unit. It supports dynamic memory allocation.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">Dynamic memory allocation is done with malloc(), calloc() and realloc() function.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large"><span style="font-size: large"><span style="text-decoration: underline"><b>Malloc</b></span></span><span style="text-decoration: underline"><b>:</b></span> malloc is used to allocate a block of memory in the heap segment. Malloc allocates the memory at run time. Malloc allocates the memory in the heap segment. Dynamic memory is not cared by the CPU, so it’s required to free the memory after the use to prevent the memory leakage. </span></p>
<p align="justify"><span style="font-size: large"><b><span style="font-size: large">Syntax</span>:</b></span></p>
<p align="justify"><span style="font-size: large"><b>ptr=(int*/char*)malloc(byte-size);</b></span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">where<b> ptr</b> is a pointer type of variable which points the base address of the allocated memory in heap segment. After that is pointer typecast of the data.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">If we allocates the ‘0’ bytes to the malloc then also it reserve some memory which is of size 32Kbytes.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">The usable size of the malloc is checked by the malloc_usable_size which is 24Kbytes, and it keeps extra 8bytes with it which is chunk size. </span></p>
<p align="justify"><span style="font-size: large"><span style="text-decoration: underline"><b>Working of malloc function:</b></span></span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">When we gives the size to allocate then it checks the threshold of malloc and then checks it in memory pages if available then then it allocates the memory blocks otherwise memory mapping comes into the picture(mmap).</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">Malloc allocates the memory in heap segment which have fixed size of 130Kbytes.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">When we allocates the memory then it points the address of the page which is of 130Kbyte’s size if the requirement is more than heap then the size of heap then it calls the extra memory by mmap.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">On the successful of malloc it returns the address of the allocated space. On the failure of malloc it returns the NULL .</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large"><span style="font-size: large"><span style="text-decoration: underline"><b>Calloc</b></span></span><span style="text-decoration: underline"><b>:</b></span> calloc is used to allocate dynamic memory. Dynamic memory is allocated on run time .</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">Calloc is similar to malloc the difference is, that the default values of the allocated blocks are zero in calloc and in malloc the default values are garbage. </span></p>
<p align="justify"><span style="font-size: large"><span style="text-decoration: underline"><b><span style="font-size: large">Realloc</span>:</b></span><span style="font-weight: normal">realloc is used to allocate the memory on run time whenever the extra memory required on the run time.</span></span></p>
<p align="justify"><span style="font-size: large"><span style="text-decoration: underline"><b><span style="font-size: large">Syntax</span>:</b></span></span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">ptr_new=(typr-caste)realloc(ptr,new_size in bytes);</span></p>
<p align="justify"><span style="font-size: large"><span style="font-weight: normal">where </span><b>ptr_new</b><span style="font-weight: normal"> is the address of the new allocate space, </span><b>ptr</b><span style="font-weight: normal"> is the previous size of allocated memory.</span></span></p>
<p align="justify"><span style="font-size: large"><span style="text-decoration: underline"><b>Working of realloc function:</b></span></span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">when realloc function is used then first it checks the available space in that page if the required space is available then it added the requested blocks of memory.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">If the size is not available then an extra page comes through the memory mapping concept and reallocates the space requested and it copies the data of the current address to new allocated space and frees the previous memory.</span></p>
<p style="font-weight: normal" align="justify"><span style="font-size: large">Malloc is slightly faster than Calloc than Realoc. </span></p>
<p style="font-weight: normal" align="justify">
<p style="font-weight: normal" align="justify">
<p style="font-weight: normal" align="justify">
<p style="font-weight: normal" align="justify">
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/dynamic-memory-allocation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gcc compilation process</title>
		<link>https://www.emblogic.com/blog/02/gcc-compilation-process-2/</link>
		<comments>https://www.emblogic.com/blog/02/gcc-compilation-process-2/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:41:37 +0000</pubDate>
		<dc:creator><![CDATA[Mayank Rohilla]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20896</guid>
		<description><![CDATA[&#160; Gcc compiler Compilation Process: Any c file, a user wants to compile is not directly compiled. For example, there is c file having a name hello.c, this hello.c file is not directly provided to the compiler. Hello.c file first &#8230; <a href="https://www.emblogic.com/blog/02/gcc-compilation-process-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p style="margin-bottom: 0in;line-height: 100%" align="center"><span style="font-size: x-large"><span style="font-size: xx-large"><b>Gcc</b></span> <span style="font-size: xx-large"><b>compiler</b></span></span></p>
<p style="margin-bottom: 0in;line-height: 100%" align="left"><span style="font-size: x-large"><b>Compilation Process:</b></span></p>
<p style="margin-bottom: 0in;line-height: 100%">Any c file, a user wants to compile is not directly compiled. For example, there is c file having a name hello.c, this hello.c file is not directly provided to the compiler. Hello.c file first of all provided to the gcc preprocessor , this preprocessor converts this hello.c file into hello.i file. This hello.i file consists of two file stdio.h and hello.c file. The combination these two files together makes a new file which is hello.c file . This hello.c file is provided to the gcc compiler. The gcc compiler is basically a two pass compiler which passes file two times . Then the file moves to the lexical analysis ,this lexical analysis breaks the content of file into tokens , then the tokens are provided to the syntax analysis which analysis all the tokens of file according to the c format ,this analysis gave us an errors ,saying that tokens used are appropriate or not .After the analysis process, file passes through the intermediate code generation, code optimization and object code generation. After the 2-pass compilation process, the format of file changes into different format which is in hello.s format .The output of the compiler is provided to the assembly, which is in the format of hello.s file. This hello.s file through assembly passes to the assembler. Assembler converts this hello.s file into hello.o file. This hello.o file passes through the symbol table, data segment and code segment process . After passing through these processes, file is provided to linker .The output of linker generates a new file named as a.out file which is in executable format. This executable file is then provided to the executable linkable format (elf), data segment and code segment.</p>
<p style="margin-bottom: 0in;line-height: 100%">After this whole process loader loads the file into the RAM. File spreads out in the ram. Ram is basically a process context (virtual address space content ) which consists of stack segment, file descripter, data segment and code segment. Stack segment consists of local variable of the file. File descripter consists of three ports 0,1,2 . These three ports are connected to the standard input, standard output and standard error respectively via stream. Stream is used for moving data wheather for input, output or for error. Standard input is used for entering the data to the port 0. standard output takes out the data from port 1. And standard error is to takes out the error from port 2. Data segment consists of various variables like global variable, static variable, extreme variable, register variable, volatile variable, constant variable, macros variable and preprocessor directive. Code segment consists of compiled code. Stack segment, file directive, data segment and code segment all these have some logical addresses.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/gcc-compilation-process-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler process in &#8216;C&#8217;</title>
		<link>https://www.emblogic.com/blog/02/compiler-process-in-c/</link>
		<comments>https://www.emblogic.com/blog/02/compiler-process-in-c/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:35:15 +0000</pubDate>
		<dc:creator><![CDATA[Ayush Dhiman]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20872</guid>
		<description><![CDATA[Compiler is a software ,which is use for converting the code language to machine language. the c programe are work in 5 process- Preprocessor compiler assembler linker loader Preprocessor-In the preprocessor a preprocessor directive (#) and a header file (stdio.h) &#8230; <a href="https://www.emblogic.com/blog/02/compiler-process-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="color: #000000">Compiler is a software ,which is use for converting the code language to machine language.</p>
<p style="color: #000000">the c programe are work in 5 process-</p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">Preprocessor</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">compiler</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">assembler</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">linker</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">loader</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Preprocessor</b></span><span style="text-decoration: underline">-</span>In the preprocessor a preprocessor directive (#) and a header file (stdio.h)</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">int main() the programe are start for exicute.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">after that type a code &#8220;hello world&#8221; use c libraries.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and the last format is return 0; in this point the programe is success full exicute.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">after that this process the preprocessor also give a hello.i file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in hello.i file are include 2. files stdio.h+hello.c file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Compiler</b></span><span style="text-decoration: underline">-</span>in this process the compiler are work in 2 pras.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">1.pras </span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">lexical analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">syntax analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">intermediate code genration</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">code optimization</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">the 1st pras process is create a symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">2. pras</span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">lexical analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">syntax analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">intermediate code genration</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">code optimization</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">object code genration</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and the 2nd pras is compile the code use symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and compiler create a &#8221; hello.s&#8221; file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Lexical analysis</b></span>-in lexical process the code is break in tokken,</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">example- hello world  &#8211;&gt;h e l l o w o r l d. </span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Syntax analysis</b></span><span style="text-decoration: underline">-</span>in syntax process the cheak the code in right format.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">example (),:,&lt;,&gt;,&#8221;&#8221;&#8221;.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Intermediate code genration</b></span><b>-</b>in intermediate code genration process the code token also arrange in  highest priority order.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Code optimization</b></span>-in code optimization process the compiler also optimize code  and resolve  minor error.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Object code genration-</b></span>in object code genration process the compiler are genrate the full code in objective form.</span></span></p>
<p style="color: #000000"><span style="color: #000000"> <span style="font-family: Arial, Verdana">in this process the fully code also link of symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in hello.s file, include &#8220;code,data segment,symbol table&#8221;.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Assembler</b></span>-   after the compiler process the code also convert in  assembly language.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and make a hello.o file in .o file include links,data ,code, refrence symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>linker</b></span><span style="text-decoration: underline">- </span>the linker process  also linked the code for c library and symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and make exicutable linkable format and output file-&gt; a.out.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in this file stored in secondry memory .</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">programe  compiling process is complete</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Loader- </b></span>the programe exicutable linkable format file (secondry memory) to process context (primary memory) through loader.</span></span></p>
<p style="color: #000000">
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/compiler-process-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Precision Time Protocol</title>
		<link>https://www.emblogic.com/blog/02/precision-time-protocol/</link>
		<comments>https://www.emblogic.com/blog/02/precision-time-protocol/#comments</comments>
		<pubDate>Fri, 03 Feb 2017 04:09:07 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13879</guid>
		<description><![CDATA[The Precision Time Protocol (PTP) is a protocol used to synchronize clocks throughout a computer network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems.[1] PTP was originally &#8230; <a href="https://www.emblogic.com/blog/02/precision-time-protocol/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The Precision Time Protocol (PTP) is a protocol used to synchronize clocks throughout a computer network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems.[1]</p>
<p>PTP was originally defined in the IEEE 1588-2002 standard, officially entitled &#8220;Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems&#8221; and published in 2002. In 2008, IEEE 1588-2008 was released as a revised standard; also known as PTP Version 2, it improves accuracy, precision and robustness but is not backward compatible with the original 2002 version.[2]</p>
<p>&#8220;IEEE 1588 is designed to fill a niche not well served by either of the two dominant protocols, NTP and GPS. IEEE 1588 is designed for local systems requiring accuracies beyond those attainable using NTP. It is also designed for applications that cannot bear the cost of a GPS receiver at each node, or for which GPS signals are inaccessible</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/precision-time-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gcc- tool chain</title>
		<link>https://www.emblogic.com/blog/02/gcc-tool-chain/</link>
		<comments>https://www.emblogic.com/blog/02/gcc-tool-chain/#comments</comments>
		<pubDate>Thu, 02 Feb 2017 11:24:44 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13875</guid>
		<description><![CDATA[GCC is a popular tool chain that can generate executables for wide range of architectures including x86, ARM v4/v5/v6/v7, and many others. In personal computers GNU GCC is a compiler that compiles an application written for LINUX X86 PC. When &#8230; <a href="https://www.emblogic.com/blog/02/gcc-tool-chain/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>GCC is a popular tool chain that can generate executables for wide range of architectures including x86, ARM v4/v5/v6/v7, and many others. In personal computers GNU GCC is a compiler that compiles an application written for LINUX X86 PC. When the host and target architectures are different, the tool chain is called &#8221; cross compiler &#8220;.<br />
You may come across different tool chains to cross compile your application for ARM like arm-none-linux-gnueabi, arm-none-eabi, arm-eabi, arm-fsl-linux-gnueabi-gcc etc.</p>
<p>Tool chains have  a loose name convention like arch [-vendor] [-os] &#8211; eabi<br />
arch &#8211;      refers to target architecture (which in our case is ARM)<br />
vendor &#8211;  refers to toolchain supplier<br />
os &#8211;         refers to the target operating system<br />
eabi &#8211;      refers to Embedded Application Binary Interface</p>
<p>some illustrations as follows :</p>
<p>arm-none-eabi &#8211; This tool chain targets for ARM architecture, has no vendor, does not target an operating system and complies with the ARM EABI.<br />
arm-none-linux-gnueabi &#8211; This toolchain targets the ARM architecture, has no vendor, creates binaries that run on the Linux operating system, and uses the GNU EABI. It is used to target ARM-based Linux systems.</p>
<p>So, If you built your application &#8220;helloworld.c&#8221; with arm-none-linux-gnueabi-gcc (or) arm-fsl-linux-gnueabi-gcc, executable will work on your ARM target board as the tool chain has only difference in vendor.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/gcc-tool-chain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Access to Linux</title>
		<link>https://www.emblogic.com/blog/02/remote-access-to-linux/</link>
		<comments>https://www.emblogic.com/blog/02/remote-access-to-linux/#comments</comments>
		<pubDate>Wed, 01 Feb 2017 12:26:34 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13872</guid>
		<description><![CDATA[Our office network contains several Windows computers and one Linux desktop. I recently switched from Windows to Linux for most of my work, and have enjoyed its many advantages. But as I became more dependent on the information and applications &#8230; <a href="https://www.emblogic.com/blog/02/remote-access-to-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Our office network contains several Windows computers and one Linux desktop. I recently switched from Windows to Linux for most of my work, and have enjoyed its many advantages. But as I became more dependent on the information and applications stored in that computer, I wondered how I could use that system from other locations. This article describes how I solved that problem and shows how you can set up remote access to Linux computers.</p>
<p>My Linux distribution is SUSE Linux 10.1. Our network consists of a Linksys WRT54GS wireless router, a Linksys WMP54G wireless access card in the Linux computer, a Linksys WRE54G repeater to boost the signal quality, and a Maxtor Shared Storage drive, so all the computers have shared storage. My goals were to access the files on both Linux disks (local hard drive and shared storage) and to run applications on the Linux system from any other computer on the Internet. I accomplished these tasks in three largely independent ways, which you can mix and match to suit your needs:<br />
·          Secure Shell (SSH)<br />
·          File Transfer Protocol (FTP)<br />
·          SUSE Linux VNC-based remote administration feature<br />
As a starting point, I assume that your Linux installation and network are already set up, using components similar to mine. The shared file server is not required, but if you have one, see the sidebar (editor: insert link here) for instructions about mounting this resource.</p>
<p>SSH</p>
<p>SSH is the Secure SHell service. It is similar to telnet, but with more features, and every transaction is encrypted. Using SSH, you are provided a shell nearly identical to one available locally. This provides all of the command line functionality of Linux. Also, curses applications (like YaST) work through SSH. Keep in mind that because the shell is identical to one available locally, you cannot move files between your SSH client&#8217;s system and the SSH server system. For file transfer, FTP is required.</p>
<p>To set up SSH, open up the YaST Control Center and use the Software Management module to make sure you have the package openssh installed. Next, enable the SSH server on your system by selecting YaST&#8217;s System tab, opening System Services, and ensuring that the service ssh is enabled.</p>
<p>When you want to access this SSH server from a remote computer, use the ssh command in Linux and Mac OS X. Type the following at the remote computer:</p>
<p>ssh </p>
<p>The IP address you use here is either: your company’s static IP address, or the address assigned to your router by your Internet service provider (ISP). If you do not know the IP address of your router, you can find it by visiting www.whatismyipaddress.com.</p>
<p>For Windows, the application PuTTY is the preferred SSH client.</p>
<p>FTP</p>
<p>FTP is the File Transfer Protocol. It can be used to move files between where you are (the remote client) and the computer you&#8217;re connecting to (your office Linux system).</p>
<p>To set up your Linux computer as an FTP server, use YaST&#8217;s Software Management module to make sure you have the vsftpd package installed. Then, check the System Services module to verify that vsftpd is enabled.</p>
<p>Before you can begin to use the FTP server properly, it needs to be configured. The default configuration is for a read-only anonymous server, without permission to see the directory tree. This is fairly useless. You probably want to modify FTP access to allow login with the normal accounts of the system and with write permissions. The general configuration file that vsftpd uses is /etc/vsftpd.conf, which is only writable by root. Make the following changes to this file, which appear below in the same order as in the file.<br />
·          Uncomment the line that says “#write_enable=YES”. This permits actions which modify files on your system.<br />
·          Uncomment and change the line “#ftpd_banner=&#8221;Welcome to FOOBAR FTP service.&#8221;” if you want to. This is a message sent to the client when they log in.<br />
·          Uncomment the line “#local_enable=YES”. This allows login with the user accounts of the system. These are listed in /etc/passwd.<br />
·          Change the line “anonymous_enable=YES” to say “anonymous_enable=NO”. There is no need to allow random passersby to access your system.<br />
·          Uncomment the lines “#log_ftp_protocol=YES” and “#xferlog_enable=YES”, which will enable logging of all actions.<br />
To access the FTP service from a remote computer, you can use a command line FTP client. Many are available for Windows, Mac OS X, and Linux. At the FTP command line, just type</p>
<p>ftp </p>
<p>Also, most web browsers support the FTP protocol directly, so you can type ftp:// into the browser bar. Personally, I recommend a GUI FTP tool rather than command line or browser-based utility. I like Filezilla on Windows.</p>
<p>Linux Remote Desktop</p>
<p>Remote desktops create an “almost like you are there” experience for remote users. With a high-speed connection, this is a very nice way to work on your Linux system from another location. SUSE’s remote desktop is based on VNC. To begin, make sure that the VNC-related packages (tightvnc, xorg-x11-Xvnc, kdenetwork3-vnc) are installed on your Linux computer. Next, start the Remote Administration module on the YaST System tab, choose “Allow Remote Administration” and click “Finish”.</p>
<p>To access your Linux system from a remote computer, use a VNC client (RealVNC, TightVNC, UltraVNC, Krdc or KVPnc) and connect to port 5901 of your router’s IP address. If you are somewhere that a VNC client is not available (and installing one is not desirable) the SUSE VNC server allows another connection method. Type :5801 into a standard web browser, and a Java applet will start that remotely mimics your Linux desktop.</p>
<p>Setting up the Router with Port Mapping</p>
<p>There is one last crucial step before any of this can work. Your router must be modified to allow incoming connections to the services you just established. Using a web browser on your office network, enter the IP address of your router’s control panel. (This is usually something like 192.168.1.1.) You want to configure port forwarding, also called port mapping. On the Linksys WRT54GS router, this is the first tab under Applications and Gaming. Set your router to forward ports 20, 21, 22, 5801, and 5901 for TCP and UDP traffic, for any application, to the IP address assigned to the Linux computer inside your network. (This address is probably something like 192.168.1.6.) Ports 20 and 21 are for FTP, port 22 is for SSH, and ports 5801 and 5901 are for the VNC remote desktop. To find the internal IP address of your Linux system, type ifconfig in a Linux root shell.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/remote-access-to-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and setting TFTPD in Ubuntu</title>
		<link>https://www.emblogic.com/blog/02/installing-and-setting-tftpd-in-ubuntu/</link>
		<comments>https://www.emblogic.com/blog/02/installing-and-setting-tftpd-in-ubuntu/#comments</comments>
		<pubDate>Wed, 01 Feb 2017 04:04:22 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13870</guid>
		<description><![CDATA[Installing and setting TFTPD in Ubuntu 1. Install tftpd and related packages. $ sudo apt-get install xinetd tftpd tftp 2. Create /etc/xinetd.d/tftp and put this entry: service tftp { protocol = udp port = 69 socket_type = dgram wait = &#8230; <a href="https://www.emblogic.com/blog/02/installing-and-setting-tftpd-in-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Installing and setting TFTPD in Ubuntu</p>
<p>1. Install tftpd and related packages.<br />
$ sudo apt-get install xinetd tftpd tftp<br />
2. Create /etc/xinetd.d/tftp and put this entry:</p>
<p>service tftp<br />
{<br />
protocol        = udp<br />
port            = 69<br />
socket_type     = dgram<br />
wait            = yes<br />
user            = nobody<br />
server          = /usr/sbin/in.tftpd<br />
server_args     = /tftpboot<br />
disable         = no<br />
}</p>
<p>3. Make /tftpboot directory</p>
<p>$ sudo mkdir /tftpboot<br />
$ sudo chmod -R 777 /tftpboot<br />
$ sudo chown -R nobody /tftpboot</p>
<p>4. Start tftpd through xinetd</p>
<p>$ sudo /etc/init.d/xinetd start</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/installing-and-setting-tftpd-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPIO Device driver</title>
		<link>https://www.emblogic.com/blog/01/gpio-device-driver/</link>
		<comments>https://www.emblogic.com/blog/01/gpio-device-driver/#comments</comments>
		<pubDate>Wed, 25 Jan 2017 12:26:57 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13863</guid>
		<description><![CDATA[GPIO Device driver Device node creation without using “mknod” In my last post, where i showed how to write a character gpio driver, i had used mknod for device node creation. Without mknod the device files would not have been &#8230; <a href="https://www.emblogic.com/blog/01/gpio-device-driver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>GPIO Device driver</p>
<p>Device node creation without using “mknod”<br />
In my last post, where i showed how to write a character gpio driver, i had used mknod for device node creation. Without mknod the device files would not have been created under /dev. So, we had to manually create the device node under /dev using mknod. Now, cannot this manual work be done away with? Of course, it can be done!!.<br />
The automatic creation of device files can be handled with udev. One has to ensure that the major and minor numbers assigned to a device controlled by the driver are exported to user space through the sysfs interface. To know more about this, read “The Linux Device Module” chapter from the Linux Device Drivers book.<br />
Below i am posting the source code for the driver module, the user space application and the Makefile. The user space application and Makefile remain the same. I have only changed the name of the device node under /dev from gpio to gpio_drv. So, the user space application code accordingly reflects this.<br />
The Driver Module:<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
 <br />
#define GPIO_NUMBER    149     //any  valid gpio number<br />
 <br />
static dev_t first;         // Global variable for the first device number<br />
static struct cdev c_dev;     // Global variable for the character device structure<br />
static struct class *cl;     // Global variable for the device class<br />
 <br />
static int init_result;<br />
 <br />
static ssize_t gpio_read( struct file* F, char *buf, size_t count, loff_t *f_pos )<br />
{<br />
    char buffer[10];<br />
 <br />
    int temp = gpio_get_value(GPIO_NUMBER);<br />
 <br />
    sprintf( buffer, &#8220;%1d&#8221; , temp );<br />
 <br />
    count = sizeof( buffer );<br />
 <br />
    if( copy_to_user( buf, buffer, count ) )<br />
    {<br />
        return -EFAULT;<br />
    }<br />
 <br />
    if( *f_pos == 0 )<br />
    {<br />
        *f_pos += 1;<br />
        return 1;<br />
    }<br />
    else<br />
    {<br />
        return 0;<br />
    }<br />
}<br />
 <br />
static ssize_t gpio_write( struct file* F, const char *buf, size_t count, loff_t *f_pos )<br />
{<br />
 <br />
    printk(KERN_INFO &#8220;Executing WRITE.\n&#8221;);<br />
 <br />
    switch( buf[0] )<br />
    {<br />
        case &#8217;0&#8242;:<br />
        gpio_set_value(GPIO_NUMBER, 0);<br />
        break;<br />
 <br />
        case &#8217;1&#8242;:<br />
        gpio_set_value(GPIO_NUMBER, 1);<br />
        break;<br />
 <br />
        default:<br />
        printk(&#8220;Wrong option.\n&#8221;);<br />
        break;<br />
    }<br />
    return count;<br />
}<br />
 <br />
static int gpio_open( struct inode *inode, struct file *file )<br />
{<br />
    return 0;<br />
}<br />
 <br />
static int gpio_close( struct inode *inode, struct file *file )<br />
{<br />
    return 0;<br />
}<br />
 <br />
static struct file_operations FileOps =<br />
{<br />
    .owner        = THIS_MODULE,<br />
    .open         = gpio_open,<br />
    .read         = gpio_read,<br />
    .write        = gpio_write,<br />
    .release      = gpio_close,<br />
};<br />
 <br />
static int init_gpio(void)<br />
{<br />
    //init_result = register_chrdev( 0, &#8220;gpio&#8221;, &amp;FileOps );<br />
 <br />
    init_result = alloc_chrdev_region( &amp;first, 0, 1, &#8220;gpio_drv&#8221; );<br />
 <br />
    if( 0 &gt; init_result )<br />
    {<br />
        printk( KERN_ALERT &#8220;Device Registration failed\n&#8221; );<br />
        return -1;<br />
    }<br />
    //else<br />
    //{<br />
    //    printk( KERN_ALERT &#8220;Major number is: %d\n&#8221;,init_result );<br />
    //    return 0;<br />
    //}<br />
 <br />
    if ( (cl = class_create( THIS_MODULE, &#8220;chardev&#8221; ) ) == NULL )<br />
    {<br />
        printk( KERN_ALERT &#8220;Class creation failed\n&#8221; );<br />
        unregister_chrdev_region( first, 1 );<br />
        return -1;<br />
    }<br />
 <br />
    if( device_create( cl, NULL, first, NULL, &#8220;gpio_drv&#8221; ) == NULL )<br />
    {<br />
        printk( KERN_ALERT &#8220;Device creation failed\n&#8221; );<br />
        class_destroy(cl);<br />
        unregister_chrdev_region( first, 1 );<br />
        return -1;<br />
    }<br />
 <br />
    cdev_init( &amp;c_dev, &amp;FileOps );<br />
 <br />
    if( cdev_add( &amp;c_dev, first, 1 ) == -1)<br />
    {<br />
        printk( KERN_ALERT &#8220;Device addition failed\n&#8221; );<br />
        device_destroy( cl, first );<br />
        class_destroy( cl );<br />
        unregister_chrdev_region( first, 1 );<br />
        return -1;<br />
    }<br />
 <br />
    return 0;<br />
}<br />
 <br />
void cleanup_gpio(void)<br />
{<br />
    //unregister_chrdev( init_result, &#8220;gpio&#8221; );<br />
 <br />
    cdev_del( &amp;c_dev );<br />
    device_destroy( cl, first );<br />
    class_destroy( cl );<br />
    unregister_chrdev_region( first, 1 );<br />
 <br />
    printk(KERN_ALERT &#8220;Device unregistered\n&#8221;);<br />
}<br />
 <br />
module_init(init_gpio);<br />
module_exit(cleanup_gpio);<br />
 <br />
MODULE_AUTHOR(&#8220;Sanchayan&#8221;);<br />
MODULE_LICENSE(&#8220;GPL&#8221;);<br />
MODULE_DESCRIPTION(&#8220;Beagleboard-xM GPIO Driver&#8221;);<br />
The User Space Application:<br />
#include<br />
#include<br />
 <br />
int main(void)<br />
{<br />
    int fd;<br />
    char gpio_buffer[10];<br />
    char choice[10];<br />
 <br />
    fd = open( &#8220;/dev/gpio_drv&#8221;, O_RDWR );<br />
 <br />
    printf( &#8220;Value of fd is: %d&#8221;, fd );<br />
 <br />
    if( fd  trigger” in their respective directories.<br />
Now, run the user space application by typing ./gpio_app on the command line prompt. You will be prompted to enter the value “0? or “1? to turn off or turn on the led. You can observe the state of the led pin on your board after this.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/gpio-device-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic board bring up of Olinuxino  board &amp; solved libncurses issue.</title>
		<link>https://www.emblogic.com/blog/01/basic-board-bring-up-of-olinuxino-board-solved-libncurses-issue/</link>
		<comments>https://www.emblogic.com/blog/01/basic-board-bring-up-of-olinuxino-board-solved-libncurses-issue/#comments</comments>
		<pubDate>Fri, 20 Jan 2017 13:03:50 +0000</pubDate>
		<dc:creator><![CDATA[Raghu Nath]]></dc:creator>
				<category><![CDATA[ARM Embedded Processors]]></category>
		<category><![CDATA[Embedded Linux]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13858</guid>
		<description><![CDATA[Built the U-boot successfully through the host and built the kernel and wrote the files in sd card. There was an issue while configuring menu in linux-sunki folder, the issue was libncurses problem in fedora. Then I installed libncurses by &#8230; <a href="https://www.emblogic.com/blog/01/basic-board-bring-up-of-olinuxino-board-solved-libncurses-issue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Built the U-boot successfully through the host  and built the kernel and wrote the files in sd card.<br />
There was an issue while configuring menu in linux-sunki folder, the issue was <strong>libncurses</strong> problem in fedora.<br />
Then I installed libncurses by <strong>yum install ncurses-*</strong> .<br />
After installing the libncurses i was able to access the menuconfig.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/basic-board-bring-up-of-olinuxino-board-solved-libncurses-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Write Your Own Linux Kernel Module with a Simple Example</title>
		<link>https://www.emblogic.com/blog/01/how-to-write-your-own-linux-kernel-module-with-a-simple-example/</link>
		<comments>https://www.emblogic.com/blog/01/how-to-write-your-own-linux-kernel-module-with-a-simple-example/#comments</comments>
		<pubDate>Tue, 10 Jan 2017 04:13:17 +0000</pubDate>
		<dc:creator><![CDATA[Shubham Gupta]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13848</guid>
		<description><![CDATA[What are kernel modules? Kernel modules are piece of code, that can be loaded and unloaded from kernel on demand. Kernel modules offers an easy way to extend the functionality of the base kernel without having to rebuild or recompile &#8230; <a href="https://www.emblogic.com/blog/01/how-to-write-your-own-linux-kernel-module-with-a-simple-example/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>What are kernel modules?</p>
<p>Kernel modules are piece of code, that can be loaded and unloaded from kernel on demand.</p>
<p>Kernel modules offers an easy way to extend the functionality of the base kernel without having to rebuild or recompile the kernel again. Most of the drivers are implemented as a Linux kernel modules. When those drivers are not needed, we can unload only that specific driver, which will reduce the kernel image size.</p>
<p>The kernel modules will have a .ko extension. On a normal linux system, the kernel modules will reside inside /lib/modules//kernel/ directory.</p>
<p>Earlier we discussed how to compile a kernel from the source.</p>
<p>This tutorial explains how to write a Kernel module using a simple Hello World example.<br />
I. Utilities to Manipulate Kernel Modules<br />
1. lsmod – List Modules that Loaded Already</p>
<p>lsmod command will list modules that are already loaded in the kernel as shown beblow.</p>
<p># lsmod<br />
Module                  Size  Used by<br />
ppp_deflate            12806  0<br />
zlib_deflate           26445  1 ppp_deflate<br />
bsd_comp               12785  0<br />
..</p>
<p>2. insmod – Insert Module into Kernel</p>
<p>insmod command will insert a new module into the kernel as shown below.</p>
<p># insmod /lib/modules/3.5.0-19-generic/kernel/fs/squashfs/squashfs.ko</p>
<p># lsmod | grep &#8220;squash&#8221;<br />
squashfs               35834  0</p>
<p>3. modinfo – Display Module Info</p>
<p>modinfo command will display information about a kernel module as shown below.</p>
<p># modinfo /lib/modules/3.5.0-19-generic/kernel/fs/squashfs/squashfs.ko</p>
<p>filename:       /lib/modules/3.5.0-19-generic/kernel/fs/squashfs/squashfs.ko<br />
license:        GPL<br />
author:         Phillip Lougher<br />
description:    squashfs 4.0, a compressed read-only filesystem<br />
srcversion:     89B46A0667BD5F2494C4C72<br />
depends:<br />
intree:         Y<br />
vermagic:       3.5.0-19-generic SMP mod_unload modversions 686</p>
<p>4. rmmod – Remove Module from Kernel</p>
<p>rmmod command will remove a module from the kernel. You cannot remove a module which is already used by any program.</p>
<p># rmmod squashfs.ko</p>
<p>5. modprobe – Add or Remove modules from the kernel</p>
<p>modprobe is an intelligent command which will load/unload modules based on the dependency between modules. Refer to modprobe commands for more detailed examples.</p>
<p>II. Write a Simple Hello World Kernel Module</p>
<p>1. Installing the linux headers</p>
<p>You need to install the linux-headers-.. first as shown below. Depending on your distro, use apt-get or yum.</p>
<p># apt-get install build-essential linux-headers-$(uname -r)</p>
<p>2. Hello World Module Source Code</p>
<p>Next, create the following hello.c module in C programming language.</p>
<p>#include     // included for all kernel modules<br />
#include     // included for KERN_INFO<br />
#include       // included for __init and __exit macros</p>
<p>MODULE_LICENSE(&#8220;GPL&#8221;);<br />
MODULE_AUTHOR(&#8220;Lakshmanan&#8221;);<br />
MODULE_DESCRIPTION(&#8220;A Simple Hello World module&#8221;);</p>
<p>static int __init hello_init(void)<br />
{<br />
    printk(KERN_INFO &#8220;Hello world!\n&#8221;);<br />
    return 0;    // Non-zero return means that the module couldn&#8217;t be loaded.<br />
}</p>
<p>static void __exit hello_cleanup(void)<br />
{<br />
    printk(KERN_INFO &#8220;Cleaning up module.\n&#8221;);<br />
}</p>
<p>module_init(hello_init);<br />
module_exit(hello_cleanup);</p>
<p>Warning: All kernel modules will operate on kernel space, a highly privileged mode. So be careful with what you write in a kernel module.</p>
<p>3. Create Makefile to Compile Kernel Module</p>
<p>The following makefile can be used to compile the above basic hello world kernel module.</p>
<p>obj-m += hello.o</p>
<p>all:<br />
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules</p>
<p>clean:<br />
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean</p>
<p>Use the make command to compile hello world kernel module as shown below.</p>
<p># make</p>
<p>make -C /lib/modules/3.5.0-19-generic/build M=/home/lakshmanan/a modules<br />
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-19-generic&#8217;<br />
  CC [M]  /home/lakshmanan/a/hello.o<br />
  Building modules, stage 2.<br />
  MODPOST 1 modules<br />
  CC      /home/lakshmanan/a/hello.mod.o<br />
  LD [M]  /home/lakshmanan/a/hello.ko<br />
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-19-generic&#8217;</p>
<p>The above will create hello.ko file, which is our sample Kernel module.<br />
4. Insert or Remove the Sample Kernel Module</p>
<p>Now that we have our hello.ko file, we can insert this module to the kernel by using insmod command as shown below.</p>
<p># insmod hello.ko</p>
<p># dmesg | tail -1<br />
[ 8394.731865] Hello world!</p>
<p># rmmod hello.ko</p>
<p># dmesg | tail -1<br />
[ 8707.989819] Cleaning up module.</p>
<p>When a module is inserted into the kernel, the module_init macro will be invoked, which will call the function hello_init. Similarly, when the module is removed with rmmod, module_exit macro will be invoked, which will call the hello_exit. Using dmesg command, we can see the output from the sample Kernel module.</p>
<p>Please note that printk is a function which is defined in kernel, and it behaves similar to the printf in the IO library. Remember that you cannot use any of the library functions from the kernel module.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/how-to-write-your-own-linux-kernel-module-with-a-simple-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
