<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1983061815697767869</atom:id><lastBuildDate>Wed, 28 Aug 2024 10:01:35 +0000</lastBuildDate><title>Android Porting on Devices</title><description>on an Embedded System</description><link>http://android-porting-on-devices.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-8615315486320109455</guid><pubDate>Tue, 19 Apr 2011 10:11:00 +0000</pubDate><atom:updated>2011-04-19T03:11:17.436-07:00</atom:updated><title>Android Tools</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;http://www.kernel.org/&lt;br /&gt;
&lt;br /&gt;
Kernel Patch work Project List -&lt;br /&gt;
http://www.kernel.org/pub/software/scm/git/&lt;br /&gt;
&lt;br /&gt;
Android Glossary -&lt;br /&gt;
http://elinux.org/Android_Glossary&lt;br /&gt;
&lt;br /&gt;
&lt;h1 class=&quot;firstHeading&quot; id=&quot;firstHeading&quot;&gt;Android Kernel Download From eLinux.orgJump to: &lt;a href=&quot;http://elinux.org/Android_Kernel_Download#column-one&quot;&gt;navigation&lt;/a&gt;, &lt;a href=&quot;http://elinux.org/Android_Kernel_Download#searchInput&quot;&gt;search&lt;/a&gt;&lt;/h1&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Kernel_Download&amp;amp;action=edit&amp;amp;section=1&quot; title=&quot;Edit section: Main Google Android Kernels&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Main_Google_Android_Kernels&quot;&gt; Main Google Android Kernels &lt;/span&gt;&lt;/h2&gt;The main Google repository with Android source code is at: &lt;a class=&quot;external free&quot; href=&quot;http://android.git.kernel.org/&quot; rel=&quot;nofollow&quot;&gt;http://android.git.kernel.org/&lt;/a&gt; &lt;br /&gt;
There are (as of September 2009) 4 main separate kernel repositories at that site: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; common &lt;/li&gt;
&lt;li&gt; experimental &lt;/li&gt;
&lt;li&gt; msm &lt;/li&gt;
&lt;li&gt; omap &lt;/li&gt;
&lt;/ul&gt;To download one of these and use it directly, you can use git. For example: &lt;br /&gt;
&lt;pre&gt;git clone git://android.git.kernel.org/kernel/common.git kernel&lt;/pre&gt;To preserve your sanity, it&#39;s probably worth downloading this into a &#39;kernel&#39; directory in your overall Android source directory scheme &lt;br /&gt;
You can use repo, following the instructions at &lt;a class=&quot;external free&quot; href=&quot;http://source.android.com/download&quot; rel=&quot;nofollow&quot;&gt;http://source.android.com/download&lt;/a&gt;, to pull down the entire Android source. However, when you download the rest of the Android source code, using the &#39;repo&#39; command, you do NOT automatically get a kernel tree included.  That is, a kernel git tree is not referenced in the default Android manifest file,  &lt;br /&gt;
To add projects, such as the kernel, to your overall Android repository scheme, you add the appropriate kernel repository to your local manifest.xml file. This file is located in the .repo directory. &lt;br /&gt;
To include the kernel/common tree, include a line like this in .repo/manifest.xml: &lt;br /&gt;
&lt;pre&gt;&amp;lt;project path=&quot;kernel/common&quot; name=&quot;kernel/common&quot; /&amp;gt;&lt;/pre&gt;The complete list of projects (including other kernel options besides kernel/common) is listed on &lt;a class=&quot;external free&quot; href=&quot;http://android.git.kernel.org/&quot; rel=&quot;nofollow&quot;&gt;http://android.git.kernel.org/&lt;/a&gt;.  &lt;br /&gt;
Note that the default revision for  git repositories is specified in the &amp;lt;default&amp;gt; tag in manifest.xml as &quot;revision=master&quot; but the kernel/common repository may not have a head called &quot;master&quot;. In that case if you just type &quot;repo sync kernel/common&quot; you may see the message: &lt;br /&gt;
&lt;pre&gt;error: revision master in kernel/common not found&lt;/pre&gt;Typically the heads in the kernel/common repository will be called android-2.6.x (where x is the kernel number); specifying this number in the manifest should allow repo to sync properly, i.e.: &lt;br /&gt;
&lt;pre&gt;&amp;lt;project path=&quot;kernel/common&quot; name=&quot;kernel/common&quot; revision=&quot;android-2.6.27&quot;/&amp;gt;&lt;/pre&gt;You can view the heads by clicking on the project link from &lt;a class=&quot;external free&quot; href=&quot;http://android.git.kernel.org/&quot; rel=&quot;nofollow&quot;&gt;http://android.git.kernel.org/&lt;/a&gt;.  &lt;br /&gt;
For more about repo, see &lt;a class=&quot;external free&quot; href=&quot;http://source.android.com/download/using-repo&quot; rel=&quot;nofollow&quot;&gt;http://source.android.com/download/using-repo&lt;/a&gt; &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Kernel_Download&amp;amp;action=edit&amp;amp;section=2&quot; title=&quot;Edit section: Other Repositories with Android-specific changes&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Other_Repositories_with_Android-specific_changes&quot;&gt; Other Repositories with Android-specific changes &lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt; Linux kernel for omap and beagle-board, by Embinux: &lt;a class=&quot;external free&quot; href=&quot;http://labs.embinux.org/git/cgit.cgi/repo/kernel.git&quot; rel=&quot;nofollow&quot;&gt;http://labs.embinux.org/git/cgit.cgi/repo/kernel.git&lt;/a&gt; &lt;ul&gt;&lt;li&gt; clone with: git clone git://labs.embinux.org/repo/kernel.git kernel &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Kernel_Download&amp;amp;action=edit&amp;amp;section=3&quot; title=&quot;Edit section: &#39;Raw&#39; Android kernel patches&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;.27Raw.27_Android_kernel_patches&quot;&gt; &#39;Raw&#39; Android kernel patches &lt;/span&gt;&lt;/h2&gt;I do not know of any freely available patches for the Linux kernel with the Android fixes, as of November 2009.  I have, however, heard of multiple efforts to extract the patches to make it easier to port the Android kernel features onto newer Linux kernels. &lt;br /&gt;
Here is a way of extracting raw Android patches at a certain point in time, though this may be dated: &lt;br /&gt;
&lt;pre&gt;git clone git://android.git.kernel.org/kernel/common.git android-kernel
cd android-kernel
git checkout --track -b android-2.6.32 origin/android-2.6.32
git fetch --tags git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.32.y.git
git shortlog v2.6.32.9..HEAD
git format-patch v2.6.32.9..HEAD&lt;/pre&gt;Sum total 173 patches for the 2.6.32.9 kernel as of writing. &lt;br /&gt;
If anyone knows where raw android kernel patches are available, please add a link here.  See also the &lt;a href=&quot;http://elinux.org/Android_Kernel_Features&quot; title=&quot;Android Kernel Features&quot;&gt;Android Kernel Features&lt;/a&gt; page for more information about individual kernel features.&lt;br /&gt;
&lt;br /&gt;
&lt;h1 class=&quot;firstHeading&quot; id=&quot;firstHeading&quot;&gt;Android Kernel Build&lt;/h1&gt;&lt;h3 id=&quot;siteSub&quot;&gt;From eLinux.org&lt;/h3&gt;&lt;div id=&quot;jump-to-nav&quot;&gt;Jump to: &lt;a href=&quot;http://elinux.org/Android_Kernel_Build#column-one&quot;&gt;navigation&lt;/a&gt;, &lt;a href=&quot;http://elinux.org/Android_Kernel_Build#searchInput&quot;&gt;search&lt;/a&gt;&lt;/div&gt;How to build an Android kernel. &lt;br /&gt;
The Android build system may or may not automatically rebuild a kernel for you. &lt;br /&gt;
This page documents how to build an Android kernel, independent of the  regular Android &quot;distribution&quot; build system. &lt;br /&gt;
[FIXTHIS - nothing here yet.] &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Kernel_Build&amp;amp;action=edit&amp;amp;section=1&quot; title=&quot;Edit section: Building an Individual application&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Building_an_Individual_application&quot;&gt; Building an Individual application &lt;/span&gt;&lt;/h2&gt;Steps required  to compile individual application package in Android SDK. &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;  Go to build directory under Android sdk directory   &lt;/li&gt;
&lt;li&gt;  Execute source source envsetup.sh &lt;/li&gt;
&lt;li&gt;  Go to corresponding application directory &lt;/li&gt;
&lt;li&gt;  Issue mm command to build the application only&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
Here are some development tools useful for working with Android&lt;br /&gt;
&lt;table class=&quot;toc&quot; id=&quot;toc&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div id=&quot;toctitle&quot;&gt;&lt;h2&gt;Contents&lt;/h2&gt;&lt;span class=&quot;toctoggle&quot;&gt;[&lt;a class=&quot;internal&quot; href=&quot;&quot; id=&quot;togglelink&quot;&gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li class=&quot;toclevel-1 tocsection-1&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Android_SDK&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Android SDK&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-2&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#host-side_tools&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;host-side tools&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-3 tocsection-3&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#adb&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;adb&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-4&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#aapt&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;aapt&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-5&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#ddms&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;ddms&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-6&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Fastboot&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Fastboot&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-7&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Toolchains&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.5&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Toolchains&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-8&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Emulator&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.6&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Emulator&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-9&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#traceview&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1.7&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;traceview&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-10&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#target-side_tools&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;target-side tools&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-3 tocsection-11&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#am&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;am&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-12&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#dumpstate&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;dumpstate&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-13&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#logcat&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;logcat&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-14&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#monkey&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;monkey&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-15&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#procrank&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.5&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;procrank&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-16&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#service&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.6&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;service&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-17&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#toolbox&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2.7&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;toolbox&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-18&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#other_tools&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;other tools&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-19&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#agcc&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;agcc&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-20&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#bootchart&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;bootchart&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-21&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#busybox&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;busybox&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-22&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#smem&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;smem&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-23&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#strace&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.5&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;strace&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-24&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Eclipse&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Eclipse&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-25&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Hardware&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Hardware&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-26&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_Tools#Serial_Cable_for_G1&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Serial Cable for G1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=1&quot; title=&quot;Edit section: Android SDK&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Android_SDK&quot;&gt; Android SDK &lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=2&quot; title=&quot;Edit section: host-side tools&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;host-side_tools&quot;&gt; host-side tools &lt;/span&gt;&lt;/h3&gt;&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=3&quot; title=&quot;Edit section: adb&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;adb&quot;&gt; adb &lt;/span&gt;&lt;/h4&gt;adb is the android debugger - it also doubles as file transfer agent. The setup consists of an &lt;tt&gt;adbd&lt;/tt&gt; on the target in the &lt;tt&gt;/sbin&lt;/tt&gt; directory. On the host two programs are run: the &lt;tt&gt;adb&lt;/tt&gt; application (in the SDK&#39;s &lt;tt&gt;tools&lt;/tt&gt; directory) and an adb server, started by the adb application. &lt;br /&gt;
For emulators, adb will usually run automagically. &lt;br /&gt;
For real boards - with debugging over USB, you might need to do work, as is documented here: &lt;a class=&quot;external free&quot; href=&quot;http://developer.android.com/guide/developing/device.html#setting-up&quot; rel=&quot;nofollow&quot;&gt;http://developer.android.com/guide/developing/device.html#setting-up&lt;/a&gt; . &lt;br /&gt;
For real boards that do not have a USB connection but have Ethernet instead, you might need to do a few tricks. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; make sure that adbd runs on the board. If it doesn&#39;t run, you might want to check the &lt;tt&gt;init.rc&lt;/tt&gt; file. &lt;/li&gt;
&lt;li&gt; make sure that the network connection between host and the board is working - test pinging both ways. &lt;/li&gt;
&lt;li&gt; on the host, type the following (and yes, you need to specify the board&#39;s IP address on the host): &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;ADBHOST=&amp;lt;target-ip&amp;gt; tools/adb kill-server
  ADBHOST=&amp;lt;target-ip&amp;gt; tools/adb shell&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; you should now get a prompt on the board, you can exit the prompt if you want. &lt;/li&gt;
&lt;li&gt; &lt;tt&gt;tools/adb devices&lt;/tt&gt; should now list the device. &lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=4&quot; title=&quot;Edit section: aapt&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;aapt&quot;&gt; aapt &lt;/span&gt;&lt;/h4&gt;The Android Asset Packaging Tool is used to create, inspect and manage Android packages. &lt;br /&gt;
You can use this to see details about a package, it&#39;s resources, and xml information. &lt;br /&gt;
The &lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/guide/developing/tools/aapt.html&quot; rel=&quot;nofollow&quot;&gt;Android developer page on aapt&lt;/a&gt; is somewhat meager. &lt;br /&gt;
See &lt;a href=&quot;http://elinux.org/Android_aapt&quot; title=&quot;Android aapt&quot;&gt;Android aapt&lt;/a&gt; for substantially more information. &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=5&quot; title=&quot;Edit section: ddms&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;ddms&quot;&gt; ddms &lt;/span&gt;&lt;/h4&gt;The Dalvik Debug Monitor Server is a host-based tool which interacts with and Android target system and can show numerous bits of information, including the log, cpu and memory utilization, and  lots of details about individual processes. &lt;br /&gt;
See the &lt;a class=&quot;external text&quot; href=&quot;http://developer.android.com/guide/developing/tools/ddms.html&quot; rel=&quot;nofollow&quot;&gt;DDMS developer guide&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=6&quot; title=&quot;Edit section: Fastboot&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Fastboot&quot;&gt; Fastboot &lt;/span&gt;&lt;/h4&gt;&lt;a href=&quot;http://elinux.org/Android_Fastboot&quot; title=&quot;Android Fastboot&quot;&gt;Android Fastboot&lt;/a&gt; is a tool to boot and manipulate the partitions on an Android development phone. &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=7&quot; title=&quot;Edit section: Toolchains&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Toolchains&quot;&gt; Toolchains &lt;/span&gt;&lt;/h4&gt;Android provides pre-built toolchains (C/C++ compilers and linkers),  but requires the installation of a java compiler (JDK) from an external  source. &lt;br /&gt;
As of NDK version r5 (December 2010), the toolchains can now be  used in standalone cross-compiler mode. See docs/STANDALONE-TOOLCHAIN.html in the NDK for information about  this.  Previously, the toolchains could be used within the build system, but it was difficult and error  prone to compile native programs outside the Android build system with  them. &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=8&quot; title=&quot;Edit section: Emulator&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Emulator&quot;&gt; Emulator &lt;/span&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt; Emulator - See &lt;a class=&quot;external free&quot; href=&quot;http://developer.android.com/guide/developing/tools/emulator.html&quot; rel=&quot;nofollow&quot;&gt;http://developer.android.com/guide/developing/tools/emulator.html&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;The emulator is a version of QEMU, which mimics the instruction set of an ARM processor, and  the hardware that one might find on a mobile phone.  The emulator runs on an x86 system, but executes an ARM linux kernel and programs.  The flow of control is: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;ul&gt;&lt;li&gt; application -&amp;gt; &lt;/li&gt;
&lt;li&gt; dalvik VM -&amp;gt; &lt;/li&gt;
&lt;li&gt; C/C++ libraries -&amp;gt; &lt;/li&gt;
&lt;li&gt; ARM linux kernel -&amp;gt; &lt;/li&gt;
&lt;li&gt; emulated instructions and hardware (QEMU)-&amp;gt; &lt;/li&gt;
&lt;li&gt; C libraries-&amp;gt; &lt;/li&gt;
&lt;li&gt; x86 kernel -&amp;gt; &lt;/li&gt;
&lt;li&gt; real hardware &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=9&quot; title=&quot;Edit section: traceview&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;traceview&quot;&gt; traceview &lt;/span&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt; Google&#39;s main page describing traceview: &lt;a class=&quot;external free&quot; href=&quot;http://developer.android.com/guide/developing/tools/traceview.html&quot; rel=&quot;nofollow&quot;&gt;http://developer.android.com/guide/developing/tools/traceview.html&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external free&quot; href=&quot;http://www.bottomlesspit.org/file_download/2/Android_SDK_Traceview_tool.pdf&quot; rel=&quot;nofollow&quot;&gt;http://www.bottomlesspit.org/file_download/2/Android_SDK_Traceview_tool.pdf&lt;/a&gt; - good overview presentation by Olivier Bilodeau &lt;ul&gt;&lt;li&gt; presentation with speaker notes: &lt;a class=&quot;external free&quot; href=&quot;http://www.bottomlesspit.org/file_download/3/Android_SDK_Traceview_tool_w_speakernotes.pdf&quot; rel=&quot;nofollow&quot;&gt;http://www.bottomlesspit.org/file_download/3/Android_SDK_Traceview_tool_w_speakernotes.pdf&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://newfoo.net/2009/04/18/performance-tuning-android-applications.html&quot; rel=&quot;nofollow&quot;&gt;Performance Tuning Android Applications&lt;/a&gt; - straightforward article discussing traceview use to find an application bottleneck. April 2009. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=10&quot; title=&quot;Edit section: target-side tools&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;target-side_tools&quot;&gt; target-side tools &lt;/span&gt;&lt;/h3&gt;&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=11&quot; title=&quot;Edit section: am&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;am&quot;&gt; am &lt;/span&gt;&lt;/h4&gt;Activity Manager - can be used to start applications at the command line, or send intents to  running applications. &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=12&quot; title=&quot;Edit section: dumpstate&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;dumpstate&quot;&gt; dumpstate &lt;/span&gt;&lt;/h4&gt;&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=13&quot; title=&quot;Edit section: logcat&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;logcat&quot;&gt; logcat &lt;/span&gt;&lt;/h4&gt;This is the user tool for accessing the Android system log.  This is implemented at a special option in adb (I&#39;m not sure what the difference is between &quot;adb logcat&quot; and &quot;adb shell logcat&quot;) &lt;br /&gt;
You can find lots of information about logcat on the &lt;a href=&quot;http://elinux.org/Android_logger&quot; title=&quot;Android logger&quot;&gt;Android logger&lt;/a&gt; page, and at &lt;a class=&quot;external free&quot; href=&quot;http://developer.android.com/guide/developing/tools/adb.html#logcat&quot; rel=&quot;nofollow&quot;&gt;http://developer.android.com/guide/developing/tools/adb.html#logcat&lt;/a&gt; &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=14&quot; title=&quot;Edit section: monkey&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;monkey&quot;&gt; monkey &lt;/span&gt;&lt;/h4&gt;&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=15&quot; title=&quot;Edit section: procrank&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;procrank&quot;&gt; procrank &lt;/span&gt;&lt;/h4&gt;procrank shows a listing of processes on the system, sorted by one of the memory utilization metrics.  See &lt;a href=&quot;http://elinux.org/Android_Memory_Usage#procrank&quot; title=&quot;Android Memory Usage&quot;&gt;Android Memory Usage#procrank&lt;/a&gt; &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=16&quot; title=&quot;Edit section: service&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;service&quot;&gt; service &lt;/span&gt;&lt;/h4&gt;Can be used to send an individual service message. &lt;br /&gt;
&lt;pre&gt;Usage: service [-h|-?]
       service list
       service check SERVICE
       service call SERVICE CODE [i32 INT | s16 STR] ...
Options:
   i32: Write the integer INT into the send parcel.
   s16: Write the UTF-16 string STR into the send parcel.&lt;/pre&gt;On one forum, I saw that you could switch between portrait and landscape with: &lt;br /&gt;
&lt;pre&gt;$ service call window 18 i32 1 # to set to landscape on the emulator
$ service call window 18 i32 0 # to set to portrait on the emulator&lt;/pre&gt;service list will show a list of different services that can be communicated with. &lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=17&quot; title=&quot;Edit section: toolbox&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;toolbox&quot;&gt; toolbox &lt;/span&gt;&lt;/h4&gt;stop, start - commands to stop and start services on an Android system &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=18&quot; title=&quot;Edit section: other tools&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;other_tools&quot;&gt; other tools &lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=19&quot; title=&quot;Edit section: agcc&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;agcc&quot;&gt; agcc &lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://plausible.org/andy/agcc&quot; rel=&quot;nofollow&quot;&gt;agcc&lt;/a&gt; - A wrapper tool for compiling native Android apps (linked directly to bionic) &lt;ul&gt;&lt;li&gt; See &lt;a class=&quot;external free&quot; href=&quot;http://android-tricks.blogspot.com/2009/02/hello-world-c-program-on-using-android.html&quot; rel=&quot;nofollow&quot;&gt;http://android-tricks.blogspot.com/2009/02/hello-world-c-program-on-using-android.html&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=20&quot; title=&quot;Edit section: bootchart&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;bootchart&quot;&gt; bootchart &lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; See &lt;a href=&quot;http://elinux.org/Using_Bootchart_on_Android&quot; title=&quot;Using Bootchart on Android&quot;&gt;Using Bootchart on Android&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=21&quot; title=&quot;Edit section: busybox&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;busybox&quot;&gt; busybox &lt;/span&gt;&lt;/h3&gt;Android ships with a utility suite (called &#39;toolbox&#39;) that is not busybox. &lt;br /&gt;
You can get a binary busybox for Android &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/14/android-busybox&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; The site includes instructions for easy installation on your device. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=22&quot; title=&quot;Edit section: smem&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;smem&quot;&gt; smem &lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; smem - smem is a tools for analyzing the memory usage on a system &lt;ul&gt;&lt;li&gt; See &lt;a href=&quot;http://elinux.org/Using_smem_on_Android&quot; title=&quot;Using smem on Android&quot;&gt;Using smem on Android&lt;/a&gt; for more information &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=23&quot; title=&quot;Edit section: strace&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;strace&quot;&gt; strace &lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; strace &lt;ul&gt;&lt;li&gt; Statically linked binary available at: &lt;a class=&quot;external free&quot; href=&quot;http://benno.id.au/blog/2007/11/18/android-runtime-strace&quot; rel=&quot;nofollow&quot;&gt;http://benno.id.au/blog/2007/11/18/android-runtime-strace&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; Instructions for building Android strace - &lt;a class=&quot;external free&quot; href=&quot;http://discuz-android.blogspot.com/2008/01/create-google-android-strace-tool.html&quot; rel=&quot;nofollow&quot;&gt;http://discuz-android.blogspot.com/2008/01/create-google-android-strace-tool.html&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=24&quot; title=&quot;Edit section: Eclipse&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Eclipse&quot;&gt; Eclipse &lt;/span&gt;&lt;/h2&gt;The officially supported integrated development environment (IDE) is &lt;a class=&quot;external text&quot; href=&quot;http://www.eclipse.org/&quot; rel=&quot;nofollow&quot;&gt;Eclipse&lt;/a&gt;  (currently 3.4 or 3.5) using the Android Development Tools (ADT)  Plugin, though developers may use any text editor to edit Java and XML  files then use command line tools (Java Development Kit and Apache Ant  are required) to create, build and debug Android applications as well as  control attached Android devices (e.g., triggering a reboot, installing  software package(s) remotely). &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=25&quot; title=&quot;Edit section: Hardware&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Hardware&quot;&gt; Hardware &lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Tools&amp;amp;action=edit&amp;amp;section=26&quot; title=&quot;Edit section: Serial Cable for G1&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Serial_Cable_for_G1&quot;&gt; Serial Cable for G1 &lt;/span&gt;&lt;/h3&gt;You can build a serial cable to use with the G1, which is helpful to see kernel boot messages on the serial console. &lt;br /&gt;
See &lt;a class=&quot;external free&quot; href=&quot;http://www.instructables.com/id/Android_G1_Serial_Cable&quot; rel=&quot;nofollow&quot;&gt;http://www.instructables.com/id/Android_G1_Serial_Cable&lt;/a&gt; &lt;br /&gt;
Back to &lt;a href=&quot;http://elinux.org/Android_Portal&quot; title=&quot;Android Portal&quot;&gt;Android Portal&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/android-tools.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-6448895083288590313</guid><pubDate>Tue, 19 Apr 2011 09:24:00 +0000</pubDate><atom:updated>2011-04-19T02:24:48.213-07:00</atom:updated><title>Dalvik Porting Guide</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt; &lt;br /&gt;
&lt;h1&gt;Dalvik Porting Guide&lt;/h1&gt;The Dalvik virtual machine is intended to run on a variety of platforms. The baseline system is expected to be a variant of UNIX (Linux, BSD, Mac OS X) running the GNU C compiler.  Little-endian CPUs have been exercised the most heavily, but big-endian systems are explicitly supported. &lt;br /&gt;
There are two general categories of work: porting to a Linux system with a previously unseen CPU architecture, and porting to a different operating system.  This document covers the former. &lt;br /&gt;
Basic familiarity with the Android platform, source code structure, and build system is assumed. &lt;br /&gt;
&lt;h2&gt;Core Libraries&lt;/h2&gt;The native code in the core libraries (chiefly &lt;code&gt;libcore&lt;/code&gt;, but also &lt;code&gt;dalvik/vm/native&lt;/code&gt;) is written in C/C++ and is expected to work without modification in a Linux environment.  Much of the code comes directly from the Apache Harmony project. &lt;br /&gt;
The core libraries pull in code from many other projects, including OpenSSL, zlib, and ICU.  These will also need to be ported before the VM can be used. &lt;br /&gt;
&lt;h2&gt;JNI Call Bridge&lt;/h2&gt;Most of the Dalvik VM runtime is written in portable C.  The one non-portable component of the runtime is the JNI call bridge.  Simply put, this converts an array of integers into function arguments of various types, and calls a function.  This must be done according to the C calling conventions for the platform.  The task could be as simple as pushing all of the arguments onto the stack, or involve complex rules for register assignment and stack alignment. &lt;br /&gt;
To ease porting to new platforms, the &lt;a href=&quot;http://sourceware.org/libffi/&quot;&gt; open-source FFI library&lt;/a&gt; (Foreign Function Interface) is used when a custom bridge is unavailable.  FFI is not as fast as a native implementation, and the optional performance improvements it does offer are not used, so writing a replacement is a good first step. &lt;br /&gt;
The code lives in &lt;code&gt;dalvik/vm/arch/*&lt;/code&gt;, with the FFI-based version in the &quot;generic&quot; directory.  There are two source files for each architecture. One defines the call bridge itself: &lt;br /&gt;
&lt;blockquote&gt; &lt;code&gt;void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo, int argc, const u4* argv, const char* signature, void* func, JValue* pReturn)&lt;/code&gt; &lt;/blockquote&gt;This will invoke a C/C++ function declared: &lt;br /&gt;
&lt;blockquote&gt;     &lt;code&gt;return_type func(JNIEnv* pEnv, Object* this [, &lt;i&gt;args&lt;/i&gt;])&lt;/code&gt; &lt;/blockquote&gt;or (for a &quot;static&quot; method):&lt;blockquote&gt;     &lt;code&gt;return_type func(JNIEnv* pEnv, ClassObject* clazz [, &lt;i&gt;args&lt;/i&gt;])&lt;/code&gt; &lt;/blockquote&gt;The role of &lt;code&gt;dvmPlatformInvoke&lt;/code&gt; is to convert the values in &lt;code&gt;argv&lt;/code&gt; into C-style calling conventions, call the method, and then place the return type into &lt;code&gt;pReturn&lt;/code&gt; (a union that holds all of the basic JNI types).  The code may use the method signature (a DEX &quot;shorty&quot; signature, with one character for the return type and one per argument) to determine how to handle the values. &lt;br /&gt;
The other source file involved here defines a 32-bit &quot;hint&quot;.  The hint is computed when the method&#39;s class is loaded, and passed in as the &quot;argInfo&quot; argument.  The hint can be used to avoid scanning the ASCII method signature for things like the return value, total argument size, or inter-argument 64-bit alignment restrictions.   &lt;br /&gt;
&lt;h2&gt;Interpreter&lt;/h2&gt;The Dalvik runtime includes two interpreters, labeled &quot;portable&quot; and &quot;fast&quot;. The portable interpreter is largely contained within a single C function, and should compile on any system that supports gcc.  (If you don&#39;t have gcc, you may need to disable the &quot;threaded&quot; execution model, which relies on gcc&#39;s &quot;goto table&quot; implementation; look for the THREADED_INTERP define.) &lt;br /&gt;
The fast interpreter uses hand-coded assembly fragments.  If none are available for the current architecture, the build system will create an interpreter out of C &quot;stubs&quot;.  The resulting &quot;all stubs&quot; interpreter is quite a bit slower than the portable interpreter, making &quot;fast&quot; something of a misnomer. &lt;br /&gt;
The fast interpreter is enabled by default.  On platforms without native support, you may want to switch to the portable interpreter.  This can be controlled with the &lt;code&gt;dalvik.vm.execution-mode&lt;/code&gt; system property.  For example, if you: &lt;br /&gt;
&lt;blockquote&gt; &lt;code&gt;adb shell &quot;echo dalvik.vm.execution-mode = int:portable &amp;gt;&amp;gt; /data/local.prop&quot;&lt;/code&gt; &lt;/blockquote&gt;and reboot, the Android app framework will start the VM with the portable interpreter enabled. &lt;br /&gt;
&lt;h3&gt;Mterp Interpreter Structure&lt;/h3&gt;There may be significant performance advantages to rewriting the interpreter core in assembly language, using architecture-specific optimizations.  In Dalvik this can be done one instruction at a time. &lt;br /&gt;
The simplest way to implement an interpreter is to have a large &quot;switch&quot; statement.  After each instruction is handled, the interpreter returns to the top of the loop, fetches the next instruction, and jumps to the appropriate label. &lt;br /&gt;
An improvement on this is called &quot;threaded&quot; execution.  The instruction fetch and dispatch are included at the end of every instruction handler. This makes the interpreter a little larger overall, but you get to avoid the (potentially expensive) branch back to the top of the switch statement. &lt;br /&gt;
Dalvik mterp goes one step further, using a computed goto instead of a goto table.  Instead of looking up the address in a table, which requires an extra memory fetch on every instruction, mterp multiplies the opcode number by a fixed value.  By default, each handler is allowed 64 bytes of space. &lt;br /&gt;
Not all handlers fit in 64 bytes.  Those that don&#39;t can have subroutines or simply continue on to additional code outside the basic space.  Some of this is handled automatically by Dalvik, but there&#39;s no portable way to detect overflow of a 64-byte handler until the VM starts executing. &lt;br /&gt;
The choice of 64 bytes is somewhat arbitrary, but has worked out well for ARM and x86. &lt;br /&gt;
In the course of development it&#39;s useful to have C and assembly implementations of each handler, and be able to flip back and forth between them when hunting problems down.  In mterp this is relatively straightforward.  You can always see the files being fed to the compiler and assembler for your platform by looking in the &lt;code&gt;dalvik/vm/mterp/out&lt;/code&gt; directory. &lt;br /&gt;
The interpreter sources live in &lt;code&gt;dalvik/vm/mterp&lt;/code&gt;.  If you haven&#39;t yet, you should read &lt;code&gt;dalvik/vm/mterp/README.txt&lt;/code&gt; now. &lt;br /&gt;
&lt;h3&gt;Getting Started With Mterp&lt;/h3&gt;Getting started: &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Decide on the name of your architecture.  For the sake of discussion, let&#39;s call it &lt;code&gt;myarch&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;Make a copy of &lt;code&gt;dalvik/vm/mterp/config-allstubs&lt;/code&gt; to &lt;code&gt;dalvik/vm/mterp/config-myarch&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;Create a &lt;code&gt;dalvik/vm/mterp/myarch&lt;/code&gt; directory to hold your source files. &lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;myarch&lt;/code&gt; to the list in &lt;code&gt;dalvik/vm/mterp/rebuild.sh&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;Make sure &lt;code&gt;dalvik/vm/Android.mk&lt;/code&gt; will find the files for your architecture.  If &lt;code&gt;$(TARGET_ARCH)&lt;/code&gt; is configured this will happen automatically. &lt;/li&gt;
&lt;/ol&gt;You now have the basic framework in place.  Whenever you make a change, you need to perform two steps: regenerate the mterp output, and build the core VM library.  (It&#39;s two steps because we didn&#39;t want the build system to require Python 2.5.  Which, incidentally, you need to have.) &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;In the &lt;code&gt;dalvik/vm/mterp&lt;/code&gt; directory, regenerate the contents of the files in &lt;code&gt;dalvik/vm/mterp/out&lt;/code&gt; by executing &lt;code&gt;./rebuild.sh&lt;/code&gt;.  Note there are two files, one in C and one in assembly. &lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;dalvik&lt;/code&gt; directory, regenerate the &lt;code&gt;libdvm.so&lt;/code&gt; library with &lt;code&gt;mm&lt;/code&gt;.  You can also use &lt;code&gt;make libdvm&lt;/code&gt; from the top of the tree. &lt;/li&gt;
&lt;/ol&gt;This will leave you with an updated libdvm.so, which can be pushed out to a device with &lt;code&gt;adb sync&lt;/code&gt; or &lt;code&gt;adb push&lt;/code&gt;.  If you&#39;re using the emulator, you need to add &lt;code&gt;make snod&lt;/code&gt; (System image, NO Dependency check) to rebuild the system image file.  You should not need to do a top-level &quot;make&quot; and rebuild the dependent binaries. &lt;br /&gt;
At this point you have an &quot;all stubs&quot; interpreter.  You can see how it works by examining &lt;code&gt;dalvik/vm/mterp/cstubs/entry.c&lt;/code&gt;.  The code runs in a loop, pulling out the next opcode, and invoking the handler through a function pointer.  Each handler takes a &quot;glue&quot; argument that contains all of the useful state. &lt;br /&gt;
Your goal is to replace the entry method, exit method, and each individual instruction with custom implementations.  The first thing you need to do is create an entry function that calls the handler for the first instruction. After that, the instructions chain together, so you don&#39;t need a loop. (Look at the ARM or x86 implementation to see how they work.) &lt;br /&gt;
Once you have that, you need something to jump to.  You can&#39;t branch directly to the C stub because it&#39;s expecting to be called with a &quot;glue&quot; argument and then return.  We need a C stub &quot;wrapper&quot; that does the setup and jumps directly to the next handler.  We write this in assembly and then add it to the config file definition. &lt;br /&gt;
To see how this works, create a file called &lt;code&gt;dalvik/vm/mterp/myarch/stub.S&lt;/code&gt; that contains one line: &lt;br /&gt;
&lt;pre&gt;/* stub for ${opcode} */&lt;/pre&gt;Then, in &lt;code&gt;dalvik/vm/mterp/config-myarch&lt;/code&gt;, add this below the &lt;code&gt;handler-size&lt;/code&gt; directive: &lt;pre&gt;# source for the instruction table stub
asm-stub myarch/stub.S&lt;/pre&gt;Regenerate the sources with &lt;code&gt;./rebuild.sh&lt;/code&gt;, and take a look inside &lt;code&gt;dalvik/vm/mterp/out/InterpAsm-myarch.S&lt;/code&gt;.  You should see 256 copies of the stub function in a single large block after the &lt;code&gt;dvmAsmInstructionStart&lt;/code&gt; label.  The &lt;code&gt;stub.S&lt;/code&gt; code will be used anywhere you don&#39;t provide an assembly implementation. &lt;br /&gt;
Note that each block begins with a &lt;code&gt;.balign 64&lt;/code&gt; directive. This is what pads each handler out to 64 bytes.  Note also that the &lt;code&gt;${opcode}&lt;/code&gt; text changed into an opcode name, which should be used to call the C implementation (&lt;code&gt;dvmMterp_${opcode}&lt;/code&gt;). &lt;br /&gt;
The actual contents of &lt;code&gt;stub.S&lt;/code&gt; are up to you to define. See &lt;code&gt;entry.S&lt;/code&gt; and &lt;code&gt;stub.S&lt;/code&gt; in the &lt;code&gt;armv5te&lt;/code&gt; or &lt;code&gt;x86&lt;/code&gt; directories for working examples. &lt;br /&gt;
If you&#39;re working on a variation of an existing architecture, you may be able to use most of the existing code and just provide replacements for a few instructions.  Look at the &lt;code&gt;armv4t&lt;/code&gt; implementation as an example. &lt;br /&gt;
&lt;h3&gt;Replacing Stubs&lt;/h3&gt;There are roughly 230 Dalvik opcodes, including some that are inserted by &lt;a href=&quot;http://android.git.kernel.org/dexopt.html&quot;&gt;dexopt&lt;/a&gt; and aren&#39;t described in the &lt;a href=&quot;http://android.git.kernel.org/dalvik-bytecode.html&quot;&gt;Dalvik bytecode&lt;/a&gt; documentation.  Each one must perform the appropriate actions, fetch the next opcode, and branch to the next handler.  The actions performed by the assembly version must exactly match those performed by the C version (in &lt;code&gt;dalvik/vm/mterp/c/OP_*&lt;/code&gt;). &lt;br /&gt;
It is possible to customize the set of &quot;optimized&quot; instructions for your platform.  This is possible because optimized DEX files are not expected to work on multiple devices.  Adding, removing, or redefining instructions is beyond the scope of this document, and for simplicity it&#39;s best to stick with the basic set defined by the portable interpreter. &lt;br /&gt;
Once you have written a handler that looks like it should work, add it to the config file.  For example, suppose we have a working version of &lt;code&gt;OP_NOP&lt;/code&gt;.  For demonstration purposes, fake it for now by putting this into &lt;code&gt;dalvik/vm/mterp/myarch/OP_NOP.S&lt;/code&gt;: &lt;br /&gt;
&lt;pre&gt;/* This is my NOP handler */&lt;/pre&gt;Then, in the &lt;code&gt;op-start&lt;/code&gt; section of &lt;code&gt;config-myarch&lt;/code&gt;, add: &lt;br /&gt;
&lt;pre&gt;op OP_NOP myarch&lt;/pre&gt;This tells the generation script to use the assembly version from the &lt;code&gt;myarch&lt;/code&gt; directory instead of the C version from the &lt;code&gt;c&lt;/code&gt; directory. &lt;br /&gt;
Execute &lt;code&gt;./rebuild.sh&lt;/code&gt;.  Look at &lt;code&gt;InterpAsm-myarch.S&lt;/code&gt; and &lt;code&gt;InterpC-myarch.c&lt;/code&gt; in the &lt;code&gt;out&lt;/code&gt; directory.  You will see that the &lt;code&gt;OP_NOP&lt;/code&gt; stub wrapper has been replaced with our new code in the assembly file, and the C stub implementation is no longer included. &lt;br /&gt;
As you implement instructions, the C version and corresponding stub wrapper will disappear from the output files.  Eventually you will have a 100% assembly interpreter.  You may find it saves a little time to examine the output of your compiler for some of the operations.  The &lt;a href=&quot;http://android.git.kernel.org/porting-proto.c.txt&quot;&gt;porting-proto.c&lt;/a&gt; sample code can be helpful here. &lt;br /&gt;
&lt;h3&gt;Interpreter Switching&lt;/h3&gt;The Dalvik VM actually includes a third interpreter implementation: the debug interpreter.  This is a variation of the portable interpreter that includes support for debugging and profiling. &lt;br /&gt;
When a debugger attaches, or a profiling feature is enabled, the VM will switch interpreters at a convenient point.  This is done at the same time as the GC safe point check: on a backward branch, a method return, or an exception throw.  Similarly, when the debugger detaches or profiling is discontinued, execution transfers back to the &quot;fast&quot; or &quot;portable&quot; interpreter. &lt;br /&gt;
Your entry function needs to test the &quot;entryPoint&quot; value in the &quot;glue&quot; pointer to determine where execution should begin.  Your exit function will need to return a boolean that indicates whether the interpreter is exiting (because we reached the &quot;bottom&quot; of a thread stack) or wants to switch to the other implementation. &lt;br /&gt;
See the &lt;code&gt;entry.S&lt;/code&gt; file in &lt;code&gt;x86&lt;/code&gt; or &lt;code&gt;armv5te&lt;/code&gt; for examples. &lt;br /&gt;
&lt;h3&gt;Testing&lt;/h3&gt;A number of VM tests can be found in &lt;code&gt;dalvik/tests&lt;/code&gt;.  The most useful during interpreter development is &lt;code&gt;003-omnibus-opcodes&lt;/code&gt;, which tests many different instructions. &lt;br /&gt;
The basic invocation is: &lt;br /&gt;
&lt;pre&gt;$ cd dalvik/tests
$ ./run-test 003&lt;/pre&gt;This will run test 003 on an attached device or emulator.  You can run the test against your desktop VM by specifying &lt;code&gt;--reference&lt;/code&gt; if you suspect the test may be faulty.  You can also use &lt;code&gt;--portable&lt;/code&gt; and &lt;code&gt;--fast&lt;/code&gt; to explictly specify one Dalvik interpreter or the other. &lt;br /&gt;
Some instructions are replaced by &lt;code&gt;dexopt&lt;/code&gt;, notably when &quot;quickening&quot; field accesses and method invocations.  To ensure that you are testing the basic form of the instruction, add the &lt;code&gt;--no-optimize&lt;/code&gt; option. &lt;br /&gt;
There is no in-built instruction tracing mechanism.  If you want to know for sure that your implementation of an opcode handler is being used, the easiest approach is to insert a &quot;printf&quot; call.  For an example, look at &lt;code&gt;common_squeak&lt;/code&gt; in &lt;code&gt;dalvik/vm/mterp/armv5te/footer.S&lt;/code&gt;. &lt;br /&gt;
At some point you need to ensure that debuggers and profiling work with your interpreter.  The easiest way to do this is to simply connect a debugger or toggle profiling.  (A future test suite may include some tests for this.) &lt;br /&gt;
&lt;br /&gt;
&lt;address&gt;Copyright © 2009 The Android Open Source Project&lt;/address&gt;&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/dalvik-porting-guide.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-4887894463364313984</guid><pubDate>Tue, 19 Apr 2011 09:23:00 +0000</pubDate><atom:updated>2011-04-19T02:23:38.153-07:00</atom:updated><title>Android&#39;s git Repository</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;b&gt;***&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;a public git repository put together with the 
various android-specific kernel patches (binder, logger, alarm drivers,
goldflish platform support, etc) soon.&lt;span&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span&gt;Which HW support&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;[Anil S &amp;lt;anils@mistralsolutions.com&amp;gt;]
&amp;gt; Hello Brian,
&amp;gt; 
&amp;gt;  It would be really great if you could share thoughts on the
&amp;gt; questions given here on Android:
&amp;gt; 
&amp;gt; I was able to add support for the keypad, touch and network in Android,
&amp;gt; however the interfaces like GPS, Accelerometer, vibrator, hardware 3D
&amp;gt; acceleration, battery etc. are not integrated with Android right now. I
&amp;gt; would appreciate if you could throw some light on these open issues. How
&amp;gt; exactly can these interfaces be integrated with Android? 

We&#39;re trying to use the standard kernel/driver interfaces when possible,
but for things that may have a good deal of variation in implementation,
we&#39;re looking to provide a very thin &quot;hardware interface library&quot; layer
to adapt between the bottom of the userspace stack and the drivers or
whatnot for specific hardware platforms.  

We&#39;ll continue to adopt standardized kernel solutions as they become
available -- We&#39;re now using the power supply framework in 2.6.24 for
monitoring battery/charge state (post M5 SDK -- it&#39;ll be in the next 
release), for example.&lt;b&gt;&lt;span&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;span&gt;List:       &lt;a href=&quot;http://marc.info/?l=linux-omap&amp;amp;r=1&amp;amp;w=2&quot;&gt;linux-omap&lt;/a&gt;
Subject:    &lt;a href=&quot;http://marc.info/?t=120366908300001&amp;amp;r=1&amp;amp;w=2&quot;&gt;Re: Android on OMAP&lt;/a&gt;
From:       &lt;a href=&quot;http://marc.info/?a=114313030200003&amp;amp;r=1&amp;amp;w=2&quot;&gt;Dirk Behme &amp;lt;dirk.behme () googlemail ! com&amp;gt;&lt;/a&gt;
Date:       &lt;a href=&quot;http://marc.info/?l=linux-omap&amp;amp;r=1&amp;amp;w=2&amp;amp;b=200802&quot;&gt;2008-02-26 8:46:05&lt;/a&gt;
Message-ID: &lt;a href=&quot;http://marc.info/?i=47C3D1CD.9060204%20%28%29%20googlemail%20%21%20com&quot;&gt;47C3D1CD.9060204 () googlemail ! com&lt;/a&gt;&lt;/span&gt;
[&lt;a href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120401557316300&amp;amp;q=raw&quot;&gt;Download message RAW&lt;/a&gt;]&lt;/b&gt;

skyflame wrote:
&amp;gt;&amp;gt;&amp;gt; Hi
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; I move to m5-r14 with both kernel driver and filesystem grabed from 
&amp;gt;&amp;gt;&amp;gt; the sdk.
&amp;gt;&amp;gt;&amp;gt; Now, I can enter the homescreen , and the keyboard is also working 8 )
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; I don&#39;t do anything extra than what I am doing on the m3-r14 release.
&amp;gt;&amp;gt;
&amp;gt;&amp;gt;
&amp;gt;&amp;gt; Great! Congratulations! :)
&amp;gt;&amp;gt;
&amp;gt;&amp;gt; Do you think you can make the kernel patch (against 2.6.23-omap1?) and 
&amp;gt;&amp;gt; the filesystem available somewhere? Then we can link wiki page to it.
&amp;gt;&amp;gt;
&amp;gt;&amp;gt; Dirk
&amp;gt;&amp;gt;
&amp;gt;&amp;gt;
&amp;gt; 
&amp;gt; Hi Dirk
&amp;gt; 
&amp;gt; I was working on a 2.6.21 kernel. For I don&#39;t got a working 2.6.23 
&amp;gt; kernel on hand.
&amp;gt; The git tree kernel don&#39;t work fine with my omap2430SDP V5.0
&amp;gt; The PMIC seems not working in the right way, thus the LCD don&#39;t run up.
&amp;gt; So I can not make the diff over 2.6.23 omap1  : (

Okay. I sent my 2.6.23 omap1 Android patch yesterday (seems that it 
didn&#39;t reach the list cause of &amp;gt; 100k). If you didn&#39;t get it I can 
send it again in private mail. Would be quite nice if you could check 
if there are the same files in it you used.

Anything like

cat my_patch | grep +++ &amp;gt; file1
cat your_patch | grep +++ &amp;gt; file2
kdiff3 file1 file2

&amp;gt; The whole Filesystem is about 28MBytes in bz2 format.
&amp;gt; I don&#39;t know where can I upload it. I can not find some place where can 
&amp;gt; hold such big file for a long time.
&amp;gt; I am glad to upload it , if someone has the network storage resources.

As already mentioned yesterday: Same to me ;)

Anybody with ~30-40 MB permanent public storage?
  &lt;b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;
&amp;gt; I&#39;m hoping to get a public git repository put together with the 
&amp;gt; various android-specific kernel patches (binder, logger, alarm drivers,
&amp;gt; goldflish platform support, etc) soon.  This should at least make
&amp;gt; it easier for folks to merge various drivers &#39;n things into their
&amp;gt; working trees, rather than having to extract them from the kernel
&amp;gt; source tarball provided with emulator/sdk releases.

The core android kernel patches are now available from git.android.com.
Please be aware that these are *newer* than the M5 SDK, and I think
the binder driver in particular may not be compatible with M5.  When
the next SDK release happens, we should be able to point at a sha1
hash of the git change the kernel came from.

&lt;a href=&quot;http://git.android.com/?p=kernel.git;a=shortlog;h=android&quot;&gt;http://git.android.com/?p=kernel.git;a=shortlog;h=android&lt;/a&gt;
git://git.android.com/kernel.git

Please note that for legacy reasons the default branch is the
msm-2.6.24 branch -- you&#39;ll want to check out the &quot;android&quot;
branch if you&#39;re looking for the generic patches useful for
all platforms.
&lt;/pre&gt;&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/androids-git-repository.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-8686999994950705532</guid><pubDate>Tue, 19 Apr 2011 08:49:00 +0000</pubDate><atom:updated>2011-04-19T01:49:35.750-07:00</atom:updated><title>Android Porting On Real Target [Realtime Project]</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div&gt; &lt;div id=&quot;toc1&quot;&gt;&lt;div class=&quot;toctitle&quot;&gt; &lt;h2 style=&quot;display: inline;&quot;&gt;Contents&lt;/h2&gt;&lt;span class=&quot;toctoggle&quot;&gt;&lt;a class=&quot;internal&quot; href=&quot;&quot; id=&quot;togglelink&quot;&gt;&lt;span id=&quot;hidetoc1&quot;&gt;&lt;img alt=&quot;[-]&quot; border=&quot;0&quot; src=&quot;http://wiki.kldp.org/imgs/plugin/arrup.png&quot; title=&quot;[-]&quot; width=&quot;10px&quot; /&gt;&lt;/span&gt;&lt;span id=&quot;showtoc1&quot; style=&quot;display: none;&quot;&gt;&lt;img alt=&quot;[+]&quot; border=&quot;0&quot; src=&quot;http://wiki.kldp.org/imgs/plugin/arrdown.png&quot; title=&quot;[+]&quot; width=&quot;10px&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;a href=&quot;&quot; name=&quot;toc&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dd&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-1&quot; id=&quot;toc-1&quot;&gt;1 Introduction &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-2&quot; id=&quot;toc-2&quot;&gt;2 Copyright and Acknowledgements &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3&quot; id=&quot;toc-3&quot;&gt;3 The brief analysis of the Android architecture &lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1&quot; id=&quot;toc-3.1&quot;&gt;3.1 Android Kernel &lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.1&quot; id=&quot;toc-3.1.1&quot;&gt;3.1.1 ARM EABI &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.2&quot; id=&quot;toc-3.1.2&quot;&gt;3.1.2 OpenBinder &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.3&quot; id=&quot;toc-3.1.3&quot;&gt;3.1.3 Frame Buffer &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.4&quot; id=&quot;toc-3.1.4&quot;&gt;3.1.4 Input Devices &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.5&quot; id=&quot;toc-3.1.5&quot;&gt;3.1.5 Low Memory Killer &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.6&quot; id=&quot;toc-3.1.6&quot;&gt;3.1.6 Android Logger &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.7&quot; id=&quot;toc-3.1.7&quot;&gt;3.1.7 Android Power &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.8&quot; id=&quot;toc-3.1.8&quot;&gt;3.1.8 Panic Timeout &lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.2&quot; id=&quot;toc-3.2&quot;&gt;3.2 Android Root File system &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.3&quot; id=&quot;toc-3.3&quot;&gt;3.3 Licenses of the Android Packages &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-4&quot; id=&quot;toc-4&quot;&gt;4 Toolchain supporting ARM EABI &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;dd&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-4.1&quot; id=&quot;toc-4.1&quot;&gt;4.1 Building toolchain &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-4.2&quot; id=&quot;toc-4.2&quot;&gt;4.2 Other toolchain &lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-5&quot; id=&quot;toc-5&quot;&gt;5 Kernel &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;dd&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-5.1&quot; id=&quot;toc-5.1&quot;&gt;5.1 Patch kernel &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-5.2&quot; id=&quot;toc-5.2&quot;&gt;5.2 .config &lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6&quot; id=&quot;toc-6&quot;&gt;6 Root file system &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;dd&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.1&quot; id=&quot;toc-6.1&quot;&gt;6.1 Get ramdisk image from emulator &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.2&quot; id=&quot;toc-6.2&quot;&gt;6.2 Get data and system directory from emulator &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.3&quot; id=&quot;toc-6.3&quot;&gt;6.3 Integrate the Android system with a existing ramdisk image. &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.4&quot; id=&quot;toc-6.4&quot;&gt;6.4 System and Data directories &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.5&quot; id=&quot;toc-6.5&quot;&gt;6.5 Run and Debug &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.6&quot; id=&quot;toc-6.6&quot;&gt;6.6 Screenshots &lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7&quot; id=&quot;toc-7&quot;&gt;7 Application Development &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;dd&gt;&lt;br /&gt;
&lt;dl&gt;&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7.1&quot; id=&quot;toc-7.1&quot;&gt;7.1 Install Eclipse IDE &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7.2&quot; id=&quot;toc-7.2&quot;&gt;7.2 Build and Run Sample Applications &lt;/a&gt;&lt;/dt&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7.3&quot; id=&quot;toc-7.3&quot;&gt;7.3 Screenshots &lt;/a&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-8&quot; id=&quot;toc-8&quot;&gt;8 Epilogue &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;dt&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-9&quot; id=&quot;toc-9&quot;&gt;9 Links and References &lt;/a&gt;&lt;/dt&gt;&lt;br /&gt;
&lt;/dl&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=1&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;1&lt;/a&gt; &lt;/span&gt;Introduction &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-1&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-1&quot;&gt; &lt;br /&gt;
&lt;div&gt;Google explains that Android is a software stack for mobile devices  that includes an operating system, middleware and key applications.  This document explains the Android architecture by Google and porting  procedure on the real hardware. The explanation is based on the m3 sdk  version of the Android emulator. &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;If you have enough knowledge about patching the kernel, resolving  rejections from a patch, making an ramdisk image, and the Linux kernel  itself, reading this article will be easier. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=2&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;2&lt;/a&gt; &lt;/span&gt;Copyright and Acknowledgements &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-2&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-2&quot;&gt; &lt;br /&gt;
&lt;div&gt;This document is copyright (c) Kwangwoo Lee (kwangwoo.lee at gmail  dot com). Permission is granted to copy, distribute and/or modify this  document under the terms of the GNU Free Documentation License. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget/ko&quot; title=&quot;AndroidPortingOnRealTarget/ko&quot;&gt;AndroidPortingOnRealTarget/ko&lt;/a&gt; - Korean translation by dasomoli (dasomoli at gmail dot com). &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=3&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3&lt;/a&gt; &lt;/span&gt;The brief analysis of the Android architecture &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-3&quot;&gt; &lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=4&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1&lt;/a&gt; &lt;/span&gt;Android Kernel &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-4&quot;&gt; &lt;br /&gt;
&lt;div&gt;The most different things are the Android kernel uses ARM EABI(Embedded Application Binary Interface) and &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt;  IPC(Inter Process Communication). If you want to compile the kernel  supporting ARM EABI, you should rebuild toolchains to support ARM EABI. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The Android sdk emulates goldfish architecture using qemu. The alsa  may be used for audio on Android. See the audio.c file in the goldfish  architecture directory and the driver uses /dev/eac for audio on the  Android system. RTC(Real Time Clock) device is also used through  /dev/rtc0. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The following parts explain the main differences: &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=5&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.1&lt;/a&gt; &lt;/span&gt;ARM EABI &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.1&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-5&quot;&gt; &lt;br /&gt;
&lt;div&gt;EABI is the new &quot;Embedded&quot; ABI by ARM Ltd. The changes are listed on Debian wiki. (&lt;a class=&quot;externalLink&quot; href=&quot;http://wiki.debian.org/ArmEabiPort&quot;&gt;http://wiki.debian.org/ArmEabiPort&lt;/a&gt;) &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Faster floating point performance, with or without FPU. &lt;/li&gt;
&lt;li&gt;Mixing soft and hardfloat code is possible. &lt;/li&gt;
&lt;li&gt;Structure packing is not as painful as it used to be. &lt;/li&gt;
&lt;li&gt;More compatibility with various tools. &lt;/li&gt;
&lt;li&gt;A more efficient syscall convention. (&lt;a class=&quot;externalLink&quot; href=&quot;http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4&quot;&gt;http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4&lt;/a&gt;) &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;Example with long ftruncate64(unsigned int fd, loff_t length):

legacy ABI:
- put fd into r0
- put length into r1-r2
- use &quot;swi #(0x900000 + 194)&quot; to call the kernel

new ARM EABI:
- put fd into r0
- put length into r2-r3 (skipping over r1)
- put 194 into r7
- use &quot;swi 0&quot; to call the kernel&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The Android uses EABI kernel feature. Enable kernel options of the  CONFIG_AEABI and CONFIG_OABI_COMPAT. You can see the differences of the  executable binary as follows : &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Legacy ABI &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;$ arm-softfloat-linux-gnu-objdump -x t7-demo | grep private
private flags = 202: [APCS-32] [FPA float format] [software FP] [has entry point]

$ file t7-demo
t7-demo: ELF 32-bit LSB executable, ARM, version 1 (ARM), 
for GNU/Linux 2.4.3, dynamically linked (uses shared libs), 
for GNU/Linux 2.4.3, stripped&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;ARM EABI &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;$ arm-softfloat-linux-gnueabi-objdump -x t7-demo  | grep private
private flags = 4000002: [Version4 EABI] [has entry point]

$ file t7-demo
t7-demo: ELF 32-bit LSB executable, ARM, version 1 (SYSV), 
for GNU/Linux 2.6.14, dynamically linked (uses shared libs), 
for GNU/Linux 2.6.14, stripped&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;img alt=&quot;[https]&quot; class=&quot;url&quot; src=&quot;http://wiki.kldp.org/imgs/https.png&quot; /&gt;&lt;a class=&quot;externalLink named&quot; href=&quot;https://support.codesourcery.com/GNUToolchain/kbentry32&quot;&gt;The FAQs from codesourcery explains ABI and EABI&lt;/a&gt; : &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;What is the ABI for the ARM Architecture? Is it the same as the ARM EABI?  &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The ABI for the ARM Architecture is a standard developed by ARM and  its partners (including CodeSourcery) that explains how compilers,  assemblers, linkers, and other similar tools should generate object  files and executable files. Tools that correctly implement the ABI for  the ARM Architecture can interoperate; i.e., objects files built with  one toolchain can be combined with object files built with another  toolchain if both compilers use the ABI for the ARM Architecture. The  &quot;ARM EABI&quot; is an informal name for the ABI for the ARM Architecture. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=6&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.2&lt;/a&gt; &lt;/span&gt;&lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt; &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.2&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-6&quot;&gt; &lt;br /&gt;
&lt;div&gt;The &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt;  provides a object-oriented operating system environment. It is designed  to be hosted by traditional kernels. This project is started at Be.  Inc. as the part of the next generation &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/BeOS&quot; rel=&quot;nofollow&quot;&gt;B&lt;/a&gt;eOS&lt;/span&gt;, and finished implementing at &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/PalmSource&quot; rel=&quot;nofollow&quot;&gt;P&lt;/a&gt;almSource&lt;/span&gt; as a core part at the Cobalt system. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;It is a system oriented component architecture rather than  application oriented, and It provides IPC between processes, threadpool,  memory management and clean up feature at the end of reference of an  binder object. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The vanilla kernel do not have &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt; IPC mechanism you should patch the kernel. The &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt;  offers thread management for the system through /dev/binder. It is the  reason that Android system do not offer thread libraries. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Dianne Hackborn worked for the &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/BeOS&quot; rel=&quot;nofollow&quot;&gt;B&lt;/a&gt;eOS&lt;/span&gt; explains briefly at osnews.com.&lt;br class=&quot;macro&quot; /&gt;  &lt;a class=&quot;externalLink&quot; href=&quot;http://osnews.com/story/13674/Introduction-to-OpenBinder-and-Interview-with-Dianne-Hackborn/&quot;&gt;http://osnews.com/story/13674/Introduction-to-OpenBinder-and-Interview-with-Dianne-Hackborn/&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Documentation&lt;br class=&quot;macro&quot; /&gt;  &lt;a class=&quot;externalLink&quot; href=&quot;http://www.angryredplanet.com/%7Ehackbod/openbinder/docs/html/index.html&quot;&gt;http://www.angryredplanet.com/~hackbod/openbinder/docs/html/index.html&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Source code&lt;br class=&quot;macro&quot; /&gt;  &lt;a class=&quot;externalLink&quot; href=&quot;http://www.angryredplanet.com/%7Ehackbod/openbinder/openbinder-12-28-2005.tar.gz&quot;&gt;http://www.angryredplanet.com/~hackbod/openbinder/openbinder-12-28-2005.tar.gz&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;After patching the kernel, you can see the files for binder at drivers/binder/. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=7&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.3&lt;/a&gt; &lt;/span&gt;Frame Buffer &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.3&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-7&quot;&gt; &lt;br /&gt;
&lt;div&gt;The basic frame buffer driver should be implemented already. After  that you need to implement the differences between your architecture  driver and the goldfish driver. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The frame buffer driver of the goldfish architecture supports the  fb_pan_display function of the struct fb_ops. It means you should  allocate memory twice rather than the actual frame size. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Initialize frame buffer information &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;struct fb_info *fbinfo;
...
fbinfo-&amp;gt;fix.ypanstep = 1;
fbinfo-&amp;gt;var.yres_virtual    = gm-&amp;gt;lcd.yres * 2;
fbinfo-&amp;gt;fix.smem_len        = (gm-&amp;gt;lcd.xres *
                                gm-&amp;gt;lcd.yres *
                                gm-&amp;gt;lcd.bpp / 8) * 2;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Allocate frame buffer memory &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;struct mvfb_info *fbi;
...
fbi-&amp;gt;map_size = PAGE_ALIGN(fbi-&amp;gt;fb-&amp;gt;fix.smem_len + PAGE_SIZE);
fbi-&amp;gt;map_cpu  = dma_alloc_writecombine(fbi-&amp;gt;dev, fbi-&amp;gt;map_size,
                                       &amp;amp;fbi-&amp;gt;map_dma, GFP_KERNEL);&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Implement fb_pan_display fuction hook &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;static int mvfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fb)
{
...
}

static struct fb_ops mvfb_ops = {
        .owner  = THIS_MODULE,

        .fb_check_var = mvfb_check_var,
        .fb_set_par = mvfb_set_par, 
        .fb_setcolreg = mvfb_setcolreg,
        .fb_blank = mvfb_blank,
        .fb_pan_display = mvfb_pan_display,

        .fb_fillrect = cfb_fillrect,
        .fb_copyarea = cfb_copyarea,
        .fb_imageblit = cfb_imageblit,

        .fb_mmap = mvfb_mmap, 
};&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The device file is located at /dev/graphics/fb0. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=8&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.4&lt;/a&gt; &lt;/span&gt;Input Devices &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.4&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-8&quot;&gt; &lt;br /&gt;
&lt;div&gt;Android uses event device for user input. There are three devices  such as keypad, qwerty2 keyboard and mouse. The qwerty2 keyboard and  mouse are normal devices. So I just explain the keypad and touchscreen  which mouse device is replaced with. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;On the Android shell, Cat the /proc/bus/input/{devices,handlers} and then you will see the devices used for the Android. &lt;pre class=&quot;wiki&quot;&gt;$ adb shell

# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name=&quot;goldfish-events-keyboard&quot;
P: Phys=
S: Sysfs=/class/inut/input0
U: Uniq=
H: Handlers=kbd mouse0 event0
...
#
# cat /proc/bus/input/handlers
N: Number=0 Name=kbd
N: Number=1 Name=mousedev Minor=32
N: Number=2 Name=evdev Minor=64
#&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Keypad&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;Qemu emulates goldfish-events-keyboard. It is a keypad using event  device(/dev/input/event0). So you should know which key event and values  come from the event device to activate Android applications. To do  that, read event0 device with cat and redirect the output to a file. If  you push and release the key button on emulator, the output values will  be saved. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The output format is struct input_event. So the output on each  event is 16 bytes like 8 bytes for time, 2 bytes for type, 2 bytes for  code, 4 bytes for value. Read input.txt and input-programming.txt about  input event devices in the Documentation/input directory of the Linux  kernel source code. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;struct input_event {
        struct timeval time;
        unsigned short type;
        unsigned short code;
        unsigned int value;
};&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;The Tiger7 evaluation board has it&#39;s own scancode table. The  following shows the key layout on evaluation board, scancode table, and  Android keycodes: &lt;pre class=&quot;wiki&quot;&gt;/*
 *  Key Layout       Scancode Table
 *
 *   1  2  3        0x1  0x10  0x100
 *   4  5  6        0x2  0x20  0x200
 *   7  8  9        0x4  0x40  0x400
 *   *  0  #        0x8  0x80  0x800
 */

