<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13719177</id><updated>2011-11-27T16:07:48.423-08:00</updated><category term='linux'/><category term='indic-computing'/><category term='acm'/><category term='gpl'/><category term='freebsd'/><category term='pmctools'/><category term='netbsd'/><title type='text'>EDOOFUS</title><subtitle type='html'>&lt;pre&gt;
#define EDOOFUS 88 /* Programming error */
&lt;/pre&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13719177.post-2419868730682084705</id><published>2010-07-22T11:22:00.000-07:00</published><updated>2010-10-12T09:58:25.267-07:00</updated><title type='text'>Choosing an open-source project to work with</title><content type='html'>&lt;p&gt;In the article "&lt;a
href="http://shal.in/post/285909694/why-you-should-contribute-to-open-source"&gt;Why
you should contribute to open-source&lt;/a&gt;" Shalin Mangar lists some of
the benefits of participating in an open source project.&lt;/p&gt;
&lt;p&gt;However, there are a large number of open-source
projects out there; indeed, quite a few tools have &lt;i&gt;multiple&lt;/i&gt;
active implementations.  How does a new contributor choose a project to contribute to?&lt;/p&gt;

&lt;p&gt;The process I usually suggest is:&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;Start by choosing a domain of interest&amp;mdash;an area which you would be
   comfortable spending a few years of your life learning about.&lt;/li&gt;
 &lt;li&gt;Short list two to five interesting open-source projects in this domain.&lt;/li&gt;
 &lt;li&gt;Research the functioning of each project using the check list
   given later in this post.&lt;/li&gt;
 &lt;li&gt;Narrow your list down to one project that matches your values.&lt;/li&gt;
 &lt;li&gt;Dive in and start!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Find open-source projects in a domain of interest.&lt;/h2&gt;
&lt;p&gt;Whether this is compilers, operating systems, GUI tools, Web 2.0
 tools or something else, you should choose a domain that fascinates
 you.&lt;/p&gt;
&lt;p&gt;Search for existing open-source projects&amp;mdash;collaboration sites like &lt;a
 href="http://www.freshmeat.net/"&gt;Freshmeat&lt;/a&gt; or &lt;a
 href="http://sourceforge.net/"&gt;SourceForge&lt;/a&gt; can help you find
 an active project in the area you are interested in.  Sites like &lt;a
 href="http://www.ohloh.net/"&gt;ohloh.net&lt;/a&gt; can help you guage the
 project's activity levels and other vital statistics.&lt;/p&gt;

&lt;h2&gt;Study the selected projects in depth&lt;/h2&gt;

&lt;p&gt;Spend some time examining each community.  Visit their home pages
and browse their code.  Keep a look out for the key values held by the
community.  The following set of questions could help get you
started:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;&lt;p&gt;What is the quality of the project's source code and documentation?
    Is doing work to a high standard a value in the community?
    What will you learn by reading their code?&lt;/p&gt;
   &lt;p&gt;&lt;i&gt;Warning signs:&lt;/i&gt; incomprehensible code, documentation
   that is sparse or poorly written, or that is out of sync with the
   code.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;What are the project's communication channels?  Do they maintain
   public archives of their communication?   What is the signal to noise
   ratio observed on their channels?   What tone of communication is
   commonly seen?&lt;/p&gt;
   &lt;p&gt;&lt;i&gt;Warning signs:&lt;/i&gt; snooty behaviour towards newbies,
   excessive bureaucracy within the project, contributions being
   silently dropped.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;What are the project's development processes like?  For example,
   they have a culture of performing code reviews?  Do they use a ticket
   tracking system?  What kind of automation do they use?&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;How open is decision making in the project?  Do you see
   evidence of outside input being welcomed?  How do conflicts get
   resolved?&lt;/p&gt;

   &lt;p&gt;&lt;i&gt;Warning signs:&lt;/i&gt; private communication channels between
   select developers, small groups of developers taking ad-hoc
   decisions without input from the other stake holders, frequent conflicts
   that escalate.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;What is the project's maturity?  Are there experienced hands around
   to act as mentors?  Do you see evidence of such mentoring on the
   project's communications channels?&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;How active is the project?  Projects that show a steady (or
   steadily increasing) rate of progress over a long period are
   usually in healthy shape.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Who is behind the project?&lt;/p&gt;
   &lt;p&gt;Some open-source projects are dominated by people employed in a
   small number of companies.  Such projects run the risk of sudden
   death when corporate priorities change, as happened to the &lt;a
   href="http://www.opensolaris.org/"&gt;OpenSolaris&lt;/a&gt; project, one of
   the best operating system projects of its time.&lt;/p&gt;
   &lt;p&gt;Look at the
   profiles of the key developers; keep a look out for projects that
   lack sufficient diversity.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;/p&gt;What is the licensing of
   the project?  Some projects use permissive licenses like the Apache
   license, while some prefer the more restrictive GPL.  Are you
   comfortable with the license being used?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Match projects to your own values&lt;/h2&gt;
&lt;p&gt;Write down what you expect to gain from participating in the projects in
your short list.&lt;/p&gt;
&lt;p&gt;Some of the reasons people participate in open-source are:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;Wanting to contribute and make a difference to society.&lt;/li&gt;
 &lt;li&gt;Wanting to learn and become an expert in some aspect of computing.&lt;/li&gt;
 &lt;li&gt;For some, open-source provides a creative outlet that their employment does not provide.&lt;/li&gt;
 &lt;li&gt;For some, open-source is a way to join a community---they value
   the company of  people sharing a common interest in a domain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use your values as a guide to selecting the project that would fit
 you the best.&lt;/p&gt;

&lt;h2&gt;Dive in and get started&lt;/h2&gt;
&lt;p&gt;Hopefully the suggestions above would have helped you narrow down
 to one, attractive open-source project.  Your next steps would be to
 dive in and learn your way around the project's code.  Pick a bug to
 be fixed, or a small feature that needs implementing.&lt;/p&gt;
