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

<channel>
	<title>Tinyhack.com &#187; opensource</title>
	<atom:link href="http://tinyhack.com/category/opensource/feed/" rel="self" type="application/rss+xml" />
	<link>http://tinyhack.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 05 Nov 2011 10:09:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>EZ430-Chronos OTP</title>
		<link>http://tinyhack.com/2011/03/02/ez430-chronos-otp/</link>
		<comments>http://tinyhack.com/2011/03/02/ez430-chronos-otp/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 17:29:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=185</guid>
		<description><![CDATA[After wanting the EZ430 Chronos watch for a long time, I finally ordered one on Febuary 20th from TI eStore, and I got the watch on February 24th (Tax Free). So this is another stuff in my long list of &#8230; <a href="http://tinyhack.com/2011/03/02/ez430-chronos-otp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After wanting the <a href="http://processors.wiki.ti.com/index.php/EZ430-Chronos">EZ430 Chronos watch</a> for a long time, I finally ordered one on Febuary 20th from TI eStore, and I got the watch on February 24th (Tax Free). So this is another stuff in my long list of &#8220;things to hack&#8221;.</p>
<p>I had a good idea to use my Ez430 Chronos as OTP generator for Google 2 factor authentication. Before my long weekend, I did my research on Thursday (24 February) and that time no one had implemented it. So I wrote a small modification to <a href="http://github.com/poelzi/OpenChronos/">OpenChronos</a>, and just before I finished my implementation on Sunday (I was quite busy during the long weekend helping to move our company&#8217;s office), I looked at <a href="http://processors.wiki.ti.com/index.php/EZ430-Chronos">Chronos Wiki</a> again to find some links to the chronos documentation, and found out that  <a href="http://tnhh.net/pancake/chronos-otp.xml">Huan Truong has just implemented his version of OTP</a> by modifying OpenChronos.</p>
<p><img src="http://1.bp.blogspot.com/-FXbRgwkcP1U/TWcEytoBZjI/AAAAAAAACEs/Tdbx5RYBQ7s/s320/%253D%253Futf-8%253FB%253FSmFtIGd3IHNhbXBlLiBHYSBrZW5hIHBhamVrLi5qcGc%253D%253F%253D-765512" /></p>
<p>After learning that in his version the clock function doesn&#8217;t work yet (in his readme it says &#8220;THIS FIRMWARE CURRENTLY HAS A YET-TO-IMPLEMENT CLOCK FUNCTIONALITY, SO IT WONT DISPLAY TIME PROPERLY&#8221;), I decided to continue my implementation. My implementation doesn&#8217;t change the time logic so you can still use the stock Control Center provided by TI  (Huan Troung changed the OpenChronos code to use epoch implementation, and he modified the control center) . Instead of replacing all algorithms to use timestamp, I use a simple mktime implementation to convert existing year/month/date data to unix timestamp.</p>
<p>After flashing the image to the watch, a new menu is added to the second line after &#8220;rFbSL&#8221;, it will show a heart icon  and first 2 digits of the OTP (I will never buy a heart monitor for this watch so I use that icon just to show that I am in OTP mode). Pressing the &#8220;#&#8221; key for a few seconds will show the remaining 4 digits. Just for your information, enabling CONFIG_OTP adds  2914 bytes to the code size.</p>
<p>So here is my version of Google OTP <strike> (If many people are interested, I can put it in github):</p>
<p>http://tinyhack.com/files/OpenChronos-joe-otp.zip</p>
<p>I am too lazy to implement the &#8220;make config&#8217;, just edit otp.h with your key, and fill in the timezone offset (+N from UTC). You can get the key from base32 encoded string using codegen script that I made, for example:</p>
<p>bash$ python codegen.py pf xwqy lomvz wu 33f<br />
\x79\x6f\x68\x61\x6e\x65\x73\x6a\x6f\x65<br />
</strike></p>
<p><a href="https://github.com/yohanes/OpenChronos">https://github.com/yohanes/OpenChronos</a></p>
<p>You can use <code>make config</code> to set your secret key in base32 (that means you can just copy paste from the auth code presented by Google), and you can set the timezone offset.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2011/03/02/ez430-chronos-otp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CNS11XX FreeBSD port completed</title>
		<link>http://tinyhack.com/2009/12/11/cns11xx-freebsd-port-completed/</link>
		<comments>http://tinyhack.com/2009/12/11/cns11xx-freebsd-port-completed/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 08:33:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=149</guid>
		<description><![CDATA[It has been a long time since I started this project, and even though I am making a good progress at the beginning, my progress was getting slower lately. Today I decided to take a day off from work to &#8230; <a href="http://tinyhack.com/2009/12/11/cns11xx-freebsd-port-completed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It has been a long time since I started this project, and even though I am making a good progress at the beginning, my progress was getting slower lately. Today I decided to take a day off from work to finish some remaining task: network driver, automatic memory detection, and flash device support.</p>
<p>Pyun YongHyeon have helped me a lot with the network driver. The speed is still not good, but he have helped to make the network driver to more correct (better, more reliable). I will still need to ask him to check for the final version, but I believe I have fixed most errors he pointed out.</p>
<p>My agestar, which also uses CNS11XX devices comes with 32Mb memory, while the Emprex NSD-100 have 64mb of memory. I have added a code to autodetect the memory size. So one binary file should work on both devices.</p>
<p>The flash device in Emprex NSD-100 complies with CFI, and it was very easy to use with the existing CFI driver. I just need to write several lines of code. The next step is to boot freebsd directly from the flash (with the root filesystem on USB). Unlike in Linux, the flash device can not be accessed as partitions (not yet).</p>
<p>First, we need to write the kernel.bin to cfi0, because the first 132 kb is used by boot loader, we need to skip to somewhere > 132kb. To make it easy, i just skip 1 megabyte from beginning of flash.</p>
<p>dd if=kernel.bin seek=1 bs=1m of=/dev/cfi0</p>
<p>be very very very careful with the dd command. Without correct seek and bs, you may overwrite the bootloader. The command  will take quite a long time to finish (3 minutes).</p>
<p>Next step is to set the initial boot command. In the boot loader, setup bootcmd to copy the data in ram to 0&#215;1000000 from 0&#215;10100000, then boot the device:</p>
<p>setenv bootcmd cp.l 0&#215;10100000 0&#215;1000000 0x1a0000\;go 0&#215;1000000<br />
saveenv</p>
<p>Now when we boot the device, we should go directly to freebsd.</p>
<p>I won&#8217;t provide binaries, but the latest source code is in:</p>
<p><a href="http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/str91xx/src/sys/arm/econa&#038;HIDEDEL=NO">http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/str91xx/src/sys/arm/econa&#038;HIDEDEL=NO</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2009/12/11/cns11xx-freebsd-port-completed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CNX11XX/STR91XX FreeBSD Progress</title>
		<link>http://tinyhack.com/2009/09/28/cnx11xxstr91xx-freebsd-progress/</link>
		<comments>http://tinyhack.com/2009/09/28/cnx11xxstr91xx-freebsd-progress/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:56:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=145</guid>
		<description><![CDATA[Last weekend I continued my work on FreeBSD port. I am concentrating on the network speed improvement, and I made a good progress with it. The network speed is now about 2.1 Mbps (FTP upload from device), this is still &#8230; <a href="http://tinyhack.com/2009/09/28/cnx11xxstr91xx-freebsd-progress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last weekend I continued my work on FreeBSD port. I am concentrating on the network speed improvement, and I made a good progress with it. The network speed is now about 2.1 Mbps (FTP upload from device), this is still slower than the Linux version but i think it already reach a usable state (I think I should be able to stream some DivX files through HTTP from it). I will ask around in the freebsd-arm/freebsd-net mailing list so I can do more improvement on the driver.</p>
<p>I am still a bit worried playing around with the Flash, since I don&#8217;t have anything to restore it back in case I made a mistake. So I think I will leave this part for a while.</p>
<p>For everyone who have NSD-100 with Serial Port attached to it, you can try a precompiled binary thah I have prepared, or you can compile from source.  To use the binary version, you will need a USB disk (at least 2GB in size), and a TFTP server. Actually you only need about 256 megabyte if you prepare your own disk instead of using my image.</p>
<p>Here are the steps for the binary version:</p>
<ol>
<li>Download the disk image from <a href="http://tinyhack.com/files/disk-2gb-freebsd-armv4-26-september-2009.img.bz2">here</a></li>
<li>Decompress (bunzip) the disk image, use dd to write to your USB disk</li>
<li>Since there is no boot menu, entering single or multi user mode is done by booting different kernel. Download the <a href="http://tinyhack.com/files/kernel-cns11xx-multi-freebsd-28-sept-2009.bin">multi user kernel</a> or <a href="http://tinyhack.com/files/kernel-cns11xx-single-freebsd-28-sept-2009.bin">single user kernel</a> and put it in your tftpserver</li>
<li>Boot the kernel </li>
</ol>
<p>To boot the kernel, you need to access your device using serial port. I think You need to hold the reset button to enter the boot prompt (mine always goes to the boot prompt because Bruce did something with the configuration area). You should see
<pre>STR9100></pre>
<p> prompt.</p>
<pre>
setenv serverip 192.168.1.1
(you can also 'saveenv' to save the TFTP server address permanently)
tftpboot 0x1000000 name-of-kernel.bin
go 0x1000000
</pre>
<p>To build your own disk image, make an empty disk.img with the size that you want. Goto /usr/src and then (modified from instruction to make i386 image <a href="http://bsdimp.blogspot.com/2007/10/building-bootable-freebsdi386-images.html">by Warner Losh</a>)</p>
<pre>
export TARGET_ARCH=arm
make buildworld
mdconfig -a -t vnode -f disk.img
fdisk -I md0
fdisk -B md0
bsdlabel -w md0s1 auto
bsdlabel -B md0s1
newfs /dev/md0s1a
mount /dev/md0s1a /mnt/
make installworld DESTDIR=/mnt
make distrib-dirs DESTDIR=/mnt
make distribution DESTDIR=/mnt
echo /dev/da0s1a / ufs rw 1 1 > /mnt/etc/fstab
echo ifconfig_DEFAULT=DHCP > /mnt/etc/rc.conf
echo hostname=demo >> /mnt/etc/rc.conf
</pre>
<p>To compare your boot experience <a href="http://tinyhack.com/files/freebsd-cns11xx-log-multi-28-sept-2009.txt">here is is the bootlog for the multi user mode</a>, and <a href="http://tinyhack.com/files/freebsd-cns11xx-log-single-28-sept-2009.txt">the single user mode</a>.</p>
<p>For the latest kernel source, you can see the perforce depot at:</p>
<p><a href="http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/str91xx&#038;HIDEDEL=NO">http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/str91xx&#038;HIDEDEL=NO</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2009/09/28/cnx11xxstr91xx-freebsd-progress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Agestar/CNS11XX Freebsd progress</title>
		<link>http://tinyhack.com/2009/05/24/agestarcns11xx-freebsd-progress/</link>
		<comments>http://tinyhack.com/2009/05/24/agestarcns11xx-freebsd-progress/#comments</comments>
		<pubDate>Sun, 24 May 2009 13:55:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=126</guid>
		<description><![CDATA[I&#8217;m still working on the Freebsd port, and haven&#8217;t tried to fix the network driver problem in Linux (it only happens on samba 3 which I don&#8217;t use daily). The reason to focus my work on the FreeBSD port is &#8230; <a href="http://tinyhack.com/2009/05/24/agestarcns11xx-freebsd-progress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still working on the Freebsd port, and haven&#8217;t tried to fix the network driver problem in Linux (it only happens on samba 3 which I don&#8217;t use daily). The reason to focus my work on the FreeBSD port is because I want to understand more about the network driver. The current Linux network driver was not written from scratch but from modifying existing source. The source was full of things that I don&#8217;t understand, which proves to be unnecessary after I gain understanding when writing the Freebsd network driver.</p>
<p>Here is the current FreeBSD port status:</p>
<ol>
<li>Timer is now working, previously the timer tick works, but the time counter was too fast.</li>
<li>EHCI and OHCI is working, but there is still some caching problem, so i need to modify usb_busdma.c, this modification is not clean. I can access USB disks, and USB network adapter.</li>
<li>Network driver works, but it is still very slow . I am still trying to understand better the DMA handling in FreeBSD. There is still one bug: you can not stop the interface and start it again. The stopping part works, ifconfig ece0 down, but the starting again part doesn&#8217;t. </li>
<li>Multi user works. I can also activate network services, such as sshd.</li>
</ol>
<p>I am still waiting for my perforce account. But anyone willing to test it can contact me. I still don&#8217;t know the best method to release a patch against CURRENT for people to try, because changes happens very quickly.</p>
<p>Here is the latest boot log: <a href="http://tinyhack.com/files/bsd-24-may-2009.txt">bsd-24-may-2009.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2009/05/24/agestarcns11xx-freebsd-progress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Funding Small Open Source Project</title>
		<link>http://tinyhack.com/2007/02/28/funding-small-open-source-project/</link>
		<comments>http://tinyhack.com/2007/02/28/funding-small-open-source-project/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 16:40:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2007/02/28/funding-small-open-source-project/</guid>
		<description><![CDATA[I have a small open source project, Symbianbible, a bible reader for the Symbian Platform. This is a small project, with many users, and I am the only developer. Currently, I have ported this application to every Symbian version that &#8230; <a href="http://tinyhack.com/2007/02/28/funding-small-open-source-project/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have a small open source project, <a href="http://www.compactbyte.com">Symbianbible</a>, a bible reader for the Symbian Platform. This is a small project, with many users, and I am the only developer. Currently, I have ported this application to every Symbian version that Nokia has (Series 60, 1st, 2nd, 3rd, Series 80, Series 90). In this post, I am going to tell the story of how I got the funding to  port this program for multiple Symbian platform.</p>
<p>Since the first release, many people asked, &#8220;can you port it to device X?&#8221;. Buying every phone models (at least one for each platform) and their accessories (such as memory card, card reader, bluetooth adapter, etc) is expensive, so I wrote in my FAQ, that I would only port if there are some people that donate or lend me their phone.<br />
<span id="more-10"></span><br />
Surprisingly, someone did gave me a Series 80 phone (Nokia 9300) and Series 6 3rd edition phone (Nokia E50, which I traded with Nokia E61). He gave those phones upon reading my FAQ. So the lesson learned is: ask your users something, and they might help you.</p>
<p>For the accessories and different phone models, I relied on Google Adsense. There result is not to big, but it is enough to pay my hosting feee, some phone accessories, and gives me additional money for buying other phone models. With the help of my friend, I also try to receive donations using paypal, but until now, the earning is still less compared with Adsense.</p>
<p>My advice is, if you have an open source project, try funding it with advertising. Some incentive will keep you working on it.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2563024894235569";
google_ad_output = "textlink";
google_ad_format = "ref_text";
google_cpa_choice = "CAAQidTQgAIaCDFyD7PiBqtPKN2uuIEB";
google_ad_channel = "1552502825";
//--></script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2007/02/28/funding-small-open-source-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>They violated the open source license: What should I do?</title>
		<link>http://tinyhack.com/2007/01/20/they-violated-the-open-source-license-what-should-i-do/</link>
		<comments>http://tinyhack.com/2007/01/20/they-violated-the-open-source-license-what-should-i-do/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 08:45:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=4</guid>
		<description><![CDATA[I have found at least two programs that violated the GPL. I have contacted the companies that broke the license and they have found a way to work around it. I don&#8217;t know if this is the correct way to &#8230; <a href="http://tinyhack.com/2007/01/20/they-violated-the-open-source-license-what-should-i-do/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have found at least two programs that violated the GPL. I have contacted the companies that broke the license and they have found a way to work around it. I don&#8217;t know if this is the correct way to do it. Would the open source community be interested on &#8220;damages&#8221; that those company has caused? or just let them switch to non open source solution, and we&#8217;ll forget about their sin?</p>
<p>The two programs that violated the GPL are Windows programs and you can&#8217;t see it unless you reverse engineer it. It is just my reflex to reverse engineer a program to know how it works, and may be I should look on more programs to see if they violated anything. But sometimes, I just don&#8217;t know what to do with my finding. Any ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2007/01/20/they-violated-the-open-source-license-what-should-i-do/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

