<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>benburleson</title>
	<atom:link href="http://benburleson.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://benburleson.wordpress.com</link>
	<description>A product of 80s America...living the American dream.</description>
	<lastBuildDate>Sat, 03 Jan 2009 01:16:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='benburleson.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>benburleson</title>
		<link>http://benburleson.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://benburleson.wordpress.com/osd.xml" title="benburleson" />
	<atom:link rel='hub' href='http://benburleson.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Move to Self-Hosted WordPress</title>
		<link>http://benburleson.wordpress.com/2009/01/03/move-to-self-hosted-wordpress/</link>
		<comments>http://benburleson.wordpress.com/2009/01/03/move-to-self-hosted-wordpress/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 01:15:40 +0000</pubDate>
		<dc:creator>benburleson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benburleson.wordpress.com/2009/01/03/move-to-self-hosted-wordpress/</guid>
		<description><![CDATA[I have moved from the WordPress-hosted blog to self-hosted for more control. Please update any links: http://benburleson.com/blog/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=31&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have moved from the WordPress-hosted blog to self-hosted for more control.  Please update any links: <a title="benburleson.com/blog" href="http://benburleson.com/blog/">http://benburleson.com/blog/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benburleson.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benburleson.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benburleson.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benburleson.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benburleson.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benburleson.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benburleson.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benburleson.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=31&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benburleson.wordpress.com/2009/01/03/move-to-self-hosted-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf07e034fe718dd344368fc65100a79e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">benburleson</media:title>
		</media:content>
	</item>
		<item>
		<title>Hide Image Source using CSS Sprite Technique via PHP and Javascript</title>
		<link>http://benburleson.wordpress.com/2008/12/24/hide-image-source-using-css-sprite-technique-via-php-and-javascript/</link>
		<comments>http://benburleson.wordpress.com/2008/12/24/hide-image-source-using-css-sprite-technique-via-php-and-javascript/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 00:13:07 +0000</pubDate>
		<dc:creator>benburleson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benburleson.wordpress.com/?p=29</guid>
		<description><![CDATA[After thinking how silly it is to attempt to prevent people from downloading images by blocking the right-click functionality, I thought, &#8220;There must be a better way to do this!&#8221; So, I came up with a technique to scramble the image and rearrange it using CSS so it looks normal. I released it to Google [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=29&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After thinking how silly it is to attempt to prevent people from downloading images by blocking the right-click functionality, I thought, &#8220;There must be a better way to do this!&#8221;</p>
<p>So, I came up with a technique to scramble the image and rearrange it using CSS so it looks normal.</p>
<p>I released it to Google Code: <a title="SprHide - Google Code" href="http://code.google.com/p/sprhide/" target="_blank">http://code.google.com/p/sprhide/</a></p>
<p>Check it out in action here: <a title="SprHide in Action" href="http://benburleson.com/sprhide/test.php5" target="_blank">http://benburleson.com/sprhide/test.php5</a></p>
<p>Go ahead, try to steal the image!</p>
<p>(Without using a screengrab, jerk!)</p>
<p>It could use a lot of cleaning up and there are plenty of possibilities for improvement.  I&#8217;m hoping the Open Source Community will pick it up!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benburleson.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benburleson.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benburleson.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benburleson.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benburleson.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benburleson.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benburleson.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benburleson.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=29&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benburleson.wordpress.com/2008/12/24/hide-image-source-using-css-sprite-technique-via-php-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf07e034fe718dd344368fc65100a79e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">benburleson</media:title>
		</media:content>
	</item>
		<item>
		<title>Remote Updates on a Blackfin Device &#8211; Part 2</title>
		<link>http://benburleson.wordpress.com/2008/12/23/remote-updates-on-a-blackfin-device-part-2/</link>
		<comments>http://benburleson.wordpress.com/2008/12/23/remote-updates-on-a-blackfin-device-part-2/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 16:50:13 +0000</pubDate>
		<dc:creator>benburleson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benburleson.wordpress.com/?p=25</guid>
		<description><![CDATA[OK, here is the second part of my approach to (safely) apply software application updates remotely to a Blackfin device without using netboot. See Part 1 for the background. So, we now have our Blackfin booting uClinux from a compressed image stored in a flash partition.  We allocated two other flash partitions: Bootloader (Das U-Boot) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=25&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>OK, here is the second part of my approach to (safely) apply software application updates remotely to a <a title="Blackfin ADSP-BF537" href="http://www.analog.com/en/embedded-processing-dsp/blackfin/adsp-bf537/processors/product.html" target="_blank">Blackfin</a> device without using netboot.</p>
<p>See <a title="Remote Updates on a Blackfin Device - Part 1" href="http://benburleson.wordpress.com/2008/12/12/remote-updates-on-a-blackfin-device-part-1/">Part 1</a> for the background.</p>
<p>So, we now have our Blackfin booting uClinux from a compressed image stored in a flash partition.  We allocated two other flash partitions:</p>
<ul>
<li>Bootloader (Das U-Boot)</li>
<li>Flash filesystem (jffs2)</li>
</ul>
<p>In the startup messages, you should see something like this:</p>
<pre><span style="color:#ccffff;">Creating 3 MTD partitions on "physmap-flash.0":                                
0x00000000-0x00040000 : "Bootloader"                                           
0x00040000-0x00100000 : "jffs2"                                                
0x00100000-0x00400000 : "uImage" </span></pre>
<p>The jffs2 partition is mounted in the startup script /etc/rc.  You need these two lines somewhere:</p>
<pre><span style="color:#ccffff;">mkdir /mnt/flash
mount -t jffs2 /dev/mtdblock1 /mnt/flash
</span></pre>
<p>The mounted directory /mnt/flash/ is used to store application updates.  Those will persist between device power cycles and are deployed each time the device boots.</p>
<p>The application deployment is kicked off by another line in /etc/rc.  I simply call a script I created: /bin/deploy.  Here&#8217;s what is inside /bin/deploy:</p>
<pre><span style="color:#ccffff;">#!/bin/sh                                                                       

cd /mnt/flash                                                                   

machine=`hostname`                                                             
pkgname="$machine-*.tgz"                                                       
md5name="$machine-*.md5"                                                        

md5sum -c $md5name                                                             
if [ $? -ne 0 ]                                                                
then                                                                           
  echo "md5 BAD! Deploy aborted."                                              
else                                                                           
  echo "md5 OK. Deploying applications."                                       
  tar zxvf $pkgname -C /                                                       
fi</span></pre>
<p>This script changes to the directory /mnt/flash/ (our persistant flash filesystem) and checks if a valid tarball exists for this device.  The tarball must begin with the hostname of the device and includes a version id.  The tarball must also pass an md5 check.  If the check is successful, the tarball is exploded from / (root), placing new software in the device.</p>
<p>Now, how do we get the tarball of updated software and its md5 into /mnt/flash?  I created another script for that:</p>
<pre><span style="color:#ccffff;">#!/bin/sh

if [ $# -ne 1 ]
then
  echo "Syntax Error"
  echo "Usage $0 &lt;version&gt;  e.g. $0 1.0.2"
else

  cd /mnt/flash

  machine=`hostname`
  pkgname="$machine-$1.tgz"
  md5name="$machine-$1.md5"

  if [ -f $pkgname ]
  then
    echo "$pkgname already exists.  Download new copy? [Y/n]"
    read ans
    if [ $ans == "N" -o $ans == "n" ]
    then
      echo "Using local copy of $pkgname."
      download=0
    else
      echo "Downloading new copy of $pkgname."
      download=1
    fi
  else
    echo "$pkgname needs to be downloaded."
    download=1
  fi

  if [ $download -eq 1 ]
  then
    rm $machine-*.tgz
    rm $machine-*.md5
    tftp -g -l $pkgname -r $pkgname fs
    tftp -g -l $md5name -r $md5name fs
    md5sum -c $md5name
  fi
  /bin/deploy
fi</span></pre>
<p>This script is just a smart downloader.  It takes an input parameter as the version number of the device application upgrade to download.  It prepends the hostname to the version number and creates two filenames: 1) the tarball, and 2) the md5.</p>
<p>It first checks if the upgrade needs to be downloaded and allows the user a choice to download a new copy or use existing one if upgrade version exists.  It it does not exist, it automatically downloads it (via TFTP) from a TFTP server.  (The setup of that server is outside of the scope of this, but I will explain below how the tarball and md5 are created.)</p>
<p>After the download of the upgrade, it performs an md5 check and deploys the new upgrade.</p>
<p>The final step is creating the upgrade tarball and md5.  To accomplish this, I created a slightly crude ant task:</p>
<pre><span style="color:#ccffff;">tar czvf $(LCO_VER_FW).tgz -C romfs/ bin/lco-fw-post bin/lco-enviro-update home/httpd/cgi-bin/command home/httpd/cgi-bin/status
md5sum $(LCO_VER_FW).tgz &gt; $(LCO_VER_FW).md5
scp $(LCO_VER_FW).* root@fs:/tftpboot/</span></pre>
<p>It contains three steps:</p>
<ul>
<li>Create tarball &#8211; based from root dir (romfs), include necessary files</li>
<li>Create md5</li>
<li>scp both files to TFTP server</li>
</ul>
<p>LCO_VER_FW is just a variable conatining the hostname and version id.</p>
<p>And there you have it!  A complete, safe solution to upgrade device-specific software remotely without using netboot!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benburleson.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benburleson.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benburleson.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benburleson.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benburleson.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benburleson.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benburleson.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benburleson.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=25&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benburleson.wordpress.com/2008/12/23/remote-updates-on-a-blackfin-device-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf07e034fe718dd344368fc65100a79e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">benburleson</media:title>
		</media:content>
	</item>
		<item>
		<title>My First Zazzle Sale!</title>
		<link>http://benburleson.wordpress.com/2008/12/16/my-first-zazzle-sale/</link>
		<comments>http://benburleson.wordpress.com/2008/12/16/my-first-zazzle-sale/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 22:26:12 +0000</pubDate>
		<dc:creator>benburleson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benburleson.wordpress.com/?p=16</guid>
		<description><![CDATA[Holy Crap, how surprised was I to see this about one year after I created it.  I wish I had info on who ordered it so I could find out how they found it! For those of you looking for a last-minute Christmas gift for that oh-so-hard-to-shop-for friend, look no further! http://www.zazzle.com/dont_bug_me_im_on_sabbatical_mug-168830337059033050<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=16&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Holy Crap, how surprised was I to see this about one year after I created it.  I wish I had info on who ordered it so I could find out how they found it!</p>
<div id="attachment_17" class="wp-caption alignright" style="width: 447px"><a onclick="return mugicPopWin(this,event);" oncontextmenu="mugicRightClick(this);" href="http://www.zazzle.com/dont_bug_me_im_on_sabbatical_mug-168830337059033050"><img class="size-full wp-image-17" title="zazzle-sale" src="http://benburleson.files.wordpress.com/2008/12/zazzle-sale.png?w=437&#038;h=409" alt="Notification of my first Zazzle sale!" width="437" height="409" /></a><p class="wp-caption-text">Notification of my first Zazzle sale!</p></div>
<p>For those of you looking for a last-minute Christmas gift for that oh-so-hard-to-shop-for friend, look no further!</p>
<p><a onclick="return mugicPopWin(this,event);" oncontextmenu="mugicRightClick(this);" title="Don't Bug Me, I'm on Sabbatical." href="http://www.zazzle.com/dont_bug_me_im_on_sabbatical_mug-168830337059033050">http://www.zazzle.com/dont_bug_me_im_on_sabbatical_mug-168830337059033050</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benburleson.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benburleson.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benburleson.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benburleson.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benburleson.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benburleson.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benburleson.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benburleson.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=16&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benburleson.wordpress.com/2008/12/16/my-first-zazzle-sale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf07e034fe718dd344368fc65100a79e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">benburleson</media:title>
		</media:content>

		<media:content url="http://benburleson.files.wordpress.com/2008/12/zazzle-sale.png" medium="image">
			<media:title type="html">zazzle-sale</media:title>
		</media:content>
	</item>
		<item>
		<title>Remote Updates on a Blackfin Device &#8211; Part 1</title>
		<link>http://benburleson.wordpress.com/2008/12/12/remote-updates-on-a-blackfin-device-part-1/</link>
		<comments>http://benburleson.wordpress.com/2008/12/12/remote-updates-on-a-blackfin-device-part-1/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 20:20:49 +0000</pubDate>
		<dc:creator>benburleson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benburleson.wordpress.com/?p=8</guid>
		<description><![CDATA[Background Blackfin device: CM-BF537E from Bluetechnix Bootloader: Das U-Boot (blackfin.uClinux project site) OS: uClinux (blackfin.uClinux project site) The goal is a controller for various mechanical devices (move motors, read sensors via GPIO) with a web interface (HTML and web-services). I spent some time organizing a safe method for deploying application updates to a remote blackfin [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=8&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<ul>
<li>Blackfin device: <a title="CM-BF537E" href="http://www.bluetechnix.com/rainbow2006/site/blackfin_family/__core_modules/__cm-bf537e/313/cm-bf537e.aspx" target="_blank">CM-BF537E</a> from <a title="Bluetechnix" href="http://www.bluetechnix.com/rainbow2006/Default.aspx" target="_blank">Bluetechnix</a></li>
<li>Bootloader: <a title="U-Boot" href="http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot" target="_blank">Das U-Boot</a> (<a title="U-Boot" href="http://blackfin.uclinux.org/gf/project/u-boot" target="_blank">blackfin.uClinux project site</a>)</li>
<li>OS: <a title="uClinux" href="http://docs.blackfin.uclinux.org/doku.php?id=uclinux_on_blackfin" target="_blank">uClinux</a> (<a title="uClinux" href="http://blackfin.uclinux.org/gf/project/uclinux-dist" target="_blank">blackfin.uClinux project site</a>)</li>
</ul>
<p>The goal is a controller for various mechanical devices (move motors, read sensors via GPIO) with a web interface (HTML and web-services).</p>
<p>I spent some time organizing a safe method for deploying application updates to a remote blackfin device.  There were a couple restrictions that led to my final plan.</p>
<ul>
<li>If the update process fails, the device should still boot and be accessible via internet.</li>
<li>Updating needs to be done remotely via internet.</li>
</ul>
<h2>Approach</h2>
<h3>Flash Layout</h3>
<p>Three paritions:</p>
<ul>
<li>Bootloader (u-boot) &#8211; 2 sectors 0&#215;20000000-0x2003FFFF</li>
<li>Flash filesystem (jffs2) &#8211; 6 sectors 0&#215;20040000-0x200FFFFF</li>
<li>uClinux compressed image (uImage) &#8211; 24 sectors 0&#215;20100000-0x203FFFFF</li>
</ul>
<p>I originally placed the uImage parition directly after the u-boot partition, with the jffs2 partition at the end.  The flash device on the CM-BF537E splits the flash into two halves addressable by toggling a GPIO pin (pf4).  Some tools handled the addressing and toggling of pf4 for me, others didn&#8217;t.  It turned out easier to move the jffs2 parition into the first half of flash and let the uImage parition straddle the flash halves.</p>
<h3>Setting Up U-Boot</h3>
<p>On the first boot, I wanted u-boot to download the uImage (via TFTP) and write it to flash memory.  However, we did not want the device to always netboot, so u-boot would then alter itself to boot from the flashed uImage.</p>
<p>U-boot also needs to erase the jffs2 paritions on a fresh CM-BF537E so the filesystem can mount.</p>
<p>Here is the important section from cm-bf537e.h</p>
<pre><span style="color:#ccffff;">"erasejffs2=" \
    "protect off 0x20040000 0x200FFFFF;" \
    "erase 0x20040000 0x200FFFFF;" \
    "protect on 0x20040000 0x200FFFFF;" \
    "" \
"tftpupdate=" \
    "run erasejffs2;" \
    "tftp $(loadaddr) $(imagename);" \
    "protect off 0x20100000 0x203FFFFF;" \
    "erase 0x20100000 0x203FFFFF;" \
    "cp.b $(loadaddr) 0x20100000 0x300000;" \
    "protect on 0x20100000 0x203FFFFF;" \
    "setenv bootcmd run localboot;" \
    "saveenv;" \
    "reset" \
    "" \
"localboot=" \
    "ping 172.16.5.1;" \
    "pf4 set;" \
    "cp.b 0x20100000 $(loadaddr) 100000;" \
    "pf4 clear;" \
    "cp.b 0x20000000 0x1100000 200000;" \
    "pf4 set;" \
    "bootm" \
    ""</span></pre>
<p>Again, on first boot, the device auto-runs tftpupdate.  Here is what happens:</p>
<ul>
<li>Jffs2 parition is erased</li>
<li>uImage is downloaded into memory (address 0&#215;1000000)</li>
<li>Unprotect flash sectors where uImage will be stored</li>
<li>Erase flash sectors where uImage will be stored</li>
<li>Copy uImage into flash</li>
<li>Protect flash sectors where uImage is now stored</li>
<li>Change default startup command to localboot (described below)</li>
<li>Save setting change</li>
<li>Reset device</li>
</ul>
<p>When the device comes back up, here is what happens:</p>
<ul>
<li>Ping a server (the only thing this does is write the u-boot MAC Address to the network device so uClinux will use the same MAC Address and not assign a random one)</li>
<li>Set the GPIO pin to use the first half of flash (mentioned above)</li>
<li>Copy uImage from first half of flash into memory (0&#215;1000000)</li>
<li>Clear GPIO pin to use second half of flash</li>
<li>Copy remainder of uImage in upper half of flash to memory (offset from previous copy)</li>
<li>Re-set GPIO pin</li>
<li>Boot uImage from memory</li>
</ul>
<p>From here, the device is now running!</p>
<p>Upgrades to the uImage stored in flash are possible, but the u-boot console is needed to halt the autoboot and run the tftpupdate macro again.</p>
<p>This post is actually just the setup of U-Boot and uClinux to boot a blackfin device from a stored uImage (i.e. NOT netboot).  Part 2 will explain the scheme for updating the device remotely &#8211; without netboot!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benburleson.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benburleson.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benburleson.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benburleson.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benburleson.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benburleson.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benburleson.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benburleson.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=8&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benburleson.wordpress.com/2008/12/12/remote-updates-on-a-blackfin-device-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf07e034fe718dd344368fc65100a79e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">benburleson</media:title>
		</media:content>
	</item>
		<item>
		<title>California&#8217;s Prop8 Is About Real People &#8211; Here&#8217;s One View</title>
		<link>http://benburleson.wordpress.com/2008/11/09/californias-prop8-is-about-real-people-heres-one-view/</link>
		<comments>http://benburleson.wordpress.com/2008/11/09/californias-prop8-is-about-real-people-heres-one-view/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 23:53:38 +0000</pubDate>
		<dc:creator>benburleson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benburleson.wordpress.com/2008/11/09/californias-prop8-is-about-real-people-heres-one-view/</guid>
		<description><![CDATA[This was written by my friend Peter. It&#8217;s a powerful view of what California&#8217;s vote on Proposition 8 really means. read more &#124; digg story<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=7&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This was written by my friend Peter.  It&#8217;s a powerful view of what California&#8217;s vote on Proposition 8 really means.</p>
<p><a href="http://benburleson.com/Prop8/Peter.html">read more</a> | <a href="http://digg.com/political_opinion/California_s_Prop8_Is_About_Real_People_Here_s_One_View">digg story</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benburleson.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benburleson.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/benburleson.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/benburleson.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benburleson.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benburleson.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benburleson.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benburleson.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benburleson.wordpress.com&amp;blog=5155085&amp;post=7&amp;subd=benburleson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://benburleson.wordpress.com/2008/11/09/californias-prop8-is-about-real-people-heres-one-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bf07e034fe718dd344368fc65100a79e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">benburleson</media:title>
		</media:content>
	</item>
	</channel>
</rss>
