<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[The IIO Dummy Project]]></title>
  <link href="http://cristina2689.github.io/atom.xml" rel="self"/>
  <link href="http://cristina2689.github.io/"/>
  <updated>2016-03-14T02:19:13+02:00</updated>
  <id>http://cristina2689.github.io/</id>
  <author>
    <name><![CDATA[Cristina Georgiana Opriceana]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[LinuxCon 2016 Dublin]]></title>
    <link href="http://cristina2689.github.io/blog/2016/03/05/linuxcon-2016-report/"/>
    <updated>2016-03-05T15:12:08+02:00</updated>
    <id>http://cristina2689.github.io/blog/2016/03/05/linuxcon-2016-report</id>
    <content type="html"><![CDATA[<p>In the fall I attended LinuxCon 2015 in Dublin, Ireland as part of my internship at The Linux Foundation and I also gave a presentation on the results of my work in the IIO Dummy Driver, which went out of the staging area after the summer.</p>

<p>There were three days of technical presentations, with a Keynote Presentation in the end of each day and several receptions for chat and interaction in the evening.</p>

<p>I was most interested in the Linux Kernel presentations, but I noticed there were a lot of IoT and Cloud services presentations, since these represent some of the trends in administration lately.</p>

<!--more-->


<p>I joined the round 9 and round 10 interns, together with the coordinator of the program, Julia Lawell to constitute a panel on Linux Kernel Internship Reports, but this happend only on the 3rd day.</p>

<p>The group coming from Romania was pretty large, we had 3 interns that gave presentations, some teaching assistants and professors from my university and also former interns in the internship program. Going to LinuxCon is somehow a tradition and the group becomes larger and larger every year.</p>

<p>One of my favourite presentations was the one given by Michael Kerrisk (yes, the author of <code>The Linux Programming Interface</code>) on <code>seccomp</code> and the current capabilites of it, such as selective permission and investigation of system calls that a process can make.
The presentation went through the beginnings of seccomp and then focused on Berkeley Packet Filter virtual machine, implemented in the kernel. Michael proposed some examples of filters and also integration of a program with BPF filters, which made the presentation more hands-on and provided high interaction with the public.</p>

<p>I also attended Harald König&rsquo;s presentation on <code>Using strace to understand bash</code>, which were mostly things I&rsquo;ve known before, such as wildcards, quoting and some nice examples of strace investigation, such as seeing what login scripts have been executed in bash.</p>

<p>Another presentation that I really liked was from the guys of <code>Free Electrons</code>. I&rsquo;ve been using the documentation of free electrons a lot, but I had no idea they are just  9-10 people working in the company, with such a great contribution of embedded Linux.</p>

<p>The second day closed with Fireside Chat, in which Dirk Hohndel interviewed Linus Torvalds and it was for sure what everyone had expected to see. They talked about kernel security, future plans for Linux, the trouble of finding maintainers, not only contributions and also what would be the next project of Linus or if he&rsquo;s thinking of one. Linus had a particulary funny answer, suggesting that he created Git, Linux because no one else provided him with what he needed, adding that: <code>"I’d much rather coast along and be lazy. Anytime I need to start a new project,</code> <code>that’s a failure for the rest of the world"</code>.</p>

<p>There was also room for the famous joke with Linus being hit by a bus, especially since in the UK they drive on the left side.</p>

<p>I also had the chance to meet Linus Torvalds and GregKH in person at the ending reception, held in the Guiness Storehouse in Dublin. Pretty awesome!</p>

<p><img src="https://scontent-frt3-1.xx.fbcdn.net/hphotos-xta1/v/t1.0-9/12122788_10207887431046501_8984541342106139055_n.jpg?oh=a0a0657087673f79d569c525672b5dd7&amp;oe=578CB914" height="420" width="700" alt="LinuxCon" /></p>

<p>On the 3rd day I had the opportunity to present my work over the summer on the Linux Kernel Internship Panel, introduced by Julia Lawell, the coordinator of the program. Meeting the other interns, sharing experiences and impressions on the internship and also meeting developers that I&rsquo;ve seen only on mailing lists made me see what truly is the Linux open source community.</p>

<p><img src="https://scontent-frt3-1.xx.fbcdn.net/hphotos-xtf1/v/t1.0-9/10472157_10208926041931124_7822473924208183624_n.jpg?oh=f5e17e6b221877983f6fc7f52009a38a&amp;oe=5789E44C" height="420" width="700" alt="Presentationphoto" /></p>

<p>Since the days were so busy with presentations and all, I didn&rsquo;t have the time to go visit too much, but Dublin has the air of an industrial and also modern city with pittoresque pubs in which one can have a nice time. I really enjoyed it.</p>

<p>All in all, attending LinuxCon in Ireland was technically enligthening and fun, no need to mention the beer!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Illustrated Guide to Linux First Patch]]></title>
    <link href="http://cristina2689.github.io/blog/2015/06/13/the-illustrated-guide-to-linux-first-patch/"/>
    <updated>2015-06-13T01:17:37+03:00</updated>
    <id>http://cristina2689.github.io/blog/2015/06/13/the-illustrated-guide-to-linux-first-patch</id>
    <content type="html"><![CDATA[<h2>Step 1: Standards and practices</h2>

<p><img src="https://imgs.xkcd.com/comics/standards.png" alt="alt text" /></p>

<p>Everything you have to know for working on the Linux Kernel has been created by Linus Torvalds.
That is the Linux Kernel itself and git.</p>

<p>Oh.. almost everything. Linus seemed content with the C programming language.</p>

<p>Linux kernel is currently under a mixture of code following C89/C90 and C99 standards. By taking a
look into the Makefiles you&rsquo;ll find the majority compiling with -std=gnu89, that is to say
they are using the C89/C90 standard with some extensions.</p>

<!--more-->


<p>If you ever wonder why they still allow errors like these &ldquo;error: ‘for’ loop initial declarations are only allowed in C99 mode&rdquo;
Linus has given a <a href="https://lkml.org/lkml/2012/4/12/18">legitimate answer</a> which says that it&rsquo;s mainly a standard for keeping code clean and easy to follw through the sources.</p>

<p>Why git?
CVS and SVN seemd a <a href="https://www.youtube.com/watch?v=4XpnKHJAok8">terrible idea</a> at that time as a version control system and what  do you do when you really don&rsquo;t like a tool?
That&rsquo;s right, you&rsquo;ve probably guessed.</p>

<p>So, the step 0 would be to setup git and download the latest kernel version. Also,make sure to fetch the changes every time you start working on
something, so that your patches won&rsquo;t be rejected when the maintainer tries to apply them on the tree.</p>

<p>The next step would be to check the kernel coding style, which is generously explained in the
<a href="https://www.kernel.org/doc/Documentation/CodingStyle">Linux Documentation</a> and set your editor according to them.</p>

<p><img src="http://evadeflow.com/wp-content/uploads/2011/03/TabsSpacesBoth_thumb.png" alt="alt text" /></p>

<p>Yes, apart from the ultimate error which is breaking the build, the second ultimate would be mixing tabs and spaces!
Linux Kernel goes on the dark side of tabs (no cookies, sorry), with extra-spaces when aligning parameters.</p>

<h2>Step 2: My code is compiling</h2>

<p><img src="https://imgs.xkcd.com/comics/compiling.png" alt="alt text" /></p>

<p>Depending on your processor, the building time might vary, but it will still take a bit.
In the meantime you can read Linux Device Drivers or have a little bit of fun reading some statistics on how many times words like &lsquo;bastard&rsquo; and &lsquo;crap&rsquo; <a href="https://www.linuxcounter.net/statistics/kernel">appear</a> in the Linux Kernel source code.
You can also grep it for more fun.</p>

<h2>Step 3: Make a small change and send it</h2>

<p>The reason for which you that to pass through all these preparatory steps was to finally get some changes committed.
You can start with a simple change such as adding error check on some devices or clean some code that needs refactoring.</p>

<p>Linux does not use pull requests (at least not on <a href="https://github.com/torvalds/linux/pull/17#issuecomment-5654674">github</a> )
as a means of merging changes, but e-mailed patches. That means you have to find the propper maintainter - the <code>get_maintainter.pl</code> in the
<code>/scripts</code> folder will help you to do so - and e-mail him your patch. You&rsquo;ll find a set of standards for that, too.</p>

<p><img src="http://imgs.xkcd.com/comics/goto.png" alt="alt image" /></p>

<p>Just keep in mind to compile your module and test after making even the tiniest change, because if something goes wrong you will have wasted
your time and the maintainer&rsquo;s time on sending a patch that cannot be applied, or worse, breaks the build.</p>

<p>Even if sometimes paying attention to all these rules involving proper coding, commit standards and e-mail formatting seems to be a little bit
overwhelming by taking more time than the actual code changes, with time it will become quite natural. After all, in a development area of
aproximately <a href="http://lwn.net/Articles/646942/">1,500 people</a> working from remote areas, the needs of having a rather fixed set of rules is indeed well-justified.</p>

<h2>Step 4: Become a regular contributor</h2>

<p>After sending a series of first patches, you&rsquo;ll be proud to be officially known as a Kernel Newbie! You can choose a project to focus on, talk
to people in the community, hang out on the IRC channels and so on.</p>

<p>Keep in mind that, if there&rsquo;s something you cannot manage, it is very likely to find someone on the IRC channels more than happy to give you a hand.
You don&rsquo;t have to become like this guy!</p>

<p><img src="http://imgs.xkcd.com/comics/wisdom_of_the_ancients.png" alt="alt text" /></p>

<p>For an official tutorial, please follow this <a href="http://kernelnewbies.org/FirstKernelPatch">link</a>.</p>

<hr />

<p>Copyright on the images goes to <a href="https://xkcd.com,">https://xkcd.com,</a> if not specified otherwise.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[IIO Kernel Development, From Zero to Hero]]></title>
    <link href="http://cristina2689.github.io/blog/2015/06/12/iio-kernel-development/"/>
    <updated>2015-06-12T13:13:08+03:00</updated>
    <id>http://cristina2689.github.io/blog/2015/06/12/iio-kernel-development</id>
    <content type="html"><![CDATA[<p>Hi, I am Cristina and I&rsquo;m doing an internship at The Linux Foundation this summer,
as part of the <a href="https://wiki.gnome.org/Outreachy">Outreachy</a> program, for which I&rsquo;ve been selected.</p>

<p>I haven&rsquo;t been involved too much into open source development and I&rsquo;ve always wished
to be, so that when I heard the program was opened, I saw it as the perfect chance to start
contributing and be part of a community.</p>

<p>The process of selection lasted from the end of February until April, time in which
I&rsquo;ve got accustomed with the work environment, kernel development practices and wrote a
few patches for a project I liked. I did my best in trying to know the project as much as
I could and finally got accepted!</p>

<!--more-->


<p>Why Linux Kernel?</p>

<p>I find operating systems the most fascinating subject in computer science and what
better way to broaden my knowledge than actually contributing to the Linux Kernel?
Apart from that, the penguin is nice.</p>

<p>What is IIO?</p>

<p>IIO stands for the Linux Industrial I/O Subsystem which deals with drivers for
small devices, analog or digital such as sensors (pressure, light, temperature), accelerometers
, ADCs, DACs and others. The IIO module has been in the upstream linux kernel since v2.6.32,
that would be around 2009 and supports more than 200 iio device drivers <a href="http://ftp.heanet.ie/mirrors/fosdem-video/2015/devroom-software_defined_radio/iiosdr.mp4">[1]</a>.
More blog posts on this subject and the iio architecture are coming in the next weeks,
as I am currently investigating and reading in the field.</p>

<p>There were several proposals for the projects on this round, which you can find <a href="http://kernelnewbies.org/OutreachyIntro">here</a>.
I chose the IIO dummy driver mentored by Daniel Baluta and Octavian Purdila, which acts as a
sort of template for writing iio drivers, but which is far from clean. My main responsability
is to solve all the problems related to this dummy driver and get it out of staging.</p>

<p>All in all, it&rsquo;s going to be an interesting summer, with a lot of challenges
I can hardly wait to solve!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Hello, World!]]></title>
    <link href="http://cristina2689.github.io/blog/2015/06/03/hello/"/>
    <updated>2015-06-03T15:01:55+03:00</updated>
    <id>http://cristina2689.github.io/blog/2015/06/03/hello</id>
    <content type="html"><![CDATA[<p>This is my first blog entry!</p>
]]></content>
  </entry>
  
</feed>