&lt;p&gt;Good luck, and happy hacking!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-2419868730682084705?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/2419868730682084705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2010/07/choosing-open-source-project-to-work.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/2419868730682084705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/2419868730682084705'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2010/07/choosing-open-source-project-to-work.html' title='Choosing an open-source project to work with'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-6138081140077718920</id><published>2009-06-12T20:13:00.000-07:00</published><updated>2009-06-12T20:16:05.937-07:00</updated><title type='text'>New discussion group for PmcTools</title><content type='html'>&lt;p&gt;The PmcTools project now has a new discussion group &lt;i&gt;&lt;a href="http://groups.google.com/group/pmctools-discuss"&gt;pmctools-discuss&lt;/a&gt;&lt;/i&gt;, hosted on groups.google.com.&lt;/p&gt;
&lt;p&gt;If you have a question on how to use PmcTools, or about its internals, please ask it there.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-6138081140077718920?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://groups.google.com/group/pmctools-discuss' title='New discussion group for PmcTools'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/6138081140077718920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2009/06/new-discussion-group-for-pmctools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/6138081140077718920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/6138081140077718920'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2009/06/new-discussion-group-for-pmctools.html' title='New discussion group for PmcTools'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-7212584369073052084</id><published>2009-04-19T21:58:00.000-07:00</published><updated>2009-04-19T22:20:28.118-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pmctools'/><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><category scheme='http://www.blogger.com/atom/ns#' term='acm'/><title type='text'>PmcTools talk at the Bangalore chapter of the ACM</title><content type='html'>&lt;p&gt;In April 2009 I was invited to &lt;a href="http://acmbangalore.org//index.php?option=com_content&amp;amp;task=view&amp;amp;id=24&amp;amp;Itemid=3"&gt;speak on FreeBSD/PmcTools&lt;/a&gt; by the &lt;a href="http://www.acmbangalore.org/"&gt;Bangalore chapter&lt;/a&gt; of the &lt;a href="http://www.acm.org/"&gt;ACM&lt;/a&gt;. The slides for this talk are available at:
&lt;a href="http://people.freebsd.org/~jkoshy/download/acm-apr-09.pdf"&gt;http://people.freebsd.org/~jkoshy/download/acm-apr-09.pdf&lt;/a&gt; (550KB, PDF).&lt;/p&gt;