static unsigned short android_keycode[] = {
        /*
         *  0x66 0x67 0x9e Home  Up   Back
         *  0x69 0xe8 0x6a Left  Ok   Right
         *  0xe7 0x6c 0x6b Send  Down Hangup
         *  0xe5  Menu       just_distinction_for_private
         */
        KEY_HOME,         KEY_UP,       KEY_BACK,
        KEY_LEFT,         KEY_REPLY,    KEY_RIGHT,
        KEY_SEND,         KEY_DOWN,     KEY_END,
        KEY_KBDILLUMDOWN, KEY_RESERVED, KEY_PLAY
};&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;There is a power button on emulator, but I skipped it to get output value. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;If an interrupt of the keypad is caught, translate the scancode  with the keycode of the Android on the above table and send event to  user space application. &lt;pre class=&quot;wiki&quot;&gt;...
keycode = translate_keycode(scancode);
...
input_event(keydev-&amp;gt;input, EV_KEY, keycode, KEY_PRESSED);
or
input_event(keydev-&amp;gt;input, EV_KEY, keycode, KEY_RELEASED);
...&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The high resolution timer - hrtimer is used for reduce keypad debounce. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Touchscreen&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;If you have a touchscreen driver supporting the event interface for a  pointing device, it&#39;ll work well. If you do not have it, you may  implement it or use other pointing devices. Fortunately the evaluation  board has already implemented touchscreen driver -  drivers/input/touchscreen/tsc2007.c - which is made just before  beginning to porting Android. Refer the drivers on  drivers/input/touchscreen/ to implement your own driver and the text  files on Documentation/input/. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;Here is the output of the /proc/bus/input/{devices,handlers} on evaluation board. &lt;pre class=&quot;wiki&quot;&gt;# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name=&quot;MVT7 KEYPAD&quot;
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=kbd event0 evbug
B: EV=f
...

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name=&quot;TSC2007 Touchscreen&quot;
P: Phys=0-0090/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=event1 evbug
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

