<?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>G33K @ Work &#187; Allgemein</title>
	<atom:link href="http://www.geekatwork.de/category/allgemein/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geekatwork.de</link>
	<description>Basteleien eines Geeks</description>
	<lastBuildDate>Mon, 12 Jul 2010 08:38:54 +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>Building and running your own Android</title>
		<link>http://www.geekatwork.de/2010/04/01/building-and-running-your-own-android/</link>
		<comments>http://www.geekatwork.de/2010/04/01/building-and-running-your-own-android/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 20:00:43 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[fastboot]]></category>
		<category><![CDATA[G2]]></category>
		<category><![CDATA[HTC]]></category>
		<category><![CDATA[Magic]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[SPL]]></category>

		<guid isPermaLink="false">http://www.geekatwork.de/?p=197</guid>
		<description><![CDATA[Almost a year ago I bought an HTC Magic (also known as  [...]]]></description>
			<content:encoded><![CDATA[<p>Almost a year ago I bought an HTC Magic (also known as the G2) phone as a replacement for my iPhone.<br />
I was quite happy with it since it had the newest Android 1.5 and there was also an update released by Google to get it to version 1.6.</p>
<p>Now, that there are much fancier phones out there, like the Nexus One and Motorola Milestone, there must be a reason for people to buy them. The consequence about that is that they are holding back any updates to Android 2.0 or 2.1 for older phones. At least that&#8217;s my impression.</p>
<p>I also ever wanted to build and run my own Android since it is open source. At least that&#8217;s what Google says.<br />
My first steps were quite disappointing since there was no device specific package for my G2 in the source tree. There was only one for the HTC Dream (G1).</p>
<p>Yesterday I wanted to give it another try and it was a success. I will post my steps here which are especially for the HTC Magic (or G2, HTC Sapphire, MyTouch 3G, Google IO &#8211; they are all the same) but it should be possible to do this with other phones as long as you have all the device specific blobs like the GSM Baseband layer or low level hardware drivers for your specific device.<br />
Also keep in mind that this won&#8217;t be a normal guide like &#8220;How can I root this phone?&#8221; I assume that you more or less know what you are doing. So don&#8217;t blame me when you brick your phone: Shit happens and I&#8217;m not going to fix it.<span id="more-197"></span></p>
<p>Also, be careful what phone you have. There are 2 versions of the HTC Magic. One is the PVT32A and the other is PVT32B.<br />
The A version has more RAM compared to B. The phone sold by HTC on their own is the A version. Almost all others are B versions. My phone is a B variant.<br />
Check <a href="http://wiki.xda-developers.com/index.php?pagename=HTC_Sapphire_Hacking#sec01" target="_blank">this site</a> for any further information.</p>
<h2>The SPL</h2>
<p>The SPL is the Secondary Program Loader. The Initial Program Loader, which runs before the SPL is responsible for the basic bootstrapping of the processor inside the phone. Most of the time it is located on some on-die ROM and loads the SPL from flash.</p>
<p>The SPL itself is responsible for all kinds of boot services like booting from flash or receiving and handling data from the USB port with the fastboot protocol, which can be used for several maintenance tasks.</p>
<p>Usually, if you buy an OEM phone, you will get a shipment bootloader. Development phones will have an engineering bootloader.<br />
The difference between those two is that with the shipment bootloader, you will not be able to write the flash directly from your computer over the fastboot protocol, which you definitely want if you compile/develop your own Android. So the first step is to install an engineering loader.<br />
You can get several SPLs <a href="http://forum.xda-developers.com/showthread.php?t=529019" target="_blank">here</a>. I installed the Crios  loader.<br />
Just put the zip file on your SD-Card, boot a <a href="http://www.cyanogenmod.com/downloads/recovery-image" target="_blank">modified recovery image</a> via fastboot and apply the zip file from your SD:</p>
<pre class="brush:plain">fastboot boot cm-recovery-1.4.img</pre>
<p>The fastboot utility is available <a href="http://developer.htc.com/adp.html#s2" target="_blank">here</a> or from your compiled Android in the out/host/&lt;platform&gt;/bin/ subdirectory.<br />
To get your phone into fastboot mode, turn it off and hold the &#8220;back&#8221;-key while turning it on.</p>
<p>After flashing the new SPL you will have the engineering bootloader with security turned off.</p>
<h2>Getting the Android sourcecode</h2>
<p>If you want to build your own Android you obviously need to get the sourcecode. I did all the work on a Gentoo Linux. I don&#8217;t know how to do it under Windows or Mac OS.</p>
<p>First I thought to take the CyanogenMod repositories but they won&#8217;t check out completely because there seems to be missing at least one repository on github.</p>
<p>To get the official Google tree, just follow <a href="http://source.android.com/download" target="_blank">this guide</a>.</p>
<p>Essentially you just install the required packages, get the repo client, do the repo init, repo sync and you should be done.</p>
<h2>Get the binary blobs</h2>
<p>For the Sapphire board package, you will need to get some binary blobs for the camera, WLAN, baseband and several other things.</p>
<p>You can download them on the <a title="http://developer.htc.com/google-io-device.html" href="http://" target="_blank">HTC page for the Google IO</a>. Just download the recovery image for Android 1.6 and put it into the root of your Android source tree.<br />
After that you need to change the directory to vendor/htc/sapphire-open and execute the unzip-files.sh which extracts the blobs from the downloaded zipfile and puts them into the appropriate places.</p>
<h2>Building it</h2>
<p>After you prepared your environment, get back to the root of the source tree and do a</p>
<pre class="brush:plain">source build/envsetup.sh
lunch</pre>
<p>to setup several environment variables and select the build target, which will be <em>aosp_sapphire_eu-userdebug</em> in our case.</p>
<p>After that you can just execute a</p>
<pre class="brush:plain">make -j3</pre>
<p>to start the build. You can adjust the number behind the -j parameter to your machine. If you have n cores, the number you normally use is n+1. This is not essential for a successful build, but if you have 2 or more cores, you should use them for the build.<br />
Now it&#8217;s time to ge some beautiful delicious black coffee or a cold bootle of <a href="http://www.club-mate.de" target="_blank">Club-Mate</a>, go for a walk or take a nap. This will take quite some time.</p>
<h2>Common errors during the build</h2>
<p>I ran into several erros while buildng. All of them were specific to my environment.</p>
<ul>
<li><em>no rule to make target `run-java-tool&#8217;</em> during build<br />
Solution: Just execute a <em>export PATH=$(java-config -O)/bin:$PATH</em> and the error you should be gone</li>
<li>Java 1.6 is installed.<br />
Solution: Do an <em>ACCEPT_LICENSE=&#8221;*&#8221; emerge =sun-jdk-1.5.0.22</em> and select the 1.5 JDK with eselect.</li>
<li>Building the emulator fails with something like <em>prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directory</em><br />
Solution: Do an <em>emerge libX11</em></li>
</ul>
<h2>Installing the built images on your phone</h2>
<p>After the build finished successful you will have everything in the <em>out</em> subdirectory.</p>
<p>Thanks to the engineering SPL, you can now install the built images using fastboot:</p>
<pre class="brush:plain">export ANDROID_PRODUCT_OUT="/path/to/android/root/out/target/product/sapphire-open"
fastboot flashall</pre>
<p>Be sure your phone is in fastboot mode.</p>
<p>After you flashed the images you should boot the recovery image, mentioned in the SPL section, again and wipe the userdata partition.<br />
This will cause a data loss. Anyway, you should have done a backup with nandroid in the modified recory image before messing around with your phone&#8217;s firmware <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>The result</h2>

<a href='http://www.geekatwork.de/2010/04/01/building-and-running-your-own-android/about/' title='about'><img width="150" height="150" src="http://www.geekatwork.de/wp-content/uploads/about-150x150.png" class="attachment-thumbnail" alt="about" title="about" /></a>
<a href='http://www.geekatwork.de/2010/04/01/building-and-running-your-own-android/menu/' title='menu'><img width="150" height="150" src="http://www.geekatwork.de/wp-content/uploads/menu-150x150.png" class="attachment-thumbnail" alt="menu" title="menu" /></a>
<a href='http://www.geekatwork.de/2010/04/01/building-and-running-your-own-android/main/' title='main'><img width="150" height="150" src="http://www.geekatwork.de/wp-content/uploads/main-150x150.png" class="attachment-thumbnail" alt="main" title="main" /></a>

<h2>Next steps</h2>
<p>As you can see from the images above, all of the Google applications are missing. The next step would be to take them from an official Google image and put them on your phone. I think cyanogen already wrote a script for doing this for his builds. I haven&#8217;t checked this out yet.</p>
<p>Anyway, we have our very own Android 2.1 running.<br />
If you want to use it on a daily basis you should consider building a stable branch and using this instead of the master branch.</p>
<p>If you&#8217;ve got any questions or problems, just leave them in the comments and we will try to figure them out.</p>
<p><strong>Update:</strong> The cyanogenmod repositories do check out. I just used the wrong manifest repository.<br />
If you want to give it a try, just do a</p>
<pre class="brush:plain">repo init -u git://github.com/cyanogen/android.git -b eclair
repo sync</pre>
<p>instead of using the Google repository. <a href="http://wiki.cyanogenmod.com/index.php/Building_from_source" target="_blank">Have a look here</a> for more information.</p>
<p>General useful information, like adding your own target, creating keys for signing etc. can be found <a href="http://pdk.android.com/online-pdk/guide/build_new_device.html" target="_blank">here</a>.</p>
 <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://www.geekatwork.de/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.geekatwork.de/2010/04/01/building-and-running-your-own-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple ][</title>
		<link>http://www.geekatwork.de/2009/12/19/apple/</link>
		<comments>http://www.geekatwork.de/2009/12/19/apple/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 23:42:41 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Apple 2]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[Elektronik]]></category>
		<category><![CDATA[Vintage Computing]]></category>

		<guid isPermaLink="false">http://galauner.de/wp/?p=65</guid>
		<description><![CDATA[Damals - genau genommen im Jahre 1984, also noch lange  [...]]]></description>
			<content:encoded><![CDATA[<p>Damals &#8211; genau genommen im Jahre 1984, also noch lange meiner Zeit &#8211; entschloss sich mein Vater sich einen Heimcomputer zu kaufen: Ein Nachbau eines Apple 2.<br />
Dazu ein Matsuhita Floppy, einen passenden Floppycontroller, eine 16KB Speichererweiterung (&#8220;Language Card&#8221;) und eine Z/80 CPU-Karte.</p>
<p>Seit seiner Einmottung verstaubte dieses schöne Stück Computergeschichte auf unserem Dachboden und ich habe dieses Gerät nie vorher angefasst&#8230; Bis letztes Wochenende.<span id="more-65"></span></p>
<p>Ich hole das Teil also vom Speicher, schließe den UHF-Konverter an den Antennenausgang meines Fernsehers und schalte ihn ein. Man hört ein &#8220;MIEP&#8221; und das Floppy rattert kurz.<br />
Nachdem ich dann versuchte ein lesbares Bild auf meinem Fernseher zu bekommen und es nach 15 Minuten immernoch Schatten warf und krisselig war, sodass man es kaum lesen konnte, gab ich auf und fand mich damit ab. Bunt kam da auch nichts raus <img src='http://www.geekatwork.de/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Also kein &#8220;hochauflösender Grafikmodus&#8221;.</p>
<p>Im Laufe des Abends/der Nacht blätterte ich also durch ein, ebenfalls vom Speicher gekramtes, Buch, in dem die Nutzung dieser schönen Maschine beschrieben war und irgendwann hab ich dann auch mal ein kleines Basic Programm auf eine, sogar noch leere, Diskette gespeichert.</p>
<p>Am nächsten Tag habe ich mir dann auch mal ein Chinch-Kabel und einen Scart-Adapter gesucht, um endlich mal ein vernünftiges Bild (hoffentlich auch mit Farbe) zu bekommen. Hinten am Apple fällt nämlich sowieso Composite raus, das man direkt in einen heutigen Fernseher schieben kann. Die UHF-Konverter waren vor 20 Jahren nur nötig, weil kein Fernseher Composite Signale verarbeiten konnte. Das konnten damals halt nur Monitore &#8211; und die waren teuer.<br />
Also Flux angeklemmt und man bekam ein extrem cooles und um Welten besseres 40&#215;25 Zeichen großes Bild zu Gesicht. Die Color-Demos auf der Apple DOS 3.3 Master Disk blieben allerdings schwarz/weiß:<br />
<a rel="lightbox[apple2]" href="http://www.geekatwork.de/wp-content/uploads/3mzz.jpg"><img class="alignnone size-medium wp-image-66" title="3mzz" src="http://www.geekatwork.de/wp-content/uploads/3mzz-300x225.jpg" alt="3mzz" width="300" height="225" /></a></p>
<p>Weil ich weitere Informationen über den Computer gesucht habe, bin ich auch über die Software <a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAcQFjAA&amp;url=http%3A%2F%2Fadtpro.sourceforge.net%2F&amp;ei=5xEsS83IKJPJ_gabmtGCCQ&amp;usg=AFQjCNHVbSaTiNESuE_MOukgmSBRvWEGow&amp;sig2=gRIprYfCGipN5NBtN9o2rg" target="_blank">ADTPro</a> gestolpert. Mit ihr ist es Möglich Diskettenimages, die man auch im Netz findet, per Audio-Interface des Apples, an den man normalerweile einen Kasettenrekorder anschließt, zu übertragen und auch auf eine reale Diskette zu schreiben. Getestet habe ich das mangels Klinkenkabel noch nicht. Die Videos sehen aber sehr vielversprechend aus.</p>
<p>Genauso fand ich das FAQ der <a href="http://home.swbell.net/rubywand/A2FAQs5MAINHALL.html" target="_blank">Usenetgruppe comp.sys.apple2</a>, um überhaupt erstmal rauszufinden, was das denn nun genau für ein Apple 2 war, da es einige verschiedene gab: Apple II, Apple II+, Apple IIe(uro), Apple IIe(uro)+ etc.<br />
Was hier vor mir stand war also dann ein Nachbau eines Apple IIe oder IIe+, mit Apple II+-Tastatur und Apple IIe+ Roms.<br />
Wieso? Der Apple hat seit II+ hat einen sogenannten Autostart-Monitor, der einen nach dem Einschalten nicht direkt auf den Monitor-Prompt wirft, sondern, falls eine Floppy- oder SCSI-Karte installiert ist wird versucht ein DOS zu laden.<br />
Zusätzlich muss man, damit der &#8220;Reset&#8221;-Knopf auf der Tastatur seine Wirkung zeigt gleichzeitig Control drücken. Der Apple II (ohne +) hatte das noch nicht.<br />
Laut Originalrechnung ist das aber kein richtiger Apple IIe+ von Apple, sondern ein MEWA II, den ich im Netz nur auf einer Webseite mit der Bezeichnung MEWA-48 gefunden habe.<br />
<a rel="lightbox[apple2]" href="http://www.geekatwork.de/wp-content/uploads/o3nc.jpg"><img class="alignnone size-medium wp-image-67" title="Apple 2" src="http://www.geekatwork.de/wp-content/uploads/o3nc-225x300.jpg" alt="Apple 2" width="225" height="300" /></a></p>
<p>Später habe ich dann das Buch &#8220;Understanding the Apple 2&#8243; gefunden. Sehr interessant. Der komplette Computer ist erklärt. Jedes einzelne Teil vom Taktgenerator bis hin zur Adressdekodierung am Bus. Das schöne ist, dass man bei diesen alten Computern wirklich noch alles nachvollziehen kann. Keine hochwissenschaftlichen, mit Marketing-Buzzwords gespickten und bis unter die Zähne patentierte Bussysteme oder generische Chips, über die es keine Information gibt.</p>
<p>Das Problem an diesem Gerät ist nur, dass es wahrscheinlich ein IIe+ ist. Steve Wozniak hat damals, um das Composite Signal PAL-Kompatibel zu bekommen einiges am Videogenerator ändern müssen. Leider fiel diesen Änderungen auch der Farbmodus zum Opfer. Es gibt PAL-Karten, die man einstecken kann, um Farbe als PAL-Signal zu bekommen, nach denen ich aber bisher nicht gesucht habe.<br />
Ich bin mir da nicht sicher, weil ich nicht wirklich weiß, was da jetzt für ein Signal rauskommt. NTSC kann dieser kleine Billigfernseher aber höchstwahrscheinlich nicht anzeigen. Ich geh also mal von einem IIe+ aus, der PAL rauswirft.</p>
<p>Was ich mir noch für Extension Karten besorgen möchte sind die PAL-Karte und eine Serial-Karte für eine serielle Schnittstelle. PAL-Karte für ein buntes Bild und Serial kann man immer brauchen, wenn man mit der &#8220;mordernen Welt&#8221; einigermaßen kommunizieren möchte.</p>
<p>Auf jeden Fall macht das Teil Spaß!</p>
<p><strong>Update:</strong> Es ist doch kein IIe. Wie ich grade im Buch &#8220;Understanding the Apple IIe&#8221; gelesen habe, besitzt der einen &#8220;Auxiliary Slot&#8221;. Den hat mein Apple definitiv nicht. Das heißt entweder spuckt der wirklich NTSC aus oder es ist ein II+ mit angepasstem Videosignalgenerator. Die Möglichkeit besteht, weil das ja swieso ein Klon ist, den man ja dann entsprechend anpassen könnte.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = 'G33KatWork';
var flattr_url = 'http://www.geekatwork.de';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'G33K @ Work';
var flattr_dsc = 'Basteleien eines Geeks';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://www.geekatwork.de/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.geekatwork.de/2009/12/19/apple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neues Blog :)</title>
		<link>http://www.geekatwork.de/2009/12/15/neues-blog/</link>
		<comments>http://www.geekatwork.de/2009/12/15/neues-blog/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 06:29:09 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Webseite]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://galauner.de/wp/?p=38</guid>
		<description><![CDATA[So.
Ich hab mich jetzt doch mal entschieden Wordpress  [...]]]></description>
			<content:encoded><![CDATA[<p>So.<br />
Ich hab mich jetzt doch mal entschieden WordPress ne Chance zu geben.</p>
<p>Die alte Rails Webseite ist nie wirklich fertig geworden. Mit Rails selber konnte ich mich auch nie so wirklich anfreunden. Und die Lust zum Webdevelopment fehlte auch gänzlich.</p>
<p>Also schnell ein WordPress Template umgehackt und hier ist es. Sieht doch ganz gut aus.<br />
Jetzt fehlt wie immer der Content.</p>
 <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://www.geekatwork.de/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.geekatwork.de/2009/12/15/neues-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
