<?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>Tinyhack</description>
	<lastBuildDate>Tue, 06 Jul 2010 15:18:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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>yohanes</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 the office. This weekend, I could have continued coding, but I don&#8217;t feel like coding, [...]]]></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>20</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>yohanes</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. The port is currently accessible through FreeBSD CVS at: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/arm/econa/ I asked in the freebsd-arm [...]]]></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>yohanes</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 got stuck for a while on the EHCI part until Hans Petter Selasky pointed me [...]]]></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>yohanes</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 rest. Anyway, this time I want to post about optimizing EEE 900A. My wife was [...]]]></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>yohanes</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 thought it will be fun to be able to emulate it on my Wii. AppleWin [...]]]></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>

<a href='http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/scr31/' title='scr31'><img width="150" height="150" src="http://tinyhack.com/wp-content/uploads/2009/01/scr31-150x150.jpg" class="attachment-thumbnail" alt="scr31" title="scr31" /></a>
<a href='http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/scr11/' title='scr11'><img width="150" height="150" src="http://tinyhack.com/wp-content/uploads/2009/01/scr11-150x150.jpg" class="attachment-thumbnail" alt="scr11" title="scr11" /></a>
<a href='http://tinyhack.com/2009/01/02/wiiapple-apple-iie-emulator-for-wii/scr21/' title='scr21'><img width="150" height="150" src="http://tinyhack.com/wp-content/uploads/2009/01/scr21-150x150.jpg" class="attachment-thumbnail" alt="scr21" title="scr21" /></a>