# cat /proc/bus/input/handlers
N: Number=0 Name=kbd
N: Number=1 Name=evdev Minor=64
N: Number=2 Name=evbug&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;As a result, the keypad uses /dev/input/event0 and the touchscreen interface uses /dev/input/event1 on application layer. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=9&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.5&lt;/a&gt; &lt;/span&gt;Low Memory Killer &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.5&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-9&quot;&gt; &lt;br /&gt;
&lt;div&gt;The Linux Kernel has an OOM(Out of Memory) killer for the situation  that no memory is left to allocate for a request of a process. It  examines all processes and keeps score with some restrictions. The  process with highest score will be killed except init. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The Low Memory Killer of the Android behaves a bit different  against OOM killer. It classifies processes according to the importance  with groups and kills the process in the lowest group. It will make the  system to be stable at the view of the end users. For example, the UI  Process - foreground process - is the most important process for the end  users. So to keep the process live looks more stable than keeping other  background processes live. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;Enable CONFIG_LOW_MEMORY_KILLER after patching the kernel. &lt;div class=&quot;indent&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=10&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.6&lt;/a&gt; &lt;/span&gt;Android Logger &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.6&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-10&quot;&gt; &lt;br /&gt;
&lt;div&gt;If you enable this feature, you can see some useful information  about Android through /dev/log/main. There are three device files on  /dev/log such as main, events, radio. The /dev/log/radio file seems to  be related with a modem device and ril daemon - rild - on Android  system. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;When this logger is enabled, the system performance is a bit slower  on the system. To use this feature, enable CONFIG_ANDROID_LOGGER. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=11&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.7&lt;/a&gt; &lt;/span&gt;Android Power &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.7&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-11&quot;&gt; &lt;br /&gt;
&lt;div&gt;The Android power is for the battery management on devices and some  subsystem related with power management like inotify feature on file  system. It is not necessary to start up Android through the init(&lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/ShellScript&quot; rel=&quot;nofollow&quot;&gt;S&lt;/a&gt;hellScript&lt;/span&gt;)  of the Android system. But the runtime binary looks up some files  regarding Android power - /sys/android_power/acruire_partial_wake_lock -  on starting up Android manually and failed to start up. Enable  CONFIG_ANDROID_POWER to use. &lt;div class=&quot;indent&quot;&gt;- 예전 버전의 문서에서 init은 바이너리로 되어있었는데 쉘스크립트로 바뀌어 있네요. 이전  문서에서 말한 init은 안드로이드 램디스크의 루트 디렉토리 밑에 있는 init 바이너리를 말씀하신 것 같은데, 그 것이 아니고  다른 init인건가요? 아니면 그 init이 쉘 스크립트인 것인가요? -- dasomoli &lt;br /&gt;
&lt;br /&gt;
- 문서를 작성한 m3 버전에서는 binary 였습니다. 다른 분이 shell script로 바꾼 것 같네요. 번역해 주셔서 감사합니다. -- &lt;a href=&quot;http://wiki.kldp.org/wiki.php/%C0%CC%B1%A4%BF%EC&quot; title=&quot;이광우&quot;&gt;이광우&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
- m5 버전에서도 바이너리인 것 같아서요. 그리고 별 말씀을요.^^; -- dasomoli &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=12&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.1.8&lt;/a&gt; &lt;/span&gt;Panic Timeout &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.1.8&quot;&gt;¶&lt;/a&gt;&lt;/h3&gt;&lt;div id=&quot;sc-12&quot;&gt; &lt;br /&gt;
&lt;div&gt;It is not necessary to start up Android on evaluation board. Set CONFIG_PANIC_TIMEOUT with a desired value. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=13&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.2&lt;/a&gt; &lt;/span&gt;Android Root File system &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.2&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-13&quot;&gt; &lt;br /&gt;
&lt;div&gt;Android emulator has 3 basic images on tools/lib/images directory. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;ramdisk.img &lt;/li&gt;
&lt;li&gt;system.img &lt;/li&gt;
&lt;li&gt;userdata.img &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;ramdisk.img is gziped cpio archive. ramdisk image is very small and  contains configuration files, and some executable files such as init and  recovery. The init file is not a regular system V init. It is made just  for the Android and do special things to start up the Android system. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;system.img and userdata.img are VMS Alpha executable. system.img  and userdata.img have the contents of /system and /data directory on  root file system. They are mapped on NAND devices with yaffs2 file  system. /dev/block/mtdblock0 for /system and /dev/block/mtdblock1 for  /data. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;/system directory has libraries and default system packages (*.apk). /data directory has timezone, cache, and &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/ApiDemos&quot; rel=&quot;nofollow&quot;&gt;A&lt;/a&gt;piDemos&lt;/span&gt;.apk package. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The main services are zygote(/system/bin/app_process),  runtime(/system/bin/runtime), and dbus(/system/bin/dbus-daemon). You can  see the /etc/init.rc file on the Android ramdisk image. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;...
zygote {
    exec /system/bin/app_process
    args {
        0 -Xzygote
        1 /system/bin
        2 --zygote
    }
    autostart 1
}
runtime {
    exec /system/bin/runtime
    autostart 1
}
...
dbus {
    exec /system/bin/dbus-daemon
    args.0 --system
    args.1 --nofork
    autostart 1
}
...&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=14&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;3.3&lt;/a&gt; &lt;/span&gt;Licenses of the Android Packages &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-3.3&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-14&quot;&gt; &lt;br /&gt;
&lt;div&gt;tools/lib/images/NOTICE contains package lists and licenses for  each libraries. The table of the licenses is cited from the presentation  by Lim,&lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/GeunSik&quot; rel=&quot;nofollow&quot;&gt;G&lt;/a&gt;eunSik&lt;/span&gt; at 2008 Korea Android Summit. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;table cellspacing=&quot;0&quot; class=&quot;wiki&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;strong&gt;Open Source&lt;/strong&gt; &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; &lt;strong&gt;License&lt;/strong&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; Linux Kernel &lt;/td&gt;&lt;td&gt;GPL &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;a href=&quot;http://wiki.kldp.org/wiki.php/NetBSD&quot;&gt;NetBSD&lt;/a&gt; C Library &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; BSD &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; DBUS &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/GPL2&quot; rel=&quot;nofollow&quot;&gt;G&lt;/a&gt;PL2&lt;/span&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt; (core) &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/GPL2&quot; rel=&quot;nofollow&quot;&gt;G&lt;/a&gt;PL2&lt;/span&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/YAFFS2&quot; rel=&quot;nofollow&quot;&gt;Y&lt;/a&gt;AFFS2&lt;/span&gt; &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; GPL &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;a href=&quot;http://wiki.kldp.org/wiki.php/SQLite&quot;&gt;SQLite&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/GPL2&quot; rel=&quot;nofollow&quot;&gt;G&lt;/a&gt;PL2&lt;/span&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; Webkit &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; BSD (including LGPL) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/WebCore&quot; rel=&quot;nofollow&quot;&gt;W&lt;/a&gt;ebCore&lt;/span&gt; &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; LGPL &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; SDL &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; LGPL &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; SGL &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; Google(Skia) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;center&quot;&gt; &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenGL&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penGL&lt;/span&gt; &lt;/td&gt;&lt;td class=&quot;center&quot;&gt; SGI &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenGL&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penGL&lt;/span&gt; (BSD/MPL) &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br class=&quot;macro&quot; /&gt;  &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=15&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;4&lt;/a&gt; &lt;/span&gt;Toolchain supporting ARM EABI &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-4&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-15&quot;&gt; &lt;br /&gt;
&lt;div&gt;The toolchain represents the tools to be used for the system  development. It contains C/C++ compiler, linker, libraries, binutils,  and etc. The Android kernel and system requires EABI support. So legacy  toolchain is not compatible to make the Android system. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=16&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;4.1&lt;/a&gt; &lt;/span&gt;Building toolchain &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-4.1&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-16&quot;&gt; &lt;br /&gt;
&lt;div&gt;To make life easier, I used the crosstool-0.43 script (&lt;a class=&quot;externalLink&quot; href=&quot;http://www.kegel.com/crosstool/&quot;&gt;http://www.kegel.com/crosstool/&lt;/a&gt;) by Dan Kegel. Unfortunately it is not support to build eabi toolchain, so I applied &lt;strong&gt;a glibc 2.5+ nptl build for arm softfloat eabi patch&lt;/strong&gt; (&lt;a class=&quot;externalLink&quot; href=&quot;http://sources.redhat.com/ml/crossgcc/2006-12/msg00076.html&quot;&gt;http://sources.redhat.com/ml/crossgcc/2006-12/msg00076.html&lt;/a&gt;) by Khem Raj. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;$./arm-softfloat-eabi.sh&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;If the network is connected, the script will download and build toolchain using gcc 4.1.1 and glibc 2.5. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=17&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;4.2&lt;/a&gt; &lt;/span&gt;Other toolchain &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-4.2&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-17&quot;&gt; &lt;br /&gt;
&lt;div&gt;I did not use the codesourcery toolchain, but they said it will work for the building Android system. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;* &lt;a class=&quot;externalLink&quot; href=&quot;http://www.codesourcery.com/&quot;&gt;http://www.codesourcery.com&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=18&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;5&lt;/a&gt; &lt;/span&gt;Kernel &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-5&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-18&quot;&gt; &lt;br /&gt;
&lt;div&gt;To port the Android on a real hardware is started by Benno (&lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/&quot;&gt;http://benno.id.au&lt;/a&gt;),  you can see some useful information on his blog. On his blog some  pre-compiled static binaries are linked. It is very helpful for  debugging Android system. You can also build static build busybox and  strace binaries, but it&#39;s better to get them and use. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;You can get patch file including the differences between the  Android kernel and the vanilla kernel with 2.6.23 version. It has all  differences between them. So you need to extract parts of them, and make  your own patch for your system architecture.  &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;For example, the Android kernel has it&#39;s own yaffs file system  patch. If you have your own yaffs or some other file systems like jffs2  on your architecture, then you need to remove the yaffs parts of the  patch. The goldfish architecture which the Android kernel emulate an ARM  architecture on qemu is not necessary part for your architecture. It  can be removed. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The Android kernel emulates &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/ARMv5&quot; rel=&quot;nofollow&quot;&gt;A&lt;/a&gt;RMv5&lt;/span&gt; instructions. So &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/ARM926EJ&quot; rel=&quot;nofollow&quot;&gt;A&lt;/a&gt;RM926EJ&lt;/span&gt;-S (&lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/ARMv5TEJ&quot; rel=&quot;nofollow&quot;&gt;A&lt;/a&gt;RMv5TEJ&lt;/span&gt;) will be good to work. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=19&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;5.1&lt;/a&gt; &lt;/span&gt;Patch kernel &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-5.1&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-19&quot;&gt; &lt;br /&gt;
&lt;div&gt;Benno played with a &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/NEO1973&quot; rel=&quot;nofollow&quot;&gt;N&lt;/a&gt;EO1973&lt;/span&gt; device by openmoko. So he made patch files for it. Get the original patch file from &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/blog/2007/11/21/android-neo1973&quot;&gt;http://benno.id.au/blog/2007/11/21/android-neo1973&lt;/a&gt;, I used android.diff. It has whole things about goldfish, qemu, yaffs, and Android specific parts. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;You can edit and remove the patch file directly. After making patch  including binder, android power, android logger, low memory killer  except goldfish and qemu specific parts, get vanilla 2.6.23 version  Linux kernel and patch it. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;If you use a 2.6.24.1 version Linux kernel, some part regarding android power should be fixed accordingly or disabled to work. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=20&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;5.2&lt;/a&gt; &lt;/span&gt;.config &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-5.2&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-20&quot;&gt; &lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Necessary &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;...
CONFIG_PANIC_TIMEOUT=0
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
CONFIG_BINDER=y
CONFIG_LOW_MEMORY_KILLER=y
...&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Optional &lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;wiki&quot;&gt;...
# CONFIG_ANDROID_GADGET is not set
# CONFIG_ANDROID_RAM_CONSOLE is not set
# CONFIG_ANDROID_POWER is not set
# CONFIG_ANDROID_LOGGER is not set
...&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=21&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6&lt;/a&gt; &lt;/span&gt;Root file system &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-21&quot;&gt; &lt;br /&gt;
&lt;div&gt;The root file system is composed of three parts such as a primary  ramdisk image on ram, a system image on nand dev0  (/dev/block/mtdblock0), and a data image on nand dev1  (/dev/block/mtdblock1). The mtd devices has a yaffs2 file system and  each of them has 64 &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/MiB&quot; rel=&quot;nofollow&quot;&gt;M&lt;/a&gt;iB&lt;/span&gt; capacity on the Android emulator. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The extracted system and data directories are copied to the real  existing NAND device and they are mounted with --bind option to work on a  real hardware. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=22&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6.1&lt;/a&gt; &lt;/span&gt;Get ramdisk image from emulator &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.1&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-22&quot;&gt; &lt;br /&gt;
&lt;div&gt;1. unpack ramdisk image from tools/lib/images/ramdisk.img &lt;pre class=&quot;wiki&quot;&gt;$ gzip -cd ramdisk.img &amp;gt; ramdisk
$ cpio -iv -F ramdisk&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div class=&quot;indent&quot;&gt;cpio will extract files and directories on current working directory. &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;2. the contents list of the ramdisk &lt;pre class=&quot;wiki&quot;&gt;data
dev
etc
etc/default.prop
etc/firmware
etc/firmware/brf6150.bin
etc/firmware/brf6300.bin
etc/hcid.conf
etc/hosts
etc/init.gprs-pppd
etc/init.rc
etc/init.ril
etc/init.testmenu
etc/ppp
etc/ppp/chap-secrets
etc/ppp/ip-down
etc/ppp/ip-up
etc/qemu-init.sh
etc/system.conf
etc/system.d
etc/system.d/bluez-hcid.conf
etc/usbd.conf
init
proc
sbin
sbin/recovery
sys
system
tmp
var
var/run&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=23&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6.2&lt;/a&gt; &lt;/span&gt;Get data and system directory from emulator &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.2&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-23&quot;&gt; &lt;br /&gt;
&lt;div&gt;To get data and system directory you need a static compiled busybox binary. The compiled binary can be obtained from &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/blog/2007/11/14/android-busybox&quot;&gt;http://benno.id.au/blog/2007/11/14/android-busybox&lt;/a&gt; , or make your own binary. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;1. launch the Android emulator &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;2. push static compiled busybox into emulator &lt;pre class=&quot;wiki&quot;&gt;# adb push busybox .&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;3. launch the Android shell &lt;pre class=&quot;wiki&quot;&gt;# adb shell&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;4. make tarball with busybox &lt;pre class=&quot;wiki&quot;&gt;# chmod +x /busybox
# busybox tar -c /data.tar /data
# busybox tar -c /system.tar /system
# exit&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;5. extract tarball from the emulator &lt;pre class=&quot;wiki&quot;&gt;# adb pull /data.tar .
# adb pull /system.tar .&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div class=&quot;indent&quot;&gt;Extract command often failed. So you may repeat it again until it has done successfully. &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=24&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6.3&lt;/a&gt; &lt;/span&gt;Integrate the Android system with a existing ramdisk image. &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.3&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-24&quot;&gt; &lt;br /&gt;
&lt;div&gt;The ramdisk for your architecture can make your work a bit easier.  Copy the contents of the Android ramdisk to your own ramdisk except  system and data directory. And make just mount point for system and data  directory. The mount points will be used later with a bind option. The  init binary of the Android ramdisk image is the key binary to start the  system and It read a configuration file on /etc/init.rc. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;Edit /etc/init.rc and comment out qemu part. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;...
startup {
        ...
#       qemu-init {
#           exec /etc/qemu-init.sh
#       }
}
...&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;Make run.sh script. /dev/block/mtdblock5 is a mtd partition on a  real NAND device, and it is mounted on /mnt. data and system directories  are already copied on mtdblock5. So the script below just shows bind  mounting each directory on /. Fix your script according to your board  configuration. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;#!/bin/sh
mount -t yaffs /dev/block/mtdblock5 /mnt
mount --bind /mnt/data   /data
mount --bind /mnt/system /system

# data folder is owned by system user on emulator. Fix 777 to other.
chmod 777 /data
#chmod 777 /system

export PATH=/system/sbin:/system/bin:/sbin/usr/local/bin
export LD_LIBRARY_PATH=/system/lib

export ANDROID_BOOTLOGO=1
export ANDROID_ROOT=/system
export ANDROID_ASSETS=/system/app
export EXTERNAL_STORAGE=/sdcard
export ANDROID_DATA=/data
export DRM_CONTENT=/data/drm/content

/init &amp;amp;&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;An optional configuration for touchscreen - &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/TSLib&quot; rel=&quot;nofollow&quot;&gt;T&lt;/a&gt;SLib&lt;/span&gt;. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;...
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts

export LD_PRELOAD=/lib/libts.so:/lib/ts/pthres.so
...&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=25&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6.4&lt;/a&gt; &lt;/span&gt;System and Data directories &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.4&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-25&quot;&gt; &lt;br /&gt;
&lt;div&gt;The contents of the system and data directories are copied to  mtdblock5 already. You should copy your own method. To use it, I chose  bind mounting on root directory. Bind mounting is a technique to mount  an existing directory with a new mount point. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=26&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6.5&lt;/a&gt; &lt;/span&gt;Run and Debug &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.5&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-26&quot;&gt; &lt;br /&gt;
&lt;div&gt;Now the kernel, ramdisk, and data directories - data and system -  are ready. It&#39;s time to see the red cylon eye. After boot up your  integrated system, run the run.sh on root directory.  &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;# cd /
# . /android/run.sh
yaffs: dev is 32505861 name is &quot;mtdblock5&quot;
yaffs: passed flags &quot;&quot;
yaffs: Attempting MTD mount on 31.5, &quot;mtdblock5&quot;
yaffs: auto selecting yaffs2
# init: HOW ARE YOU GENTLEMEN
init: reading config file
init: device init
init: mtd partition -1,
init: mtd partition 0, &quot;l1boot&quot;
init: mtd partition 1, &quot;u-boot&quot;
init: mtd partition 2, &quot;params&quot;
init: mtd partition 3, &quot;kernel&quot;
init: mtd partition 4, &quot;ramdisk&quot;
init: mtd partition 5, &quot;rootfs&quot;
sh: can&#39;t access tty; job control turned off
# binder_open(c394bcc8 c3c731a0) (pid 1577) got c3e48000
binder_open(c394bcc8 c3cd8dc0) (pid 1616) got c319f000
binder_open(c394bcc8 c3cd8ac0) (pid 1673) got c3d10000
binder_open(c394bcc8 c3cd8940) (pid 1680) got c0e19000
binder_open(c394bcc8 c3cd88c0) (pid 1691) got c2fa0000
binder_open(c394bcc8 c3d174a0) (pid 1592) got c25b8000
binder_release(c394bcc8 c3cd88c0) (pid 1691) pd c2fa0000
#&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Do not make eac device file on /dev. It is for the audio on  qemu. If it exists, the start up sequence will wait forever to finish  writing some data to the sound device. &lt;/li&gt;
&lt;li&gt;Use the Android init binary instead of manual startup. The manual  start up will require the android power patch. In that case the start up  sequence will access /sys/android_power/acquire_partial_wake_lock and  wait. &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;To debug the Android system, use static compiled strace binary from &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/blog/2007/11/18/android-runtime-strace&quot;&gt;http://benno.id.au/blog/2007/11/18/android-runtime-strace&lt;/a&gt; and run the Android manually. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;#!/bin/sh
# set environment variables above example
...
/system/bin/app_process -Xzygote /system/bin --zygote &amp;amp;
/system/bin/dbus-daemon --system &amp;amp;
/system/bin/runtime&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;The above example shows manual startup sequence, use strace on run /system/bin/runtime binary. &lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;wiki&quot;&gt;./strace -ff -F -tt -s 200 -o /tmp/strace runtime&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=27&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;6.6&lt;/a&gt; &lt;/span&gt;Screenshots &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-6.6&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-27&quot;&gt; &lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Skipped &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=28&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;7&lt;/a&gt; &lt;/span&gt;Application Development &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-28&quot;&gt; &lt;br /&gt;
&lt;div&gt;The Android applications use Java syntax and xml layouts, but it is  not a Java. Because they use their own virtual machine - dalvik - and  compiler for dex file format. And use package named apk such as  Home.apk, Phone.apk, ApiDemos.apk and etc. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The apk file is a Zip archive and it has four parts. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;AndroidManifest.xml &lt;/li&gt;
&lt;li&gt;classes.dex &lt;/li&gt;
&lt;li&gt;resources.arsc &lt;/li&gt;
&lt;li&gt;res directory &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;The Dex file format is explained on &lt;a class=&quot;externalLink&quot; href=&quot;http://www.retrodev.com/android/dexformat.html&quot;&gt;http://www.retrodev.com/android/dexformat.html&lt;/a&gt;.  And the contents of the files and directories are explained some day by  Google. It is not explained currently. We can just guess about it. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The Android SDK will create an *.apk file. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=29&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;7.1&lt;/a&gt; &lt;/span&gt;Install Eclipse IDE &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7.1&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-29&quot;&gt; &lt;br /&gt;
&lt;div&gt;Install procedure from &lt;a class=&quot;externalLink&quot; href=&quot;http://code.google.com/android/intro/installing.html&quot;&gt;http://code.google.com/android/intro/installing.html&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;1. Eclipse IDE for Java developer (JDT and WST plugins are included) from &lt;a class=&quot;externalLink&quot; href=&quot;http://www.eclipse.org/downloads/&quot;&gt;http://www.eclipse.org/downloads/&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;2. JDK (Java SE) from &lt;a class=&quot;externalLink&quot; href=&quot;http://java.sun.com/javase/downloads/index.jsp&quot;&gt;http://java.sun.com/javase/downloads/index.jsp&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;3. ADT (Android Development Tools) with a eclipse plugin including Apache Ant &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=30&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;7.2&lt;/a&gt; &lt;/span&gt;Build and Run Sample Applications &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7.2&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-30&quot;&gt; &lt;br /&gt;
&lt;div&gt;1. Open sample projects and build &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;2. Run sample applications on emulator &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=31&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;7.3&lt;/a&gt; &lt;/span&gt;Screenshots &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-7.3&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;&lt;div id=&quot;sc-31&quot;&gt; &lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Android Platform on Nokia&#39;s N810 Product(arm1136jf-s) &lt;div class=&quot;indent&quot;&gt;&lt;div class=&quot;imgAttach&quot;&gt;&lt;img alt=&quot;n810.kandroid200805.PNG&quot; height=&quot;240&quot; src=&quot;http://wiki.kldp.org/pds/AndroidPortingOnRealTarget/n810.kandroid200805.PNG&quot; style=&quot;border: 0pt none;&quot; title=&quot;n810.kandroid200805.PNG&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Android Platform on arm1136jf-S for another CE Product. &lt;div class=&quot;indent&quot;&gt;&lt;div class=&quot;imgAttach&quot;&gt;&lt;img alt=&quot;fi.initial_display.jpg&quot; height=&quot;309&quot; src=&quot;http://wiki.kldp.org/pds/AndroidPortingOnRealTarget/fi.initial_display.jpg&quot; style=&quot;border: 0pt none;&quot; title=&quot;fi.initial_display.jpg&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
invain님이 shot을 올려주셨군요. -- &lt;a href=&quot;http://wiki.kldp.org/wiki.php/%C0%CC%B1%A4%BF%EC&quot; title=&quot;이광우&quot;&gt;이광우&lt;/a&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=32&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;8&lt;/a&gt; &lt;/span&gt;Epilogue &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-8&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-32&quot;&gt; &lt;br /&gt;
&lt;div&gt;The Android system seems to be a new kind of a Linux based distribution for a mobile environment like Debian, &lt;a href=&quot;http://wiki.kldp.org/wiki.php/RedHat&quot;&gt;RedHat&lt;/a&gt;, &lt;a href=&quot;http://wiki.kldp.org/wiki.php/SuSE&quot;&gt;SuSE&lt;/a&gt;,  and etc. They just use the Linux kernel and a lot of different  libraries in the open source world. They offer a software based &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenGL&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penGL&lt;/span&gt;-ES  library on a 3D acceleration currently, but they are developing on a  hardware accelerated baseband processor for it. The hardware  acceleration is necessary for fast UI rendering effects later. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;The Android system on the sdk is not a completed one to port on a  real hardware, because some device - for example, camera - related  libraries and classes are not implemented yet and not opened for users.  It seems to be under the development stage. So we would better to wait  the Google announces the whole porting kit. &lt;/div&gt;&lt;br /&gt;
&lt;div&gt;Until then, we should look for the business model with the Android  system. It requires a bit high cpu performance, so the carrier vendors  will require a cheap baseband processor (RF part) and a multimedia  co-processor, because the baseband processor including multimedia  features will be very expensive. &lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;sectionEdit&quot; style=&quot;float: right;&quot;&gt;&lt;span class=&quot;sep&quot;&gt;[&lt;/span&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget?action=edit&amp;amp;section=33&quot;&gt;&lt;span&gt;edit&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;sep&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span class=&quot;tocnumber&quot;&gt;&lt;a href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#toc&quot;&gt;9&lt;/a&gt; &lt;/span&gt;Links and References &lt;a class=&quot;perma&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget#s-9&quot;&gt;¶&lt;/a&gt;&lt;/h1&gt;&lt;div id=&quot;sc-33&quot;&gt; &lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Android Main Page : &lt;a class=&quot;externalLink&quot; href=&quot;http://code.google.com/android/&quot;&gt;http://code.google.com/android/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Debian ARM EABI wiki : &lt;a class=&quot;externalLink&quot; href=&quot;http://wiki.debian.org/ArmEabiPort&quot;&gt;http://wiki.debian.org/ArmEabiPort&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;System Call Convention : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4&quot;&gt;http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;The &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/FAQs&quot; rel=&quot;nofollow&quot;&gt;F&lt;/a&gt;AQs&lt;/span&gt; from Codesourcery : &lt;a class=&quot;externalLink&quot; href=&quot;https://support.codesourcery.com/GNUToolchain/kbentry32&quot;&gt;https://support.codesourcery.com/GNUToolchain/kbentry32&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Dianne Hackborn interview for &lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt; : &lt;a class=&quot;externalLink&quot; href=&quot;http://osnews.com/story/13674/Introduction-to-OpenBinder-and-Interview-with-Dianne-Hackborn/&quot;&gt;http://osnews.com/story/13674/Introduction-to-OpenBinder-and-Interview-with-Dianne-Hackborn/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt; Documentation : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.angryredplanet.com/%7Ehackbod/openbinder/docs/html/index.html&quot;&gt;http://www.angryredplanet.com/~hackbod/openbinder/docs/html/index.html&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a class=&quot;nonexistent&quot; href=&quot;http://wiki.kldp.org/wiki.php/OpenBinder&quot; rel=&quot;nofollow&quot;&gt;O&lt;/a&gt;penBinder&lt;/span&gt; Source : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.angryredplanet.com/%7Ehackbod/openbinder/openbinder-12-28-2005.tar.gz&quot;&gt;http://www.angryredplanet.com/~hackbod/openbinder/openbinder-12-28-2005.tar.gz&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Crosstool : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.kegel.com/crosstol/&quot;&gt;http://www.kegel.com/crosstol/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Crosstool EABI patch : &lt;a class=&quot;externalLink&quot; href=&quot;http://sources.redhat.com/ml/crossgcc/2006-12/msg00076.html&quot;&gt;http://sources.redhat.com/ml/crossgcc/2006-12/msg00076.html&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Codesourcery : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.codesourcery.com/&quot;&gt;http://www.codesourcery.com&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Benno&#39;s blog : &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/&quot;&gt;http://benno.id.au&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Android patch : &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/blog/2007/11/21/android-neo1973&quot;&gt;http://benno.id.au/blog/2007/11/21/android-neo1973&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Static Busybox : &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/blog/2007/11/14/android-busybox&quot;&gt;http://benno.id.au/blog/2007/11/14/android-busybox&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Static Strace : &lt;a class=&quot;externalLink&quot; href=&quot;http://benno.id.au/blog/2007/11/18/android-runtime-strace&quot;&gt;http://benno.id.au/blog/2007/11/18/android-runtime-strace&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Dex File Format : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.retrodev.com/android/dexformat.html&quot;&gt;http://www.retrodev.com/android/dexformat.html&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Android SDK Install : &lt;a class=&quot;externalLink&quot; href=&quot;http://code.google.com/android/intro/installing.html&quot;&gt;http://code.google.com/android/intro/installing.html&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Eclipse IDE : &lt;a class=&quot;externalLink&quot; href=&quot;http://www.eclipse.org/downloads/&quot;&gt;http://www.eclipse.org/downloads/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;JDK SE : &lt;a class=&quot;externalLink&quot; href=&quot;http://java.sun.com/javase/downloads/index.jsp&quot;&gt;http://java.sun.com/javase/downloads/index.jsp&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Presentation from the 2008 Korea Android Summit (&lt;a class=&quot;externalLink&quot; href=&quot;http://www.kandroid.org/&quot;&gt;http://www.kandroid.org&lt;/a&gt; ) &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/android-porting-on-real-target-realtime.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-8857519537818502368</guid><pubDate>Tue, 19 Apr 2011 08:42:00 +0000</pubDate><atom:updated>2011-04-19T01:42:01.907-07:00</atom:updated><title>Android on OMAP</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This page collects information about and guides you through the installation of &lt;a class=&quot;external text&quot; href=&quot;http://www.google.de/&quot; rel=&quot;nofollow&quot;&gt;Google&#39;s&lt;/a&gt; &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/&quot; rel=&quot;nofollow&quot;&gt;Android&lt;/a&gt; on &lt;a class=&quot;external text&quot; href=&quot;http://www.ti.com/&quot; rel=&quot;nofollow&quot;&gt;TI&#39;s&lt;/a&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.arm.com/&quot; rel=&quot;nofollow&quot;&gt;ARM&lt;/a&gt; based &lt;a class=&quot;external text&quot; href=&quot;http://focus.ti.com/general/docs/wtbu/wtbusplashcontent.tsp?templateId=6123&amp;amp;contentId=4752&quot; rel=&quot;nofollow&quot;&gt;OMAP&lt;/a&gt; &lt;a class=&quot;external text&quot; href=&quot;http://focus.ti.com/general/docs/wtbu/wtbugencontent.tsp?templateId=6123&amp;amp;navigationId=11988&amp;amp;contentId=4638&amp;amp;DCMP=WTBU&amp;amp;HQS=Other+OT+omap&quot; rel=&quot;nofollow&quot;&gt;SoCs&lt;/a&gt;. &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: Only small parts of this page should be TI OMAP  specific. The basic tasks should also apply to all other ARM926 or  higher based SoCs at least able to run a 2.6.23 Linux kernel. &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: If you like this page, please see the &lt;a href=&quot;http://elinux.org/Android_Portal&quot; title=&quot;Android Portal&quot;&gt;Android Portal&lt;/a&gt; on this site for much more information about Android systems programming.  See &lt;a href=&quot;http://elinux.org/Android_Porting&quot; title=&quot;Android Porting&quot;&gt;Android Porting&lt;/a&gt; for more links to porting information, articles and tutorials. &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: This article assumes that your are familiar with  some basics of embedded ARM Linux. E.g. you should know how to use diff  &amp;amp; patch, how to boot your embedded ARM SoC with a recent non-Android  Linux, how to use a cross compiler etc. &lt;br /&gt;
&lt;table class=&quot;toc&quot; id=&quot;toc&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div id=&quot;toctitle&quot;&gt;&lt;h2&gt;Contents&lt;/h2&gt;&lt;span class=&quot;toctoggle&quot;&gt;[&lt;a class=&quot;internal&quot; href=&quot;&quot; id=&quot;togglelink&quot;&gt;hide&lt;/a&gt;]&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li class=&quot;toclevel-1 tocsection-1&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Android&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Android&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-2&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#What_is_Android_.28not.29&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;What is Android (not)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-3&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Versions&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;1.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Versions&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-4&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Hardware&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Hardware&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-5&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Goldfish&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Goldfish&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-6&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Real_hardware&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;2.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Real hardware&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-7&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Compiler&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Compiler&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-8&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Code&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Code&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-9&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Kernel&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Kernel&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-3 tocsection-10&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Patch_extraction&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.1.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Patch extraction&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-11&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Extracted_patches&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.1.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Extracted patches&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-12&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Git_patches&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.1.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Git patches&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-13&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#File_System&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;File System&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-3 tocsection-14&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Binary_extraction&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.2.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Binary extraction&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-15&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Extracted_binaries&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;4.2.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Extracted binaries&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-16&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Target&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Target&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-17&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Kernel_configuration&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Kernel configuration&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-18&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#File_system_configuration&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;File system configuration&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-19&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Start_up&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Start up&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-3 tocsection-20&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Android_root_file_system&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.3.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Android root file system&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-21&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Start_via_scripts&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.3.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Start via scripts&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-3 tocsection-22&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Start_init_via_scripts&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.3.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Start init via scripts&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-23&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Debugging&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;5.4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Debugging&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-24&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#FAQ&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;FAQ&lt;/span&gt;&lt;/a&gt; &lt;ul&gt;&lt;li class=&quot;toclevel-2 tocsection-25&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Kernel_patch&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.1&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Kernel patch&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-26&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#OpenBinder&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.2&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;OpenBinder&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-27&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Devices_nodes&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.3&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Devices nodes&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-28&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#.2Fdev.2Fxxx_minor_numbers&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.4&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;/dev/xxx minor numbers&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-29&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#.2Fdev.2Ffb0&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.5&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;/dev/fb0&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-30&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Blank_screen&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.6&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Blank screen&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-31&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Page_flipping_frame_buffer&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.7&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Page flipping frame buffer&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-32&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Android_start_crashes&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.8&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Android start crashes&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-33&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Power_management&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.9&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Power management&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-34&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#TLS_issue&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.10&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;TLS issue&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-35&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#TLS_issue_and_processors&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.11&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;TLS issue and processors&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-36&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#TLS_issue_workaround&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.12&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;TLS issue workaround&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-37&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Red_cycle_eye_runtime_speed&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.13&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Red cycle eye runtime speed&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-38&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#File_not_found&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.14&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;File not found&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-39&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Limited_main_memory&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.15&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Limited main memory&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-40&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Some_buttons_work.2C_some_not&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.16&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Some buttons work, some not&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-41&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Filesystem.2C_JFFS2_and_SIGSEGV&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.17&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Filesystem, JFFS2 and SIGSEGV&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-42&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Using_JFFS2&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.18&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Using JFFS2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-43&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Nokia_N8x0_and_Android_SDK&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.19&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Nokia N8x0 and Android SDK&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-44&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#N8x0_and_recent_OMAP_git_kernel&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.20&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;N8x0 and recent OMAP git kernel&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-45&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#N810_keys&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.21&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;N810 keys&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-46&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#N8x0_touchscreen&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.22&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;N8x0 touchscreen&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-47&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Nokia770_support&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.23&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Nokia770 support&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-2 tocsection-48&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#HW_interfaces_support&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;6.24&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;HW interfaces support&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-49&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Links&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Links&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-50&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Contact&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Contact&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-51&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Videos&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;9&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Videos&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;toclevel-1 tocsection-52&quot;&gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Screenshots&quot;&gt;&lt;span class=&quot;tocnumber&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;toctext&quot;&gt;Screenshots&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=1&quot; title=&quot;Edit section: Android&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Android&quot;&gt;Android&lt;/span&gt;&lt;/h1&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=2&quot; title=&quot;Edit section: What is Android (not)&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;What_is_Android_.28not.29&quot;&gt;What is Android (not)&lt;/span&gt;&lt;/h2&gt;Android is a software stack for mobile devices that includes an operating system, middleware and key applications. See &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/what-is-android.html&quot; rel=&quot;nofollow&quot;&gt;Google&#39;s &lt;i&gt;What is Android?&lt;/i&gt;&lt;/a&gt; page and &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/26/what-is-android&quot; rel=&quot;nofollow&quot;&gt;Benno&#39;s &lt;i&gt;What is Android?&lt;/i&gt; and &lt;i&gt;What Android isn&#39;t&lt;/i&gt;&lt;/a&gt; page for more details about Android. &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=3&quot; title=&quot;Edit section: Versions&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Versions&quot;&gt;Versions&lt;/span&gt;&lt;/h2&gt;From time to time Google updates their &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/download_previous.html&quot; rel=&quot;nofollow&quot;&gt;Android releases&lt;/a&gt;. At time of writing this article version &lt;i&gt;m5-rc14&lt;/i&gt;  was the recent one. You should always use the latest available version.  And make sure you use an Android kernel (patch) for your hardware that  matches the file system version (see below). &lt;br /&gt;
&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=4&quot; title=&quot;Edit section: Hardware&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Hardware&quot;&gt;Hardware&lt;/span&gt;&lt;/h1&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=5&quot; title=&quot;Edit section: Goldfish&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Goldfish&quot;&gt;Goldfish&lt;/span&gt;&lt;/h2&gt;Android SDK isn&#39;t targeted for a special (ARM) SoC. Instead, they use &lt;a class=&quot;external text&quot; href=&quot;http://fabrice.bellard.free.fr/qemu/&quot; rel=&quot;nofollow&quot;&gt;QEMU&lt;/a&gt; to create a virtual ARM SoC called &lt;i&gt;Goldfish&lt;/i&gt;.  The virtual ARM SoC boots an (currently 2.6.23, m5-rc14) ARM Linux  kernel with Goldfish platform support on your (x86) Windows, MacOS X or  Linux host. &lt;br /&gt;
This virtual ARM SoC comprises: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; ARM926ej-S CPU &lt;/li&gt;
&lt;li&gt; Thumb support &lt;/li&gt;
&lt;li&gt; MMC &lt;/li&gt;
&lt;li&gt; RTC &lt;/li&gt;
&lt;li&gt; Keyboard &lt;/li&gt;
&lt;li&gt; USB Gadget &lt;/li&gt;
&lt;li&gt; Framebuffer &lt;/li&gt;
&lt;li&gt; TTY driver &lt;/li&gt;
&lt;li&gt; NAND &lt;/li&gt;
&lt;li&gt; Software compiled for ARMv5TEJ instruction set (!) with EABI &lt;/li&gt;
&lt;li&gt; no &lt;a class=&quot;external text&quot; href=&quot;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205g/CIAIIFIB.html&quot; rel=&quot;nofollow&quot;&gt;TLS&lt;/a&gt; &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120384694214686&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;yet&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=6&quot; title=&quot;Edit section: Real hardware&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Real_hardware&quot;&gt;Real hardware&lt;/span&gt;&lt;/h2&gt;Running Android on real hardware, some prerequisites should be fulfilled: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; SoC with ARM926 or higher (e.g. ARM11) (check &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120394328104000&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;ARM MPCore or ARM Cortex&lt;/a&gt; regarding &lt;a href=&quot;http://elinux.org/Android_on_OMAP#TLS_issue&quot; title=&quot;Android on OMAP&quot;&gt;TLS issue&lt;/a&gt;) &lt;ul&gt;&lt;li&gt; Note: ARM920T with ARMv4 instruction set &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/21/android-neo1973&quot; rel=&quot;nofollow&quot;&gt;will not work&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt; You have already a recent (~2.6.23) Linux kernel with Thumb &amp;amp; MMU &amp;amp; EABI etc support running on your target &lt;/li&gt;
&lt;li&gt; Soc/HW has and Linux kernel supports &lt;ul&gt;&lt;li&gt; Display/frame buffer (touchscreen would be good but optional). Frame buffer &lt;i&gt;has&lt;/i&gt; to support &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Page_flipping_frame_buffer&quot; title=&quot;Android on OMAP&quot;&gt;double buffer/page flipping&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt; Keyboard &lt;/li&gt;
&lt;li&gt; USB (optional) &lt;/li&gt;
&lt;li&gt; RTC (optional?) &lt;/li&gt;
&lt;li&gt; Serial console &lt;/li&gt;
&lt;li&gt; Some storage, sufficient for ~64MB, e.g. NFS or USB stick or  NAND or NOR or MMC/SDcard etc. NFS would be easiest for development &lt;/li&gt;
&lt;li&gt; Sufficient main memory (SDRAM) &amp;gt;=32MB. While 32MB seems to  be enough to start, system will be really slow then. Therefore 32MB is  sufficient for &lt;i&gt;proof of concept&lt;/i&gt;, but not for a usable system. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Known to work HW&lt;/b&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120368832309928&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;OMAP1 based boards&lt;/a&gt; (ARM v5 ARM926) &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120368832309928&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;OMAP2 based boards&lt;/a&gt; (ARM v6 ARM11) &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.mistralsolutions.com/pes-support/support-downloads/omap2530-evm-documentation-a-software.html&quot; rel=&quot;nofollow&quot;&gt;omap2530evm&lt;/a&gt; 2430OSK is renamed as 2530EVM based on TI&#39;s recommendation (ARM v6 ARM1136jf-s) &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://euedge.com/blog/2007/12/06/google-android-runs-on-sharp-zaurus-sl-c760/&quot; rel=&quot;nofollow&quot;&gt;Sharp Zaurus SL-C760(PXA255)&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/74237419.html&quot; rel=&quot;nofollow&quot;&gt;Sharp Zaurus SL-C1000(PXA270)&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/74237419.html&quot; rel=&quot;nofollow&quot;&gt;Sharp Zaurus SL-C3000&lt;/a&gt;(PXA270) &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.atmark-techno.com/en/products/armadillo/a500&quot; rel=&quot;nofollow&quot;&gt;Armadillo-500&lt;/a&gt; and &lt;a class=&quot;external text&quot; href=&quot;http://youtube.com/watch?v=eFxnCaEwL_U&quot; rel=&quot;nofollow&quot;&gt;Armadillo Panel Computer&lt;/a&gt; (Freescale i.MX31L ARM11) &lt;/li&gt;
&lt;li&gt; OMAP1 based &lt;a href=&quot;http://elinux.org/OSK&quot; title=&quot;OSK&quot;&gt;OSK&lt;/a&gt; (OMAP5912 ARM926 with only 32MB SDRAM). Really slow, mainly usable as &lt;i&gt;proof of concept&lt;/i&gt;. &lt;/li&gt;
&lt;li&gt; AM/DM 37x based Hardware &lt;a class=&quot;external text&quot; href=&quot;http://www.mistralsolutions.com/AM37x_EVM&quot; rel=&quot;nofollow&quot;&gt;AM/DM37xEVM from Mistral&lt;/a&gt;    &lt;/li&gt;
&lt;/ul&gt;&lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/android-internals/browse_thread/thread/7028432fa76f57e8/1556f431d3eb1e57?hl=en&amp;amp;&quot; rel=&quot;nofollow&quot;&gt;Android internals ML&lt;/a&gt;, &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120741537025066&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;OMAP ML&lt;/a&gt; and &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/p/android-on-n8xx/&quot; rel=&quot;nofollow&quot;&gt;Android on N810&lt;/a&gt; page. Working Android port for Nokia Internet Tablets can be found &lt;a class=&quot;external text&quot; href=&quot;http://guug.org/nit/nitdroid/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; OMAP3430 based Hardware &lt;a class=&quot;external text&quot; href=&quot;http://www.omappedia.org/wiki/Android_Getting_Started&quot; rel=&quot;nofollow&quot;&gt;OMAP3430 based Zoom2 from LogicPD&lt;/a&gt;. DSP acceleration for multimedia use cases as well as WLAN is also supported. &lt;/li&gt;
&lt;li&gt; OMAP3530 based Hardware &lt;a class=&quot;external text&quot; href=&quot;http://www.mistralsolutions.com/pes-downloads/software-downloads/android-download-for-tmdsevm3530.html&quot; rel=&quot;nofollow&quot;&gt;OMAP3EVM from Mistral&lt;/a&gt; (Android runs on ARM Cortex™-A8 Core) &lt;/li&gt;
&lt;li&gt; OMAP3530 based &lt;a class=&quot;external text&quot; href=&quot;http://beagleboard.org/&quot; rel=&quot;nofollow&quot;&gt;BeagleBoard&lt;/a&gt; using &lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/beagleboard/browse_thread/thread/e933982889f0441d#&quot; rel=&quot;nofollow&quot;&gt;code from Rupesh Gujare&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt; OMAP3530 based Hardware &lt;a class=&quot;external text&quot; href=&quot;http://www.technexion.com/index.php/tao-3530&quot; rel=&quot;nofollow&quot;&gt;TAO-3530 from TechNexion&lt;/a&gt; (Android runs on ARM Cortex™-A8 Core) &lt;/li&gt;
&lt;li&gt; OMAP3530 based Hardware &lt;a class=&quot;external text&quot; href=&quot;http://www.armkits.com/product/devkit8000.asp&quot; rel=&quot;nofollow&quot;&gt;DevKit8000&lt;/a&gt; from &lt;a class=&quot;external text&quot; href=&quot;http://www.armkits.com/&quot; rel=&quot;nofollow&quot;&gt;Embest&lt;/a&gt; and &lt;a class=&quot;external text&quot; href=&quot;http://www.timll.com/chinese/OMAP/DevKit8000.asp&quot; rel=&quot;nofollow&quot;&gt;Timll&lt;/a&gt; (Android runs on ARM Cortex™-A8 Core) &lt;/li&gt;
&lt;li&gt; OMAP3530 Open-source MID Solution &lt;b&gt;K7&lt;/b&gt; from &lt;a class=&quot;external text&quot; href=&quot;http://www.opensourcemid.org/&quot; rel=&quot;nofollow&quot;&gt;OpenSourceMID.org&lt;/a&gt;supports for both WinCE and Android OS &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Known to not work HW&lt;/b&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/21/android-neo1973&quot; rel=&quot;nofollow&quot;&gt;Neo 1973&lt;/a&gt; (ARM920T) &lt;/li&gt;
&lt;/ul&gt;&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=7&quot; title=&quot;Edit section: Compiler&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Compiler&quot;&gt;Compiler&lt;/span&gt;&lt;/h1&gt;Getting Android working on real hardware, you need an &lt;a class=&quot;external text&quot; href=&quot;http://wiki.debian.org/ArmEabiPort&quot; rel=&quot;nofollow&quot;&gt;ARM EABI&lt;/a&gt;  (good EABI description, ignore the Debian specific stuff) compatible  development environment. I.e., your tool chain, your kernel and user  space must be compatible to ARM EABI. If you don&#39;t like to create your  own ARM EABI compatible compiler, linker, library etc. you should use &lt;a class=&quot;external text&quot; href=&quot;http://www.codesourcery.com/&quot; rel=&quot;nofollow&quot;&gt;CodeSourcery&#39;s&lt;/a&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.codesourcery.com/gnu_toolchains/arm/download.html&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;ARM GNU/Linux&lt;/b&gt; tool chain&lt;/a&gt;. &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: The naming in the CodeSourcery download section is slightly confusing. You need the &lt;b&gt;ARM GNU/Linux&lt;/b&gt; named tool chain which is indeed an ARM GNU/Linux EABI tool chain with glibc. The &lt;i&gt;ARM EABI&lt;/i&gt; named tool chain there is something normally known as arm-elf tool chain &lt;i&gt;without&lt;/i&gt; any Linux support and without glibc. &lt;br /&gt;
&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=8&quot; title=&quot;Edit section: Code&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Code&quot;&gt;Code&lt;/span&gt;&lt;/h1&gt;As mentioned above, the Android SDK contains an emulator where a  virtual ARM device runs the Android SW on your host PC. The Linux &lt;i&gt;kernel&lt;/i&gt; used in this emulator is available in source code. In contrast, the user space &lt;i&gt;file system&lt;/i&gt; (applications) is currently only available as binary as part of the SDK. &lt;br /&gt;
To get Android running on real HW, currently you need both,  matching SDK and kernel source. You need kernel source to extract  Android specific patches to add them to your SoC specific kernel. And  SDK to get Android user space file system binaries. While getting  Android kernel patches is somehow straight forward, extracting user  space file system with Android applications in it is a little bit  tricky. &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=9&quot; title=&quot;Edit section: Kernel&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Kernel&quot;&gt;Kernel&lt;/span&gt;&lt;/h2&gt;On &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/p/android/downloads/list&quot; rel=&quot;nofollow&quot;&gt;Android project page&lt;/a&gt;  the source code of the kernel is available. From full kernel tree with  Android modifications included you can extract patches. With this, you  have to extract the Android specific patches yourself from the complete  kernel tree, use already extracted patches or get kernel patches by git. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=10&quot; title=&quot;Edit section: Patch extraction&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Patch_extraction&quot;&gt;Patch extraction&lt;/span&gt;&lt;/h3&gt;See third paragraph of &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/21/android-neo1973&quot; rel=&quot;nofollow&quot;&gt;Benno&#39;s Android on NEO 1973 article&lt;/a&gt;. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Download matching version (e.g. m5-rc14) of &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/p/android/downloads/list&quot; rel=&quot;nofollow&quot;&gt;Android kernel source&lt;/a&gt;. Besides complete kernel source this will contain Android specific changes. &lt;/li&gt;
&lt;li&gt; Download matching (e.g. 2.6.23) stock Linux kernel (or use  e.g. git to check out stock kernel version) and diff both kernels to get  Android related changes. &lt;/li&gt;
&lt;li&gt; As we want to run Android on real hardware, you can throw away all QEMU and Goldfish related changes. If you don&#39;t want to use &lt;a class=&quot;external text&quot; href=&quot;http://www.yaffs.net/&quot; rel=&quot;nofollow&quot;&gt;yaffs2&lt;/a&gt;  file system (e.g. cause you don&#39;t have NAND or have it already in your  tree), throw away yaffs2 related changes as well. If you use  m5-rc14  (or higher?) you can remove &lt;a href=&quot;http://elinux.org/Android_on_OMAP#OpenBinder&quot; title=&quot;Android on OMAP&quot;&gt;OpenBinder related files&lt;/a&gt; (/driver/binder) as well. &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Kernel_patch&quot; title=&quot;Android on OMAP&quot;&gt;Result&lt;/a&gt; should be a generic, no ARM or OMAP specific Android patch you can apply to your (e.g. 2.6.23) kernel for your ARM based SoC. &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;Note&lt;/i&gt;: There seems to be &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120384694214686&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;some effort&lt;/a&gt; to make Android kernel patches available in a easier usable format. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=11&quot; title=&quot;Edit section: Extracted patches&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Extracted_patches&quot;&gt;Extracted patches&lt;/span&gt;&lt;/h3&gt;At some locations there are ready made patches available. The  advantage of this is that you don&#39;t have to extract the patches  yourself. The disadvantage is that you can&#39;t always be sure that they  contain everything you need and that they match your SDK/user space file  system (&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Extracted_binaries&quot; title=&quot;Android on OMAP&quot;&gt;see below&lt;/a&gt;) version. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/android/android-noqemu-nogoldfish-noyaffs2.diff&quot; rel=&quot;nofollow&quot;&gt;Benno&#39;s no Qemu no goldfish no yaffs2 patch&lt;/a&gt;, as of date of Benno&#39;s article most probably based on m3-rc20. &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;Note&lt;/i&gt;: Some guys on OMAP mailing list have Android patches extracted (currently from m5-rc14) and &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120401478515308&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;are willing to share them&lt;/a&gt;.  Unfortunately they don&#39;t have any permanent web storage yet. If you  have and like to help community with providing some web space, contact &lt;a class=&quot;external text&quot; href=&quot;http://vger.kernel.org/vger-lists.html#linux-omap&quot; rel=&quot;nofollow&quot;&gt;OMAP list&lt;/a&gt;. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=12&quot; title=&quot;Edit section: Git patches&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Git_patches&quot;&gt;Git patches&lt;/span&gt;&lt;/h3&gt;There are Android kernel patches available using &lt;a class=&quot;external text&quot; href=&quot;http://git.android.com/?p=kernel.git;a=shortlog;h=android&quot; rel=&quot;nofollow&quot;&gt;Android&#39;s git&lt;/a&gt; repository. But have a look to &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120716474803274&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;Brian&#39;s notes&lt;/a&gt; regarding this. &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=13&quot; title=&quot;Edit section: File System&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;File_System&quot;&gt;File System&lt;/span&gt;&lt;/h2&gt;Getting user space file system binaries running in emulator extracted  is slightly tricky. We have to extract the binaries as currently access  to source code have only &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120368832309928&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;Google itself and eventually WindRiver&lt;/a&gt;. &lt;br /&gt;
Again, there are two ways to get user space binaries: Extracting them your self or taking already extracted ones. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=14&quot; title=&quot;Edit section: Binary extraction&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Binary_extraction&quot;&gt;Binary extraction&lt;/span&gt;&lt;/h3&gt;The user space applications compiled for ARMv5 EABI are part of the Android SDK in &lt;i&gt;system.img&lt;/i&gt; and &lt;i&gt;userdata.img&lt;/i&gt; in &lt;i&gt;tools/lib/images&lt;/i&gt; directory of SDK. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/download_list.html&quot; rel=&quot;nofollow&quot;&gt;Download SDK&lt;/a&gt; and unzip it &lt;/li&gt;
&lt;li&gt; system.img and userdata.img are &lt;a class=&quot;external text&quot; href=&quot;http://www.yaffs.net/&quot; rel=&quot;nofollow&quot;&gt;yaffs2&lt;/a&gt; images. There is no way yet to mount them directly on a host to extract their content. An &lt;a class=&quot;external text&quot; href=&quot;http://lists.aleph1.co.uk/lurker/message/20080218.222359.6cc4bd2e.en.html&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;unyaffs&lt;/i&gt;&lt;/a&gt; tool is missing, so the only way to get the content is to start the emulator and extract the contents from running emulator. &lt;/li&gt;
&lt;/ul&gt;Recently there is an unyaffs available &lt;a class=&quot;external autonumber&quot; href=&quot;http://code.google.com/p/unyaffs/&quot; rel=&quot;nofollow&quot;&gt;[1]&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; As file system in emulator as no &lt;i&gt;cp&lt;/i&gt; or &lt;i&gt;tar&lt;/i&gt; command, we use a statically linked &lt;a class=&quot;external text&quot; href=&quot;http://www.busybox.net/&quot; rel=&quot;nofollow&quot;&gt;BusyBox&lt;/a&gt; cross compiled for ARM and use it inside emulator (get it from &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/14/android-busybox&quot; rel=&quot;nofollow&quot;&gt;Benno&lt;/a&gt; or build it your own with above tool chain). &lt;/li&gt;
&lt;li&gt; Set path to emulator tools &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;export PATH=${PATH}:&amp;lt;path_to&amp;gt;/android-sdk_m5-rc14_linux-x86/tools&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; Create an empty SDcard (image) &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;&lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/reference/othertools.html#mksdcard&quot; rel=&quot;nofollow&quot;&gt;mksdcard&lt;/a&gt; -l card 100M card.img&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; Start emulator &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;&lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/reference/emulator.html&quot; rel=&quot;nofollow&quot;&gt;emulator&lt;/a&gt; -sdcard card.img -console -debug-kernel&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; You should now see the SDK kernel booting and emulator  starting. Wait until the emulator is ready, then send the ARM busybox  from the host into the simulated environment: &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;&lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/reference/adb.html&quot; rel=&quot;nofollow&quot;&gt;adb&lt;/a&gt; -d 1 push busybox /data/busybox&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; Inside emulation, set tar (and bzip2) links to busybox, tar &lt;i&gt;/system&lt;/i&gt; and &lt;i&gt;/data&lt;/i&gt; directories to sdcard. &lt;/li&gt;
&lt;li&gt; Shutdown emulator, mount card.img &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;mount -o loop card.img mnt/&lt;/pre&gt;and get the images of system and user data. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; If you look at the extracted size of the userdata image, the  extracted one is bigger than the original userdata.img. So by the  runtime extraction we get some temporary junk in it. For this, untar  extracted userdata and remove a least some of the unnecessary stuff: &lt;ul&gt;&lt;li&gt; Remove all content of &lt;i&gt;data/dalvik-cache/&lt;/i&gt;. It holds the decompressed files from the apk packages. &lt;/li&gt;
&lt;li&gt; Remove the static busybox image. We only needed it for extraction and don&#39;t need it any more. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;Note&lt;/i&gt;: Anybody likes to hack this &lt;a class=&quot;external text&quot; href=&quot;http://lists.aleph1.co.uk/lurker/message/20080218.222359.6cc4bd2e.en.html&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;unyaffs&lt;/i&gt;&lt;/a&gt; tool? Then the system.img and userdata.img extraction would be a lot easier. &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: A user reports that he doesn&#39;t use the extracted  data directory at all. He simply mounts a tempfs to /data as it seems  that Android runtime creates most (all?) of the necessary files in /data  itself at runtime.  &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=15&quot; title=&quot;Edit section: Extracted binaries&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Extracted_binaries&quot;&gt;Extracted binaries&lt;/span&gt;&lt;/h3&gt;At some locations there are ready made binaries available. The  advantage of this is that you don&#39;t have to extract the binaries  yourself. The disadvantage is that you can&#39;t always be sure that the  images contain everything you need and that the images match your kernel  patch (&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Extracted_patches&quot; title=&quot;Android on OMAP&quot;&gt;see above&lt;/a&gt;) version. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/14/android-filesystems&quot; rel=&quot;nofollow&quot;&gt;Android file system images&lt;/a&gt;, as of date of Benno&#39;s article most probably based on m3-rc20. &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;Note&lt;/i&gt;: Some guys on OMAP mailing list have Android binaries extracted (currently from m5-rc14) and &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120401478515308&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;are willing to share them&lt;/a&gt;.  Unfortunately they don&#39;t have any permanent web storage yet (~30MB). If  you have and like to help community with providing some web space,  contact &lt;a class=&quot;external text&quot; href=&quot;http://vger.kernel.org/vger-lists.html#linux-omap&quot; rel=&quot;nofollow&quot;&gt;OMAP list&lt;/a&gt;. &lt;br /&gt;
&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=16&quot; title=&quot;Edit section: Target&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Target&quot;&gt;Target&lt;/span&gt;&lt;/h1&gt;This section describes how to configure the software (kernel, file  system) to run Android on real hardware target. Before you do this  Android specific steps, you should make sure that everything works  without any Android specifics. I.e. make sure that the (EABI) kernel  boots, you can access all file systems (e.g. NFS or MMC or NOR or NAND  etc.) and necessary drivers (e.g. keyboard, touchscreen etc.). Do this  with booting into your normal (EABI) file system you always use. We  later switch to Android file system then. &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=17&quot; title=&quot;Edit section: Kernel configuration&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Kernel_configuration&quot;&gt;Kernel configuration&lt;/span&gt;&lt;/h2&gt;Make sure your kernel boots normally on your board. Then enable some Android specific configuration (needs &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Kernel&quot; title=&quot;Android on OMAP&quot;&gt;kernel patch extracted above&lt;/a&gt;) and make sure that your kernel still boots (with your standard file system). &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: Some of these settings are valid only for m5-rc14  and newer (?) (Binder config, /sys/android_power output) as it changed  from older versions to m5-rc14.  &lt;br /&gt;
&lt;b&gt;EABI&lt;/b&gt; &lt;br /&gt;
&lt;pre&gt;CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set&lt;/pre&gt;&lt;b&gt;THUMB&lt;/b&gt; &lt;br /&gt;
&lt;pre&gt;CONFIG_ARM_THUMB=y&lt;/pre&gt;&lt;b&gt;Android drivers&lt;/b&gt; &lt;br /&gt;
&lt;pre&gt;#
# Android
#
# CONFIG_ANDROID_GADGET is not set
# CONFIG_ANDROID_RAM_CONSOLE is not set
CONFIG_ANDROID_POWER=y
CONFIG_ANDROID_POWER_STAT=y
CONFIG_ANDROID_LOGGER=y
# CONFIG_ANDROID_TIMED_GPIO is not set
CONFIG_ANDROID_BINDER_IPC=y
#AshMem 
CONFIG_ASHMEM=y&lt;/pre&gt;After you successfully booted the kernel with configuration above  (and m5-rc14 kernel patch), make sure you have following /sys files: &lt;br /&gt;
&lt;pre&gt;/sys/android_power/acquire_partial_wake_lock
/sys/android_power/acquire_full_wake_lock
/sys/android_power/last_user_activity
/sys/android_power/request_sleep
/sys/android_power/acquire_full_wake_lock
/sys/android_power/acquire_partial_wake_lock
/sys/android_power/battery_level
/sys/android_power/battery_level_low
/sys/android_power/battery_level_raw
/sys/android_power/battery_level_scale
/sys/android_power/battery_low_level
/sys/android_power/battery_shutdown_level
/sys/android_power/charging_state
/sys/android_power/release_wake_lock
/sys/android_power/request_state
/sys/android_power/state&lt;/pre&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=18&quot; title=&quot;Edit section: File system configuration&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;File_system_configuration&quot;&gt;File system configuration&lt;/span&gt;&lt;/h2&gt;We now switch to Android file system extracted above. This should be  established on a device with enough space (&amp;gt; ~64MB) and which is  accessible on your target. Options are e.g. NFS, NOR or NAND file  system, hard disk or USB storage. In a first step it is sufficient if  you are able to manually mount it from your (temporary) standard root  file system. In a second step it is an option to use it directly as root  fs. &lt;br /&gt;
The Android file system we establish here on one of the the storage from above is built from four parts: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Content of system data image extracted above &lt;/li&gt;
&lt;li&gt; Content of user data image extracted above (make sure temporary files are removed) &lt;/li&gt;
&lt;li&gt; Content of Android ram disk image &lt;/li&gt;
&lt;li&gt; Device file system  &lt;/li&gt;
&lt;/ul&gt;To create Android file system, take (empty) storage you selected and start with ram disk: &lt;br /&gt;
Android ram disk image can be found as ramdisk.img in tools/lib/images of Android SDK. This is a gziped cpio archive: &lt;br /&gt;
&lt;pre&gt;cp ramdisk.img ramdisk.gz
gunzip ramdisk.gz
cd target_fs
cpio -iv &amp;lt; ../ramdisk&lt;/pre&gt;Result of this should be an root file system tree with: &lt;br /&gt;
&lt;pre&gt;data
dev
etc
init
proc
sbin
sys
system
tmp
var&lt;/pre&gt;Directories data, dev and system are empty. Extract content of  extracted user data image to /data and system image to /system  directories. E.g. &lt;br /&gt;
&lt;pre&gt;tar xvfj ../system_m5_rc14.tar.bz2 system/
tar xvfj ../userdata_m5_rc14.tar.bz2 data/&lt;/pre&gt;Note: This depends on how you named and stored extracted user data and system image above. &lt;br /&gt;
Last step is to create some device nodes in /dev you need for  running from this Android file system. There are several options how to  establish this. One option is to extract device file system from running  Android emulator as well. Second option is to use the same device file  system you normally use in your standard file system. Choose the easiest  way. If you did this, make sure you have Android specific device nodes  with correct major/minor numbers as well. &lt;br /&gt;
Note: Copying device nodes the best way is to tar them at source  and untar them then at target. For device nodes, cp command isn&#39;t the  best option due to special device node format. &lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=19&quot; title=&quot;Edit section: Start up&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Start_up&quot;&gt;Start up&lt;/span&gt;&lt;/h2&gt;Starting Android using the file system and kernel created above, there are three ways: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Directly boot from Android kernel into the Android file system.  I.e. let the Android kernel directly start init etc. from Android file  system. &lt;/li&gt;
&lt;li&gt; First boot from Android kernel into your standard file system.  Then &quot;manually&quot; switch over to Android file system and start Android.  This &quot;manual&quot; switch can be done using some scripts. &lt;/li&gt;
&lt;li&gt; The third way is a mix of the first two ways: Boot into a  standard non-Android file system, then switch over to Android but there  directly execute init as it would be done by root file system.  &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=20&quot; title=&quot;Edit section: Android root file system&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Android_root_file_system&quot;&gt;Android root file system&lt;/span&gt;&lt;/h3&gt;There are several ways to directly start Android from (root) file system created above: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Directly point your kernel to /init in Android file system.  Then kernel will use Android&#39;s init as init program and execute it  without any manual interaction &lt;/li&gt;
&lt;li&gt; Use Android&#39;s shell and give kernel /system/bin/sh as init program. Then start Android&#39;s init manually (/init&amp;amp;) .  &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=21&quot; title=&quot;Edit section: Start via scripts&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Start_via_scripts&quot;&gt;Start via scripts&lt;/span&gt;&lt;/h3&gt;This section describes the second way to start Android. First boot  into your normal file system and then switch to Android file system and  start Android &quot;manually&quot;, i.e. with help of some scripts. From the  initial description of this method, this way is also known as the a.sh  way (search for a.sh). The scripts used for this depend on your local  configuration. You can take below scripts as example and adapt them for  your local use. &lt;br /&gt;
These example scripts are used to first boot into standard root  file system (e.g. JFFS2 in NOR) and then to mount (/mnt/usb) and start  Android located on an ext2 formatted USB stick. &lt;br /&gt;
start_android.sh in standard root file system: &lt;br /&gt;
&lt;pre&gt;#!/bin/sh -x
echo &quot;Starting Android...&quot;
fsck.ext2 -pv /dev/sda1
mount /dev/sda1 /mnt/usb
rm -f /mnt/usb/tmp/*
umount /proc
umount /sys
mount -t proc proc /mnt/usb/proc
mount -t sysfs sysfs /mnt/usb/sys
umask 000
chroot /mnt/usb/a.sh
&lt;/pre&gt;a.sh to start Android at Android file system: &lt;br /&gt;
&lt;pre&gt;#!/system/bin/sh -x

export PATH=/sbin:/system/sbin:/system/bin:$PATH
export LD_LIBRARY_PATH=/system/lib
export ANDROID_ROOT=/system
export ANDROID_ASSETS=/system/app
export ANDROID_DATA=/data
export EXTERNAL_STORAGE=/sdcard
export DRM_CONTENT=/data/drm/content

/system/bin/app_process -Xzygote /system/bin --zygote &amp;amp;
/system/bin/dbus-daemon --system &amp;amp;
runtime &amp;amp;
/system/bin/sh&lt;/pre&gt;Notes: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; fsck.ext2 -pv /dev/sda1: Make sure ext2 file system is clean.  ext2 doesn&#39;t like unclean switch off while debugging Android start up&amp;nbsp;;) &lt;/li&gt;
&lt;li&gt; rm -f /mnt/usb/tmp/*: Remove Android temporary files before starting Android. &lt;/li&gt;
&lt;li&gt; mount proc and mount sys: This has to be done somewhere. Depending on your scripts, you can do it in a.sh as well. &lt;/li&gt;
&lt;li&gt; runtime: For debugging use here /system/bin/strace -f -ff -tt -s 200 runtime&amp;amp;. &lt;/li&gt;
&lt;li&gt; Starting runtime in background (&amp;amp;) and calling  /system/bin/sh afterwards is optional. It gives you the option to have a  shell at Android startup to e.g. observe /proc/meminfo, top or ps. Only  useful if strace isn&#39;t enabled or not so noisy&amp;nbsp;;)  &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=22&quot; title=&quot;Edit section: Start init via scripts&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Start_init_via_scripts&quot;&gt;Start init via scripts&lt;/span&gt;&lt;/h3&gt;This third way is a mixture of the first two ways: Boot into a  standard non-Android file system, then switch over to Android but there  directly execute init as it would be done by root file system. &lt;br /&gt;
From standard non-Android file system this switch can look like: &lt;br /&gt;
&lt;pre&gt;mount /dev/sda1 /mnt/usb
rm -f /mnt/usb/tmp/*
umask 000
chroot /mnt/usb /init&lt;/pre&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=23&quot; title=&quot;Edit section: Debugging&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Debugging&quot;&gt;Debugging&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt; Strace: The main debugging help currently known is &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/18/android-runtime-strace&quot; rel=&quot;nofollow&quot;&gt;strace&lt;/a&gt;. Again, a statically linked one is used. &lt;ul&gt;&lt;li&gt; You should invoke strace with &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120410568226398&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;-f -ff -tt -s 200&lt;/i&gt;&lt;/a&gt; options, e.g. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;strace -f -ff -tt -s 200 /system/bin/runtime&lt;/pre&gt;&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=24&quot; title=&quot;Edit section: FAQ&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;FAQ&quot;&gt;FAQ&lt;/span&gt;&lt;/h1&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=25&quot; title=&quot;Edit section: Kernel patch&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Kernel_patch&quot;&gt;Kernel patch&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Above section about &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Patch_extraction&quot; title=&quot;Android on OMAP&quot;&gt;kernel patch extraction&lt;/a&gt;  mentioned that not all changes in Android kernel compared to stock  kernel are needed for Android on real HW (e.g. Goldfish, QEMU and YAFFS2  related changes). What exactly do I need?  &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Regarding m5-rc14 and kernel 2.6.23 the (changed) files below seem to be sufficient to run Android on real HW: &lt;br /&gt;
&lt;pre&gt;arch/arm/Kconfig
arch/arm/kernel/process.c
arch/arm/kernel/signal.c
drivers/android/alarm.c
drivers/android/android_gadget.c
drivers/android/android_kernel_debug.c
drivers/android/android_kernel_debug.h
drivers/android/binder.c
drivers/android/Kconfig
drivers/android/logger.c
drivers/android/Makefile
drivers/android/power.c
drivers/android/ram_console.c
drivers/android/timed_gpio.c
drivers/input/evdev.c
drivers/Kconfig
drivers/misc/Kconfig
drivers/misc/lowmemorykiller/lowmemorykiller.c
drivers/misc/lowmemorykiller/Makefile
drivers/misc/Makefile
fs/inotify_user.c
include/linux/android_alarm.h
include/linux/android_gadget.h
include/linux/android_power.h
include/linux/android_timed_gpio.h
include/linux/binder_module.h
include/linux/binder_type_constants.h
include/linux/logger.h
kernel/power/process.c
drivers/Makefile&lt;/pre&gt;Kernel patches to run android on n8x0 &lt;a class=&quot;external text&quot; href=&quot;http://guug.org/nit/nitdroid/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=26&quot; title=&quot;Edit section: OpenBinder&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;OpenBinder&quot;&gt;OpenBinder&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: When I extract the kernel patch, I additionally get a &lt;i&gt;drivers/binder/&lt;/i&gt; directory. Why isn&#39;t it listed/needed above? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: The &lt;i&gt;drivers/binder/&lt;/i&gt; directory seems to contain &lt;a class=&quot;external text&quot; href=&quot;http://www.newmobilecomputing.com/story/13674/Introduction-to-OpenBinder-and-Interview-with-Dianne-Hackborn/&quot; rel=&quot;nofollow&quot;&gt;OpenBinder&lt;/a&gt;. In Android m5-rc14 this seems to be &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120417098706141&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;replaced&lt;/a&gt; by &lt;i&gt;drivers/android/binder.c&lt;/i&gt;. Therefore we don&#39;t need &lt;i&gt;drivers/binder/&lt;/i&gt;  with m5-rc14 any more. Note that new binder.c in drivers/android is  configured with CONFIG_ANDROID_BINDER_IPC, while drivers/binder was  configured by (obsolete) CONFIG_BINDER. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=27&quot; title=&quot;Edit section: Devices nodes&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Devices_nodes&quot;&gt;Devices nodes&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Do I need special devices nodes? Which? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: &lt;a href=&quot;http://elinux.org/Android_on_OMAP#File_System&quot; title=&quot;Android on OMAP&quot;&gt;Above&lt;/a&gt; we only extracted system and userdata image. If you like, you can extract /dev entries as well. However, starting Android&#39;s &lt;i&gt;runtime&lt;/i&gt; under &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Debugging&quot; title=&quot;Android on OMAP&quot;&gt;strace&lt;/a&gt; control should give you a list which devices will be opened. Besides the standard ones you will need (incomplete?): &lt;br /&gt;
&lt;pre&gt;crw-rw-rw- 1 root root 10,  x Jan  1 00:00 binder
crw-rw-rw- 1 root root 10,  x Jan  1 00:00 log/radio
crw-rw-rw- 1 root root 10,  x Jan  1 00:00 log/events
crw-rw-rw- 1 root root 10,  x Jan  1 00:00 log/main
crw-rw-rw- 1 root root 10,  x Jan  1 00:00 alarm
crw-rw-rw- 1 root root 10,  x Jan  1 00:00 eac
crw-rw-rw- 1 root root 29,  0 Jan  1 00:00 graphics/fb0
more&amp;nbsp;?&lt;/pre&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=28&quot; title=&quot;Edit section: /dev/xxx minor numbers&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;.2Fdev.2Fxxx_minor_numbers&quot;&gt;/dev/xxx minor numbers&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Which minor number will I need for /dev/xxx entries above? E.g. for /dev/binder? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: The major number 10 (major number for &quot;misc&quot; devices) above are for new drivers of m5-rc14. The minor numbers &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120417584110733&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;would be as given&lt;/a&gt; by cat /proc/misc. They are somehow board dependent and may change. &lt;br /&gt;
E.g. in m5-rc14 emulator you may get: &lt;br /&gt;
&lt;pre&gt;# cat /proc/misc
58 binder
59 log_radio
60 log_events
61 log_main
62 alarm
 1 psaux
63 eac&lt;/pre&gt;With &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Patch_extraction&quot; title=&quot;Android on OMAP&quot;&gt;kernel patch on real HW&lt;/a&gt; you may get: &lt;br /&gt;
&lt;pre&gt;# cat /proc/misc
59 binder
60 log_radio
61 log_events
62 log_main
63 alarm&lt;/pre&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=29&quot; title=&quot;Edit section: /dev/fb0&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;.2Fdev.2Ffb0&quot;&gt;/dev/fb0&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I have /dev/fb0, is this correct? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: With m5-rc14 &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/84934031.html&quot; rel=&quot;nofollow&quot;&gt;Google switched frame buffer interface&lt;/a&gt; to /dev/graphics/fb0. So you need: &lt;br /&gt;
&lt;pre&gt;crw-rw-rw- 1 root root 29,  0 Jan  1 00:00 /dev/graphics/fb0&lt;/pre&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=30&quot; title=&quot;Edit section: Blank screen&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Blank_screen&quot;&gt;Blank screen&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I did all steps like above, &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Debugging&quot; title=&quot;Android on OMAP&quot;&gt;strace&lt;/a&gt; output doesn&#39;t show any obvious errors, but if I start Android calling &lt;i&gt;runtime&lt;/i&gt;  I simply get a blank screen. No output (no ANDROID string, no red cycle  eye, nothing), just blank screen. As when the frame buffer screen saver  starts after ~10min. I use m5-rc14. &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: With m5-rc14 the frame buffer handling changed. You now need a frame buffer driver which &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/87808061.html&quot; rel=&quot;nofollow&quot;&gt;supports double buffer/page flipping&lt;/a&gt;. Observe the output of strace. If you get: &lt;br /&gt;
&lt;pre&gt;...
writev(4, [{&quot;\4&quot;, 1}, {&quot;SurfaceFlinger\&quot;, 15}, {&quot;Client API: OpenGL ES\&quot;, 22}], 3) = 38
open(&quot;/dev/graphics/fb0&quot;, O_RDWR|O_LARGEFILE) = 21
ioctl(21, FBIOGET_FSCREENINFO, 0x43145d9c) = 0
ioctl(21, FBIOGET_VSCREENINFO, 0x43145cfc) = 0
ioctl(21, FBIOPUT_VSCREENINFO, 0x43145cfc) = 0
writev(4, [{&quot;\5&quot;, 1}, {&quot;EGLDisplaySurface\&quot;, 18}, &lt;b&gt;{&quot;page flipping not supported (yres_virtual=640,  requested=1280)\&quot;, 63}], 3)&lt;/b&gt; = 82
ioctl(21, FBIOGET_VSCREENINFO, 0x43145cfc) = 0
...&lt;/pre&gt;your frame buffer driver doesn&#39;t support page flipping. &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: For above output, strace has to be invoked with &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120410568226398&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;&lt;i&gt;-f -ff -tt -s 200&lt;/i&gt;&lt;/a&gt; options, else you wouldn&#39;t see this. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=31&quot; title=&quot;Edit section: Page flipping frame buffer&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Page_flipping_frame_buffer&quot;&gt;Page flipping frame buffer&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Okay, I get this &lt;i&gt;page flipping not supported&lt;/i&gt; message  above and have a blank screen. So my frame buffer driver doesn&#39;t  support double buffer/page flipping. What do I have to change in frame  buffer driver to support double buffer/page flipping? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: This depends on frame buffer driver. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; For OMAP you can try following hack: &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;Index: linux-omap-2_6_23/drivers/video/omap/omapfb_main.c
===================================================================
--- linux-omap-2_6_23.orig/drivers/video/omap/omapfb_main.c
+++ linux-omap-2_6_23/drivers/video/omap/omapfb_main.c
@@ -168,7 +168,7 @@ static int ctrl_init(struct omapfb_devic
                /* 12 bpp is packed in 16 bits */
                if (bpp == 12)
                       bpp = 16;
-               def_size = def_vxres * def_vyres * bpp / 8;
+               def_size = def_vxres * def_vyres * 2 * bpp / 8;
                fbdev-&amp;gt;mem_desc.region_cnt = 1;
                fbdev-&amp;gt;mem_desc.region[0].size = PAGE_ALIGN(def_size);
        }
@@ -415,6 +415,7 @@ static void set_fb_fix(struct fb_info *f
        }
        fix-&amp;gt;accel              = FB_ACCEL_OMAP1610;
        fix-&amp;gt;line_length        = var-&amp;gt;xres_virtual * bpp / 8;
+       fix-&amp;gt;ypanstep           = 1;
 }

 static int set_color_mode(struct omapfb_plane_struct *plane,
@@ -1471,7 +1472,7 @@ static int fbinfo_init(struct omapfb_dev
        var-&amp;gt;xres = def_vxres;
        var-&amp;gt;yres = def_vyres;
        var-&amp;gt;xres_virtual = def_vxres;
-       var-&amp;gt;yres_virtual = def_vyres;
+       var-&amp;gt;yres_virtual = def_vyres * 2;
        var-&amp;gt;rotate       = def_rotate;
        var-&amp;gt;bits_per_pixel = fbdev-&amp;gt;panel-&amp;gt;bpp;
&lt;/pre&gt;(anybody with clean patch? -&amp;gt;&lt;a href=&quot;http://elinux.org/Android_on_OMAP#Contact&quot; title=&quot;Android on OMAP&quot;&gt;contact&lt;/a&gt;) &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; For the new omap2 dss driver (based on 2.6.29), please try following hack: &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 1042c3b..8f87b78 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1315,7 +1315,7 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
       oldw, oldh, w, h);
    }

-  size = w * h * bytespp;
+  size = w * h * bytespp * 2;
  }
 
  if (!size)
@@ -1648,7 +1648,7 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
   }

    var-&amp;gt;xres_virtual = var-&amp;gt;xres;
-   var-&amp;gt;yres_virtual = var-&amp;gt;yres;
+   var-&amp;gt;yres_virtual = var-&amp;gt;yres * 2;

   if (!var-&amp;gt;bits_per_pixel) {
    switch (display-&amp;gt;get_recommended_bpp(display)) {
@@ -1669,7 +1669,7 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
   var-&amp;gt;xres = 320;
   var-&amp;gt;yres = 240;
   var-&amp;gt;xres_virtual = var-&amp;gt;xres;
-   var-&amp;gt;yres_virtual = var-&amp;gt;yres;
+   var-&amp;gt;yres_virtual = var-&amp;gt;yres * 2;
   if (!var-&amp;gt;bits_per_pixel)
    var-&amp;gt;bits_per_pixel = 16;
  }&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; For Zaurus/pxafb have a look to following &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/87973048.html&quot; rel=&quot;nofollow&quot;&gt;solution&lt;/a&gt;. See &lt;a class=&quot;external text&quot; href=&quot;http://www.oesf.org/forum/index.php?s=b33968d11c595adb9ac146a6d4c59366&amp;amp;showtopic=25517&amp;amp;st=15&amp;amp;start=15&quot; rel=&quot;nofollow&quot;&gt;OESF&lt;/a&gt; as well. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=32&quot; title=&quot;Edit section: Android start crashes&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Android_start_crashes&quot;&gt;Android start crashes&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: When I start Android like described above, xxx strangely  crashes and/or I get strange error messages. I don&#39;t use recent  (m5-rc14) Android. &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Make sure that you use kernel patch and file system from most &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120392877715554&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;recent Android&lt;/a&gt; release (currently m5-rc14). &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120400983008672&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;Don&#39;t mix&lt;/a&gt; kernel patch and file system from different versions. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=33&quot; title=&quot;Edit section: Power management&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Power_management&quot;&gt;Power management&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I did anything like described above. Systems starts  properly, I get Android home screen. But then, system goes to suspend  mode and never wakes up. Even if I only use &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120470400929434&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;fake Android power management&lt;/a&gt;. &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: unknown yet&amp;nbsp;:( There is some guessing and some workaround. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Some &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/87973048.html#comment&quot; rel=&quot;nofollow&quot;&gt;guess from androidzaurus&lt;/a&gt;.  &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt; Workaround reported from &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120538179321533&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;Anil&lt;/a&gt;:  &lt;/li&gt;
&lt;/ul&gt;Adding keypad support (e.g. on Mistral&#39;s OSK2530EVM, OMAP2430 based  platform) and &quot;waking&quot; Android while it switches to suspend wakes it  again. When Android goes into power saving mode, it prints the following  messages &lt;br /&gt;
&lt;pre&gt;android_power_suspend: enter suspend
android_power_suspend: exit suspend, ret = -38
android_power_suspend: pm_suspend returned with no event&lt;/pre&gt;And then, if the UP or DOWN key is pressed on the HW keypad, the  system comes back to normal mode and resumes activity with the below  given console messages &lt;br /&gt;
&lt;pre&gt;android_power_wakeup 2-&amp;gt;0 at 447592867845
active wake lock PowerManagerService
active wake lock KeyEvents
android_power_suspend: done&lt;/pre&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=34&quot; title=&quot;Edit section: TLS issue&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;TLS_issue&quot;&gt;TLS issue&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: What is this TLS issue? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Some newer ARM processors support &lt;a class=&quot;external text&quot; href=&quot;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205g/CIAIIFIB.html&quot; rel=&quot;nofollow&quot;&gt;TLS&lt;/a&gt; in hardware. With current (m5-rc14) Android release this &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120384694214686&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;isn&#39;t supported&lt;/a&gt; yet. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=35&quot; title=&quot;Edit section: TLS issue and processors&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;TLS_issue_and_processors&quot;&gt;TLS issue and processors&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Which processors have this TLS issue? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120394328804005&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;ARMv6K (MPCORE) and ARMv7 (Cortex)&lt;/a&gt;. Regarding OMAP, this is OMAP3 (Cortex). OMAP1 (ARM9) and OMAP2 (ARM11) don&#39;t have this issue. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=36&quot; title=&quot;Edit section: TLS issue workaround&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;TLS_issue_workaround&quot;&gt;TLS issue workaround&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I&#39;d like to use (m5-rc14) Android on processors with TLS issue, what can I do? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: On older ARM&#39;s the TLS register is emulated (trapped by  the kernel) and on newer ARM&#39;s the register actually exists. Android  (at least the version for Goldfish) is compiled with the assumption that  the TLS register is emulated and thus expects the kernel to trap it. A non-user  defined config option called HAS_TLS_REG is set based on the processor  version that is configured which controls if the trap code gets added to  the kernel. So to get around the TLS issue, you will need to force the  option ON even if the processor supports the TLS register. You can force  it on for e.g. OMAP3 by doing the following. However, once source is  available, you really don&#39;t want to do this as it does cause a performance hit. &lt;br /&gt;
&lt;pre&gt;diff -Naur 2.6_kernel-orig/arch/arm/mm/Kconfig 2.6_kernel-android/arch/arm/mm/Kconfig
--- 2.6_kernel-orig/arch/arm/mm/Kconfig   2007-11-20 12:09:42.000000000-0600
+++ 2.6_kernel-new/arch/arm/mm/Kconfig   2007-12-08 22:23:04.000000000-0600
@@ -675,7 +675,7 @@
 config HAS_TLS_REG
   bool
   depends on&amp;nbsp;!TLS_REG_EMUL
-  default y if SMP || CPU_32v7
+  default y if SMP || CPU_32v7 &amp;amp;&amp;amp;&amp;nbsp;!ARCH_OMAP
   help
     This selects support for the CP15 thread register.
     It is defined to be available on some ARMv6 processors (including&lt;/pre&gt;(Thanks to Keith Deacon!) &lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt;: A &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120400327301855&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;user report&lt;/a&gt; wasn&#39;t quite successful regarding this. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=37&quot; title=&quot;Edit section: Red cycle eye runtime speed&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Red_cycle_eye_runtime_speed&quot;&gt;Red cycle eye runtime speed&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: The red cycle eye runs very fast on my board, and the system_server take almost 100% CPU &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120399654528241&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;This is usually indicative&lt;/a&gt;  of lack of vsync/pageflip in the fb driver. The surfaceflinger believes  it will be limited by the vsync rate and the startup animation depends  on that. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=38&quot; title=&quot;Edit section: File not found&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;File_not_found&quot;&gt;File not found&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: At Android start up I get some &lt;i&gt;File not found ...&lt;/i&gt; error messages like: &lt;br /&gt;
&lt;pre&gt;Prepping: /system/app/AlarmClock.apk:/system/app/AlarmProvider.apk:...
File not found: /system/app/AlarmClock.apk
File not found: /system/app/AlarmProvider.apk
File not found: /system/app/Anagrams.apk
...
File not found: /system/app/Vending.apk
File not found: /system/app/VoiceDialer.apk
File not found: /system/app/Voicemail.apk
File not found: /system/app/YouTube.apk
Prep complete&lt;/pre&gt;Do I have to care about these? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: No, it doesn&#39;t seem so. See &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/2007/11/18/android-framework-startup&quot; rel=&quot;nofollow&quot;&gt;Benno&#39;s blog&lt;/a&gt;, section Manual startup. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=39&quot; title=&quot;Edit section: Limited main memory&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Limited_main_memory&quot;&gt;Limited main memory&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I have only limited main memory (SDRAM, e.g. 32MB). The  system basically starts, but it is really sssllllooooowwww, slightly  unusable. More or less only a proof of concept. Can I do anything to use  Android even on systems with limited main memory? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Try to enable lowmemorykiller: &lt;br /&gt;
&lt;pre&gt;drivers/misc/lowmemorykiller/lowmemorykiller.c&lt;/pre&gt;For this, in kernel enable &lt;br /&gt;
&lt;pre&gt;CONFIG_LOW_MEMORY_KILLER=y&lt;/pre&gt;in Device drivers -&amp;gt; Misc devices. At Android startup this then results in messages like &lt;br /&gt;
&lt;pre&gt;...
send sigkill to 920 (app_process), adj 1, size 1838
...&lt;/pre&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=40&quot; title=&quot;Edit section: Some buttons work, some not&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Some_buttons_work.2C_some_not&quot;&gt;Some buttons work, some not&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Some buttons work, some buttons don&#39;t work ... wrong  mapping. How to see what key codes certain buttons are bound? And how to  edit the mapping in Android? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: From &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120749091514894&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;Brian at OMAP ML&lt;/a&gt;: &lt;br /&gt;
&lt;i&gt;There&#39;s a brute force approach to sorting out input events:  run getevent on the emulator and on the target hardware and compare the  results. It&#39;s in /system/bin. Keylayouts live in  /system/usr/keylayout/*.kl and are used to translate from the raw input  event codes to android keycodes. Keymaps live in  /system/user/keychars/*.kcm.bin (undocumented binary format right now,  sorry) and are used to describe how the key events and modifiers and  such are related.&lt;/i&gt; &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=41&quot; title=&quot;Edit section: Filesystem, JFFS2 and SIGSEGV&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Filesystem.2C_JFFS2_and_SIGSEGV&quot;&gt;Filesystem, JFFS2 and SIGSEGV&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Which file system should I use to store Android user files? Is JFFS2 okay? I use JFFS2 and get SIGSEGVs. What can I do? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Don&#39;t use JFFS2 as file system for Android. &lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/android-internals/browse_thread/thread/7028432fa76f57e8/71709fc4adcb2ddd&quot; rel=&quot;nofollow&quot;&gt;Android does not support JFFS&lt;/a&gt;. Use an ext2/3 formatted medium. Or use YAFFS2 if you use a NAND device (as emulator does). &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=42&quot; title=&quot;Edit section: Using JFFS2&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Using_JFFS2&quot;&gt;Using JFFS2&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Okay, I understand from above that Android doesn&#39;t support JFFS2. But, maybe there is a hack to try? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: You could try what &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120946006920397&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;Brian&lt;/a&gt; reports: &lt;br /&gt;
&lt;i&gt;Using JFFS2, what you&#39;re might seeing here is the property  service in init failing to create and mmap it&#39;s arena, which it tries to  do in /, which in emulator world is initramfs.  The android init/boot  model is a little different in that android don&#39;t pivot over to a root  filesystem, android mounts the system, data, etc partitions under the  ramfs on /.&lt;/i&gt; &lt;br /&gt;
&lt;i&gt;You might be able to hack around this by editing the string  &quot;/system_properties&quot; to &quot;/tmp/em_properties&quot; or something like that,  assuming you have tmpfs mounted on /tmp.&lt;/i&gt; &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=43&quot; title=&quot;Edit section: Nokia N8x0 and Android SDK&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Nokia_N8x0_and_Android_SDK&quot;&gt;Nokia N8x0 and Android SDK&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I&#39;d like to run &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Screenshots&quot; title=&quot;Android on OMAP&quot;&gt;Android on Nokia N8x0&lt;/a&gt; (&lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/android-internals/browse_thread/thread/7028432fa76f57e8/1556f431d3eb1e57&quot; rel=&quot;nofollow&quot;&gt;link 1&lt;/a&gt;, &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/p/android-on-n8xx/&quot; rel=&quot;nofollow&quot;&gt;link 2&lt;/a&gt;). Which &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/p/android/downloads/list&quot; rel=&quot;nofollow&quot;&gt;Android SDK&lt;/a&gt; should I use? Can I use m5-rc14/15 SDK? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: You &lt;i&gt;have&lt;/i&gt; to use m3 &lt;i&gt;user space&lt;/i&gt;. This works well with  m5-rc14/15 kernel patches. So best combination is to use m3 user space with m5 kernel. &lt;br /&gt;
m5 user space will &lt;b&gt;not&lt;/b&gt; work, because it needs &lt;a href=&quot;http://elinux.org/Android_on_OMAP#Page_flipping_frame_buffer&quot; title=&quot;Android on OMAP&quot;&gt;page flipping frame buffer&lt;/a&gt; and N8x0 fb driver doesn&#39;t support this. &lt;br /&gt;
For working android port: &lt;a class=&quot;external text&quot; href=&quot;http://guug.org/nit/nitdroid/&quot; rel=&quot;nofollow&quot;&gt;&quot;Nitdroid&quot;&lt;/a&gt; &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=44&quot; title=&quot;Edit section: N8x0 and recent OMAP git kernel&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;N8x0_and_recent_OMAP_git_kernel&quot;&gt;N8x0 and recent OMAP git kernel&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: I&#39;d like to use recent OMAP git kernel on N8x0. What do I need to run git kernel on N8x0? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Have a look to Tony&#39;s &lt;a class=&quot;external text&quot; href=&quot;http://www.muru.com/linux/n8x0/&quot; rel=&quot;nofollow&quot;&gt;booting nokia N8x0 with current OMAP git kernel&lt;/a&gt;. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=45&quot; title=&quot;Edit section: N810 keys&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;N810_keys&quot;&gt;N810 keys&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: How do I get the N810 keyboard to work with Android? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Try the following &lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/android-internals/msg/04f842aa0710932a&quot; rel=&quot;nofollow&quot;&gt;changes&lt;/a&gt; to get most of N810 keys working with Android, except Fn and the numbers: &lt;br /&gt;
&lt;pre&gt;Just update one file: /system/usr/keylayout/qwerty.kl

-key 158   BACK              WAKE_DROPPED
+key 1     BACK              WAKE_DROPPED
 key 230   SOFT_RIGHT        WAKE
 key 60    SOFT_RIGHT        WAKE
 key 107   ENDCALL           WAKE_DROPPED
 key 62    ENDCALL           WAKE_DROPPED
-key 229   SOFT_LEFT         WAKE_DROPPED
+key 62    SOFT_LEFT         WAKE_DROPPED
 key 59    SOFT_LEFT         WAKE_DROPPED
 key 139   SOFT_LEFT         WAKE_DROPPED
 key 228   POUND
 key 227   STAR
 key 231   CALL              WAKE_DROPPED
 key 61    CALL              WAKE_DROPPED
-key 232   DPAD_CENTER       WAKE_DROPPED
+key 96    DPAD_CENTER       WAKE_DROPPED
 key 108   DPAD_DOWN         WAKE_DROPPED
 key 103   DPAD_UP           WAKE_DROPPED
-key 102   HOME              WAKE
+key 63    HOME              WAKE
 key 105   DPAD_LEFT         WAKE_DROPPED
 key 106   DPAD_RIGHT        WAKE_DROPPED
-key 115   VOLUME_UP
-key 114   VOLUME_DOWN
+key 65    VOLUME_UP
+key 66    VOLUME_DOWN&lt;/pre&gt;&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=46&quot; title=&quot;Edit section: N8x0 touchscreen&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;N8x0_touchscreen&quot;&gt;N8x0 touchscreen&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Is there any way to get N8x0 touchscreen working with Android? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: Yes. There is a &lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/android-internals/msg/7c6ff76e0381e95a&quot; rel=&quot;nofollow&quot;&gt;patch&lt;/a&gt; you can apply to a nokia+android patched 2.6.21 kernel and you should have a working touchscreen. &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=47&quot; title=&quot;Edit section: Nokia770 support&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Nokia770_support&quot;&gt; Nokia770 support &lt;/span&gt;&lt;/h3&gt;NITdroid project provide some images to flash on your n700, see tutorial and demo at&amp;nbsp;: &lt;br /&gt;
&lt;a class=&quot;external free&quot; href=&quot;http://www.newlc.com/en/nitdroid-demo-gnulinux-android-nokia-n770-0&quot; rel=&quot;nofollow&quot;&gt;http://www.newlc.com/en/nitdroid-demo-gnulinux-android-nokia-n770-0&lt;/a&gt; &lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=48&quot; title=&quot;Edit section: HW interfaces support&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;HW_interfaces_support&quot;&gt;HW interfaces support&lt;/span&gt;&lt;/h3&gt;&lt;b&gt;Q&lt;/b&gt;: Which hardware interfaces or kernel drivers does current Android support? &lt;br /&gt;
&lt;b&gt;A&lt;/b&gt;: See discussion on &lt;a class=&quot;external text&quot; href=&quot;http://marc.info/?l=linux-omap&amp;amp;m=120946406828608&amp;amp;w=2&quot; rel=&quot;nofollow&quot;&gt;OMAP ML&lt;/a&gt;: &lt;br /&gt;
&lt;pre&gt;&amp;gt; I was able to add support for the keypad, touch and network in Android,
&amp;gt; however the interfaces like GPS, Accelerometer, vibrator, hardware 3D
&amp;gt; acceleration, battery etc. are not integrated with Android right now. I
&amp;gt; would appreciate if you could throw some light on these open issues. How
&amp;gt; exactly can these interfaces be integrated with Android? 

We&#39;re trying to use the standard kernel/driver interfaces when possible,
but for things that may have a good deal of variation in implementation,
we&#39;re looking to provide a very thin &quot;hardware interface library&quot; layer
to adapt between the bottom of the userspace stack and the drivers or
whatnot for specific hardware platforms.  

We&#39;ll continue to adopt standardized kernel solutions as they become
available -- We&#39;re now using the power supply framework in 2.6.24 for
monitoring battery/charge state (post M5 SDK -- it&#39;ll be in the next 
release), for example.&lt;/pre&gt;&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=49&quot; title=&quot;Edit section: Links&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Links&quot;&gt;Links&lt;/span&gt;&lt;/h1&gt;&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://guug.org/nit/nitdroid/&quot; rel=&quot;nofollow&quot;&gt;&quot;Nitdroid&quot; -project. Sources and precompiled (ready to use) binaries for Nokia Internet Tablets.&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.mistralsolutions.com/android&quot; rel=&quot;nofollow&quot;&gt;Mistrals&#39; Android Competency Center&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.omappedia.com/wiki/Android_Getting_Started&quot; rel=&quot;nofollow&quot;&gt;Android on the OMAP34x Zoom Mobile Development Kit&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/&quot; rel=&quot;nofollow&quot;&gt;Android&lt;/a&gt; homepage &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.e-consystems.com/5MP_hdcamera_omap.asp&quot; rel=&quot;nofollow&quot;&gt;Android Camera&lt;/a&gt; Application using V4L2 APIs, on OMAP EVM board &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://benno.id.au/blog/&quot; rel=&quot;nofollow&quot;&gt;Bennos blog&lt;/a&gt; with lot of reverse engineering info about Android &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://androidzaurus.seesaa.net/article/74237419.html&quot; rel=&quot;nofollow&quot;&gt;Android on Zaurus&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.kandroid.org/&quot; rel=&quot;nofollow&quot;&gt;Korea Android Community&lt;/a&gt;  &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;Note&lt;/i&gt;:Connect this site using &lt;a class=&quot;external free&quot; href=&quot;http://www.google.com/translate&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com/translate&lt;/a&gt; website. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Linux devices about &lt;a class=&quot;external text&quot; href=&quot;http://www.linuxdevices.com/news/NS4262102607.html&quot; rel=&quot;nofollow&quot;&gt;Penguinistas hack Android onto real hardware&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://tree.celinuxforum.org/CelfPubWiki/Jamboree18AndroidDemo&quot; rel=&quot;nofollow&quot;&gt;Google Android on Working Target&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/android/groups.html&quot; rel=&quot;nofollow&quot;&gt;Android discussion groups&lt;/a&gt;. These concentrate more on Android application programming. Not really HW and processor related. &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.oesf.org/forum/index.php?showforum=158&quot; rel=&quot;nofollow&quot;&gt;Open Embedded Software Foundation Android forum&lt;/a&gt;. Discussion, support and general information about running Android on a handheld. &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://groups.google.lu/group/android-internals/browse_thread/thread/93570c41bce07f16?hl=en&quot; rel=&quot;nofollow&quot;&gt;Porting Android to real HW at Android internals list&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://nemustech.blogspot.com/2007/12/android-porting-to-real-target-hw.html&quot; rel=&quot;nofollow&quot;&gt;Android Porting to Real Target HW&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/p/android-on-n8xx/&quot; rel=&quot;nofollow&quot;&gt;Android on Nokia 8xx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; Tony&#39;s &lt;a class=&quot;external text&quot; href=&quot;http://www.muru.com/linux/n8x0/&quot; rel=&quot;nofollow&quot;&gt;booting nokia N8x0 with current OMAP git kernel&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://forums.lugradio.org/viewtopic.php?f=4&amp;amp;t=4094#p41437&quot; rel=&quot;nofollow&quot;&gt;Robert Love talks about Google Android&lt;/a&gt;. Recorded at &lt;a class=&quot;external text&quot; href=&quot;http://www.lugradio.org/live/USA2008/&quot; rel=&quot;nofollow&quot;&gt;LUG Radio Live USA 2008&lt;/a&gt; at the Metreon Theatre, San Francisco. &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://groups.google.com/group/beagleboard/browse_thread/thread/e933982889f0441d#&quot; rel=&quot;nofollow&quot;&gt;Rupesh Gujare announces availability of an Android file system image&lt;/a&gt; for the &lt;a class=&quot;external text&quot; href=&quot;http://beagleboard.org/project/android&quot; rel=&quot;nofollow&quot;&gt;BeagleBoard&lt;/a&gt; and provides a &lt;a class=&quot;external text&quot; href=&quot;http://in.youtube.com/watch?v=3cetZMUWBHY&quot; rel=&quot;nofollow&quot;&gt;video&lt;/a&gt; and &lt;a class=&quot;external text&quot; href=&quot;http://embdroid.homeftp.net/ANDROID.tar.bz2&quot; rel=&quot;nofollow&quot;&gt;kernel + root file system&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;Note&lt;/i&gt;: Some of the infos in above links are from the first  versions of Android. Seems that with newer versions (e.g. m5-rc14) some  parts changed, e.g. binder interface and /sys/android_power interface. &lt;br /&gt;
&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=50&quot; title=&quot;Edit section: Contact&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Contact&quot;&gt;Contact&lt;/span&gt;&lt;/h1&gt;See &lt;a class=&quot;external text&quot; href=&quot;http://vger.kernel.org/vger-lists.html#linux-omap&quot; rel=&quot;nofollow&quot;&gt;OMAP mailing list&lt;/a&gt; for more information. &lt;br /&gt;
This page is distilled by &lt;a class=&quot;external text&quot; href=&quot;mailto:dirk.behme@gmail.com&quot; rel=&quot;nofollow&quot;&gt;Dirk Behme&lt;/a&gt; and information added by &lt;a class=&quot;external text&quot; href=&quot;mailto:leemgs@gmail.com&quot; rel=&quot;nofollow&quot;&gt;Lim,GeunSik&lt;/a&gt;. &lt;br /&gt;
&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=51&quot; title=&quot;Edit section: Videos&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Videos&quot;&gt;Videos&lt;/span&gt;&lt;/h1&gt;&lt;a class=&quot;external text&quot; href=&quot;http://guug.org/nit/nitdroid/&quot; rel=&quot;nofollow&quot;&gt;Nitdroid&lt;/a&gt; (Android for Nokia Internet Tablets) on Nokia n810: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://video.google.com/videoplay?docid=6988247315953961035&amp;amp;hl=en&quot; rel=&quot;nofollow&quot;&gt;Using Nitdroid&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://video.google.com/videoplay?docid=-7232749278972911905&amp;amp;hl=en&quot; rel=&quot;nofollow&quot;&gt;Web-browsing example&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;(Videos above are outdated and from very early stage)&lt;/b&gt; &lt;br /&gt;
&lt;a class=&quot;external text&quot; href=&quot;http://guug.org/nit/nitdroid/&quot; rel=&quot;nofollow&quot;&gt;NITdroid&lt;/a&gt; on nokia770&amp;nbsp;: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external free&quot; href=&quot;http://www.newlc.com/en/nitdroid-demo-gnulinux-android-nokia-n770-0&quot; rel=&quot;nofollow&quot;&gt;http://www.newlc.com/en/nitdroid-demo-gnulinux-android-nokia-n770-0&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.youtube.com/watch?v=3MKg8UAxgTE&quot; rel=&quot;nofollow&quot;&gt;Android Donut Demo on Mistral&#39;s TMDSEVM3530&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.youtube.com/watch?gl=US&amp;amp;hl=hi&amp;amp;v=IuO0YQfjflY&quot; rel=&quot;nofollow&quot;&gt;Android Demo on Mistral&#39;s TMDXEVM3503&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.mistralsolutions.com/technology/android_omap.php&quot; rel=&quot;nofollow&quot;&gt;Download Android Demo on Mistral&#39;s TMDSEVM3530 &amp;amp; TMDXEVM3503&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h1&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_on_OMAP&amp;amp;action=edit&amp;amp;section=52&quot; title=&quot;Edit section: Screenshots&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Screenshots&quot;&gt;Screenshots&lt;/span&gt;&lt;/h1&gt;&lt;ul&gt;&lt;li&gt; Android m5-rc14 home screen with kernel 2.6.23 on OMAP5912 &lt;a href=&quot;http://elinux.org/OSK&quot; title=&quot;OSK&quot;&gt;OSK&lt;/a&gt;:  &lt;/li&gt;
&lt;/ul&gt;&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Android_m5_rc14_omap_osk_kernel_2_6_23.jpg&quot;&gt;&lt;img alt=&quot;Android m5 rc14 omap osk kernel 2 6 23.jpg&quot; height=&quot;258&quot; src=&quot;http://elinux.org/images/b/ba/Android_m5_rc14_omap_osk_kernel_2_6_23.jpg&quot; width=&quot;197&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Android m5-rc14 kernel + m3 image, on a Nokia N810: &lt;/li&gt;
&lt;/ul&gt;&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Cimg0608.jpg&quot;&gt;&lt;img alt=&quot;Cimg0608.jpg&quot; height=&quot;240&quot; src=&quot;http://elinux.org/images/9/9a/Cimg0608.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Cimg0610.jpg&quot;&gt;&lt;img alt=&quot;Cimg0610.jpg&quot; height=&quot;240&quot; src=&quot;http://elinux.org/images/a/a6/Cimg0610.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Cimg0611.jpg&quot;&gt;&lt;img alt=&quot;Cimg0611.jpg&quot; height=&quot;240&quot; src=&quot;http://elinux.org/images/6/63/Cimg0611.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Android m5-rc15 home screen with kernel 2.6.18 on armadillo-500 1136 (&lt;a class=&quot;external text&quot; href=&quot;http://www.youtube.com/watch?v=jGvGl0nOQNo&quot; rel=&quot;nofollow&quot;&gt;YouTube Movie&lt;/a&gt;) &lt;/li&gt;
&lt;/ul&gt;&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Androidarmadillo200804.jpg&quot;&gt;&lt;img alt=&quot;Androidarmadillo200804.jpg&quot; height=&quot;249&quot; src=&quot;http://elinux.org/images/4/44/Androidarmadillo200804.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Android m5-rc14 home screen with kernel 2.6.19 on OMAP2430 &lt;a href=&quot;http://elinux.org/OSK&quot; title=&quot;OSK&quot;&gt;OSK&lt;/a&gt;: &lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;-If you have unstable sdcard, You will meet for Looping of &quot;Red Eye&quot; Status.&lt;/pre&gt;&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Omap2evm.android.PNG&quot;&gt;&lt;img alt=&quot;Omap2evm.android.PNG&quot; height=&quot;219&quot; src=&quot;http://elinux.org/images/b/b1/Omap2evm.android.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Android camera application using V4L2 APIs, on TI OMAP EVM board: &lt;/li&gt;
&lt;/ul&gt;[&lt;a class=&quot;external autonumber&quot; href=&quot;http://www.e-consystems.com/images/eCAM/5mp_HDcamera_image_capture.jpg&quot; rel=&quot;nofollow&quot;&gt;[2]&lt;/a&gt;] &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Android m5-rc14(2.6.23) on Nokia&#39;s n810 Tablet &lt;/li&gt;
&lt;/ul&gt;&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:N810.kandroid200805.PNG&quot;&gt;&lt;img alt=&quot;N810.kandroid200805.PNG&quot; height=&quot;150&quot; src=&quot;http://elinux.org/images/e/ef/N810.kandroid200805.PNG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Android Cupcake Ver 1.0(2.6.27) on OMAP3EVM(ARM Cortex-A8) &lt;/li&gt;
&lt;/ul&gt;&lt;a class=&quot;image&quot; href=&quot;http://elinux.org/File:Omap3evm3.jpg&quot;&gt;&lt;img alt=&quot;Omap3evm3.jpg&quot; height=&quot;221&quot; src=&quot;http://elinux.org/images/d/d0/Omap3evm3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;ul&gt;&lt;li&gt; NITdroid on nokia770&amp;nbsp;: &lt;/li&gt;
&lt;/ul&gt;[&lt;a class=&quot;external autonumber&quot; href=&quot;http://www.newlc.com/files/preview/6c0a2203f16d30fc3abfed994232f73b.png&quot; rel=&quot;nofollow&quot;&gt;[3]&lt;/a&gt;] (larger images in tutorial above) &lt;br /&gt;
&lt;div class=&quot;printfooter&quot;&gt; Retrieved from &quot;&lt;a href=&quot;http://elinux.org/Android_on_OMAP&quot;&gt;http://elinux.org/Android_on_OMAP&lt;/a&gt;&quot;&lt;/div&gt;&lt;div class=&quot;catlinks&quot; id=&quot;catlinks&quot;&gt;&lt;div id=&quot;mw-normal-catlinks&quot;&gt;&lt;a href=&quot;http://elinux.org/Special:Categories&quot; title=&quot;Special:Categories&quot;&gt;Categories&lt;/a&gt;: &lt;span dir=&quot;ltr&quot;&gt;&lt;a href=&quot;http://elinux.org/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Linux&lt;/a&gt;&lt;/span&gt; | &lt;span dir=&quot;ltr&quot;&gt;&lt;a href=&quot;http://elinux.org/Category:OMAP&quot; title=&quot;Category:OMAP&quot;&gt;OMAP&lt;/a&gt;&lt;/span&gt; | &lt;span dir=&quot;ltr&quot;&gt;&lt;a href=&quot;http://elinux.org/Category:Android&quot; title=&quot;Category:Android&quot;&gt;Android&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/android-on-omap.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-2930465659096661747</guid><pubDate>Tue, 19 Apr 2011 08:33:00 +0000</pubDate><atom:updated>2011-04-19T01:33:19.650-07:00</atom:updated><title>Porting Android to a new device</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;txt&quot;&gt;The paper was written by Peter McDermott, an American expatriate who lives in Beijing and serves as CEO of NthCode. &lt;a href=&quot;http://www.nthcode.com/&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;NthCode&lt;/u&gt;&lt;/a&gt;  is a consulting firm specializing in Linux device development, in  markets that include mobile phones, set-top boxes, and &quot;converged&quot;  multimedia devices.  Enjoy . . . !&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;&lt;center&gt;&lt;b&gt;Porting Android to a new device&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
by Peter McDermott&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Executive summary&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If  you&#39;re having trouble estimating the time and complexity of porting  Google&#39;s Android mobile platform to your embedded device, our experience  porting Android to a Nokia N810 Internet Tablet may provide you with  useful information.  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Android overview&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Android is a  mobile phone software platform created by Google.  It is based on the  Linux kernel, a number of software libraries written in &#39;C,&#39; a Java-like  virtual machine for running application code, and a full suite of  mobile phone applications.&lt;br /&gt;
&lt;br /&gt;
Android costs nothing and the source  code is freely available.  Its license terms (see the Apache license  link at the end) are commercial-friendly, saying, in essence, &quot;Do what  you like with it, just don&#39;t sue us if something goes wrong.&quot;  The one  exception to this rule is the Linux kernel, which is licensed under the  GNU Public License.  Because of this, manufacturers must release their  device&#39;s Linux kernel source code after product shipment.&lt;br /&gt;
&lt;br /&gt;
Taiwan&#39;s  HTC shipped the first Android phone, the G1, in October 2008.  Other  mobile manufacturers, including Motorola, LG, and Samsung are all  reportedly creating Android-based phones. Additionally, from NthCode&#39;s  home base in China, we see many startups and smaller manufacturers  leveraging Android in an attempt to gain a foothold in the global  smartphone market.&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; hspace=&quot;10&quot; src=&quot;http://www.linuxfordevices.com/files/misc/tmobile-g1_228x228.jpg&quot; vspace=&quot;5&quot; width=&quot;200&quot; /&gt;&lt;br /&gt;
&lt;b&gt;T-Mobile G1, the first Android phone&lt;/b&gt;&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
The  Android platform provides all the services one would expect in a mobile  phone, including phone calling, networking, messaging, and multimedia.   Our analysis of the source code so far is that these services are  complete and built on top of an excellent architecture, but do not  implement every last feature found in modern mobile phones.  This is the  1.0 release, after all.&lt;br /&gt;
&lt;br /&gt;
For application developers, Android  builds on top of the popular open-source Eclipse integrated development  environment.  Developers can use Eclipse to write Java applications,  which are then compiled to Java bytecode before being translated for  running on Android&#39;s Dalvik Virtual Machine (VM). &lt;br /&gt;
&lt;br /&gt;
Google claims  their Dalvik VM runs more efficiently in terms of speed and memory  tradeoffs than Java -- slyly suggesting that Google wrote their own VM  for performance reasons.  However, while we haven&#39;t seen supporting  data, we suppose Google really created Dalvik to escape from needing to  cede control or pay a license fee to Sun, the creator and steward of the  Java platform.&lt;br /&gt;
&lt;br /&gt;
By translating from Java to Dalvik bytecode,  Google is able to leverage the mature tools and large existing community  of Java developers.  The downside is that developers will need to take  the additional step of running the Google translation tool on their  compiled Java code before their application will run on an Android phone  (Google automates this step in their Android Eclipse plug-in, however).&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; hspace=&quot;10&quot; src=&quot;http://www.linuxfordevices.com/files/misc/android-emulator_176x340.png&quot; vspace=&quot;5&quot; width=&quot;165&quot; /&gt;&lt;br /&gt;
&lt;b&gt;Android emulator screenshot&lt;/b&gt;&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
Google  also provides an Android emulator.  The emulator is a virtualized ARM  microprocessor that runs the same system code -- and almost exactly the  same Linux kernel -- that runs on a device.  Google provides an Eclipse  add-on so that Android programs can be compiled and debugged in Eclipse  while running in their emulator.  The Android emulator is as complete an  emulator as we have ever seen -- just make sure your developers have  enough RAM in their PCs to be able to run Eclipse and the emulator  together.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So what&#39;s in it for Google?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Google has  given mobile phone manufacturers everything they want -- a free, open,  mobile operating system -- and, in return, only asked that the devices  they create can run Android applications.  We can only speculate that  Google expects to eventually earn more from consumers using Google  services on Android devices than it costs Google to develop and maintain  Android.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Overview of the Nokia N810&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We work with  embedded Linux systems at NthCode, so we thought it would be a fun  challenge (and would help with a project we&#39;re working on) if we could  port Android to an existing Linux device.&lt;br /&gt;
&lt;br /&gt;
Luckily, we already had  two Nokia N810 Internet Tablets in the office.  The N810 is a handheld  mobile device that comes with a high-resolution 4.1-inch touch screen  and a slide-out QWERTY keyboard.  The N810 has a 400 MHz Texas  Instruments OMAP 2420 CPU, 128MB RAM, and WiFi networking. The one thing  the N810 can&#39;t do is make phone calls -- this is why Nokia markets it  as an Internet Tablet that can surf the web, rather than a phone.  At  the time of this writing, the N810 costs about USD $425.&lt;br /&gt;
&lt;br /&gt;
An  active community of enthusiasts enjoys hacking the N810&#39;s Linux-based  software.  While some of those enthusiasts had already ported a  pre-release version of the Android SDK to the N810, we discovered that  no one had yet ported the Android 1.0 release to it.  So we decided to  see how long it would take us, and what we could learn in the process.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Development steps&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As  mentioned earlier, the Android system software runs on top of a Linux  kernel.  This Linux kernel provides services to applications -- such as  file access, process scheduling, and inter-process communication.&lt;br /&gt;
&lt;br /&gt;
Google  made a number of modifications to the standard Linux kernel for  Android.  Likewise, Nokia modified the standard Linux kernel to support  their hardware, such as the keypad, touch screen, and file system.&lt;br /&gt;
&lt;br /&gt;
We  quickly discovered that Nokia&#39;s N810 changes are made against an  earlier 2.6.21 Linux kernel.  And, unlike earlier Android prereleases,  the Android 1.0 modifications are made against a later 2.6.25 Linux  kernel.  We investigated and discovered that between these two versions,  a year had elapsed and the Linux community had made thousands of  changes to kernel source code.&lt;br /&gt;
&lt;br /&gt;
So, to make both Nokia&#39;s and  Google&#39;s modifications work together on the N810 we either needed to  port the N810 changes to work on the newer 2.6.25 Linux kernel, or port  the Android changes to the N810&#39;s earlier 2.6.21 Linux kernel. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What did Google change in the kernel?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We  checked the differences between the Android kernel and the standard  Linux kernel and found that Google had changed 75 files and added an  additional 88.  We have prepared an annotated list of changed files at  the end of this document, and a brief summary here.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Goldfish -- 44 Files&lt;/b&gt;  -- The Android emulator runs a virtual CPU that Google calls Goldfish.   Goldfish executes ARM926T instructions and has hooks for input and  output -- such as reading key presses from or displaying video output in  the emulator.&lt;br /&gt;
&lt;br /&gt;
These interfaces are implemented in files specific  to the Goldfish emulator and will not be compiled into a kernel that  runs on real devices.  So we safely ignored these files in our work.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;YAFFS2 -- 35 Files&lt;/b&gt;  -- Unlike PCs, which store files on disks, mobile phones store files in  sold-state flash memory chips.  The HTC G1 uses NAND flash, a type of  flash memory that is becoming more popular due to its combination of  high density and low cost.  &lt;br /&gt;
&lt;br /&gt;
YAFFS2 is an acronym for &quot;Yet  Another Flash File System, 2nd edition.&quot; It provides a high-performance  interface between the Linux kernel and NAND flash devices. YAFFS2 was  already freely available for Linux.   However, it is not part of the  standard 2.6.25 Linux kernel, and so Google added it to Android.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Bluetooth -- 10 files&lt;/b&gt;  -- Google made changes to 10 files in the Bluetooth communications  stack.  These changes fix apparent bugs related to Bluetooth headsets,  and add Bluetooth debugging and access control functions.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Scheduler -- 5 files&lt;/b&gt;  -- The Android kernel also contains slight changes to the CPU process  scheduler and time-keeping algorithms.  We don&#39;t know the history of  these changes, and the impact was not evident based on a cursory  examination.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;New Android Functionality -- 28 files&lt;/b&gt;  -- In addition to bug fixes and other small changes, Android contains a  number of new subsystems that are worth mentioning here, including the  following:&lt;ul&gt;&lt;li&gt;&lt;b&gt;IPC Binder&lt;/b&gt; -- The IPC Binder is an  Inter-Process Communication (IPC) mechanism.  It allows processes to  provide services to other processes via a set of higher-level APIs than  are available in standard Linux.  An Internet search indicated that the  Binder concept originated at Be, Inc., and then made its way into Palm&#39;s  software, before Google wrote a new Binder for Android.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Low Memory Killer&lt;/b&gt;  -- Android adds a low-memory killer that, each time it&#39;s called, scans  the list of running Linux processes, and kills one.  It was not clear in  our cursory examination why Android adds a low-memory killer on top of  the already existing one in the standard Linux kernel.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Ashmem&lt;/b&gt;  -- Ashmem is an Anonymous SHared MEMory system that adds interfaces so  processes can share named blocks of memory. As an example, the system  could use Ashmem to store icons, which multiple processes could then  access when drawing their UI.  The advantage of Ashmem over traditional  Linux shared memory is that it provides a means for the kernel to  reclaim these shared memory blocks if they are not currently in use.  If  a process then tries to access a shared memory block the kernel has  freed, it will receive an error, and will then need to reallocate the  block and reload the data.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;RAM Console and Log Device&lt;/b&gt;  -- To aid in debugging, Android adds the ability to store kernel log  messages to a RAM buffer.  Additionally, Android adds a separate logging  module so that user processes can read and write user log messages. &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Android Debug Bridge&lt;/b&gt;  -- Debugging embedded devices can best be described as challenging. To  make debugging easier, Google created the Android Debug Bridge (ADB),  which is a protocol that runs over a USB link between a hardware device  running Android and a developer writing applications on a desktop PC. &lt;br /&gt;
&lt;br /&gt;
Android  also adds a new real-time clock, switch support, and timed GPIO  support.  We list the impacted files for these new modules at the end of  this document.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Power Management -- 5 files&lt;/b&gt;  -- Power management is one of the most difficult pieces to get right in  mobile devices, so we split it out into a group separate from the other  pieces.  It&#39;s interesting to note that Google added a new power  management system to Linux, rather than reuse what already existed.  We  list the impacted files at the end of this document.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Miscellaneous Changes -- 36 files&lt;/b&gt;  -- In addition to the above, we found a number of changes that could  best be described as, &#39;Miscellaneous.&#39;  Among other things, these  changes include additional debugging support, keypad light controls, and  management of TCP networking.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;NetFilter -- 0 files&lt;/b&gt;  -- Finally, our change list showed Netfilter as having 22 changed  files.  However, examination showed the only difference was the  capitalization of the filenames (xt_DSCP.c vs. xc_dscp.c).  The contents  of the files were all identical.  So we ignored these files in our  port.&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Port the N810 changes forward or the Android changes backward?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As  you can see from the above, Android makes significant changes to the  standard Linux kernel.  Additionally, Google&#39;s system software checks to  make certain the kernel version is 2.6.25 or newer.  This led us to  wonder if Android requires features in the standard 2.6.25 Linux kernel  that are not in earlier releases. &lt;br /&gt;
&lt;br /&gt;
On the other hand, the N810  kernel changes were only to add hardware support.  Nokia did not change  core operating system services or add new interfaces.  &lt;br /&gt;
&lt;br /&gt;
We decided that we would have a higher chance of success by porting the N810 changes forward to the 2.6.25 Linux kernel.&lt;br /&gt;
&lt;br /&gt;
So, without further ado...&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1: Port the N810 kernel changes to the 2.6.25 Linux kernel&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This work took one developer seven days to complete, and included the following steps:&lt;ul&gt;&lt;li&gt;Downloaded the latest Linux-OMAP-2.6 kernel from Montavista&lt;/li&gt;
&lt;li&gt;Selected the 2.6.25 version from the kernel download (used &#39;git reset --hard v2.6.25-omap1&#39;))&lt;/li&gt;
&lt;li&gt;Patched the 2.6.25 kernel with the following patches from the N810&#39;s 2.6.21 kernel:&lt;ul&gt;&lt;li&gt;N810 Multi Media Card (MMC) driver&lt;/li&gt;
&lt;li&gt;N810 I2C serial bus controller chip driver&lt;/li&gt;
&lt;li&gt;N810 touch screen driver&lt;/li&gt;
&lt;li&gt;N810 keyboard mapping&lt;/li&gt;
&lt;li&gt;N810 audio and video DSP driver&lt;/li&gt;
&lt;li&gt;N810 DMA driver&lt;/li&gt;
&lt;li&gt;N810 board revision patch&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;After  a number of software build/flash/test/debug cycles, our new kernel was  able to boot the N810&#39;s default software and function well.&lt;br /&gt;
&lt;br /&gt;
One  issue we did have is that the kernel driver for the CX3110 WiFi chip is  provided as a binary-only kernel module, not source code that we could  recompile on the new kernel.  This meant that we were not able to make  our new kernel support WiFi on the N810.&lt;br /&gt;
&lt;br /&gt;
This is an important  note for those trying to do similar ports: if you have binary-only  drivers, make sure they&#39;ve been compiled against the kernel baseline  that you plan to use.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2: Add the Android kernel patches to the 2.6.25 N810 Linux kernel&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
With  our new N810 Linux kernel up and running, we could now apply the  Android patches.  This was mostly straightforward and took one developer  two and a half days of applying patches, flashing the kernel, and  verifying the patches worked.&lt;br /&gt;
&lt;br /&gt;
If you are using a kernel baseline  different from the one in the Android SDK, you should plan to spend more  time and resources to make it work correctly. &lt;br /&gt;
&lt;br /&gt;
Luckily, the  Android and N810 patches do not touch any of the same kernel parts. This  made merging these two change sets much easier.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3: Bring-up Android on our new kernel&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
After  two weeks of patching and testing, we were finally ready to try to boot  the full Android system.  Software development would not be any fun if  everything worked the first time, so, luckily, there were issues (that  is a joke).&lt;br /&gt;
&lt;br /&gt;
Here is the list of what we worked through:&lt;ul&gt;&lt;li&gt;The N810&#39;s jffs2 file system lacked a feature Android needs in the mmap system call&lt;/li&gt;
&lt;li&gt;So we switched to using the ext2 file system, but it reported data corruption&lt;/li&gt;
&lt;li&gt;So we switched to using the ext3 file system, and the corruption went away&lt;/li&gt;
&lt;li&gt;The system hung while booting, and while we were trying to debug, it would reboot&lt;/li&gt;
&lt;li&gt;We discovered the watchdog timer was rebooting the system, so we disabled it&lt;/li&gt;
&lt;li&gt;After that, the system sometimes successfully booted, but the screen was blank&lt;/li&gt;
&lt;li&gt;We could see graphics after we applied a double-buffered video patch to the N810&lt;/li&gt;
&lt;li&gt;After this, we could sometimes boot to the home screen, but the system often crashed&lt;/li&gt;
&lt;li&gt;We recopied some system libraries to the N810, and the crashes went away&lt;/li&gt;
&lt;li&gt;We enabled the touch screen by changing a power setting in the system software&lt;/li&gt;
&lt;li&gt;We enabled the keypad by fixing a keymap file in the system software&lt;/li&gt;
&lt;/ul&gt;And,  finally, afer 19 days, it worked.  The Android robot would show while  powering up, and then we could see the main menu and use the  applications.&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;b&gt;Android 1.0 booting on the N810&lt;/b&gt;&lt;br /&gt;
(Click to play)&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4: Play Around&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This,  of course was the pay off.  If you get this far, we recommend that you  take a photo and email it to your nerdiest friends and colleagues to  show off your accomplishment. &lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;a href=&quot;http://www.linuxfordevices.com/files/misc/n810-android1.jpg&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;161&quot; hspace=&quot;10&quot; src=&quot;http://www.linuxfordevices.com/files/misc/n810-android1-sm.jpg&quot; vspace=&quot;5&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Android 1.0 running on Nokia&#39;s N810 Internet tablet&lt;/b&gt;&lt;br /&gt;
(Click to enlarge)&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Next steps&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We  want to be able to create our own Android applications and run them on  the N810. To do that, we will need to add support for the Android Debug  Bridge, fix an intermittent system crash, and see if we can enable  battery charging when the power supply is plugged in.  Additionally, our  application needs Internet access, so we either need to make the WiFi  chip work, or enable USB Ethernet to send network data through the USB  cable to a host PC, which can then route the N810&#39;s data to the  Internet.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Finishing up&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Before we&#39;re done, we will  release the changes we made back to the Android and N810 communities so  that they can take advantage of the work we have done and have a bit of  fun. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Things to consider in your project&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you&#39;re porting Android to a new device, we recommend you consider the following points:&lt;br /&gt;
&lt;br /&gt;
First,  this is a just a milestone along the way to any kind of shipping  product.  We still have work to do before the N810 will be good enough  for us to develop custom applications.  Likewise, the N810 isn&#39;t a  phone, so we didn&#39;t have to spend time debugging the call stack.  And  then there are the pieces that don&#39;t work -- power management, WiFi,  etc. -- that could all take more time to make work than we spent on this  initial port.  So the hard work is ahead, not behind.&lt;br /&gt;
&lt;br /&gt;
Second,  the N810 is a shipped commercial product that has gone through Nokia&#39;s  strenuous quality control processes and is well loved by lots of  hackers.  We have worked on other projects with flakey hardware and no  vendor support (yeah, that was a huge mistake -- and it was made even  worse by doing it fixed-bid).  If you are porting Android to your own  hardware, be sure to factor time and resources into dealing with  hardware risks.  We highly recommend that you make sure there are  software people assigned to making the hardware drivers work.&lt;br /&gt;
&lt;br /&gt;
Third,  figure out which baseline kernel version you will use at the start.   This way, you can verify or add tasks for making sure your hardware has  the kernel drivers developed for that version of the Linux kernel.  And  since an outside vendor often provides binary drivers, make certain that  you will have those drivers compiled against your Linux kernel when you  need them.&lt;br /&gt;
&lt;br /&gt;
Fourth, use the right tools and processes --  preferably the same ones that the Linux and Android developers use.   We&#39;ve worked with big companies who import open-source software into  closed-source development models.  While this makes it easier to get  started, these teams later pay a price when they are not able to easily  merge new versions of open-source software into their code base.   Additionally, if your developers want to use Windows at all, we  recommend you push them out of their cocoon and into the Linux world.  A  highly effective team would be one running Linux on their desktop, git  for source control, and vim or emacs to edit &#39;C&#39; code. &lt;br /&gt;
&lt;br /&gt;
Finally,  assemble the right team.  While we&#39;re new to Android, we&#39;ve been hacking  embedded Linux systems for a long time.  So check your teams&#39;  experience and plan accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Saying thanks&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
First,  I&#39;d like to thank Tang Yongjun, the NthCode developer who actually  ported Android to the N810.  I don&#39;t know that I would have been as  patient as he was.&lt;br /&gt;
&lt;br /&gt;
He and I would both like to also thank  PenguinBait, B-man, and QWERTY-12 (yes, awesome names), who made the  original port of the pre-release Android SDK to the N810.  We were able  to follow many of their steps to make our port of the Android 1.0  release easier.&lt;br /&gt;
&lt;br /&gt;
Finally, this is a living document.  If you  spotted a mistake, or think others would benefit some piece of piece of  information we don&#39;t have here, please email me so I can consider the  change.&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;&lt;br /&gt;
&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
We have placed our kernel  patch, a complied kernel image, a compiled userspace image, and a few  notes at the following SourceForge.Net page: &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=246840&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Android-N810 Downloads&lt;/u&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Appendices&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.linuxfordevices.com/files/misc/porting-android-to-a-new-device-p3.html&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Annotated index of Android kernel source diffs&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Resources &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Apache_license&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Apache Open Source License&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/GNU_General_Public_License&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;GPL License&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=log;t=7&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Montavista&#39;s Linux-OMAP Repository&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.internettablettalk.com/forums/showthread.php?t=21495&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;The Original Android N810 port&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://elinux.org/Android_on_OMAP&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Elinux.org&#39;s Wiki for Android on OMAP&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://wiki.maemo.org/Updating_the_tablet_firmware&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Maemo Wiki About Updating N810 Firmware&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;This paper was originally published by &lt;a href=&quot;http://www.nthconde.com/&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;NthCode&lt;/u&gt;&lt;/a&gt;, &lt;a href=&quot;http://www.nthcode.com/pubs/porting-android-to-a-new-device.html&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;here&lt;/u&gt;&lt;/a&gt;. It is reproduced with permission. &lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linuxfordevices.com/files/misc/nthcode_team_437x284.jpg&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;img align=&quot;left&quot; border=&quot;0&quot; hspace=&quot;10&quot; src=&quot;http://www.linuxfordevices.com/files/misc/peter_mcdermott-thm.jpg&quot; vspace=&quot;5&quot; /&gt;&lt;/a&gt;&lt;b&gt;About the author&lt;/b&gt;  -- Beijing resident and American expatriate Peter McDermott founded  NthCode in 2005 to tap into the talent he saw in his Chinese co-workers  while creating some of the world&#39;s first Linux-powered mobile phones.  Peter enjoys running NthCode to this day and maintains a personal  weblog, &lt;a href=&quot;http://beijinga2d.com/&quot; rel=&quot;nofollow&quot; target=&quot;new&quot;&gt;&lt;u&gt;Beijing Analog to Digital&lt;/u&gt;&lt;/a&gt; where he discusses technology, business, and life in Beijing. Click the photo at left for an NthCode staff photo.&lt;/span&gt;&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/porting-android-to-new-device.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1983061815697767869.post-8040523903020334013</guid><pubDate>Tue, 19 Apr 2011 07:56:00 +0000</pubDate><atom:updated>2011-04-19T00:56:46.918-07:00</atom:updated><title>This overview of porting steps was seen on the android-porting list:</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This overview of porting steps was seen on the android-porting list:&lt;br /&gt;
See &lt;a class=&quot;external free&quot; href=&quot;http://www.mail-archive.com/android-porting@googlegroups.com/msg06721.html&quot; rel=&quot;nofollow&quot;&gt;http://www.mail-archive.com/android-porting@googlegroups.com/msg06721.html&lt;/a&gt; &lt;br /&gt;
This glosses over all the kernel work for a new board, and the android-specific kernel patches, but has some good discussion about the flash partitioning and file system bringup process. &lt;br /&gt;
&lt;pre&gt;If the linux kernel is up and running with all drivers in.
(particularly touchscreen and display) it shouldn&#39;t be too bad.

IHMO, the easiest way to get you running is to aggregate the initial
ramfs built into the kernel with the Android build, the root Android
root filesystem (system), and the user data section (mounted as /data
I believe) into one root filesystem.

You can then take that root filesystem as one tarball.

Modify the NAND partitioning of the kernel to set aside space for the
whole Android rootfs, and of course rebuild the kernel. (Be sure yaffs
support is in the kernel) Also no need for a ramfs at this point, just
have the kernel look to mtd2 for it&#39;s root filesystem, which will be
jffs2

Create yourself a busybox root filesystem too. Make that into a jffs2
image.

So your partitioning would look something similar to this (you&#39;ll have
to decide on the sizes of course):
mtd0: bootloader
mtd1: kernel
mtd2: rootfs (jffs2)
mtd3: Android rootfs.

Erase everything on the NAND.
Burn the normal Chumby bootloader to mtd0.
Burn the the new kernel into mtd1.
Burn the jffs2 rootfs image to mtd2.

Boot the device. Hopefully you get yourself to a prompt.

Once you have that prompt mount mtd3 to /mnt/android as a yaffs2
partition.
Untar your Android rootfs into /mnt/android.
Chown and chgrp everything under /mnt/android to &quot;root&quot;
chroot to that mount point &quot;chroot /mnt/android /init&quot;

At this point you should see Android trying to run.


I know that&#39;s a bit to chomp on, but it&#39;s more of an outline of what
you will need to do. Of course it&#39;s assuming you have the ability to
erase the whole nand and put down images amongst other assumptions,
but it should help get your mind around a little bit of the
requirements to get Android running on your device.

Regarding your bootloader question, I&#39;d just stick with the current
one. You&#39;ll only need to modify that if/when you go into having
everything compatible with the recovery system. Which is a completely
different discussion.&lt;/pre&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Porting&amp;amp;action=edit&amp;amp;section=2&quot; title=&quot;Edit section: Porting Tutorials&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Porting_Tutorials&quot;&gt; Porting Tutorials &lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Porting-Android-to-a-new-device/&quot; rel=&quot;nofollow&quot;&gt;Porting Android to a new Device&lt;/a&gt; - excellent and thorough paper on porting Android to the Nokia N810. &lt;ul&gt;&lt;li&gt; Has a detailed list of kernel changes and annotated diffs. &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt; &lt;a class=&quot;external free&quot; href=&quot;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget&quot; rel=&quot;nofollow&quot;&gt;http://wiki.kldp.org/wiki.php/AndroidPortingOnRealTarget&lt;/a&gt; &lt;/li&gt;
&lt;li&gt; &lt;a href=&quot;http://elinux.org/Android_on_OMAP&quot; title=&quot;Android on OMAP&quot;&gt;Android on OMAP&lt;/a&gt; - excellent tutorial covering lots of different issues for porting Android to platforms based on the TI OMAP (ARM) processor &lt;/li&gt;
&lt;li&gt; Some cursory notes on a port to a PXA board are at: &lt;a class=&quot;external free&quot; href=&quot;http://letsgoustc.spaces.live.com/blog/cns%2189AD27DFB5E249BA%21320.entry&quot; rel=&quot;nofollow&quot;&gt;http://letsgoustc.spaces.live.com/blog/cns!89AD27DFB5E249BA!320.entry&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Porting&amp;amp;action=edit&amp;amp;section=3&quot; title=&quot;Edit section: Porting Issues&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Porting_Issues&quot;&gt; Porting Issues &lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt; Matt Porter (Mentor Graphics) gave a presentation on  difficulties encountered while they were porting Android to MIPS and PPC  processors at &lt;a class=&quot;external text&quot; href=&quot;http://www.embeddedlinuxconference.com/elc_europe09/index.html&quot; rel=&quot;nofollow&quot;&gt;ELC Europe 2009&lt;/a&gt;. His talk was called &quot;Mythbusters: Android&quot; and has lots of good information. &lt;ul&gt;&lt;li&gt; See &lt;a class=&quot;internal&quot; href=&quot;http://elinux.org/images/2/2d/Mythbusters_Android.pdf&quot; title=&quot;Mythbusters Android.pdf&quot;&gt;Mythbusters_Android.pdf&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt; &lt;a class=&quot;external text&quot; href=&quot;http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/porting-guide.html;hb=HEAD&quot; rel=&quot;nofollow&quot;&gt;Dalvik porting guide&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;[&lt;a href=&quot;http://elinux.org/index.php?title=Android_Porting&amp;amp;action=edit&amp;amp;section=4&quot; title=&quot;Edit section: Porting to New Processors&quot;&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class=&quot;mw-headline&quot; id=&quot;Porting_to_New_Processors&quot;&gt; Porting to New Processors &lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt; Mentor Graphics has ported Android to MIPS and PPC &lt;/li&gt;
&lt;li&gt; Power.Org supported the work to port Android to PPC &lt;ul&gt;&lt;li&gt; Nina Wilner talked about this work, and gave a demo at ELC Europe 2009 &lt;/li&gt;
&lt;li&gt; see &lt;a class=&quot;internal&quot; href=&quot;http://elinux.org/images/0/07/Android_On_Power.pdf&quot; title=&quot;Android On Power.pdf&quot;&gt;Android_On_Power.pdf&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><link>http://android-porting-on-devices.blogspot.com/2011/04/this-overview-of-porting-steps-was-seen.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item></channel></rss>