&lt;p&gt;This was an overview talk.  The talk briefly touched upon: the motivations and goals of the project, the programming APIs, some aspects of the implementation and on possible future work.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-7212584369073052084?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://people.freebsd.org/~jkoshy/download/acm-apr-09.pdf' title='PmcTools talk at the Bangalore chapter of the ACM'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/7212584369073052084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2009/04/pmctools-talk-at-bangalore-chapter-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/7212584369073052084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/7212584369073052084'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2009/04/pmctools-talk-at-bangalore-chapter-of.html' title='PmcTools talk at the Bangalore chapter of the ACM'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-806790823905505658</id><published>2009-02-09T23:05:00.001-08:00</published><updated>2009-02-10T04:35:28.717-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pmctools'/><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Short updates</title><content type='html'>&lt;p&gt;A couple of (lagged!) updates on my FreeBSD/PmcTools work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In Nov'08, I added support for Intel&amp;trade; Core&amp;nbsp;2&amp;trade; PMCs
    to &lt;a href="http://code.google.com/p/pmctools"&gt;&lt;b&gt;PmcTools&lt;/b&gt;&lt;/a&gt; (&lt;a
    href="http://svn.freebsd.org/viewvc/base?view=revision&amp;amp;revision=185363"&gt;SVN
    #185363&lt;/a&gt; and later changesets).&lt;p&gt;
   &lt;p&gt;More recently, Nokia, via Jeff Roberson, contributed basic support for the PMCs in the Core/i7&amp;trade; CPU, the next member in the
      Core&amp;trade; family of CPUs (&lt;a
    href="http://svn.freebsd.org/viewvc/base?view=revision&amp;revision=187761"&gt;SVN
    #187761&lt;/a&gt;).&lt;/p&gt;
    &lt;p&gt;With these additions PmcTools supports most Intel CPUs that have PMCs in them.  (I have plans to finish support for 166Mhz Pentium MMX&amp;trade; CPUs soon.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A couple of tricky bugs were tracked down and fixed:&lt;/p&gt;
 &lt;ul&gt;
 &lt;li&gt;&lt;p&gt;The NMI handler code I had written for the &lt;tt&gt;amd64&lt;/tt&gt; architecture needed to be more
 robust than it was.  Fixed in &lt;a href="http://svn.freebsd.org/viewvc/base?view=revision&amp;amp;revision=188065"&gt;SVN #188065&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
 &lt;li&gt;&lt;p&gt;A bug in callchain capture code that would appear only under high loads
   and only on SMP machines.  Fixed in &lt;a href="http://svn.freebsd.org/viewvc/base?view=revision&amp;amp;revision=186037"&gt;SVN #186037&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;Thanks to Artem Belevich, Fabien Thomas, George Neville-Neil and
   Jeff Roberson for their assistance with debugging.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-806790823905505658?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://code.google.com/p/pmctools' title='Short updates'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/806790823905505658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2009/02/short-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/806790823905505658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/806790823905505658'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2009/02/short-updates.html' title='Short updates'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-7734187522959073294</id><published>2008-09-19T10:06:00.000-07:00</published><updated>2008-09-19T10:48:32.332-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pmctools'/><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Timed measurements with pmcstat(8)</title><content type='html'>&lt;p&gt;Every once in a while I get email asking for an option to &lt;b&gt;&lt;a
href="http://www.freebsd.org/cgi/man.cgi?query=pmcstat&amp;amp;apropos=0&amp;amp;sektion=8&amp;amp;manpath=FreeBSD+8-current&amp;amp;format=html"&gt;pmcstat(8)&lt;/a&gt;&lt;/b&gt;
that would allow hardware events to be measured for a specified time
interval.&lt;/p&gt;

&lt;p&gt;The good news is: &lt;b&gt;&lt;a 
href="http://www.freebsd.org/cgi/man.cgi?query=pmcstat&amp;amp;apropos=0&amp;amp;sektion=8&amp;amp;manpath=FreeBSD+8-current&amp;amp;format=html"&gt;pmcstat(8)&lt;/a&gt;&lt;/b&gt;
&lt;em&gt;already supports&lt;/em&gt; timed measurements &amp;mdash; using &lt;tt&gt;/bin/sleep&lt;/tt&gt;.

&lt;p&gt;Here is how you would do it:&lt;/p&gt;

&lt;ul&gt; 
 &lt;li&gt;&lt;p&gt;Timed system sampling would be done in the following manner:&lt;/p&gt;
   &lt;pre&gt;% pmcstat -S instructions -O logfile /bin/sleep 42&lt;/pre&gt;
   &lt;p&gt;This invocation allocates a system-scope sampling PMC (&lt;tt&gt;-S&lt;/tt&gt;) and
     profiles the whole system while &lt;tt&gt;/bin/sleep&lt;/tt&gt; executes, i.e.,    
     for 42 seconds.&lt;/p&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;p&gt;Timed measurements on groups of processes 
   are performed in a similar fashion:&lt;/p&gt;
   &lt;pre&gt;% pmcstat -d -p dc-misses -t '1234' /bin/sleep 24&lt;/pre&gt;
   &lt;p&gt;This invocation would allocate a process-scope counting PMC (&lt;tt&gt;-p&lt;/tt&gt;)
     that counts data cache misses, attach it (&lt;tt&gt;-t&lt;/tt&gt;) to the process
     with pid &lt;tt&gt;1234&lt;/tt&gt; and its descendants (&lt;tt&gt;-d&lt;/tt&gt;), and count for 24 seconds.&lt;/p&gt;  
   &lt;/p&gt;Note that the '&lt;tt&gt;-t&lt;/tt&gt;' option also takes regular expressions,
     so you don't need to know process ids beforehand.  To count instructions
     executed by processes named '&lt;tt&gt;httpd&lt;/tt&gt;' for an hour you would use:&lt;/p&gt;
   &lt;pre&gt;% pmcstat -p instructions -t 'httpd' /bin/sleep 3600&lt;/pre&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The "Unix way" uses small tools, each of which does a defined     
task reasonably well and which are combined to perform more   
complex tasks.  In the examples above, &lt;tt&gt;/bin/sleep&lt;/tt&gt; manages
time intervals and &lt;b&gt;&lt;a 
href="http://www.freebsd.org/cgi/man.cgi?query=pmcstat&amp;amp;apropos=0&amp;amp;sektion=8&amp;amp;manpath=FreeBSD+8-current&amp;amp;format=html"&gt;pmcstat(8)&lt;/a&gt;&lt;/b&gt;
manages PMC based measurements.&lt;/p&gt;

&lt;p&gt;When you combine them, voilà, you get timed PMC based measurements.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-7734187522959073294?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.freebsd.org/cgi/man.cgi?query=pmcstat&amp;apropos=0&amp;sektion=8&amp;manpath=FreeBSD+8-current&amp;format=html' title='Timed measurements with &lt;tt&gt;pmcstat(8)&lt;/tt&gt;'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/7734187522959073294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/09/timed-measurements-with-pmcstat8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/7734187522959073294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/7734187522959073294'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/09/timed-measurements-with-pmcstat8.html' title='Timed measurements with &lt;tt&gt;pmcstat(8)&lt;/tt&gt;'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-8359667535234831656</id><published>2008-09-14T23:25:00.000-07:00</published><updated>2008-09-14T23:35:57.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pmctools'/><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>PMCTools meets KCachegrind</title><content type='html'>&lt;p&gt;&lt;a href="mailto:fabien.thomas@netasq.com"&gt;Fabien Thomas&lt;/a&gt; sent in a screenshot
showing the result of his experiments at integrating KCachegrind and PmcTools.&lt;/p&gt;
&lt;p&gt;Thank you Fabien, for sharing!&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/_H8QAJoSzBp8/SM4Auiv3EtI/AAAAAAAAAL8/iikY36HvUxw/s1600-h/pmctools%2Bkcachegrind.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_H8QAJoSzBp8/SM4Auiv3EtI/AAAAAAAAAL8/L6TRxr5l7ZM/s320-R/pmctools%2Bkcachegrind.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-8359667535234831656?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/8359667535234831656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/09/pmctools-meets-kcachegrind.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/8359667535234831656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/8359667535234831656'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/09/pmctools-meets-kcachegrind.html' title='PMCTools meets KCachegrind'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_H8QAJoSzBp8/SM4Auiv3EtI/AAAAAAAAAL8/L6TRxr5l7ZM/s72-Rc/pmctools%2Bkcachegrind.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-470451353862802482</id><published>2008-08-31T02:23:00.000-07:00</published><updated>2008-08-31T20:13:53.837-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Unbreaking CVSup/amd64</title><content type='html'>&lt;p&gt;When I recently upgraded my FreeBSD6/amd64 ``-STABLE'' machine, the
  CVSup binary on the system stopped working.  CVSup would dump core
  consistently, shortly after connecting to the remote server. This rather unwelcome development took away my ability to keep my
  CVS trees upto-date; fixing the bug became top priority.  The bug
  also turned out to be an interesting one.&lt;/p&gt;

&lt;h3&gt;The bug&lt;/h3&gt;

&lt;p&gt;Running &lt;tt&gt;CVSup&lt;/tt&gt; after the upgrade to 6.3-PRERELEASE would
  result in a core dump shortly after connection establishment.&lt;/p&gt;

&lt;pre&gt;
Program received signal SIGBUS, Bus error.
0x0000000800682d4f in fcntl () from /lib/libc.so.6
(gdb)
(gdb) disassemble fcntl
... snip ...
0x0000000800682d3f &amp;lt;fcntl+79&amp;gt;:  movaps %xmm4,0xffffffffffffffc1(%rax)
0x0000000800682d43 &amp;lt;fcntl+83&amp;gt;:  movaps %xmm3,0xffffffffffffffb1(%rax)
0x0000000800682d47 &amp;lt;fcntl+87&amp;gt;:  movaps %xmm2,0xffffffffffffffa1(%rax)
0x0000000800682d4b &amp;lt;fcntl+91&amp;gt;:  movaps %xmm1,0xffffffffffffff91(%rax)
&lt;span style="color: red"&gt;0x0000000800682d4f &amp;lt;fcntl+95&amp;gt;:  movaps %xmm0,0xff
ffffffffffff81(%rax)&lt;/span&gt;
0x0000000800682d53 &amp;lt;fcntl+99&amp;gt;:  lea    0x110(%rsp),%rax
0x0000000800682d5b &amp;lt;fcntl+107&amp;gt;: movl   $0x10,0x20(%rsp)
0x0000000800682d63 &amp;lt;fcntl+115&amp;gt;: movl   $0x30,0x24(%rsp)
0x0000000800682d6b &amp;lt;fcntl+123&amp;gt;: mov    %rax,0x28(%rsp)
... snip ...
&lt;/pre&gt;

&lt;p&gt;The faulting instruction was trying to save SSE registers to
  memory; and this was odd since there was no reason for this
  particular code path to be using SSE registers in the first
  place.&lt;/p&gt;


&lt;p&gt;Rebuilding Modula-3 and CVSup from source did not fix the core
  dump, though the builds of these tools themselves completed without
  error.  A search through the PR database revealed that other FreeBSD
  users had also been tripped by the bug: PR &lt;a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=124353"&gt;bin/124353&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;A peek at the solution&lt;/h3&gt;
&lt;p&gt;Modula-3's runtime needed to be patched in the following way to fix
  this fault.&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;First, in
$M3SRC&lt;tt&gt;/libs/m3core/src/unix/freebsd-4.amd64/Unix.i3&lt;/tt&gt;, we
declare the Modula-3 function &lt;tt&gt;Unix.fcntl()&lt;/tt&gt; as being
implemented externally by C function &lt;tt&gt;ufcntl()&lt;/tt&gt;.
&lt;pre&gt;
... snip ...
&lt;*EXTERNAL "ufcntl"*&gt; PROCEDURE fcntl (fd, request: int; arg: long): int;
... snip ...
&lt;/pre&gt;
  &lt;/li&gt;
  &lt;li&gt;Matching this declaration, an implementation of &lt;tt&gt;ufcntl()&lt;/tt&gt;
    was provided in
    $M3SRC&lt;tt&gt;/libs/m3core/src/runtime/FBSD_AMD64/RTHeapDepC.c&lt;/tt&gt;:
    &lt;pre&gt;
...
#include &amp;lt;fcntl.h&amp;gt;
...
int
ufcntl(int fd, int cmd, long arg)
{
       return (fcntl(fd, cmd, arg));
}
    &lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the surface, this "fix" does not seem to be doing anything.  The
 &lt;tt&gt;ufcntl()&lt;/tt&gt; entry point takes 3 arguments but it passes these
 down to &lt;tt&gt;fcntl()&lt;/tt&gt; unchanged, and in the same order.&lt;/p&gt;

&lt;p&gt;Yet, despite the apparent ``no op''-like nature of the change, the core
  dumps were gone.&lt;/p&gt;

&lt;h3&gt;Why this works&lt;/h3&gt;

&lt;p&gt;To understand why this fix works, we have to delve into the ABI;
 into the C calling conventions used for AMD64 code.&lt;/p&gt;

&lt;p&gt;For normal function calls, the AMD64 calling convention passes upto
  6 integer arguments in registers.  Thus register &lt;tt&gt;%rdi&lt;/tt&gt; would
  hold the first argument (&lt;tt&gt;fd&lt;/tt&gt; in our case), register
  &lt;tt&gt;%rsi&lt;/tt&gt; the second, &lt;tt&gt;cmd&lt;/tt&gt;, register &lt;tt&gt;%rdx&lt;/tt&gt; the
  third and so on.  However, the C prototype for &lt;tt&gt;fcntl()&lt;/tt&gt; is:
  &lt;tt&gt;int fcntl(fd, cmd, ...);&lt;/tt&gt;, i.e., &lt;tt&gt;fcntl&lt;/tt&gt; is a varargs
  function.  Varargs functions use a different calling convention on   
  the AMD64: register &lt;tt&gt;%rax&lt;/tt&gt; is a ``hidden'' input parameter
  for these functions.&lt;/p&gt;
    
&lt;p&gt;So, prior to the fix, the Modula-3 runtime was invoking
  &lt;tt&gt;fcntl()&lt;/tt&gt; directly, but with registers set up for a
  non-varargs function call.&lt;/p&gt;
   
&lt;p&gt;Now, as it turns out, in FreeBSD 6.2 and earlier, &lt;tt&gt;fcntl()&lt;/tt&gt;
  in &lt;tt&gt;libc&lt;/tt&gt; was &lt;em&gt;not&lt;/em&gt; a C language function; rather it
  was implemented as an assembly language stub that invoked the
  &lt;tt&gt;SYS_fcntl&lt;/tt&gt; system call.  On the AMD64, FreeBSD's argument
  passing convention for system calls is close enough to the
  non-varargs C calling convention that the processor's registers
  happened to be correctly setup for a direct system call.&lt;/p&gt;

&lt;p&gt;When &lt;tt&gt;fcntl()&lt;/tt&gt; in &lt;tt&gt;libc&lt;/tt&gt; was changed in FreeBSD
  6-STABLE on 24 Apr 2008 to be a C function instead of a system call,
  things broke.&lt;/p&gt;

&lt;p&gt;Though not obvious from just looking at the C code, the no-op like
  fix above works by using the C compiler to translate between the two
  calling conventions.&lt;/p&gt;

&lt;h3&gt;What's worrying&lt;/h3&gt;
 
&lt;p&gt;The relevant change to &lt;tt&gt;libc&lt;/tt&gt; was in CVS/SVN HEAD for about
20 days before it was merged to -stable.  CVSup is also a critical tool for
the FreeBSD project.  This bug was however only detected in -stable, and not
in -current.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-470451353862802482?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.freebsd.org/cgi/query-pr.cgi?pr=124353' title='Unbreaking CVSup/amd64'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/470451353862802482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/08/interesting-bug-unbreaking-cvsupamd64.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/470451353862802482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/470451353862802482'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/08/interesting-bug-unbreaking-cvsupamd64.html' title='Unbreaking CVSup/amd64'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-974301652047034454</id><published>2008-08-17T22:01:00.000-07:00</published><updated>2008-08-17T22:15:52.588-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Getting online using FreeBSD and BSNL DataOne</title><content type='html'>&lt;p&gt;BSNL's DataOne service (DSL) is straightforward to use in
FreeBSD.  The following recipe shows how to get online using PPPoE.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, you need to configure your DSL modem as specified by the
  ISP.  This procedure is modem-specific and your BSNL representative
  should be able to assist you here.&lt;/li&gt;
&lt;li&gt;You would need the name of the ethernet interface to which your modem is attached.
  If you are unsure of what this is, use &lt;tt&gt;ifconfig(8)&lt;/tt&gt; to find out.&lt;/li&gt;
&lt;li&gt;Next, you need to add the following template text to &lt;tt&gt;/etc/ppp/ppp.conf&lt;/tt&gt;:
&lt;pre&gt;
dataone:
 set device "PPPoE:*INTERFACE*"
 set authname "*YOUR-USERNAME*"
 set authkey "*YOUR-PASSWORD*"
 set dial
 enable dns
 add default HISADDR
&lt;/pre&gt;
&lt;p&gt;Replace &lt;i&gt;*YOUR-USERNAME*&lt;/i&gt; and &lt;i&gt;*YOUR-PASSWORD*&lt;/i&gt; with your DataOne
   user name and password respectively.  Replace &lt;i&gt;*INTERFACE*&lt;/i&gt; with the name of your network interface (i.e., "rl0" or "fxp0" or whatever).&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;Finally, invoke &lt;tt&gt;ppp(8)&lt;/tt&gt; in the usual way:
&lt;pre&gt;
% ppp dataone
ppp&gt; dial
ppp&gt; ... the prompt changes as PPP negotiation proceeds ...
PPP&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thats, it!  You should be online.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-974301652047034454?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/974301652047034454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/08/getting-online-using-freebsd-and-bsnl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/974301652047034454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/974301652047034454'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/08/getting-online-using-freebsd-and-bsnl.html' title='Getting online using FreeBSD and BSNL DataOne'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-7312805471830357393</id><published>2008-08-15T19:56:00.000-07:00</published><updated>2008-08-15T20:12:35.814-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='indic-computing'/><title type='text'>Draft #5 of the indic-computing "Design Axes" article</title><content type='html'>&lt;p&gt;Draft #5 of the "&lt;a href="http://indic-computing.sourceforge.net/designaxes"&gt;Design Axes for Indian Language Computing&lt;/a&gt;" article has been made available for review at the &lt;a href="http://www.indic-computing.org/"&gt;Indic-Computing&lt;/a&gt; web site.&lt;/p&gt;
&lt;p&gt;Please do take a look and let me know your comments.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-7312805471830357393?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://indic-computing.sourceforge.net/designaxes/' title='Draft #5 of the indic-computing &quot;Design Axes&quot; article'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/7312805471830357393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/08/draft-5-of-indic-computing-design-axes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/7312805471830357393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/7312805471830357393'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/08/draft-5-of-indic-computing-design-axes.html' title='Draft #5 of the indic-computing &quot;Design Axes&quot; article'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-2198696186616271564</id><published>2008-07-29T10:34:00.000-07:00</published><updated>2008-07-28T22:07:46.336-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><category scheme='http://www.blogger.com/atom/ns#' term='netbsd'/><title type='text'>Getting online with GPRS in India</title><content type='html'>&lt;p&gt;In order to get online using GPRS you would need:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;A device capable of handling GPRS; usually a cell phone or a GPRS modem.  I've used a Nokia 3110c with some success.  This particular cellphone model offers a USB port using which it may be connected to a host computer with a compatible USB cable.&lt;/li&gt;&lt;li&gt;A subscription to GPRS service.  Contact your cell service provider on the way to enable this on your cell phone.  The examples below describe the configuration needed for using AirTel's GPRS service.&lt;/li&gt;&lt;li&gt;The appropriate configuration for your OS.  This post describes how to use GPRS using FreeBSD and NetBSD.&lt;/li&gt;&lt;/ol&gt;
&lt;/p&gt;&lt;h3&gt;FreeBSD Configuration&lt;/h3&gt;
&lt;ol&gt;&lt;li&gt;Ensure that the relevant drivers are present in the kernel.  The Nokia 3110c is supported by the stock &lt;tt&gt;umodem(4)&lt;/tt&gt; driver.   Use &lt;tt&gt;kldload(8)&lt;/tt&gt; to load this into your kernel if it is not already present:
&lt;pre&gt;# kldload umodem
&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;On connecting the cellphone to the computer, you should see a message similar to  the following on the console (or in &lt;tt&gt;/var/log/messages&lt;/tt&gt;):
&lt;pre&gt;... kernel: ucom0: Nokia Nokia 3110c, rev x.yy/a.bb, addr 2, iclass 2/2
... kernel: ucom0: data interface 2, has CM over data, has break
... kernel: ucom0: status change notification available
&lt;/pre&gt;
If all goes well, a new device entry such as &lt;tt&gt;/dev/cuaU0&lt;/tt&gt;  should be present under &lt;tt&gt;/dev&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;Add the following to &lt;tt&gt;/etc/ppp/ppp.conf&lt;/tt&gt; (note the leading whitespace on most lines):
&lt;pre&gt;airtel:
 set device /dev/cuaU0
 enable dns
 set phone "*99***1#"
 set authname "airtel"
 set authkey "airtel"
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
  \"\" AT OK-AT-OK ATQ0V1E1S0=0&amp;amp;C1&amp;amp;D2+FCLASS=0 OK \
  AT+CGDCONT=1,\\\"IP\\\",\\\"airtelgprs.com\\\" OK \\dATDT\\T \
  TIMEOUT 40 CONNECT"
  add default HISADDR
  set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
&lt;/pre&gt;&lt;p&gt;For the curious, the &lt;tt&gt;ppp(8)&lt;/tt&gt; manual page fully describes the syntax and semantics of the configuration commands above.&lt;/p&gt;&lt;p&gt;Note that the contents of the &lt;tt&gt;authname&lt;/tt&gt; and &lt;tt&gt;authkey&lt;/tt&gt; configuration items do not seem to matter.  You could put the name of your pet dog there if you wish.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;Invoke the &lt;tt&gt;ppp(8)&lt;/tt&gt; daemon in the usual way:
&lt;pre&gt;% ppp airtel
ppp&gt; dial
... the prompt changes as PPP setup progresses
PPP&gt;
&lt;/pre&gt;&lt;p&gt;And you should be done.
&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;NetBSD Configuration
&lt;/h3&gt;&lt;p&gt;In NetBSD as in FreeBSD, this particular cellphone model is supported by the &lt;tt&gt;umodem(4)&lt;/tt&gt; driver.  Once recognized, the modem will be accessible using a path name such as &lt;tt&gt;/dev/ttyU0&lt;/tt&gt;.&lt;/p&gt;&lt;p&gt;The following recipe uses the &lt;tt&gt;pppd(8) daemon&lt;/tt&gt;.  This recipe requires the NetBSD kernel to have been compiled with in-kernel PPP support.
&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a file &lt;tt&gt;/etc/ppp/peers/airtel&lt;/tt&gt; with the following contents:
&lt;pre&gt;ttyU0 115200
connect '/usr/sbin/chat -v -f /etc/ppp/chat-airtel -T "*99***1#"'
defaultroute
usepeerdns
ipcp-accept-local
ipcp-accept-remote
user "airtel"
password "airtel"
&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Create a file &lt;tt&gt;/etc/ppp/chat-airtel&lt;/tt&gt; with the following contents:
&lt;pre&gt;ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "ERROR"
ABORT "NO ANSWER"
"" "AT"
OK "ATQ0V1E1S0=0&amp;amp;C1&amp;amp;D2+FCLASS=0"
OK AT+CGDCONT=1,\"IP\",\"airtelgprs.com\"
OK \dATDT\T
TIMEOUT 40
CONNECT
&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Start &lt;tt&gt;ppp&lt;/tt&gt; using:
&lt;pre&gt;# pppd call airtel
&lt;/pre&gt;&lt;p&gt;Monitor &lt;tt&gt;/var/log/messages&lt;/tt&gt; for error messages.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;Once the connection is setup, IP addresses for the ISP's DNS servers would be placed in &lt;tt&gt;/etc/ppp/resolv.conf&lt;/tt&gt;.  Add these to &lt;tt&gt;/etc/resolv.conf&lt;/tt&gt; if needed.&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Connection performance&lt;/h3&gt;&lt;p&gt;In my experience, connection speeds vary widely from a few bytes/second to a peak of a few KB/sec.  Connection latencies also tend to be variable, ranging from a few hundred milliseconds upwards.  There are frequent long pauses, a minute or more in duration, during which no traffic flows (though the connection remains up).&lt;/p&gt;&lt;p&gt;Thus GPRS based connectivity is best used for batch tasks such as downloading and sending  email.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-2198696186616271564?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/2198696186616271564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/07/getting-online-with-gprs-in-india.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/2198696186616271564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/2198696186616271564'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/07/getting-online-with-gprs-in-india.html' title='Getting online with GPRS in India'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-3631789424191876408</id><published>2008-07-18T02:07:00.000-07:00</published><updated>2008-07-19T22:58:41.074-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Slowly getting back online</title><content type='html'>&lt;p&gt;One of the prices paid when I moved out to rural India last year was loss of connectivity.&lt;/p&gt;&lt;p&gt;For many months, there was no reliable way for people to call and reach me.   As for internet access, I used to go to the nearby town (20km away) to an internet parlour from where I would access the 'Net---if there was power in the town to do so.  Keeping my FreeBSD CVSup repository in sync used to be a interesting challenge, as was keeping up the communication flow with my two GSoC'07 mentees.&lt;/p&gt;&lt;p&gt;Connectivity options began to improve about a month ago: AirTel's cell service started up in the area so I could get online using GPRS.     And then, last week, BSNL  started offering DSL service in this area.&lt;/p&gt;&lt;p&gt;In the past year I explored various options for getting online as a FreeBSD user; I will describe these here by and by.    Stay tuned!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-3631789424191876408?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/3631789424191876408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2008/07/slowly-getting-back-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/3631789424191876408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/3631789424191876408'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2008/07/slowly-getting-back-online.html' title='Slowly getting back online'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-115332965382217024</id><published>2006-07-19T10:11:00.000-07:00</published><updated>2008-07-11T22:54:02.754-07:00</updated><title type='text'>Edoofus blocked by the Government of India</title><content type='html'>&lt;blockquote&gt;Against stupidity the gods themselves contend in vain.
&lt;div style="text-align: right; font-style: italic;"&gt;-- &lt;b&gt;&lt;a href="http://www.quotationspage.com/quotes/Friedrich_von_Schiller/"&gt;Friedrich von Schiller&lt;/a&gt;

&lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;(For those of you who are wondering this post is about: at the time the post was written, the Indian government had forced Indian ISPs to restrict internet access to all the blogs under the blogger.com domain.  The rationale for this edict remains unclear, even today.)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-115332965382217024?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://censorship.wikia.com/wiki/Bloggers_Against_Censorship' title='Edoofus blocked by the Government of India'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/115332965382217024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2006/07/edoofus-blocked-by-government-of-india.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/115332965382217024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/115332965382217024'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2006/07/edoofus-blocked-by-government-of-india.html' title='Edoofus blocked by the Government of India'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-114788432731261290</id><published>2006-05-17T09:42:00.001-07:00</published><updated>2008-06-07T00:34:42.460-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Robert Watson: "How FreeBSD Works"</title><content type='html'>An excellent summary of the FreeBSD project, by Robert Watson:
&lt;a href="http://www.watson.org/%7Erobert/freebsd/2006bsdcan/20060512-bsdcan2006-how-freebsd-works.pdf"&gt;
http://www.watson.org/~robert/freebsd/2006bsdcan/20060512-bsdcan2006-how-freebsd-works.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-114788432731261290?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.watson.org/~robert/freebsd/2006bsdcan/20060512-bsdcan2006-how-freebsd-works.pdf' title='Robert Watson: &quot;How FreeBSD Works&quot;'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/114788432731261290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2006/05/robert-watson-how-freebsd-works_17.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114788432731261290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114788432731261290'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2006/05/robert-watson-how-freebsd-works_17.html' title='Robert Watson: &quot;How FreeBSD Works&quot;'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-114460271140893475</id><published>2006-04-09T09:32:00.000-07:00</published><updated>2008-08-18T21:25:02.143-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='gpl'/><title type='text'>D-Link</title><content type='html'>&lt;p&gt;In 2005, I had the opportunity to visit D-Link India's development office in Bangalore.  I found that they were using Linux on a few routers that they were developing.  This surprised me since I had not found mention either of Linux, or for their obligations to their customers under the GPL, on the main D-Link website.  My understanding of the GPL was that GPL-derived binaries need to be accompanied with a prominent offer of source code.  Most companies that use Linux for embedded work just put their sources up on the web.&lt;/p&gt;
&lt;p&gt;The matter got stranger.  In response to a direct question, the VP of Development (at Bangalore) indicated that he didn't think that they needed to make the Linux source code that went into their products available to their customers. I didn't have the opportunity to ask why he thought that the GPL didn't apply to his product line.  I do know that &lt;i&gt;some&lt;/i&gt; D-Link routers are Linux based and that you can find GPL'ed source tarballs for these by assiduously googling for them.  However, it is not clear to me whether source code is available for &lt;i&gt;all&lt;/i&gt; of D-Link's Linux based routers and whether the provisions of the GPL are being correctly honored by this company.&lt;/p&gt;
&lt;p&gt;And now, there is the news that D-Link's routers have been abusing &lt;a href="http://www.lightbluetouchpaper.org/2006/04/07/when-firmware-attacks-ddos-by-d-link/"&gt;NTP&lt;/a&gt; by directly connecting to Tier-1 NTP servers around the world, in violation of the way NTP is designed to work.  The &lt;a href="http://yro.slashdot.org/article.pl?sid=06/04/07/130209"&gt;Slashdot thread&lt;/a&gt; on the topic revealed a few interesting tidbits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;D-Link's products had previously affected the free &lt;a href="http://www.dyndns.com/about/company/notify/archives/useragent_block_client10.html"&gt;DynDNS&lt;/a&gt; service.  &lt;a href="http://yro.slashdot.org/comments.pl?sid=182481&amp;amp;cid=15088189"&gt;This anonymously posted comment&lt;/a&gt; is particularly revealing: instead of taking time to fix the bugs in their code, D-Link apparently invested energy to work around the restrictions placed by DynDNS.org (this should be easy to verify).&lt;/li&gt;
&lt;li&gt;Another comment expressed frustration at the  &lt;a href="http://yro.slashdot.org/comments.pl?sid=182481&amp;amp;cid=15088277"&gt;D-Link/India  firewall&lt;/a&gt; :) used to protect management from customer feedback.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The impression I came away with after going through the material on the Internet is that D-Link, as a company, gives short shrift to the network of gentlemen's agreements that hold the internet (and modern society) up. They have demonstrated that they are not above abusing a free service if they can find one, and if the anonymous poster's information is correct, that they are willing to work-around technical protective blocks with impunity.  They use GPL'ed code without honoring its copyright fully and completely.&lt;/p&gt;
&lt;p&gt;Whether this attitude arises due to malice or due to plain incompetence is not clear yet.  Either way, this is one company whose products I'm personally going to avoid in the future, following the principle of giving my business to the least sucky corporation that I can find.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-114460271140893475?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/114460271140893475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2006/04/d-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114460271140893475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114460271140893475'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2006/04/d-link.html' title='D-Link'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-114368691119654945</id><published>2006-03-29T18:38:00.000-08:00</published><updated>2008-06-07T01:36:37.559-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netbsd'/><title type='text'>New Indian BSD developer</title><content type='html'>&lt;p&gt;India now has another BSD developer: Cherry G. Mathew &lt;tt&gt;&amp;lt;cherry at netbsd dot org&amp;gt;&lt;/tt&gt;.  Cherry is porting NetBSD to the ia64 architecture.&lt;/p&gt;&lt;p&gt;Congratulations, Cherry!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-114368691119654945?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/114368691119654945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2006/03/new-indian-bsd-developer.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114368691119654945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114368691119654945'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2006/03/new-indian-bsd-developer.html' title='New Indian BSD developer'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-114270208169459035</id><published>2006-03-18T08:59:00.000-08:00</published><updated>2008-06-07T01:15:25.885-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>hwpmc as a basecamp project</title><content type='html'>&lt;p&gt;I'm trying out &lt;a href="http://www.basecamphq.com/"&gt;Basecamp&lt;/a&gt; as a communication/project management tool for hwpmc work.&lt;/p&gt;&lt;p&gt;&lt;a href="http://37signals.com/"&gt;37 Signals&lt;/a&gt;, the company behind Basecamp, uses &lt;a href="http://www.chicagoist.com/archives/2006/02/28/interview_jason_fried_david_heinemeier_hansson_of_37signals.php"&gt;FreeBSD   servers&lt;/a&gt; to host Basecamp.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-114270208169459035?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://jkoshy-freebsd.projectpath.com/' title='hwpmc as a basecamp project'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/114270208169459035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2006/03/hwpmc-as-basecamp-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114270208169459035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/114270208169459035'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2006/03/hwpmc-as-basecamp-project.html' title='hwpmc as a basecamp project'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-113889315171656866</id><published>2006-02-02T05:32:00.000-08:00</published><updated>2008-06-07T01:27:14.417-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Embedded Space</title><content type='html'>The past few weeks I've been hacking a small MIPS-based router, getting a glimpse into the workings of the embedded 'Linux' world.  This is life at the edge of chaos: open-source, yes, but nearly bereft of sane software development practices.

The FreeBSD world is so much nicer:
&lt;ul&gt;&lt;li&gt;I found FreeBSD to be an excellent platform for development.  The tools I needed were already part of the FreeBSD ports collection, and building applications via ports allowed me to tweak their  configuration as I wished (e.g., &lt;tt&gt;make WITH_PYTHON=1 WITHOUT_PERL=1&lt;/tt&gt;); a future port upgrade would preserve such settings automatically.  User interaction remains smooth and glitch-free even running large compiles in the background.
&lt;/li&gt;&lt;li&gt;Cross-development in FreeBSD is straightforward to get started off with ...
&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;# cd /usr/src

# make buildworld TARGET_ARCH=other-architecture

# make buildenv TARGET_ARCH=other-architecture&lt;/span&gt;&lt;/blockquote&gt;and in one fell swoop one has a cross-compiler, standard libraries, and all the standard utilities synchronized with the kernel and ready for use.  This is very different from the typical 'Linux' project where one has to do a lot of work to reach this point.
&lt;/li&gt;&lt;li&gt;Then there is source history for every file in the base system.  Figuring out "what changed?" isn't an exercise in frustration, scanning a myriad &lt;tt&gt;diff&lt;/tt&gt;s and rummaging inside terse changelogs.&lt;/li&gt;&lt;li&gt;Similarly, is no need to go hunting on the 'net for the current version of common utilities, hoping that these would work with today's cross-toolchain and patch set.  Most of the common utilities that one needs for an embedded product are part of our base system—code and have recieved a fair degree of testing on our supported architectures, the &lt;tt&gt;i386&lt;/tt&gt;, &lt;tt&gt;sparc64&lt;/tt&gt;, &lt;tt&gt;arm&lt;/tt&gt;, &lt;tt&gt;amd64&lt;/tt&gt;, &lt;tt&gt;powerpc&lt;/tt&gt;, &lt;tt&gt;ia64&lt;/tt&gt; and the &lt;tt&gt;alpha&lt;/tt&gt;.    For 3rd-party tools too, patch management is easy with FreeBSD: if a FreeBSD port exists for the application then a &lt;blockquote&gt;&lt;tt&gt;# cd PORTS-DIR &amp;amp;&amp;amp; make patch&lt;/tt&gt;&lt;/blockquote&gt; would give you source code that is (a) patched to compile on FreeBSD and is (b) upto-date or close to upto-date.
&lt;/li&gt;&lt;li&gt;Tracking security vulnerabilities is straightforward on FreeBSD, both for the base system and for 3rd-party ports.
&lt;/li&gt;&lt;/ul&gt;It was sobering to realize how much we FreeBSD folk just take for granted.
&lt;p&gt;
I also now understand how embedded Linux vendor companies manage to charge hefty sums for their embedded OS offerings.  If I were a manager charged with implementing an 'embedded' Linux device, I would pay too.  The risk of a project slipup because of some bizarre interaction between lightly tested upstream source bases is all too real here.
&lt;/p&gt;&lt;p&gt;
There are a number of ways by which FreeBSD could be made even better for embedded development:
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It would be great if we could cross-compile 3rd-party applications as easily as we do the base system today.  A general fix is probably hard, but there are ways to get the near ubiquitous "&lt;tt&gt;configure&lt;/tt&gt;" shell script to handle cross builds reasonably well.
&lt;/li&gt;&lt;li&gt;We need a way to quickly cobble together complete system images (kernel, configuration files, basic utilities, 3rd party tools) for common target platforms.  For example, what if we could say ``I'd like an image from the RELENG_6 branch suitable for a Linksys WRT54GS clone, with &lt;tt&gt;pf&lt;/tt&gt; and &lt;tt&gt;sshd&lt;/tt&gt; from the base system, and &lt;tt&gt;clamav&lt;/tt&gt; and &lt;tt&gt;smtp-proxy&lt;/tt&gt; from ports and with the following local patches'', and have the system churn out a flashable image? The NanoBSD and PicoBSD tools are a start in this direction.
&lt;/li&gt;&lt;li&gt;We need our system analysis and performance measurement tools to be truly cross-platform and embedded development friendly.  For example, it would be cool to be able to run &lt;tt&gt;gprof&lt;/tt&gt; on an AMD64 platform to analyse profiles for ARM binaries.  It would be useful to be able to take kernel core dumps over the network and have seamless cross-architecture kernel debugging over a local LAN.
&lt;/li&gt;&lt;li&gt;Multiple implementations of system functionality would be useful (e.g., some embedded applications could benefit from a less profilgate malloc(3) implementation that the default).&lt;/li&gt;&lt;li&gt;Documentation on scaling FreeBSD down would be useful to new adopters.  Right now this knowledge is scattered in our list archives.
&lt;/li&gt;&lt;/ul&gt;It would be great to see FreeBSD running on more embedded &amp;amp; resource constrained platforms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-113889315171656866?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/113889315171656866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2006/02/embedded-space.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/113889315171656866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/113889315171656866'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2006/02/embedded-space.html' title='Embedded Space'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-113197808367050439</id><published>2005-11-14T04:48:00.000-08:00</published><updated>2008-06-07T01:38:59.752-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Building Products with FreeBSD</title><content type='html'>&lt;p&gt;The availability of high-quality source code from the &lt;a href="http://www.freebsd.org/"&gt;FreeBSD project&lt;/a&gt;, under its liberal license, is a boon to organizations (particularly startups) creating software products and appliances.
&lt;/p&gt; &lt;p&gt;
However, most organizations that I've had the oppurtunity to observe have not been looking at long term &lt;span style="font-style: italic;"&gt;collaboration &lt;/span&gt;with the project. They take in FreeBSD source code as a one-time drop and forget to keep an eye on where things are going. These are the kinds of mistakes that I've seen being made:
&lt;/p&gt; &lt;ul&gt;   &lt;li&gt;One organization developed a kernel module that relied on kernel threads being non-preemptible (despite PREEMPTION being present in -CURRENT). They had to scramble when kernel preemption appeared in -STABLE.
&lt;/li&gt;   &lt;li&gt;One organization started with FreeBSD 5.X and kept fixing bugs that they encountered&lt;span style="font-style: italic;"&gt; in their private copy of the code&lt;/span&gt;. They didn't feed anything back upstream, and had to redo their patches when they took the next code drop from upstream.&lt;/li&gt;&lt;li&gt;One organization started an ambitious FreeBSD project but never spoke about it in public. They advertised for candidates, but had a few excellent candidates walk away unconvinced that they would find good FreeBSD work in that company.
&lt;/li&gt;  &lt;/ul&gt;
&lt;p&gt;Traditionally, you wouldn't think of &lt;span style="font-style: italic;"&gt;collaborating &lt;/span&gt;with your OS vendor. You would buy their software, either as a binary or as source, and start using it. You wouldn't have the ability to influence your vendors strategy and decision making process (unless you were IBM, of course). While some vendors do let you view their bug-list, bug prioritization remains their prerogative, so if you are hurting because of a nasty bug, you just have to cross your fingers and wait. You would be constrained by your vendor's platform support policies too; they could stop supporting a platform that is unprofitable for them but still profitable for you.&lt;/p&gt;

&lt;p&gt;Collaboration with volunteer developed projects is something new, something that is nearly never done in the closed source world.
Collaboration is also something that is not possible with every open source project out there (just being "open-source" is not enough). Effective collaboration requires projects to be complete, transparent, to have good engineering practices, and to have fair and tranparent ways for you to contribute and influence their evolution.&lt;/p&gt;

&lt;p&gt;FreeBSD has good code, and, perhaps more importantly, follows many practices that make it a solid foundation to develop products on.&lt;/p&gt;
&lt;p&gt;So I wrote an article to introduce FreeBSD as a &lt;span style="font-style: italic;"&gt;toolbox&lt;/span&gt; for product development. I've listed the benefits of taking the long-term view, and examined best-practices to follow when collaborating with the FreeBSD project.
&lt;/p&gt; &lt;p&gt;
This article on the FreeBSD website now: &lt;a href="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/building-products/"&gt;http://www.freebsd.org/doc/en_US.ISO8859-1/articles/building-products/&lt;/a&gt;.
&lt;/p&gt; &lt;p&gt;Read, enjoy, spread the word!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-113197808367050439?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.freebsd.org/doc/en_US.ISO8859-1/articles/building-products/' title='Building Products with FreeBSD'/><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/113197808367050439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2005/11/building-products-with-freebsd.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/113197808367050439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/113197808367050439'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2005/11/building-products-with-freebsd.html' title='Building Products with FreeBSD'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13719177.post-113034261578126454</id><published>2005-10-26T08:34:00.000-07:00</published><updated>2008-06-07T00:42:04.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='freebsd'/><title type='text'>Cross building FreeBSD</title><content type='html'>&lt;h2&gt;A Tale of OS Bootstrapping&lt;/h2&gt;
What do you do when an AMD64 box comes by your way but you only have an 32-bit operating system to run on it? With FreeBSD, you can bootstrap your way into a 64 bit world. Here is what you do:
&lt;ol&gt;&lt;li&gt;Install FreeBSD in the usual way. When doing so, keep a spare disk partition for holding the new amd64 OS. In this example, we'll assume that this is partition 'd'. Mount this partition on some convenient mount point, say &lt;tt&gt;/1&lt;/tt&gt;. The full FreeBSD system occupies about ~250MB these days; so make this partition a few GB in size.
Don't forget to install the sources to the FreeBSD system of course, otherwise there won't be anything to cross-build.&lt;/li&gt;&lt;li&gt;Change directory to the root of the source tree &lt;tt&gt;/usr/src&lt;/tt&gt; and execute the following commands:&lt;pre&gt;# cd /usr/src
# make world TARGET_ARCH=amd64 DESTDIR="/1"&lt;/pre&gt; This step builds an amd64 userland and populates it into &lt;tt&gt;/1&lt;/tt&gt;.  Several interesting things happen as part of this step.&lt;ul&gt;&lt;li&gt;Since the host OS at this point is running in 32-bit mode it has to build a full cross-toolchain first: tools running on the i386 architecture but manipulating libraries and executables for the amd64 architecture.&lt;/li&gt;&lt;li&gt;It then needs to compile the whole source tree for the amd64 architecture using tools running on the i386.&lt;/li&gt;&lt;li&gt;Once compilation succeeds, the build process transfers the newly built binaries into the filesystem rooted at &lt;tt&gt;/1&lt;/tt&gt;.&lt;/li&gt;&lt;/ul&gt;Other options for TARGET_ARCH include &lt;tt&gt;powerpc&lt;/tt&gt;, &lt;tt&gt;sparc64&lt;/tt&gt;, &lt;tt&gt;alpha&lt;/tt&gt;, &lt;tt&gt;ia64&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The next step is to populate a default &lt;tt&gt;/etc&lt;/tt&gt;.  This is how you do this:&lt;pre&gt;# make distribution TARGET_ARCH=amd64 DESTDIR=/1&lt;/pre&gt;This step populates &lt;tt&gt;/1/etc&lt;/tt&gt; with the default set of startup scripts.&lt;/li&gt;&lt;li&gt;Now we need an &lt;tt&gt;amd64&lt;/tt&gt; kernel to boot from:&lt;pre&gt;# make kernel KERNCONF=GENERIC TARGET_ARCH=amd64 DESTDIR="/1"&lt;/pre&gt; This builds a kernel following the configuration specified in the configuration file named &lt;tt&gt;/usr/src/sys/amd64/conf/GENERIC&lt;/tt&gt; and installs it under &lt;tt&gt;/1/boot/kernel&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;Copy over &lt;tt&gt;/etc/fstab&lt;/tt&gt; to &lt;tt&gt;/1/etc/fstab&lt;/tt&gt; and change the definition of the &lt;tt&gt;/&lt;/tt&gt; (root) mount point to use partition 'd' (the default is to mount &lt;tt&gt;/&lt;/tt&gt; on the 'a' partition).&lt;/li&gt;&lt;li&gt;Copy over &lt;tt&gt;/etc/rc.conf&lt;/tt&gt; to &lt;tt&gt;/1/etc/rc.conf&lt;/tt&gt;, as this contains the machine's hostname, and IP addresses of its interfaces.&lt;/li&gt;&lt;li&gt;Create a file &lt;tt&gt;boot.config&lt;/tt&gt; in the 'a' disk partition containing the following text:&lt;pre&gt;0:ad(0,d)/boot/loader&lt;/pre&gt; This command informs the first stage boot loader (see &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=boot&amp;amp;apropos=0&amp;amp;sektion=8&amp;amp;manpath=FreeBSD+6.0-current&amp;amp;format=html"&gt;boot(8)&lt;/a&gt;) that we want to boot from partition 'd' instead of the usual partition 'a'. If you've booted from a SCSI disk, you may need to specify the boot device as &lt;tt&gt;da(0,d)&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;Reboot.  Viola! You boot into an AMD64 kernel running an AMD64 userland.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13719177-113034261578126454?l=edoofus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoofus.blogspot.com/feeds/113034261578126454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoofus.blogspot.com/2005/10/cross-building-freebsd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/113034261578126454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13719177/posts/default/113034261578126454'/><link rel='alternate' type='text/html' href='http://edoofus.blogspot.com/2005/10/cross-building-freebsd.html' title='Cross building FreeBSD'/><author><name>Joseph Koshy</name><uri>http://www.blogger.com/profile/05977861315586610412</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-zU2dulTriXE/TapyvPlGj0I/AAAAAAAAArc/EX7JbCMwjNo/s220/jkoshy.jpeg'/></author><thr:total>0</thr:total></entry></feed>
