<?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; Uncategorized</title>
	<atom:link href="http://tinyhack.com/category/uncategorized/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>CNS21XX port completed</title>
		<link>http://tinyhack.com/2010/07/06/cns21xx-port-completed/</link>
		<comments>http://tinyhack.com/2010/07/06/cns21xx-port-completed/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 15:01:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=172</guid>
		<description><![CDATA[About six months ago, Stefan Bethke donated me some money to buy a device from dealextreme so I can port FreeBSD to that device (you can see the pictures here). This device uses ARM Cavium Econa CNS21XX (formerly known as &#8230; <a href="http://tinyhack.com/2010/07/06/cns21xx-port-completed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/yohanes/4274406568/in/set-72157623208918338/"><img src="http://farm5.static.flickr.com/4054/4274406568_d1870fd1f2.jpg" width="500" height="333"></a><br />
About six months ago, Stefan Bethke donated me some money to buy <a href="http://dealextreme.com/details.dx/sku.20383~r.70455276">a device from dealextreme</a> so I can port FreeBSD to that device (you can see the pictures <a href="http://www.flickr.com/photos/yohanes/sets/72157623208918338/">here</a>). This device uses ARM Cavium Econa CNS21XX (formerly known as STR8132). Within few days I have completed the driver for serial port, interrupt controller, EHCI/OHCI. Then I stopped working on it, three months later I continued and finished the network driver, then I stopped again.</p>
<p>The last part that wasn&#8217;t finished was the SPI controller and the SPI flash driver, so this weekend I spent some time to finish it. So now, I can say that the port is finished, all drivers have been written for the device. With SPI flash support, I can now write the kernel to the device, and boot it from there (I don&#8217;t need to boot from network anymore).</p>
<p>Actually I am not really finished yet, since I still need to reformat the code according to the FreeBSD standard, and there might still be bugs in my code, so I invite everyone that have this device to try it out. There is also a feature in the network driver that is not implemented yet (multicast filtering), because the datasheet is not very clear (<del datetime="2010-07-06T15:02:02+00:00">i would be very happy if someone could help me to complete this</del>, wait now i suddenly understands the documentation).</p>
<p>For the boot loader, I am still using the default boot loader. This boot loader will load the kernel from memory 0&#215;600000, and since I can&#8217;t change the boot loader configuration in this particular device, I modified the kernel configuration to match this. The latest code can be accessed at <a href="http://gitorious.org/freebsd-arm">http://gitorious.org/freebsd-arm</a>.</p>
<p>To do initial boot, you will need serial port. You will need to put your kernel on your tftp server. Hit any key during boot, and type:</p>
<pre>
setenv serverip 172.17.1.1
setenv ipaddr 172.17.1.2
tftpboot 0x600000 kernel.bin
go 0x600000
</pre>
<p>and to make it permanent:</p>
<p><code>dd if=kernel.gz.tramp.bin of=/dev/flash/spi0  obs=4k conv=osync seek=96</code></p>
<p>Please note that the blocksize is 4k, and 96 means the offset is 0&#215;60000 (96*4096) which will be mapped to 0&#215;600000 by the boot loader. If you are brave, you can just compile the image and dd using the default Linux, but I don&#8217;t recommend this, since you may have different hardware (espcially SPI flash chip).</p>
<p><a href="http://www.flickr.com/photos/yohanes/4274404960/in/set-72157623208918338/"><img src="http://farm5.static.flickr.com/4061/4274404960_5ea0ebeab5.jpg" width="500" height="333"></a></p>
<p>Another news: I have completed the driver for ThinLinx Hot-e NAND using NAND2 framework. I also completed the SPI part and support for the flash SPI (read only).</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2010/07/06/cns21xx-port-completed/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Unicode: from text and font to display</title>
		<link>http://tinyhack.com/2008/10/07/unicode-from-text-and-font-to-display/</link>
		<comments>http://tinyhack.com/2008/10/07/unicode-from-text-and-font-to-display/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 10:52:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/10/07/unicode-from-text-and-font-to-display/</guid>
		<description><![CDATA[I&#8217;ve always wanted to be able to support all kind of text on my Symbian bible. The problem is this: the Unicode support for Symbian is very limited, and even non existent for some languages. Few weeks ago someone asked &#8230; <a href="http://tinyhack.com/2008/10/07/unicode-from-text-and-font-to-display/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always wanted to be able to support all kind of text on my Symbian bible. The problem is this: the Unicode support for Symbian is very limited, and even non existent for some languages. Few weeks ago someone asked me if I can make Symbian bible to support Malayalam bible (using Malayalam script of course). Malayalam writing system was only supported recently by major operating systems (such as Windows XP and OS X Leopard), and Symbian haven&#8217;t support it yet (and even if it supports it, the support will only be activated to phones on certain sales area). </p>
<p>I know that there are several Unicode layout library, such as Pango, Qt or ICU. All of them are too big for me to understand and port to Symbian. So my solution was to use the freetype library and harfbuzz font shaping. After using those two libraries on Symbian, I think now I can understand Unicode. Here is my quick guide to understand Unicode, from having a data and a font, to displaying the data with that font.</p>
<p>First thing that you need to understand is: <strong>Unicode defines list of characters for many languages of the world</strong>.</p>
<p>Some languages doesn&#8217;t have the concept of lower or upper case. Some languages have their own numbering system. Every language has their own system of ordering things. If possible: always use the function provided by the library you are using.&#160; </p>
<p> <span id="more-67"></span>
<p>Second to note is <strong>there are over 100 thousand characters defined in the Unicode</strong>. We need to store this efficiently.</p>
<p>Ideally to represent the data in memory, you will use 4 bytes representation because 1 or 2 bytes will not be enough to hold all the 100 thousands characters. Practically most people will not use the whole 100 thousands characters on a document or in an application, and storing everything in 4 bytes will waste a lot space. To solve that (and to add another problem), different Unicode encodings are created. There are several encodings 7-bit (UTF7), 8-bit (UTF8), and 16-bit Little Endian/Small Endian encodings. </p>
<p>Encoding Unicode character using less than 32 bit works by using escape characters inside the string. For example if we use 16 bit encoding, we can only store 65536 values, if the character number to be stored is less than some number (say 60000), then just store the number, else write an escape code that says &quot;for the next character, add 60000 to it), and write &quot;the number minus 60000&quot;. Actually this is a simplification, because the numbering is actually not linear (it is divided into block numbers/planes).</p>
<p>Third thing to understand is: <strong>Unicode encoding creates a new problem.</strong> </p>
<p>As you can see from the previous explanation: if we have a string 4 x 16 bits, the length of the character may not be 4, it could be 2, 3, or 4, it depends on the data. You will need to use special functions to do string manipulation such as accessing character number x,&#160; or finding the length of a string. Different operating system uses different encoding for Unicode, so you need to know what encoding you are using.</p>
<p>Another thing to remember is conversion of old encoding system to Unicode or the other way around. Before Unicode, many countries/languages have their own encoding, character number 65 may not always be an &quot;A&quot; in some language. You may need a library to do this kind of conversion.</p>
<p>Fourth thing to understand is: <strong>Unicode string is only a list of characters in logical order.</strong></p>
<p>You can&#8217;t just paint each character and hope that the result will be fine. If you have character &quot;A&quot; as the first character, and a COMBINING GRAVE character as the second character, on display you will only see one &quot;character&quot; (actually it is one grapheme). You also need to note that several algorithms should understand this logical ordering, for example, when you try to reverse a string, some character combinations must be kept intact.</p>
<p>Fifth thing to understand is: <strong>a font contains list of glyphs representing&#160; characters.</strong></p>
<p>Currently a font will never have all the possible glyphs of Unicode characters. Having a font library will enable us to load glyphs from font, and look up whether the font contains the glyphs that we need to display the character. Some fonts also contains predefined shapes for character combinations. Usually the font library will not be able to tell us that a glyph represents a combination of other glyphs.</p>
<p>Sixth thing to understand is: <strong>you need font shaping library to draw Unicode strings nicely</strong>.</p>
<p>Font shaper such as harfbuzz will try to parse a string into syllable, and will try to find the best representation of the syllable, either by looking up the correct glyphs that already combines several characters or by joining several glyphs in correct position.</p>
<p>&#160;</p>
<p>Editing Unicode text is more difficult, and I still don&#8217;t understand well enough about it (my program doesn&#8217;t need that for now).</p>
<p>PS: the Malayalam version of Symbian bible is not released yet. I was just happy that I can display the characters correctly (as the reference PDF), so I want to write this.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/10/07/unicode-from-text-and-font-to-display/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing Space key on EEE PC</title>
		<link>http://tinyhack.com/2008/07/06/fixing-space-key-on-eee-pc/</link>
		<comments>http://tinyhack.com/2008/07/06/fixing-space-key-on-eee-pc/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 15:54:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/07/06/fixing-space-key-on-eee-pc/</guid>
		<description><![CDATA[I bought the&#160; Eee PC 4G last week, but I haven&#8217;t used it optimally. Today when trying to write a new blog post using Eee PC, I felt that the space key is very difficult to press. After searching around, &#8230; <a href="http://tinyhack.com/2008/07/06/fixing-space-key-on-eee-pc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinyhack.com/wp-content/uploads/2008/07/cimg4171.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="132" alt="CIMG4171" src="http://tinyhack.com/wp-content/uploads/2008/07/cimg4171-thumb.jpg" width="170" align="right" border="0" /></a> I bought the&#160; Eee PC 4G last week, but I haven&#8217;t used it optimally. Today when trying to write a new blog post using Eee PC, I felt that the space key is very difficult to press. After searching around, I found out that many people experience the same problem. Surprisingly it is very easy to take of the Eee PC keyboard. Just press on the three dots on top of the keyboard using screw driver, and it will pop out.</p>
<p>Fixing it quite easy, I used a tape to make the space key thicker and easier to press, and I put a tape also in the keyboard to keep the rubber part from moving.</p>
<p>You can see more pictures on <a href="http://blog.compactbyte.com/photos/main.php?g2_itemId=11361">my photo gallery</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/07/06/fixing-space-key-on-eee-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latest development (kernel space OK, user space: not yet OK)</title>
		<link>http://tinyhack.com/2008/06/16/latest-development-kernel-space-ok-user-space-not-yet-ok/</link>
		<comments>http://tinyhack.com/2008/06/16/latest-development-kernel-space-ok-user-space-not-yet-ok/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 02:13:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/06/16/latest-development-kernel-space-ok-user-space-not-yet-ok/</guid>
		<description><![CDATA[Here is the current progress of the kernel porting: Basic architectural support (IRQ, timer, memory mapping) Serial port EHCI driver OHCI driver MTD driver Here are some notes regarding the development: Serial port is 16550 compliant, but you need to &#8230; <a href="http://tinyhack.com/2008/06/16/latest-development-kernel-space-ok-user-space-not-yet-ok/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is the current progress of the kernel porting:</p>
<ol>
<li>Basic architectural support (IRQ, timer, memory mapping)</li>
<li>Serial port</li>
<li>EHCI driver</li>
<li>OHCI driver</li>
<li>MTD driver</li>
</ol>
<p>Here are some notes regarding the development:</p>
<ol>
<li>Serial port is 16550 compliant, but you need to remap the registers.</li>
<li>STR9104 have PCI bus, but it is not connected anywhere. The old kernel have a driver for PCI bus, and it was used in the EHCI driver. I think this is kind of a hack, because the PCI stuff is not needed.</li>
<li>The EHCI and OHCI is part of the SoC, not on the PCI bus. There is a quirk in the initialization of the OHCI part (you can look at it in the patch)</li>
<li>MTD driver is based on CFI chipset (AMD/Fujitsu). I only tested reading and writing configuration partition (mtd2 and mtdblock2)</li>
<li>Network Driver (STR9104 contains MAC hardware, and in Agestar it is connected to IP101A as the PHY hardware)</li>
</ol>
<p><span id="more-37"></span></p>
<p>I have not uploaded a new patch for the MTD yet (I will do it tonight). For the RTC and Button part, I think it will not be so easy:</p>
<ol>
<li>The RTC in the old kernel uses I2C bus, and X1205 driver. The X1205 already have a driver in the kernel tree, but there is no driver for the I2C part in the source code from Linksys devices. In the STR9104 product page, it is mentioned that the SoC already have an RTC device inside it, so it is possible that this RTC might not require I2C at all. I need to do some experiments.</li>
<li>The button driver source code is not given, but I think I can reverse engineer this.</li>
</ol>
<p>Kineq from the mailing list have warned me about something that is not right in the user space. When he tried to build uClibc, he got &quot;invalid instruction&quot; when running some applications (he was still using the old kernel at that time). With the new kernel, I also got the same thing, some applications (such samba) failed to start (segmentation fault), some works, but will halt in the middle (for example curl will get invalid instruction). The original agestar NCB3AST firmware uses libc 2.3, and not uClibc, so may be one of these things are not correct:</p>
<ol>
<li>The uClibc (there were quite many bugs in uClibc)</li>
<li>The compiler (may be I am giving the wrong flags)</li>
<li>The processor (Faraday claims 100% arm compatibility, but may be it is not that compatible)</li>
<li>The kernel (I doubt it, since it also happens in the old kernel)</li>
</ol>
<p><b>Note:</b> Problem was solved. FA526 doesn&#8217;t support Thumb, and I tried to compile things using EABI, which requires thumb interworking.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/06/16/latest-development-kernel-space-ok-user-space-not-yet-ok/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Progress: Network is UP</title>
		<link>http://tinyhack.com/2008/06/09/progress-network-is-up/</link>
		<comments>http://tinyhack.com/2008/06/09/progress-network-is-up/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 08:02:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/06/09/progress-network-is-up/</guid>
		<description><![CDATA[I finally managed to modify the STR9100 network card driver to work on Linux Kenel 2.6. There weren&#8217;t many modifications that i made (I will post the details later). So the next important thing will be to port the USB &#8230; <a href="http://tinyhack.com/2008/06/09/progress-network-is-up/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I finally managed to modify the STR9100 network card driver to work on Linux Kenel 2.6. There weren&#8217;t many modifications that i made (I will post the details later). So the next important thing will be to port the USB host driver. I think I began to understand the old driver, and I hope I can quickly port this last importang stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/06/09/progress-network-is-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Office 2007 fonts for free</title>
		<link>http://tinyhack.com/2008/05/13/get-office-2007-fonts-for-free/</link>
		<comments>http://tinyhack.com/2008/05/13/get-office-2007-fonts-for-free/#comments</comments>
		<pubDate>Tue, 13 May 2008 05:46:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/2008/05/13/get-office-2007-fonts-for-free/</guid>
		<description><![CDATA[Microsoft office provides several new nice looking fonts in their Office 2007. Some web pages and applications already uses these fonts to make their display looks nicer. To get these fonts into your Windows without buying Office 2007, you can &#8230; <a href="http://tinyhack.com/2008/05/13/get-office-2007-fonts-for-free/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Microsoft office provides several new nice looking fonts in their Office 2007. Some web pages and applications already uses these fonts to make their display looks nicer. To get these fonts into your Windows without buying Office 2007, you can install <a href="http://www.microsoft.com/downloads/details.aspx?familyid=048DC840-14E1-467D-8DCA-19D2A8FD7485&amp;displaylang=en">Power Point Viewer 2007</a> which is a free application to view a Power Point Presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2008/05/13/get-office-2007-fonts-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codefest ASIAOSS Symposium 2007</title>
		<link>http://tinyhack.com/2006/12/21/hello-world-2/</link>
		<comments>http://tinyhack.com/2006/12/21/hello-world-2/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 02:13:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tinyhack.com/?p=51</guid>
		<description><![CDATA[Information for Indonesian participant is available here. Deadline for sending your information is February 5th, 2007.]]></description>
			<content:encoded><![CDATA[<p>Information for Indonesian participant is available <a href="http://tinyhack.com/codefest.pdf" title="Codefest Info (PDF)">here</a>. Deadline for sending your information is February 5th, 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinyhack.com/2006/12/21/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