<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>129</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>yohanes</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 the people on the mailing list have got it working with networking enabled. Kari Ahtiala [...]]]></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>3</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>yohanes</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. If you think there are some missing, unclear or inaccurate steps, or if you doubt [...]]]></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>
		<item>
		<title>Reverse Engineering Linux Kernel Image and Modules</title>
		<link>http://tinyhack.com/2008/07/06/reverse-engineering-linux-kernel-image-and-modules/</link>
		<comments>http://tinyhack.com/2008/07/06/reverse-engineering-linux-kernel-image-and-modules/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 12:35:22 +0000</pubDate>
		<dc:creator>yohanes</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/07/06/reverse-engineering-linux-kernel-image-and-modules/</guid>
		<description><![CDATA[I have switched my mind from doing the kernel porting to some other activities, which is reverse engineering ARM binaries for Symbian platform. When just starting, I thought to my self: why don&#8217;t I try to reverse engineer the original Agestar firmware, and may be I can complete some drivers for STAR STR9100. So I [...]]]></description>
			<content:encoded><![CDATA[<p>I have switched my mind from doing the kernel porting to some other activities, which is reverse engineering ARM binaries for Symbian platform. When just starting, I thought to my self: why don&#8217;t I try to reverse engineer the original Agestar firmware, and may be I can complete some drivers for STAR STR9100. So I did, and I can get the watchdog function to work (at least I think it works).</p>
<p>zImage and bootpImage are compressed kernel image, this is compressed by using GZip method 8. The easiest way to decompress it is to give it to gunzip. I just searched the kernel image for the sequence 1f 8b 08, and cut it using khexedit. You don&#8217;t have to find where the compressed data ends, gunzip will ignore trailing garbage.</p>
<p><span id="more-51"></span></p>
<p>The kernel contains some symbols for linking on dynamic module loading. You can see these symbols and their address by reading /proc/kallsyms. Some other information from /proc can be useful in reverse engineering for example you can read /proc/irq to get the irq number for devices. Some other device drivers creates a proc entries that contain their state.</p>
<p>Reverse engineering dynamic/loadable modules (.o/.ko) are a bit easier than built in modules. The code is more isolated, and it has clear names (init_module, exit_module, etc). The interface for different kind of modules is usually clear (for example an rtc driver must provide rtc_open, etc), so reverse engineering simple modules is quite easy.</p>
<p>And of course the source code of the kernel is very helpful to understand the code flow. Human can easily follow the assembly code by comparing it to the kernel source. Unfortunately this process can not yet be done automatically. If it can, I think many people can quickly reverse engineer Linux kernels on devices where the source code is not given by the vendor.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/07/06/reverse-engineering-linux-kernel-image-and-modules/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How many of you are using STAR 9100 based NAS?</title>
		<link>http://tinyhack.com/2008/06/30/how-many-of-you-are-using-star-9100-based-nas/</link>
		<comments>http://tinyhack.com/2008/06/30/how-many-of-you-are-using-star-9100-based-nas/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 06:36:04 +0000</pubDate>
		<dc:creator>yohanes</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=49</guid>
		<description><![CDATA[As listed on one of my previous posting, STAR 9100 (to be precise STAR 9104) is being used in these devices: Coolmax CN-570 http://www.smallnetbuilder.com/content/view/29899/75/1/3/ NS-348S http://www.multicase.de/en/products/76/ns348s.html http://www.enclosureservice.com/ Emprex NSD-100 http://www.emprex.com/02_products_02.php?id=205 Agestar NCB3AHT http://www.agestar.com/english/products/ncb3aht.asp http://shenztech.com/code/ui/product/product.aspx?prdid=NAS2&#38;subcatid=9 revoltec rs049 We can see from the boot log that says the machine is STAR_STR9100. Lately I have worked less and [...]]]></description>
			<content:encoded><![CDATA[<p>As listed on one of my previous posting, STAR 9100 (to be precise STAR 9104) is being used in these devices:</p>
<p>Coolmax CN-570 <a href="http://www.smallnetbuilder.com/content/view/29899/75/1/3/">http://www.smallnetbuilder.com/content/view/29899/75/1/3/</a>    <br />NS-348S <a href="http://www.multicase.de/en/products/76/ns348s.html">http://www.multicase.de/en/products/76/ns348s.html</a> <a href="http://www.enclosureservice.com/">http://www.enclosureservice.com/</a>    <br />Emprex NSD-100 <a href="http://www.emprex.com/02_products_02.php?id=205">http://www.emprex.com/02_products_02.php?id=205</a>    <br />Agestar NCB3AHT <a href="http://www.agestar.com/english/products/ncb3aht.asp">http://www.agestar.com/english/products/ncb3aht.asp</a>    <br /><a href="http://shenztech.com/code/ui/product/product.aspx?prdid=NAS2&amp;subcatid=9">http://shenztech.com/code/ui/product/product.aspx?prdid=NAS2&amp;subcatid=9</a>    <br />revoltec rs049</p>
<p>We can see from the  boot log that says the machine is STAR_STR9100. Lately I have worked less and less on this device, because it has been running smoothly enough for me (I have run it continuously for a week). The last few parts is not so important for me. These four parts are RTC (turns out to be a very limited RTC),  LED (only one LED <i>inside</i> the box, which is not very useful), and button (I have never used the button anyway), and Watch dog (this one might be useful, but I don&#8217;t have any documentation about this).</p>
<p>I am planning to stop further development. I was planning to build a custom firmware, but I think a full Debian distro is much better for me. But, if there are quite many people that uses this devices and are expecting something like NSLU2 (easy installer, etc), then I might continue the development. So, If you are using Agestar or agestar like devices, please leave a comment, and let me know what you expect.</p>
<p>If I am going to continue the development, I will need to buy another box, because I am currently using this one extensively for my daily activities. <a href="http://irina.homelinux.com">Irina</a> (that is the name I gave to my NAS box) is now serving MP3, serving web page, and act as a download station.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/06/30/how-many-of-you-are-using-star-9100-based-nas/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>RTC on STR9100</title>
		<link>http://tinyhack.com/2008/06/30/rtc-on-str9100/</link>
		<comments>http://tinyhack.com/2008/06/30/rtc-on-str9100/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 17:13:50 +0000</pubDate>
		<dc:creator>yohanes</dc:creator>
				<category><![CDATA[agestar]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=48</guid>
		<description><![CDATA[I have spent many hours to work on the RTC part, and I decided to give up for now. I have been able to activate the clock, set the clock, and make it run. But the RTC is not useful. First, it is not battery backed, so when you turn off your device, it will [...]]]></description>
			<content:encoded><![CDATA[<p>I have spent many hours to work on the RTC part, and I decided to give up for now. I have been able to activate the clock, set the clock, and make it run. But the RTC is not useful. First, it is not battery backed, so when you turn off your device, it will not keep the time. Second, it can store only the seconds, minutes, hours, and day of month.  The problem of not having a documentation is sometimes you get stuck, and don&#8217;t know what to try next.</p>
<p>There is one feature that is supposed to be useful if I can make it work: the alarm capability. With alarm some  cron-like applications can set to be notified when a particular time comes (it will ease the CPU burden). As far as I know the cron daemon doesn&#8217;t use this feature, so it is not a great loss.</p>
<p>There is one thing that still puzzles me. The original firmware uses X1205 through I2C bus. From my understanding the X1205 have different abilities compared to the STR9100 RTC. So I don&#8217;t know whether there is actually another RTC on the board.</p>
<p>Since the RTC is not very useful. I will let go hacking this part, until I find other clues.</p>
<p>Here is the output of the original firmware.</p>
<pre>
X1205: I2C based RTC driver.
i2c-core.o: driver X1205 registered.
X1205: found X1205 on STR9100 I2C Adapter
ccr_write_enable: verify SR failed
i2c-core.o: client [X1205] registered to adapter [STR9100 I2C Adapter](pos. 0).
X1205: i2c_add_driver RTC driver.
X1205: misc_register RTC driver.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/06/30/rtc-on-str9100/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
