<?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; hacks</title>
	<atom:link href="http://tinyhack.com/category/hacks/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.1</generator>
		<item>
		<title>LocalBar: Install signed BAR files directly from PlayBook</title>
		<link>http://tinyhack.com/2011/11/05/localbar-install-signed-bar-files-directly-from-playbook/</link>
		<comments>http://tinyhack.com/2011/11/05/localbar-install-signed-bar-files-directly-from-playbook/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 10:09:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=191</guid>
		<description><![CDATA[I&#8217;ve reverse engineered the protocol used by blackberry-deploy to install apps file (BAR file) into the playbook. Then I made an app to Install signed BAR files directly from the playbook itself. You can find my work here: http://yohan.es/playbook/localbar/ I &#8230; <a href="http://tinyhack.com/2011/11/05/localbar-install-signed-bar-files-directly-from-playbook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve reverse engineered the protocol used by blackberry-deploy to install apps file (BAR file) into the playbook. Then I made an app to Install signed BAR files directly from the playbook itself. You can find my work here:</p>
<p><a href="http://yohan.es/playbook/localbar/">http://yohan.es/playbook/localbar/</a></p>
<ul>
<li>I am using https://localhost method. To put it simply: it works like other desktop installers that connect via network or USB, it sends commands to an HTTP service in the playbook. The only difference is that it works through the playbook itself.</li>
<li>It is possible that in the future RIM may block requests from localhost</li>
<li>I don&#8217;t have time to develop nice GUI for this, so I just use the basic GUI API that is accessible using NDK. For example: in the NDK there is a &#8220;login dialog&#8221; but no &#8220;password dialog&#8221;, so for the password dialog I use the &#8220;login dialog&#8221; that shows the &#8220;user&#8221; field (which I don&#8217;t need).</li>
<li>This works on OS 1.0.7 and on 2.0 (developer beta)</li>
<li>With this you can sort of OTA install through the playbook. From your PlayBook Just go to a website that has some bar files (for example this forum) , download it using the built in playbook browser, then run LocalBar to install the downloaded bar files.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2011/11/05/localbar-install-signed-bar-files-directly-from-playbook/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<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>New Adventures</title>
		<link>http://tinyhack.com/2011/02/14/new-adventures/</link>
		<comments>http://tinyhack.com/2011/02/14/new-adventures/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 05:52:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=182</guid>
		<description><![CDATA[My last post was about 6 months ago. Now I am back with some new adventures. The first one is Jonathan, my first baby: And the next one is BeagleBoard-xM from John Nicholls. About a month ago I found a &#8230; <a href="http://tinyhack.com/2011/02/14/new-adventures/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My last post was about 6 months ago. Now I am back with some new adventures. The first one is Jonathan, my first baby:</p>
<p><a href="http://www.flickr.com/photos/yohanes/5444012596/" title="Jonathan by Yohanes &amp; Risna, on Flickr"><img src="http://farm6.static.flickr.com/5094/5444012596_9fd24f4476.jpg" width="333" height="500" alt="Jonathan" /></a></p>
<p>And the next one is BeagleBoard-xM from John Nicholls.</p>
<p><a href="http://www.flickr.com/photos/yohanes/5443852594/" title="BeagleBoard-xM by Yohanes &amp; Risna, on Flickr"><img src="http://farm6.static.flickr.com/5055/5443852594_73979ef90d.jpg" width="500" height="333" alt="BeagleBoard-xM" /></a></p>
<p>About a month ago I found a promotion and got this free MSP430 USB development tool:</p>
<p><a href="http://www.flickr.com/photos/yohanes/5404453918/" title="eZ430-F2013 by Yohanes &amp; Risna, on Flickr"><img src="http://farm6.static.flickr.com/5257/5404453918_18100098c3.jpg" width="500" height="333" alt="eZ430-F2013" /></a></p>
<p>It got me interested in MSP430 in general and bought some <a href="http://www.ti.com/launchpadwiki">LaunchPad</a> (only 4.30 usd each). My first project is to control the plug so i can plug and unplug BeagleBoard-xM through PC (so I can control it remotely via SSH). With this, I should be able to work on BeagleBoard remotely (like when I am in my room holding my baby boy).</p>
<p><a href="http://www.flickr.com/photos/yohanes/5444066752/" title="LaunchPad MSP430 by Yohanes &amp; Risna, on Flickr"><img src="http://farm6.static.flickr.com/5097/5444066752_12f51b4c40.jpg" width="500" height="333" alt="LaunchPad MSP430" /></a></p>
<p>And I have updated the CNS21XX code in my <a href="http://gitorious.org/freebsd-arm">gitorious repo</a> with the latest head. Hopefully I can put the code to SVN HEAD in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2011/02/14/new-adventures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>D-LINK DIR-300 Serial Port and SD mod</title>
		<link>http://tinyhack.com/2010/04/04/d-link-dir-300-serial-port-and-sd-mod/</link>
		<comments>http://tinyhack.com/2010/04/04/d-link-dir-300-serial-port-and-sd-mod/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 13:45:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=162</guid>
		<description><![CDATA[The latest progress of my freeBSD port for CNS21XX and ThinkLink Hot-e was three weeks ago. The CNS21XX network driver and Hot-e network driver was completed. I haven&#8217;t touched anything since then because I had to work on weekends at &#8230; <a href="http://tinyhack.com/2010/04/04/d-link-dir-300-serial-port-and-sd-mod/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The latest progress of my freeBSD port for CNS21XX and ThinkLink Hot-e was three weeks ago. The CNS21XX network driver and Hot-e network driver was completed. I haven&#8217;t touched anything since then because I had to work on weekends at the office. This weekend, I could have continued coding, but I don&#8217;t feel like coding, so I did a hardware project: adding serial port and SD card slot to my D-LINK DIR-300 that I <a href="http://tinyhack.com/2009/04/05/too-many-things-to-do/">bought April last year</a>.</p>
<p>This is not a difficult project, I already added SD/MMC card to my WRT54GL about 2,5 years ago. The difference is that there isn&#8217;t much guide about the hardware part (which GPIO pins to solder), and the software part (how to activate the drivers). So here is a short guide to anyone who needs it. Note that I already installed OpenWRT Kamikaze using the guide from: <a href="http://oldwiki.openwrt.org/OpenWrtDocs(2f)Hardware(2f)D(2d)Link(2f)DIR(2d)300.html">OpenWRT site</a>.<br />
<span id="more-162"></span><br />
This is what the front side of PCB looks like:</p>
<p><a href="http://www.flickr.com/photos/yohanes/4488923533/" title="DLINK DIR-300 PCB FRONT by Yohanes &amp; Risna, on Flickr"><img src="http://farm3.static.flickr.com/2766/4488923533_3351855dae.jpg" width="500" height="405" alt="DLINK DIR-300 PCB FRONT" /></a></p>
<p>On the bottom right, you can connect a serial port (note: 3.3V, you will need MAX3232 or use a data cable from phone, don&#8217;t connect directly). Many guides are already available for connecting serial port (for example: <a href="http://nuwiki.openwrt.org/oldwiki/OpenWrtDocs/Customizing/Hardware/Serial_Console">here</a>, <a href="http://blog.brixandersen.dk/?p=62">here</a>, <a href="http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort">here</a>, and <a href="https://forum.openwrt.org/viewtopic.php?pid=7240">here</a>), so I wont write about it. Just note that you will use the 3.3V and GND for the SD card mod.</p>
<p><a href="http://www.flickr.com/photos/yohanes/4488923529/" title="DLINK DIR-300 SERIAL by Yohanes &amp; Risna, on Flickr"><img src="http://farm5.static.flickr.com/4010/4488923529_d257a72c8c_m.jpg" width="203" height="240" alt="DLINK DIR-300 SERIAL" /></a></p>
<p>This is what the PCB looks like from the back:</p>
<p><a href="http://www.flickr.com/photos/yohanes/4488923531/" title="DLINK DIR-300 PCB BACK by Yohanes &amp; Risna, on Flickr"><img src="http://farm3.static.flickr.com/2701/4488923531_82f792226b.jpg" width="500" height="350" alt="DLINK DIR-300 PCB BACK" /></a></p>
<p>I found the GPIO pins from this <a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?p=269511">posting</a>  by guidoa:</p>
<blockquote><p><code><br />
1: SES Button Blue led (Enable=ON)<br />
2: WiFi led<br />
3: SES Button Red led (Enable=ON)<br />
4: SES Button (Pressed=01)<br />
6: Reset Button (Pressed=01)<br />
7: Status led (Enable=ON) </code>
</p></blockquote>
<p>I have confirmed it using voltmeter and <code>gpioctl</code> command line tool. The SES button is the button on the right side of the unit. As far as I know, SES button, and the LEDS (red and blue) are not used by default, the Wifi LED is used to indicate Wifi ON/OFF. So we can use GPIO 1,3,4. We need another one: we can use GPIO 6 or 7. Since The status led is not used, I prefer GPIO 7. You can see the location of the GPIO pins that I used from the above picture.</p>
<p>Now, look at the SD Card Pinout (you can search it in Google, or just look <a href="http://www.jbprojects.net/articles/wrt54gl_mods/">here</a>).<br />
You  need to connect SD Pin 4 to to 3.3V (see the serial port above), Pin 3 and 6 to GND. The rest is up to you (we will configure this later in software). This is what I use:</p>
<ul>
<li>Pin 2 (Data In/MOSI) to GPIO 4 (SES Button)</li>
<li>Pin 7 (Data Out/MISO) to GPIO 7 (Status LED)</li>
<li>Pin 5 in SD Card (CLK) to GPIO 1 (blue LED)</li>
<li>Pin 1 in SD Card (Chip Select) to GPIO 3 (red LED)</li>
</ul>
<p>After you solder them, you need to install these packages using opkg: kmod-mmc, kmod-mmc-over-gpio, kmod-mmc-spi, kmod-spi-bitbang, and kmod-spi-gpio. We need to edit /etc/init.d/mmc_over_gpio. The line that you are looking for is the <code>add_device "default"</code>. There are some numbers in the following order DI, DO, CLK, CS and SPI_MODE. You need to fill in the GPIO that you use for each of that pins and just fill in 0 for SPI_MODE. In my case I edit the line to become:  <code>add_device "default" 4 7 1 3 0</code>.</p>
<p>Now I can start the SD card using: <code>/etc/init.d/mmc_over_gpio start</code>. You can now mount the card. To remove the card, umount the card and  <code>/etc/init.d/mmc_over_gpio stop</code>. The SD card speed is to slow, I will look on to this later, but for now the speed is enough for me.</p>
<p>This is my final result (I am really lousy at soldering):</p>
<p><a href="http://www.flickr.com/photos/yohanes/4489691820/" title="D-LINK DIR-300 by Yohanes &amp; Risna, on Flickr"><img src="http://farm3.static.flickr.com/2700/4489691820_995f1d43cb.jpg" width="500" height="333" alt="D-LINK DIR-300" /></a></p>
<p>Doesn&#8217;t look too bad from the outside for the SD Card:</p>
<p><a href="http://www.flickr.com/photos/yohanes/4489618324/" title="DLINK DIR-300 SD CARD by Yohanes &amp; Risna, on Flickr"><img src="http://farm5.static.flickr.com/4049/4489618324_c8654d398e.jpg" width="500" height="333" alt="DLINK DIR-300 SD CARD" /></a></p>
<p>But I made a stupid mistake for the RS232 port. I put the port on the wrong place, and I can not drill for the screw on the right side of the port. Fortunately this is not fatal, I just glued the port to the casing.</p>
<p><a href="http://www.flickr.com/photos/yohanes/4489618318/" title="DLINK DIR-300 Serial Port by Yohanes &amp; Risna, on Flickr"><img src="http://farm3.static.flickr.com/2768/4489618318_1121771697.jpg" width="500" height="333" alt="DLINK DIR-300 Serial Port" /></a></p>
<p><b>Update</b> This is the dmesg log after <code>/etc/init.d/mmc_over_gpio start</code></p>
<pre>
gpio-mmc: Failed to request mmc_spi module.
mmc_spi spi32765.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
gpio-mmc: MMC-Card "default" attached to GPIO pins di=4, do=7, clk=1, cs=3
mmc_spi spi32765.0: can't change chip-select polarity
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SD512 495488KiB
 mmcblk0: p1
</pre>
<p><b>Update 9 April 2010</b> to make it clear, this is the picture of the back side of the pcb after soldering:</p>
<p><a href="http://www.flickr.com/photos/yohanes/4505357944/" title="back side of DLink DIR-300 by Yohanes &amp; Risna, on Flickr"><img src="http://farm3.static.flickr.com/2713/4505357944_ee06179198.jpg" width="500" height="333" alt="back side of DLink DIR-300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2010/04/04/d-link-dir-300-serial-port-and-sd-mod/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>ThinLinx Hot-e and CNS21XX</title>
		<link>http://tinyhack.com/2010/01/20/thinlinx-hot-e-and-cns21xx/</link>
		<comments>http://tinyhack.com/2010/01/20/thinlinx-hot-e-and-cns21xx/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 15:41:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=159</guid>
		<description><![CDATA[I am still fixing the Cavium Econa CNS11XX network driver with the guide from Pyun YongHyeon. He is guiding to make the network driver more robust. Unfortunately, we still don&#8217;t know why the driver is slower than the Linux version. &#8230; <a href="http://tinyhack.com/2010/01/20/thinlinx-hot-e-and-cns21xx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am still fixing the Cavium Econa CNS11XX network driver with the guide from Pyun YongHyeon. He is guiding to make the network driver more robust. Unfortunately, we still don&#8217;t know why the driver is slower than the Linux version. The port is currently accessible through FreeBSD CVS at:</p>
<p> <a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/arm/econa/">http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/arm/econa/</a></p>
<p>I asked in the freebsd-arm mailing list if anyone would like to donate me a CNS21XX device, and Stefan Bethke immediately offered me to buy one for me. I bought the <a href="http://dealextreme.com/details.dx/sku.20383~r.70455276">device from dealextreme</a> with the money donated to me. It took 9 days until it arrived.</p>
<p>Meanwhile John Nicolls from <a href="http://www.thinlinx.com/">ThinkLinx</a> sent me a Hot-e, a device based on AT91SAM9G20. I told him that I have received mr Stefan offer, but he said I can work on it anytime I want it. Since the Hot-e arrived earlier, I have managed to get it to boot. At first i was going to use the work from Sylvestre Gallon on at91sam9621(<a href="http://lists.freebsd.org/pipermail/freebsd-arm/2009-May/001741.html">mailing list archive</a>), but it turns out that it is not usable yet.</p>
<p>I have fixed the clock computation in at91_pmc.c, and currently writing a new timer driver (at91_pit.c), because the system timer device (at91_st.c) no longer exists in AT91SAM9G20. Currently the timer device is still not working properly, but I think I will be able to get it work this week.</p>
<p>When the CNS211XX LAN device finally arrived, I stopped the work for Hot-e for a while to test the new device. I bought a CA-42 cable to connect to it, but I can&#8217;t send anything to the device.  I thought that the device was faulty, but turns out that the cable is faulty. I was disappointed because usually I used that type of cable (it is cheap only 132 baht or 4 usd). Fortunately I still have one MAX3232, and I can make my own cable.</p>
<p>I think porting CNS21XX will not be so difficult. I made some small adjustment for the serial port driver to make it show something. Memory mapping is different compared to CNS11XX, but that can easily be adjusted. The Interrupt controller is different, so I need to rewrite some parts. After it works, EHCI/OHCI was working fine. The network driver will need major adjustment (may be I will just write a new driver for this one), and the device doesn&#8217;t use CFI for Flash, it uses SPI, so I will need to write a driver for SPI bus.</p>
<p>For CNS11XX and CNS21XX You can see my progress in this wiki page:<br />
 <a href="http://wiki.freebsd.org/FreeBSDcns11xx">http://wiki.freebsd.org/FreeBSDcns11xx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2010/01/20/thinlinx-hot-e-and-cns21xx/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>STR9104/CNS1104 FreeBSD Port Progress</title>
		<link>http://tinyhack.com/2009/05/10/str9104-cns1104-freebsd-arm/</link>
		<comments>http://tinyhack.com/2009/05/10/str9104-cns1104-freebsd-arm/#comments</comments>
		<pubDate>Sat, 09 May 2009 18:51:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=124</guid>
		<description><![CDATA[Returning from Indonesia, I continued my Freebsd porting attempt to the Emprex NSD-100. So far it&#8217;s going quite well. I took the FA526 CPU support from NetBSD, I use the 8250 driver for the UART, and default EHCI driver. I &#8230; <a href="http://tinyhack.com/2009/05/10/str9104-cns1104-freebsd-arm/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Returning from Indonesia, I continued my Freebsd porting attempt to the Emprex NSD-100. So far it&#8217;s going quite well. I took the FA526 CPU support from NetBSD, I use the 8250 driver for the UART, and default EHCI driver. I got stuck for a while on the EHCI part until Hans Petter Selasky pointed me that there might a problem in the busdma/cache handling. With the EHCI part fixed, I can get to the userland, booting from USB stick.</p>
<p>The remaining drivers that needs to be written are the OHCI and network. The OHCI shouldn&#8217;t take too much time, but I think the network will take quite a long time.</p>
<p>I was planning to clean up, and release the code today, but I was busy with something else, so may be I will release the code in the next few days. For those of you who are curious about the boot log, here it is:<br />
<span id="more-124"></span></p>
<pre>
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-CURRENT #169: Sun May 10 01:25:55 WIT 2009
    yohanes@cameron:/usr/home/yohanes/freebsd/freebsd/src/sys/arm/compile/CNS11XXNAS
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
Preloaded elf kernel "elf kernel" at 0xc12d30b8.
unknown CPU (ID = 0x66015261)
  WB enabled LABT
  16KB/16B 2-way Instruction cache
  16KB/16B 2-way write-back-locking-B Data cache
real memory  = 67108864 (64 MB)
Physical memory chunk(s):
00000000 - 0xffffff, 16777216 bytes (4096 pages)
0x1337000 - 0x3eaefff, 45580288 bytes (11128 pages)
avail memory = 61718528 (58 MB)
ULE: setup cpu 0
nfslock: pseudo-device
null: &lt;null device, zero device&gt;
random: &lt;entropy source, Software, Yarrow&gt;
mem: &lt;memory&gt;
econaarm0: &lt;ECONA device bus&gt; on motherboard
econa add children
econa add child econa_ic addr 7d000000
econa add child uart addr 78000000
econa add child timer addr 79000000
econa add child ehci addr f8000000
econa_alloc_resource start 00000000 end ffffffff, count = 00000008
econa_alloc_resource start 00000000 end ffffffff, count = 00000008
econa_alloc_resource start 78000000 end 78ffffff, count = 01000000
sys_res_memory
Alloc OK
econa_alloc_resource start 00000000 end ffffffff, count = 00000008
econa_alloc_resource start 00000000 end ffffffff, count = 00000008
econa_alloc_resource start 78000000 end 78ffffff, count = 01000000
sys_res_memory
Alloc OK
uart0: &lt;Non-standard ns8250 class UART with FIFOs&gt; mem 0x78000000-0x78ffffff irq 10 on econaarm0
econa_alloc_resource start 00000000 end ffffffff, count = 00000008
econa_alloc_resource start 78000000 end 78ffffff, count = 01000000
sys_res_memory
Alloc OK
econa_alloc_resource start 00000000 end ffffffff, count = 00000001
econa_alloc_resource start 0000000a end 0000000a, count = 00000001
sys_res_irq
Alloc OK
uart0: [FILTER]
uart0: fast interrupt
uart0: console (38461,n,8,1)
timer0: &lt;Econa CPU Timer&gt; mem 0x79000000-0x79ffffff irq 0,1 on econaarm0
econa_alloc_resource start 00000000 end ffffffff, count = 00000001
econa_alloc_resource start 79000000 end 79ffffff, count = 01000000
sys_res_memory
Alloc OK
econa_alloc_resource start 00000000 end ffffffff, count = 00000001
econa_alloc_resource start 00000000 end 00000000, count = 00000001
sys_res_irq
Alloc OK
STR9100 CPU Clock: 200 MHz
HZ = 100
reload value = 500000
IRQ Timer1 at int #0x0 clock 100000000(Hz)
timer0: [FILTER]
DONE timer
done00000000
ehci probe
ehci probe
ehci0: &lt;CNS11XX USB EHCI&gt; mem 0xf8000000-0xffffffff irq 24 on econaarm0
econa_alloc_resource start 00000000 end ffffffff, count = 00000001
econa_alloc_resource start f8000000 end ffffffff, count = 08000000
sys_res_memory
Alloc OK
econa_alloc_resource start 00000000 end ffffffff, count = 00000001
econa_alloc_resource start 00000018 end 00000018, count = 00000001
sys_res_irq
Alloc OK
add USB device
setup intr
ehci0: [MPSAFE]
ehci0: [ITHREAD]
init ehci
usbus0: EHCI version 1.0
probe and attach
usbus0: &lt;CNS11XX USB EHCI&gt; on ehci0
done
initcloks
enabling timer
Timecounter "CPU Timer" frequency 50000000 Hz quality 1000
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
ugen0.1: &lt;Cavium&gt; at usbus0
uhub0: &lt;Cavium EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1&gt; on usbus0
uhub0: 2 ports with 2 removable, self powered
ugen0.2: &lt;Kingston&gt; at usbus0
umass0: &lt;Kingston DataTraveler 2.0, class 0/0, rev 2.00/1.00, addr 2&gt; on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0000
register sim 0
scanning the sim
umass0:0:0:-1: Attached to scbus0
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
(probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
(probe0:umass-sim0:0:0:0): (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
(probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
Retrying Command (per Sense Data)
(probe0:umass-sim0:0:0:0): Retrying Command
pass0 at umass-sim0 bus 0 target 0 lun 0
pass0: &lt;Kingston DataTraveler 2.0 1.00&gt; Removable Direct Access SCSI-2 device
pass0: 40.000MB/s transfers
da0 at umass-sim0 bus 0 target 0 lun 0
da0: &lt;Kingston DataTraveler 2.0 1.00&gt; Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 1906MB (3903578 512 byte sectors: 255H 63S/T 242C)
GEOM: new disk da0
GEOM_LABEL: Label for provider da0s1a is ufsid/4a01b053676144f3.
GEOM_LABEL: Label for provider da0s1a is ufs/FreeBSDonUSB.
root_mount_prepare 100

Manual root filesystem specification:
  &lt;fstype&gt;:&lt;device&gt;  Mount &lt;device&gt; using filesystem &lt;fstype&gt;
                       eg. ufs:/dev/da0a
  ?                  List valid disk boot devices
  &lt;empty line&gt;       Abort manual input

mountroot&gt; ufs:da0s1a
Trying to mount root from ufs:da0s1a
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
Enter full pathname of shell or RETURN for /bin/sh:
# ls /
.snap		dev		media		root		usr
COPYRIGHT	etc		mnt		sbin		var
bin		lib		proc		sys
boot		libexec		rescue		tmp
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2009/05/10/str9104-cns1104-freebsd-arm/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Optimizing Asus EEE 900A</title>
		<link>http://tinyhack.com/2009/02/12/optimizing-asus-eee-900a/</link>
		<comments>http://tinyhack.com/2009/02/12/optimizing-asus-eee-900a/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 08:38:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=112</guid>
		<description><![CDATA[I just got back from my vacation around Thailand, so I will start to update things (Wii homebrew, Symbian apps, blogs, etc) again. Well, may be starting next week, I have a dental surgery this weekend and may need to &#8230; <a href="http://tinyhack.com/2009/02/12/optimizing-asus-eee-900a/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just got back from my vacation around Thailand, so I will start to update things (Wii homebrew, Symbian apps, blogs, etc) again. Well, may be starting next week, I have a dental surgery this weekend and may need to rest. Anyway, this time I want to post about optimizing EEE 900A.</p>
<p><a href="http://risna.info">My wife</a> was happy with her Asus EEE 701, but she would like something better with the same size. We sold the old Asus 701 to my brother, and she bought Asus EEE 900A. Compared to EE PC 701, the EEE PC 900A has a faster processor (Intel Atom 1.6 ghz vs the 900 Mhz EEE), more memory (1 gb vs 512 mb), bigger disk space (16 gb vs 4 gb), higher resolution (1024 x 600 vs 840&#215;400), and better graphic processors (Intel GMA 950 vs Intel GMA 900). The only problem is the 16 GB SSD is much slower than the EEE 701 4 GB SSD. You can really feel it when running almost any applications, especially the firefox browser.</p>
<p>My wife uses Windows XP on the new Asus. After reading several blog posts and many forums, the conclusion is: to make everything faster, try to reduce the number of disk access. Here is how to reduce the disk access in Windows XP:</p>
<p><span id="more-112"></span></p>
<ol>
<li>Buy more memory, we bought 2 GB memory  (quite cheap, around 690 baht/20 usd) to replace the 1 GB default</li>
<li>Allocate some of the memory (384 Mb for RAM disk). I set the environment variables TEMP and TMP to point to the RAM Disk. I also point firefox cache to the RAM disk.</li>
<li>Turn off page file</li>
<li>Disable indexing on all drives</li>
<li>Disable System restore</li>
<li>Don&#8217;t install firefox on the SSD. Firefox 3 will try to write its history every few seconds. I use Firefox portable on SD Card, and it is much faster now.</li>
</ol>
<div>For Point No 2, actually firefox already has its own memory cache. But I choose to use RAM disk anyway, because it makes it faster when restarting firefox (as long as the computer is not turned off). When restarting firefox, the browser will reload all closed tabs, and having the cache in RAM disk makes it faster.</div>
<div>Some people suggest that using <a href="http://www.nliteos.com/">nlite</a> to reduce the Windows component will make things faster (but I haven&#8217;t tried that yet). Reducing the number of services using the guide from <a href="http://www.blackviper.com/">BlackViper</a> might also help (I haven&#8217;t tested that one also).</div>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2009/02/12/optimizing-asus-eee-900a/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WiiApple: Apple IIe Emulator for Wii</title>
		<link>http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/</link>
		<comments>http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 16:27:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=81</guid>
		<description><![CDATA[I just learned about developing applications on Wii 3 days ago. I was wondering what application should I make, and I noticed that there was no Apple II emulator for Wii yet. Apple IIe was my first computer, so I &#8230; <a href="http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just learned about developing applications on Wii 3 days ago. I was  wondering what application should I make, and I noticed that there was no Apple  II emulator for Wii yet. Apple IIe was my first computer, so I thought it will  be fun to be able to emulate it on my Wii. <a href="http://applewin.berlios.de/">AppleWin</a> is a good Apple emulator, but it  is very windows specific, fortunately someone already ported it to Linux using  SDL, and the name is <a href="http://linapple.sourceforge.net/">LinApple</a>.</p>
<p>Someone already made an early SDL port to Wii, but it is missing threading  support (which is needed by the emulator). After reading things at <a href="http://wiibrew.org/">wiibrew.org</a> and <a href="http://devkitpro.org/">devkitpro.org</a>, I decided to complete the  threading part. The next problem is the input. I want to be able to write BASIC  applications, so I decided that the SDL port must support keyboard input,  someone already made <a href="http://wiibrew.org/wiki/User:Davyg/libwiikeyboard">LibWiikeyboard</a>, so  I can just plug it in SDL (actually this is a hack, to correctly handle SDL  requirements, there are some things that needs to be changed, in LibWiikeyboard  and in the SDL gamecube implementation).</p>
<p>Next part is the porting process itself. The difficult part is making sure  all the endiannes conversion of 6502 (Apple II CPU) to Wii&#8217;s PowerPC is done  correctly, because I don&#8217;t have a USB gecko to debug it. Currently the port  works, but don&#8217;t expect too much from this first release. I can already play  some games, but I haven&#8217;t tested many other things. Sound is <span style="text-decoration: line-through;">not yet</span> now supported.</p>
<p>Here are some screenshots (made using <a href="http://tvtime.sourceforge.net/">tvtime</a>, captured through my <a href="http://tinyhack.com/2008/12/31/configure-gadmei-usb-tv-box-tvr200-in-linux/">USB TV Box</a>)</p>

<p>This is the application that you can extract to your SD Card</p>
<p><a href="http://tinyhack.com/wii/wiiapple/wiiapple.zip">http://tinyhack.com/wii/wiiapple/wiiapple.zip</a></p>
<p><b>Note:</b> Latest version is available at: <a href="http://code.google.com/p/wiiapple">http://code.google.com/p/wiiapple</a></p>
<p>The plan is: Everytime I update the application, I will still use the same file name, you can look at <a href="http://tinyhack.com/wii/wiiapple/">http://tinyhack.com/wii/wiiapple/</a> to look for older releases.<br />
You will need to install <a href="http://hbc.hackmii.com/">Homebrew Channel</a> to use it.</p>
<p>And the source codes are available at:</p>
<p><a href="http://tinyhack.com/wii/wiiapple/">http://tinyhack.com/wii/wiiapple/</a></p>
<p><b>Note:</b> Latest source code is available at: <a href="http://code.google.com/p/wiiapple">http://code.google.com/p/wiiapple</a></p>
<p>Update:</p>
<p>version 0.0.2:</p>
<p>- Fixed text overlay<br />
- Disable saving options (dangerous for now, because you might overwrite your files)</p>
<p>version 0.0.3:</p>
<p>- Sound support<br />
- Fix joypad problem<br />
- Invalid disk image will not freeze the emulator (in case of invalid disk, Master.dsk will be reloaded)</p>
<p>January 6, 2009 (0.0.4)<br />
- new keyboard driver, now work with most USB keyboards<br />
<strong>Note: </strong>I am still working on the keyboard issue (some USB keyboard still  doesn&#8217;t work). <span style="text-decoration: line-through;">I think this is because the limitation of Libwiikeyboard that can only do control transfer instead of interrupt transfer</span>. Now I have rewritten the SDL keyboard part with my own code (part was based on the code from Guitar Fun).</p>
<p>January 6, 2009 (0.0.5)<br />
- Support Gamecube controller (Wiimote support is planned for next version)<br />
- updated some bug in keyboard handling</p>
<p>January 7, 2009 (0.0.6)<br />
- Increased gamecube joystick sensitivity<br />
- Fixed (most) crashing issue</p>
<p>January 8, 2009 (0.0.7)<br />
- Support Wiimote as Joystick (Press A button in Gamecube controller to switch to gamecube joypad)</p>
<p><strong>note</strong>: Mac USB keyboard works.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/feed/</wfw:commentRss>
		<slash:comments>130</slash:comments>
		</item>
		<item>
		<title>Tips For Debian on Agestar</title>
		<link>http://tinyhack.com/2008/08/25/tips-for-agestar-ncb3ast/</link>
		<comments>http://tinyhack.com/2008/08/25/tips-for-agestar-ncb3ast/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 16:09:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/08/25/tips-for-agestar-ncb3ast/</guid>
		<description><![CDATA[Chris (Whites11) and several others have pointed that the source code for a device similar to Agestar have been released by a German company (http://www.multicase.de/en/products/76/ns348s.html). I have not looked carefully at the source code of this one, but none of &#8230; <a href="http://tinyhack.com/2008/08/25/tips-for-agestar-ncb3ast/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Chris (Whites11) and several others have pointed that the source code for a device similar to Agestar have been released by a German company (<a title="http://www.multicase.de/en/products/76/ns348s.html" href="http://www.multicase.de/en/products/76/ns348s.html">http://www.multicase.de/en/products/76/ns348s.html</a>). I have not looked carefully at the source code of this one, but none of the people on the mailing list have got it working with networking enabled.</p>
<p>Kari Ahtiala who owned several NAS devices (SLUG, NCB3AST, NCH3AHT), said that you can just move your disk from NSLU (SLUG) to Agestar just fine:</p>
<p><span id="more-57"></span></p>
<blockquote><p>after upgrading the firmware, boot the Agestar without the disk, ssh to it, plug in the disk, mount it and chroot to it, and then mount -t proc /proc proc, and everything works as if the Agestar had been booted off the hard drive. </p>
<p>This is fine if you want to just borrow the disk for testing or cloning purposes. To convert it to be used on the Agestar exclusively, I copied /etc to /etc-slug (so I can revert by &quot;mv etc etc-agestar&quot; and &quot;mv&#160; etc-slug etc&quot; and enited fstab, network/interfaces and modules and issued the command &quot;e2label /dev/sdb1 /&quot; as you instructed.</p>
</blockquote>
<p>And here are some tips from him:</p>
<blockquote><p>I pretty much cloned my SLUG so the Agestar is now a NFS and Samba server, Web server and X server. The Xfce4 applications are usable on the Agestar &#8211; Mousepad is an OK editor and Thunar is OK for a file manager (these have a habit of Segfaulting, though, but at least X works: xterm, kpat, xpat2 and spider!). Using &quot;ssh -CY&quot; instead of &quot;ssh -X&quot; doesn&#8217;t seem to make much difference.</p>
<p>Usbmount is very useful: plug in a USB drive and it is accessible on your local network if you share /media via samba. Just edit /etc/usbmount/usbmount.conf: the default filesystems are ext2 and ext3 but you can add vfat and ntfs but you need to add some options:     <br />FS_MOUNTOPTIONS=&quot;-fstype=ntfs,rw,errors=remount-ro,dmask=0000,fmask=0000 -fstype=vfat,dmask=0000,fmask=0000&quot; </p>
<p>To get read-write on an NTFS drive, you need to cheat a bit: first install ntfs-3g and then     <br />ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs (this is because ntfs-3g is a program and the old ntfs is a module).</p>
</blockquote>
<p>A tip from me is that if you have a problem with your Agestar, just search google for your problem, and add &quot;NSLU&quot; &quot;debian&quot; (or NSLU2 debian). The solution for debian NSLU2 should apply to Agestar with Debian.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/08/25/tips-for-agestar-ncb3ast/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Debian on Agestar without serial port</title>
		<link>http://tinyhack.com/2008/07/30/installing-debian-on-agestar-without-serial-port/</link>
		<comments>http://tinyhack.com/2008/07/30/installing-debian-on-agestar-without-serial-port/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 00:30:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/07/30/installing-debian-on-agestar-without-serial-port/</guid>
		<description><![CDATA[I have prepared a firmware and tutorial to Install Debian here, this time without the need for serial port. I have tested this, and it seems that everything works. But of course I will not be responsible if anything happens. &#8230; <a href="http://tinyhack.com/2008/07/30/installing-debian-on-agestar-without-serial-port/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have prepared a firmware and tutorial to Install Debian <a href="http://www.tinyhack.com/agestar/debian-noserialneeded.html">here</a>, this time without the need for serial port. I have tested this, and it seems that everything works. But of course I will not be responsible if anything happens. If you think there are some missing, unclear or inaccurate steps, or if you doubt about something, then don&#8217;t install it. If you have anything to ask just email to yohanes [at] gmail.com, or just post your questions as comments.</p>
<p><b>NOTE:</b> the web update method only works on agestar ncb3ast, other models can work by using serial port and latest patch for kernel source (2.6.29 or later).</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/07/30/installing-debian-on-agestar-without-serial-port/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

