<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.openmoko.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=RzR&amp;feedformat=atom</id>
		<title>Openmoko - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=RzR&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Special:Contributions/RzR"/>
		<updated>2013-05-26T05:33:39Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.6</generator>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2012-07-07T17:03:33Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contact: http://rzr.online.fr/contact.htm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[boxar]] : Download and check video at : http://rzr.online.fr/q/esd&lt;br /&gt;
* [[Mer]] : download bootable image : http://wiki.openmoko.org/wiki/Mer&lt;br /&gt;
* [[Arkanae]] : http://rzr.online.fr/q/pygame&lt;br /&gt;
&lt;br /&gt;
By the way I am available for linux mobile professional services :&lt;br /&gt;
&lt;br /&gt;
http://rzr.online.fr/job.htm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tags: [[Maemo]] [[Mer]] [[Meego]] [[Android]] [[FreeRunner]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Development_with_Eclipse</id>
		<title>Development with Eclipse</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Development_with_Eclipse"/>
				<updated>2009-11-16T11:07:12Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* On the 8 of november it seems that its not working */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages| Development with Eclipse}}&lt;br /&gt;
A graphical Openmoko application is a gnome-based X application. Hence it is usually easy to build, run and debug it as program for the desktop computer, uploading to the mobile phone only for the final stage of debugging. Even from the mobile phone, it is possible execute the program on the phone and still use the screen, mouse and keyboard of the desktop computer to observe its work. This article describes instructions for Debian, but they will likely work with any non broken Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Eclipse recently has the C/C++ development plug-in. You will need the recent Eclipse, this plug-in and you may need to upgrade the GTK development packages. The easiest way to get the simple application running is to create the managed C project and add `pkg-config --cflags --libs gtk+-2.0` both to the compiler options and to linker flags. After that, go to [http://library.gnome.org/devel/gtk-tutorial/stable/ GTK tutorial] and try, using it, to compose a simple application.&lt;br /&gt;
&lt;br /&gt;
This approach not only shortens development cycle from minutes to seconds, but also allows to use the Eclipse debugger for C development, stepping through the code and watching variables.&lt;br /&gt;
&lt;br /&gt;
The executable for the mobile phone can usually be produced from the same source files using the Openmoko toolchain. As all surroundings of these files for Eclipse and Openmoko project are not the same, the most straightforward approach is just to set two development environments and put the symbolic links of the source files into the Openmoko project directory.&lt;br /&gt;
&lt;br /&gt;
After producing the Openmoko executable, it may be reasonable to try it via X, using the keyboard, mouse and screen of the desktop computer. All you need is to use the  -X option in the ssh command when you log in into the connected mobile phone. After that, you should be able to run the application inside the phone but have its X window on a screen of the desktop machine. This way you can check the actual execution speed and have access to the mobile phone devices that are not present on PC.&lt;br /&gt;
&lt;br /&gt;
Eclipse allows to add the custom builder to the project. These builders can be either Ant scripts or the executable shell scripts. These possibilities can be used to force the Openmoko toolchain to produce the phone executable without leaving the Eclipse IDE.&lt;br /&gt;
&lt;br /&gt;
== Set up Freerunner build Config ==&lt;br /&gt;
&lt;br /&gt;
# install [[Toolchain]]&lt;br /&gt;
# open 'Properties' for your C or C++ Project&lt;br /&gt;
# select 'C/C++ Build'-&amp;gt;'Tool Settings'&lt;br /&gt;
# click on 'Configuration'-&amp;gt;'Manage' and create new configuration eg. Freerunner (copy settings from 'Relase' configuration)&lt;br /&gt;
# change GCC C||C++||Assembler Compiler command to /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/gcc||g++||as&lt;br /&gt;
# change GCC Linker Command to /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/gcc (g++ for C++ project)&lt;br /&gt;
# go to 'Build Steps' and add &amp;quot;. /usr/local/openmoko/arm/setup-env&amp;quot; to 'Pre-build step'&lt;br /&gt;
# click Ok and select 'Freerunner' in 'Active Build Configuration' for your Project&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Notes about Eclipse Ganymed (3.4)&lt;br /&gt;
&lt;br /&gt;
There are three places where you have to change settings as above in Project Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Tool Settings&lt;br /&gt;
#GCC C Compiler -&amp;gt; Command: /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/gcc&lt;br /&gt;
#GCC C Linker -&amp;gt; Command: /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/gcc&lt;br /&gt;
#GCC Assembler -&amp;gt; Command: /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/gcc||g++||as&lt;br /&gt;
&lt;br /&gt;
--[[User:Perty|Perty]] 20:22, 18 September 2008 (UTC)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can copy your binary to Freerunner by adding Post-Build command in 'Build Steps' eg.&lt;br /&gt;
&lt;br /&gt;
scp ${project_name} root@neo:/home/root/dev_app/&lt;br /&gt;
&lt;br /&gt;
or you can Run you application on Freerunner by adding Run configuration&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
C/C++ Application: /usr/bin/ssh&lt;br /&gt;
Arguments: root@neo &amp;quot;cd dev_app &amp;amp;&amp;amp; DISPLAY=:0 ./${project_name}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:PipBoy2000|PipBoy2000]] 22:30, 9 September 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Set up Eclipse for development with Qt4==&lt;br /&gt;
&lt;br /&gt;
=== On the 8 of November it seems that its not working ===&lt;br /&gt;
&lt;br /&gt;
This method has been tried on various distributions and it didn't worked, if you get it working please tell how you've done it and remove this message ...&lt;br /&gt;
If you have others method to cross compile for the 2008.x in Qt4/c++ let us know !&lt;br /&gt;
&lt;br /&gt;
I realized this with Xubuntu Hardy in an VirtualBox and using it to compile binaries for [[FSO]] and now [[SHR]].&lt;br /&gt;
&lt;br /&gt;
So it's possible to upload it somewhere for everyone. Do somebody know where??&lt;br /&gt;
Havn't tried to compile ipk-packages with this method, just binaries.&lt;br /&gt;
What exactly didn't work? If somebody has questions just ask on the Community Mailing list, I'll try to help.&lt;br /&gt;
&lt;br /&gt;
yes, it should be great if you share you virtual machine ... we have to find a place !&lt;br /&gt;
I'm now developing under [[debian]] (who has every development libraries ), waiting a way to compile for [[FSO]]&lt;br /&gt;
&lt;br /&gt;
===Set up Environment with Libraries===&lt;br /&gt;
&lt;br /&gt;
*install [[Toolchain]]&lt;br /&gt;
&lt;br /&gt;
*install Eclipse with C/C++ development plug-in&lt;br /&gt;
&lt;br /&gt;
*add the Anstrom Repository to the '''Host'''-toolchain and also to the '''FreeRunner'''&lt;br /&gt;
**add Anstrom Repository to '''Host'''-toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;echo arch base 50 &amp;gt;&amp;gt; /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/etc/opkg.conf&lt;br /&gt;
echo src/gz base http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base &amp;gt;&amp;gt; /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/etc/opkg.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
then..&lt;br /&gt;
&amp;lt;pre&amp;gt;opkg-target update&lt;br /&gt;
opkg-target install libgcc1 libglib-2.0-0 libgmodule-2.0-0 libgobject-2.0-0 libgthread-2.0-0 libpng12-0 libqt3support4 libqtassistantclient4 libqtclucene4 libqtcore4 libqtdbus4 libqtdesigner4 libqtdesignercomponents4 libqtgui4 libqthelp4 libqtnetwork4 libqtscript4 libqtsql4 libqtsvg4 libqttest4 libqtxml4 libstdc++6 qt4-assistant qt4-common qt4-dbus qt4-demos qt4-designer qt4-fonts qt4-linguist qt4-pixeltool&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
opkg-target install qt4-x11-free-dev qt4-designer qt4-assistant // doesn't work there are some depency problems with x11-free packages so all the libs must be installed seperately (next line)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;opkg-target install libqt3support-dev libqtassistantclient-dev libqtclucene-dev libqtcore-dev libqtdbus-dev libqtdesigner-dev libqtdesignercomponents-dev libqtgui-dev libqthelp-dev libqtnetwork-dev libqtscript-dev libqtsql-dev libqtsvg-dev libqttest-dev libqtuitools4-dev libqtxml-dev libglib-2.0-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Add Qtlibs also to the '''FreeRunner''' :&lt;br /&gt;
&amp;lt;pre&amp;gt;opkg update&lt;br /&gt;
opkg -force-depends install  http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libqtgui4_4.4.3-r4.1_armv4t.ipk&lt;br /&gt;
opkg -force-depends install  http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libqtcore4_4.4.3-r4.1_armv4t.ipk&lt;br /&gt;
opkg -force-depends install  http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libqtdbus4_4.4.3-r4.1_armv4t.ipk&lt;br /&gt;
opkg -force-depends install  http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libqtxml4_4.4.3-r4.1_armv4t.ipk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Eclipse Project===&lt;br /&gt;
Project - right click - Properties --&amp;gt; C/C++ Build -- Tab &amp;quot;Tool Settings&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Configuration: Debug====&lt;br /&gt;
&lt;br /&gt;
*GCC c++ compiler -&amp;gt; Directories --- add&lt;br /&gt;
 /usr/include/qt4&lt;br /&gt;
 /usr/include/qt4/QtGui&lt;br /&gt;
 /usr/include/qt4/QtDBus&lt;br /&gt;
 /usr/include/qt4/QtCore&lt;br /&gt;
&lt;br /&gt;
*GCC C++ Linker -&amp;gt; Libraries ---add&lt;br /&gt;
**Libraries (-l):    &lt;br /&gt;
 QtCore&lt;br /&gt;
 QtGui&lt;br /&gt;
 QtDBus&lt;br /&gt;
**Library search path (-L):&lt;br /&gt;
 /usr/lib&lt;br /&gt;
** On Gentoo: /usr/lib/qt4&lt;br /&gt;
&lt;br /&gt;
====Configuration: Freerunner====&lt;br /&gt;
&lt;br /&gt;
Project - right click - Properties --&amp;gt; C/C++ Build -- Tab &amp;quot;Tool Settings&amp;quot;&lt;br /&gt;
&lt;br /&gt;
create Configuration &amp;quot;Freerunner&amp;quot;:&lt;br /&gt;
click on 'Configuration'-&amp;gt;'Manage' and create new configuration eg. Freerunner (copy settings from 'Relase' configuration)&lt;br /&gt;
&lt;br /&gt;
*GCC C++ Compiler&lt;br /&gt;
**Command: /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/g++&lt;br /&gt;
*GCC C++ Compiler -&amp;gt; Directories&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/qt4/QtCore&lt;br /&gt;
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/qt4/QtGui&lt;br /&gt;
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/qt4/QtDBus&lt;br /&gt;
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/qt4&lt;br /&gt;
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/c++/4.1.2/arm-angstrom-linux-gnueabi&lt;br /&gt;
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/c++/4.1.2&lt;br /&gt;
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include/c++/4.1.2/backward&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*GCC C++ Linker&lt;br /&gt;
**Command:    /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/g++&lt;br /&gt;
&lt;br /&gt;
*GCC C++ Linker -&amp;gt; Libraries --- add&lt;br /&gt;
**Libraries (-l): &lt;br /&gt;
&amp;lt;pre&amp;gt;QtCore&lt;br /&gt;
QtGui&lt;br /&gt;
QtDBus&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Library search path (-L):    &lt;br /&gt;
 /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/lib&lt;br /&gt;
&lt;br /&gt;
* GCC Assembler&lt;br /&gt;
**Command: /usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/as&lt;br /&gt;
&lt;br /&gt;
go to Tab 'Build Steps' and add &amp;quot;. /usr/local/openmoko/arm/setup-env&amp;quot; to 'Pre-build step'&lt;br /&gt;
&lt;br /&gt;
====workaround to deal with .ui files from Qt-Designer====&lt;br /&gt;
&lt;br /&gt;
mayby somody has a better solution please correct!!&lt;br /&gt;
&lt;br /&gt;
Create a project with properties as mentioned above.&lt;br /&gt;
To Compile your project create a bash-file in your Project-Folder (sed commands are necessary if you're using QtDbus libraries):&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 make clean&lt;br /&gt;
 rm Makefile.sed*&lt;br /&gt;
 qmake-qt4 -project&lt;br /&gt;
 qmake-qt4&lt;br /&gt;
 sed 's/INCPATH       =/INCPATH       = -I\/usr\/include\/qt4\/QtDBus/g' Makefile &amp;gt; Makefile.sed1&lt;br /&gt;
 sed 's/LIBS          = $(SUBLIBS)/LIBS          = $(SUBLIBS) -lQtDBus/g' Makefile.sed1 &amp;gt; Makefile.sed2&lt;br /&gt;
 cp Makefile.sed2 Makefile&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
Run it...then compile your project with Eclipse Configuration &amp;quot;Freerunner&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Developing_with_C%2B%2B_and_Qt</id>
		<title>Developing with C++ and Qt</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Developing_with_C%2B%2B_and_Qt"/>
				<updated>2009-11-16T11:04:22Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* News */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note|This article is way to unify community experience, tips and tricks in order to develop C++ applications based on the QT framework. It's actually incomplete and may be wrong in several parts, please fix and improve!}}&lt;br /&gt;
=Introduction=&lt;br /&gt;
extracted from wikipedia:&lt;br /&gt;
&lt;br /&gt;
''Qt is a cross-platform application development framework, widely used for the development of GUI programs, and also used for developing non-GUI programs such as console tools and servers. Qt is most notably used in KDE, Opera, Google Earth, Skype, Qtopia, Photoshop Elements, VirtualBox and OPIE. It is produced by the Norwegian company Trolltech and developed at its Brisbane office in Australia. Nokia acquired Trolltech on January 28, 2008.''&lt;br /&gt;
&lt;br /&gt;
Applications using Qt should run on 2008.x, FSO/SHR, and Qtopia from Trolltech (on this firmware alternative widget toolkits, as gtk+,  actually do not work, as they need an X server). This makes Qt a good choice to start developing new applications for the Openmoko world.&lt;br /&gt;
&lt;br /&gt;
=Developing with Trolltech/Qt Extended=&lt;br /&gt;
&lt;br /&gt;
''The SDK for the new version 4.4.1 of Ot Extended, formerly known as Qtopia is not ready yet, tarball is available but it lacks updated documentation.''&lt;br /&gt;
&lt;br /&gt;
==Use pre-built SDK==&lt;br /&gt;
&lt;br /&gt;
Trolltech provides good SDK and documentation. You can download the official SDK  [http://sourceforge.net/project/downloading.php?groupname=qpe&amp;amp;filename=qtopia-ficgta01-sdk-4.3.2.iso&amp;amp;use_mirror=osdn here].&lt;br /&gt;
&lt;br /&gt;
It's a VMware based virtual machine you can run with the free vmplayer. This is a ready to go solution. What you get is an .iso image. Mount the iso. There's a readme in there.&lt;br /&gt;
You will need to execute a script &amp;lt;tt&amp;gt;install.sh&amp;lt;/tt&amp;gt;, which will generate several &amp;lt;tt&amp;gt;.vmdk&amp;lt;/tt&amp;gt; files. Afterwards you need to load these into your vmplayer.&lt;br /&gt;
&lt;br /&gt;
The VM is Ubuntu, and comes with a Qtopia SDK (surprise, surprise). Use &amp;lt;tt&amp;gt;krandrtray&amp;lt;/tt&amp;gt; to switch to correct screen resolution. I had to install a new version of VMware to get this running, but unsure if this is really necessary. For the VMware stuff, you might need to have the kernel headers. Remember that Ubuntu calls them ''linux-headers''. Also remember this is Ubuntu, for root access just &amp;lt;tt&amp;gt;sudo command&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Fonts were huge in my version. Use &amp;lt;tt&amp;gt;KMenu -&amp;gt; Settings -&amp;gt; Appearance and Themes -&amp;gt; Fonts&amp;lt;/tt&amp;gt;. Click &amp;lt;tt&amp;gt;Adjust all fonts&amp;lt;/tt&amp;gt;, check &amp;lt;tt&amp;gt;size&amp;lt;/tt&amp;gt;, choose &amp;lt;tt&amp;gt;7&amp;lt;/tt&amp;gt;. Same with &amp;lt;tt&amp;gt;Qt Assistant&amp;lt;/tt&amp;gt;, choose for the menu &amp;lt;tt&amp;gt;Edit -&amp;gt; Font Settings&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Manually build SDK==&lt;br /&gt;
&lt;br /&gt;
If you prefer to dirty your hands and to have a SDK on your host linux system, you may build your Qtopia image, and SDK manually:&lt;br /&gt;
&lt;br /&gt;
TBD, actually refer to the excellent article at [http://blog.wolfman.com/articles/2008/08/27/porting-xgps-to-qtopia-for-the-freerunner]&lt;br /&gt;
&lt;br /&gt;
''n.b. this methods will build applications suitable only for the Qtopia firmware''&lt;br /&gt;
&lt;br /&gt;
=Development with QtCreator (C++ and Qt4)=&lt;br /&gt;
Easy crosscompiling and packaging with [[QtCreator]] IDE&lt;br /&gt;
&lt;br /&gt;
=Development with Eclipse (C++ and Qt4)=&lt;br /&gt;
&lt;br /&gt;
If you like to develop tools with C++ and Qt4 only with the Toolchain, see [[Development with Eclipse]]&lt;br /&gt;
&lt;br /&gt;
=Developing with FSO based images=&lt;br /&gt;
You have to prepare an oe build tree using the makefile at http://downloads.freesmartphone.org, read [[Mokomakefile]] article, install needed tools and type the following commands as a normal unprivileged user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir fso&lt;br /&gt;
cd fso&lt;br /&gt;
wget http://downloads.freesmartphone.org/Makefile&lt;br /&gt;
make setup&lt;br /&gt;
cd fso-unstable&lt;br /&gt;
make create-topdir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You are now ready to build Qt by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
. setup-env&lt;br /&gt;
bitbake qt4-x11-free&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that you'll have staging Qt arm libraries and x86 tools to build your application.&lt;br /&gt;
==Quick instructions for SHR unstable==&lt;br /&gt;
 sudo mkdir -p /oe/shr&lt;br /&gt;
 cd /oe/srh&lt;br /&gt;
 wget http://shr.bearstech.com/Makefile&lt;br /&gt;
 make setup&lt;br /&gt;
 cd shr-unstable&lt;br /&gt;
 . setup-env&lt;br /&gt;
 bitbake qt4-x11-free&lt;br /&gt;
==Using a devshell==&lt;br /&gt;
You may use a modified environment to build your application interactively. At first you have to bitbake the dev shell:&lt;br /&gt;
&amp;lt;pre&amp;gt;bitbake devshell&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now create a text file 'qt-arm.env' as this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OE_TREE=/oe/openmoko-fso/tmp&lt;br /&gt;
. ${OE_TREE}/deploy/glibc/addons/arm-angstrom-linux-gnueabi-openmoko-om-gta02-devshell&lt;br /&gt;
export QMAKESPEC=&amp;quot;${OE_TREE}/cross/armv4t/share/qt4/mkspecs/linux-gnueabi-oe-g++&amp;quot;&lt;br /&gt;
export OE_QMAKE_UIC=&amp;quot;${OE_TREE}/staging/i686-linux/usr/bin/uic4&amp;quot;&lt;br /&gt;
export OE_QMAKE_MOC=&amp;quot;${OE_TREE}/staging/i686-linux/usr/bin/moc4&amp;quot;&lt;br /&gt;
export OE_QMAKE_RCC=&amp;quot;${OE_TREE}/staging/i686-linux/usr/bin/rcc4&amp;quot;&lt;br /&gt;
export OE_QMAKE_CC=$CC&lt;br /&gt;
export OE_QMAKE_CXX=$CXX&lt;br /&gt;
export OE_QMAKE_INCDIR_QT=&amp;quot;${OE_TREE}/staging/armv4t-angstrom-linux-gnueabi/usr/include/qt4/&amp;quot;&lt;br /&gt;
export OE_QMAKE_LINK=$CXX&lt;br /&gt;
export OE_QMAKE_LIBDIR_QT=&amp;quot;${OE_TREE}/staging/armv4t-angstrom-linux-gnueabi/usr/lib&amp;quot;&lt;br /&gt;
export PS1=&amp;quot;\[\033[01;33m\]cross-compile-qt-shell\[\033[01;34m\] \w \$\[\033[00m\] &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
''Set OE_TREE to point to your OE tree path''&lt;br /&gt;
&lt;br /&gt;
Now change your current directory to your qt .pro file path and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
. /path/to/qt-arm.env&lt;br /&gt;
qmake-qt4&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's all! :)))&lt;br /&gt;
&lt;br /&gt;
You may now create an alias or a simple batch like this to deploy and run your application:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
scp arm-executable root@neo-ip:/tmp/&lt;br /&gt;
ssh -Y root@neo-ip &amp;quot;/tmp/executable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to have X11 forwarding or&lt;br /&gt;
&amp;lt;pre&amp;gt;ssh -Y root@neo-ip &amp;quot;DISPLAY=:0 /tmp/executable&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
to launch it on the device display with local stdout/stderr&lt;br /&gt;
&lt;br /&gt;
''consider to enable ssh public authentication''&lt;br /&gt;
&lt;br /&gt;
==Using an OE bitbake recipie==&lt;br /&gt;
If you want to build your application in batch mode you have to create a bitbake .bb recipie file. This is not suitable to fast build/debug cycles but is a necessary step if you want to insert your project in official feed/distributions like angstrom, fso based images, 2008.x and so on. It is a quickway to create a .opkg file too!&lt;br /&gt;
&lt;br /&gt;
A simple skeleton may be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SECTION = &amp;quot;x11/libs&amp;quot;&lt;br /&gt;
PRIORITY = &amp;quot;optional&amp;quot;&lt;br /&gt;
HOMEPAGE = &amp;quot;http://yourproject.org&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;GPL QPL&amp;quot;&lt;br /&gt;
DEPENDS = &amp;quot;qt4x11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SRC_URI = &amp;quot;svn://your_svn_server/some_path;module=trunk;proto=https;rev=xxx&amp;quot;&lt;br /&gt;
&lt;br /&gt;
S = &amp;quot;${WORKDIR}/trunk&amp;quot;&lt;br /&gt;
&lt;br /&gt;
inherit qt4x11&lt;br /&gt;
&lt;br /&gt;
do_configure() {&lt;br /&gt;
${OE_QMAKE_QMAKE}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
do_compile() {&lt;br /&gt;
oe_runmake&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
do_install() {&lt;br /&gt;
install -d ${D}${bindir}&lt;br /&gt;
install -m 0755 your_application_executable ${D}${bindir}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ALLOW_EMPTY = &amp;quot;&amp;quot;&lt;br /&gt;
RDEPENDS_${PN} = &amp;quot;qt4-x11-free&amp;quot;&lt;br /&gt;
FILES_${PN}  =  &amp;quot;${bindir}/your_application_executable&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This assumes you have an svn server for your sources, if not, SRC_URI has to be modified. To point a directory local to the build host you may use&lt;br /&gt;
&lt;br /&gt;
SRC_URI=:///absolute_path_to/source_dir&lt;br /&gt;
and&lt;br /&gt;
S=${WORKDIR}/source_dir&lt;br /&gt;
&lt;br /&gt;
You have to make bitbake knows about your bb file, so edit the file fso/fso-unstable/conf/local.conf and add the following line:&lt;br /&gt;
BBFILES += &amp;quot;/path/to/dir_containing_somename.bb/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can now do:&lt;br /&gt;
bitbake somename&lt;br /&gt;
&lt;br /&gt;
If it compiles fine, you'll find in the tmp/deploy/glibc/ipk/armv4t an ipk package of your application, you may copy it to the device and install usually with opkg.&lt;br /&gt;
&lt;br /&gt;
You may be able to use the FSO framework using the QT dbus module.&lt;br /&gt;
&lt;br /&gt;
=Developing for 2008.x=&lt;br /&gt;
On 2008.x qt library is already shipped in /opt/Qtopia, but there is no staging files you may use to build application against it. This is in discussion, and actually you may use some workarounds.&lt;br /&gt;
&lt;br /&gt;
The first is bitbaking qt4-x11-free with the official [[Mokomakefile]], and proceed as on the FSO section, but you have to load the correct libraries with LD_LIBRARY_PATH before running your application.&lt;br /&gt;
&lt;br /&gt;
The second is to use build tools in the work section of the oetree as they whould be in the staging area (TBD)&lt;br /&gt;
&lt;br /&gt;
To interact with the middleware you should use Qtopia library (note not qt library), but this is undocumented/untested/unconfirmed.&lt;br /&gt;
=Native compilation=&lt;br /&gt;
Native compilation is slow but possible.&lt;br /&gt;
==Debian based==&lt;br /&gt;
This is the fastest way to have a full development environment on the device&lt;br /&gt;
 apt-get install libqt4-dev build-essential&lt;br /&gt;
&lt;br /&gt;
==Gentoo==&lt;br /&gt;
 emerge qt&lt;br /&gt;
but it's very slow, actually binary package cross compilation is not possible.&lt;br /&gt;
==Openembedded based==&lt;br /&gt;
The last time I tried that I was not able to found qmake/uic/moc for the target device, howewer it should be possible trying to unpack qt sources on the device and produce them manually.&lt;br /&gt;
&lt;br /&gt;
=Known issues=&lt;br /&gt;
* on Angstrom/FSO there is no support for sqlite driver, this is discussed on openembedded-devel mailinglist.&lt;br /&gt;
* on FSO aux/power button does not brings up keyPressed events, you have to use FSO dbus Event api&lt;br /&gt;
* on illume if you open/close a dialog the parent window does not return in active state, this would be useful if you want to filter FSO dbus event api based on it (this has to be checked on other windows manager too)&lt;br /&gt;
* with &amp;lt;=480 horizontal screen resolution QMessageBox::* has serious problems, stalling the calling application, reported to qt issue tracker&lt;br /&gt;
* weird painting/font-rendering on ARM platform due to definition of qreal as float, this was signaled to trolltech, waiting for feedbacks&lt;br /&gt;
=Tip and Tricks=&lt;br /&gt;
==Window Managers==&lt;br /&gt;
Here some tips for a good interaction with window managers.&lt;br /&gt;
===Matchbox===&lt;br /&gt;
With common matchbox configuration (e.g. Hackable:1) you'll have:&lt;br /&gt;
* QMainWindow-&amp;gt;show()/showMaximized will show them maximized with visible matchbox-panel&lt;br /&gt;
* QMainWindow-&amp;gt;showFullscreen() will show them fullscreen, with hided matchbox-panel&lt;br /&gt;
* QDialog-&amp;gt;show()/showFullScreen will be showed normally, centered and with a drag&amp;amp;close titlebar&lt;br /&gt;
* QDialog-&amp;gt;showMaximized() will be showed maximized and with titlebar, the last will cover matchbox-panel&lt;br /&gt;
* QWidget's behaviour is the same of QMainWindow&lt;br /&gt;
&lt;br /&gt;
QDialog issues:&lt;br /&gt;
* Creating an unparented QDialog will create an &amp;quot;always on top&amp;quot; window!, if you have a top level widget showed too and switch to another application, you cannot switch to it again until the QDialog is closed.&lt;br /&gt;
&lt;br /&gt;
''So, use always QMainWindow/QWidget for creating the main application form, use QDialog (always parented) for simple user interaction (yes/ok/no/close/messages etc.), and QWidget to show application subwindows and customized maximized dialogs.''&lt;br /&gt;
&lt;br /&gt;
''Use setWindowModality if you want to emulate a QDialog with a Top Level QWidget''&lt;br /&gt;
===Illume===&lt;br /&gt;
* QMainWindow/QDialog/QWidget-&amp;gt;show()/showMaximized will show them maximized with visible illume top bar&lt;br /&gt;
* QMainWindow/QDialog/QWidget-&amp;gt;showFullscreen() will show them fullscreen, with hided illume top bar&lt;br /&gt;
&lt;br /&gt;
How to show not fullscreen QDialog (as on matchbox?)&lt;br /&gt;
&lt;br /&gt;
=News=&lt;br /&gt;
&lt;br /&gt;
* 16 October 2008, openembedded repository was updated, the preferred version of Qt in &amp;quot;openmoko&amp;quot; distro (used by fso) is 4.4.1&lt;br /&gt;
* 16 October 2008, openembedded version bump from 4.4.1 to 4.4.3&lt;br /&gt;
* 17 March 2009, qt 4.5.0 emerged fine on my gentooized freerunner :) this release is faster, let's wait for a bump version in [[openembedded]] too.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GSM_network_registration</id>
		<title>GSM network registration</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GSM_network_registration"/>
				<updated>2009-11-16T10:29:25Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We'd like to know the real network registration status by our NEO devices in the world.  Please provide some information about your NEO status!  The question list as below:&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
1. What NEO device you are using? [[GTA01]] or [[GTA02]].&lt;br /&gt;
&lt;br /&gt;
2. Where is your location and what is your network provider? eg. T-Mobile, San Francisco in USA.&lt;br /&gt;
&lt;br /&gt;
3. When you boot the NEO, how long it takes to register the network? eg. in normal case, it should be able to register to a network in 1~2 minutes immediately.&lt;br /&gt;
&lt;br /&gt;
4. What is your GSM firmware version? You can get this number by an AT command. Using [[USB_Networking|SSH]] to connect to your NEO, then type these commands:&lt;br /&gt;
&lt;br /&gt;
  root@fic-gta02:~# [[Gsmd|libgsmd-tool]] -m atcmd&lt;br /&gt;
  AT+CGMR&lt;br /&gt;
  STR=`AT+CGMR'&lt;br /&gt;
  RSTR=`+CGMR: &amp;quot;HW: GTA02BV5, GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko6&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
5. What is your [[IMEI]] code? Check by using this [[Hardware:AT Commands|AT command]] like previous steps.&lt;br /&gt;
  AT+CGSN&lt;br /&gt;
  STR=`AT+CGSN'&lt;br /&gt;
  RSTR=`+CGSN: 000000000000000'&lt;br /&gt;
&lt;br /&gt;
6. if NEO takes over 3 minutes to register to the network or it just re-register to the network again and again. Please attach your gsm log file ('/tmp/gsm.log') to our bugzilla, we already created a bug for [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1024 this issue].&lt;br /&gt;
&lt;br /&gt;
(#4 and #5 Under FSO/frameworkd - use &amp;quot;mdbus -s org.freesmartphone.ophoned /org/freesmartphone/GSM/Device GetInfo&amp;quot; to retrieve both IMEI and version string at once - mdbus is provided by the package 'mickeydbus' if not already installed)&lt;br /&gt;
&lt;br /&gt;
In qtopia/qtextended, go into Applications-&amp;gt;System Info-&amp;gt;Modem. Look for 'Revision'.&lt;br /&gt;
&lt;br /&gt;
== Results table ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|  Owner    ||   Location   |||   Network Provider || How/When purchased [[SIM card]] || Device   || GSM firmware ||   IMEI  ||   Status ||   GSM log&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||T-Mobile|| with phone, &amp;gt; 2years ||GTA01||Moko6||YES||just fine||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||AT&amp;amp;T|| with phone, 8/28/07 ||GTA01||Moko6||YES||takes several minutes to register, home network rejects, CME error 32, reregisters continuously||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||AT&amp;amp;T|| replacement for one received with phone, 3/17/08 ||GTA01||Moko6||YES||preliminary test: registers promptly to home network. Will test in various locations and report back.||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||AT&amp;amp;T|| prepaid, no phone, 3/13/08 ||GTA01||Moko6||YES||just fine in some locations, but in others it takes several minutes to register and reregisters continuously. however, always better than card that came with phone||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:SpeedEvil]] || Fife, Scotland, UK||T-Mobile||PAYG with phone 7/2007||GTA01||Moko1||YES||Just fine||no&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:erin_yueh@openmoko.com  Erin Yueh]   ||   Taipei, Taiwan    ||   TW mobile     || ||    GTA02BV5  ||  Moko6   ||   NO   ||   Normal, can register to the network immediately||   no&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:marcus.bauer@gmail.com  Marcus Bauer]   ||   Nice, France    || Orange     || ||   GTA01Bv4 ||  Moko4   ||   YES   ||   Registers immediately and stays registered for ~10 minutes before the re-registering loop starts once per minute||   [http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=554&amp;amp;action=view log]&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:ahvenas@gmail.com  Henrik Pihl]   ||   Kuressaare, Estonia    || Elisa     || ||    GTA01Bv4  ||  Moko4   ||   YES   ||   Normal, can register to the network immediately, but starts reconnecting to the network in the first minutes.||   [http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=555&amp;amp;action=view log]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MarcinHrwJuszkiewicz | Marcin 'Hrw' Juszkiewicz]]   ||   Poznań, Poland    ||   Era (Heyah)     || prepaid, bought in October 2007, never charged, expired ||    GTA01Bv4  ||  phase0 phone (red PCB) with old GSM firmware   ||   YES   ||   Card expired, home network rejects it with CME Error 32 (emergency calls only), system displays &amp;quot;Registering...&amp;quot; for several minutes. ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MarcinHrwJuszkiewicz | Marcin 'Hrw' Juszkiewicz]]   ||   Poznań, Poland    ||   PlusGSM     || prepaid, several years old, not charged ||    GTA01Bv4  ||  phase0 phone (red PCB) with old GSM firmware   ||   YES   ||   Registered after entering PIN. Normal work after register. ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:plr@udgaard.com Peter Rasmussen]   ||   Copenhagen Denmark    || DK Sonofon     || Pre-paid BiBoB service since Oct. 2007 ||    GTA01Bv4  ||  Moko1   ||   YES   ||   Registered immediatly after entering PIN. Works after that. No /tmp/gsm.log appears ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Kevin_Dean | Kevin Dean]]   ||   Washington DC Metro Area, USA    || T-Mobile     || ||    GTA01Bv4  ||  Moko1   ||   YES   ||   Normal, can register to the network immediately, no PIN needed||   [http://www.monochromementality.com/data/files/logs/openmoko/2008-03-17/gsm.log.edited Log (Replaced my wife's # with 9991231122)]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Dennis_Wollersheim | Dennis Wollersheim]]   ||   Melbourne, Australia ||   Telstra     || ||    GTA01Bv4  ||  Moko4   ||   Yes   ||   Registers quickly, reregisters every 30 seconds or so||   [http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=556&amp;amp;action=view  gsm log]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:thomasg | Thomas Gstädtner]]   ||   Nuremberg, Germany   || T-Mobile (Ericsson RBS2206, GSM900) || 2004 || GTA01Bv4 || Moko 1 || Yes || Registers nearby immediately, w/ PIN or w/o || NO&lt;br /&gt;
|-&lt;br /&gt;
| [[User:thakoman | thakoman]]   ||   Kassel, Germany   || vodafone d2 || 2008 || GTA02BV5 || Moko 8 || Yes || The first SIM wasn'n found at all, The second made one call and after some minutes the firmware died!? Since that same issues as with the first one || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || vodafone d2 || 200x || GTA01Bv4 || Moko 1 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || vodafone d2 || 200x || GTA02 || Moko 6 || No || Does not register, pin entry works, net scan also. || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || e-plus || 200x || GTA02 (same as above) || Moko 6 || No || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ScaredyCat | ScaredyCat]]   ||   Ipswich, UK   || Virgin || 2007 || GTA01 || Moko 1 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ScaredyCat | ScaredyCat]]   ||   Lelystad, Netherlands   || Virgin (Roaming on T-Mobile NL) || 2007 || GTA01 || Moko 1 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[user:jluis|jluis]]   ||   Barcelona, Spain    ||   Orange (Amena)    || 082007 ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems|| No&lt;br /&gt;
|-&lt;br /&gt;
| [[user:jluis|jluis]]   ||   Barcelona, Spain    ||   Vodafone    || phone &amp;gt; 3 years ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems|| No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Joachim | Joachim Jaeger]]   ||   Eschbach, Germany    ||   O2     || Fonic prepaid card, 01/2008 ||    GTA01Bv4  || Moko 4   ||   YES   ||   Registers immediately after entering PIN. Normal work after register. ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [[user:liuxf|liuxf]]   ||   Beijing, China ||   CU-GSM || 2006 ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems|| No&lt;br /&gt;
|-&lt;br /&gt;
| [[user:ismo|ismo]]   ||   Zurich, Switzerland ||   sunrise || 2007 ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || vodafone || 200x || GTA02 || Moko 7 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:homyx | homyx]]   ||   Ingolstadt, Germany   || o2 || 2005, 2007 || GTA01 || Moko 1 || yes || No Problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:BasilK | basilk]]   ||   Moskow, Russia   || MegaFon || 2008 ||  GTA01Bv4 || Moko 4 || YES || No Problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ibb | Ib Bentzen]]   || Copenhagen, Denmark || TDC Mobil (Telmore) || 4 yrs || GTA01Bv4 || Moko4 || YES || OK || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Zrich | zrich]]   || Cambridge, MA, USA || Cingular || &amp;gt; 3 Years || GTA02 || Moko7 || Yes || No Problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Infoport | William Vidrine]]   || Greensboro, NC, USA || AT&amp;amp;T || replaced SIM sold with service Jul-18-08; model 71234 O 4022 || GTA02 || Moko8 || Yes || doesn't try to register on boot; sometimes takes switching on/off to register; re-registers with Home network frequently || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:robolange | Robert Lange]]   || Philadelphia, PA, USA || AT&amp;amp;T || obtained with AT&amp;amp;T prepaid phone in July 2008; model 71234 O 4022 || GTA02Bv5 || Moko8 || Yes || Had problems with OM2007.2 occasionally failing to power up the antenna, and with losing GSM connection necessitating a reboot every few hours.  With OM2008.9, I see none of these problems and the voice/sms works fine. || N/A&lt;br /&gt;
|-&lt;br /&gt;
| KB || Denmark || TDC || From TDC business in 2007 (64K43) didn't work, got new card for free (64K23) and that worked! || GTA02Bv5 || Moko8 || ¿What? || Works with new card || File not found&lt;br /&gt;
|-&lt;br /&gt;
| clare johnstone||Perth, Australia ||Vodafone AU || Prepaid 10 days||GTA02bv5 ||Moko8||YES ||no service briefly 2 min intervals for  10 hours today||MDBUS listing&lt;br /&gt;
|-&lt;br /&gt;
| [[User:gercamjr | Gerardo Camorlinga]]||Amarillo, TX, USA ||ATT || Prepaid $15 Motorola phone, pay as you go plan ||GTA02 ||Moko8||YES ||works great, used the gui script from [http://wiki.openmoko.org/wiki/Manually_using_GPRS Manually using GPRS]||No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:pini | Pini]]||Lyon, France ||SFR || &amp;gt; 3 years ||GTA02Bv5 ||??||YES ||Just fine||No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:W23 | w23]] || Novosibirsk, Russia || MegaFon || prepaid, ~2005 || GTA02 || Moko9-beta || Yes (?) || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:RzR | RzR]] || France || simyo.fr || prepaid, ~200911 || GTA02 || Moko9-beta1 || Yes || No problems on qtmoko || No&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[FreeRunner unable to work with 3G SIM cards]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GSM]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/GSM_network_registration</id>
		<title>GSM network registration</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/GSM_network_registration"/>
				<updated>2009-11-16T09:02:48Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We'd like to know the real network registration status by our NEO devices in the world.  Please provide some information about your NEO status!  The question list as below:&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
1. What NEO device you are using? [[GTA01]] or [[GTA02]].&lt;br /&gt;
&lt;br /&gt;
2. Where is your location and what is your network provider? eg. T-Mobile, San Francisco in USA.&lt;br /&gt;
&lt;br /&gt;
3. When you boot the NEO, how long it takes to register the network? eg. in normal case, it should be able to register to a network in 1~2 minutes immediately.&lt;br /&gt;
&lt;br /&gt;
4. What is your GSM firmware version? You can get this number by an AT command. Using [[USB_Networking|SSH]] to connect to your NEO, then type these commands:&lt;br /&gt;
&lt;br /&gt;
  root@fic-gta02:~# [[Gsmd|libgsmd-tool]] -m atcmd&lt;br /&gt;
  AT+CGMR&lt;br /&gt;
  STR=`AT+CGMR'&lt;br /&gt;
  RSTR=`+CGMR: &amp;quot;HW: GTA02BV5, GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko6&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
5. What is your [[IMEI]] code? Check by using this [[Hardware:AT Commands|AT command]] like previous steps.&lt;br /&gt;
  AT+CGSN&lt;br /&gt;
  STR=`AT+CGSN'&lt;br /&gt;
  RSTR=`+CGSN: 000000000000000'&lt;br /&gt;
&lt;br /&gt;
6. if NEO takes over 3 minutes to register to the network or it just re-register to the network again and again. Please attach your gsm log file ('/tmp/gsm.log') to our bugzilla, we already created a bug for [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1024 this issue].&lt;br /&gt;
&lt;br /&gt;
(#4 and #5 Under FSO/frameworkd - use &amp;quot;mdbus -s org.freesmartphone.ophoned /org/freesmartphone/GSM/Device GetInfo&amp;quot; to retrieve both IMEI and version string at once - mdbus is provided by the package 'mickeydbus' if not already installed)&lt;br /&gt;
&lt;br /&gt;
In qtopia/qtextended, go into Applications-&amp;gt;System Info-&amp;gt;Modem. Look for 'Revision'.&lt;br /&gt;
&lt;br /&gt;
== Results table ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|  Owner    ||   Location   |||   Network Provider || How/When purchased [[SIM card]] || Device   || GSM firmware ||   IMEI  ||   Status ||   GSM log&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||T-Mobile|| with phone, &amp;gt; 2years ||GTA01||Moko6||YES||just fine||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||AT&amp;amp;T|| with phone, 8/28/07 ||GTA01||Moko6||YES||takes several minutes to register, home network rejects, CME error 32, reregisters continuously||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||AT&amp;amp;T|| replacement for one received with phone, 3/17/08 ||GTA01||Moko6||YES||preliminary test: registers promptly to home network. Will test in various locations and report back.||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MichaelShiloh]] || San Francisco, CA, USA ||AT&amp;amp;T|| prepaid, no phone, 3/13/08 ||GTA01||Moko6||YES||just fine in some locations, but in others it takes several minutes to register and reregisters continuously. however, always better than card that came with phone||no&lt;br /&gt;
|-&lt;br /&gt;
| [[User:SpeedEvil]] || Fife, Scotland, UK||T-Mobile||PAYG with phone 7/2007||GTA01||Moko1||YES||Just fine||no&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:erin_yueh@openmoko.com  Erin Yueh]   ||   Taipei, Taiwan    ||   TW mobile     || ||    GTA02BV5  ||  Moko6   ||   NO   ||   Normal, can register to the network immediately||   no&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:marcus.bauer@gmail.com  Marcus Bauer]   ||   Nice, France    || Orange     || ||   GTA01Bv4 ||  Moko4   ||   YES   ||   Registers immediately and stays registered for ~10 minutes before the re-registering loop starts once per minute||   [http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=554&amp;amp;action=view log]&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:ahvenas@gmail.com  Henrik Pihl]   ||   Kuressaare, Estonia    || Elisa     || ||    GTA01Bv4  ||  Moko4   ||   YES   ||   Normal, can register to the network immediately, but starts reconnecting to the network in the first minutes.||   [http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=555&amp;amp;action=view log]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MarcinHrwJuszkiewicz | Marcin 'Hrw' Juszkiewicz]]   ||   Poznań, Poland    ||   Era (Heyah)     || prepaid, bought in October 2007, never charged, expired ||    GTA01Bv4  ||  phase0 phone (red PCB) with old GSM firmware   ||   YES   ||   Card expired, home network rejects it with CME Error 32 (emergency calls only), system displays &amp;quot;Registering...&amp;quot; for several minutes. ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [[User:MarcinHrwJuszkiewicz | Marcin 'Hrw' Juszkiewicz]]   ||   Poznań, Poland    ||   PlusGSM     || prepaid, several years old, not charged ||    GTA01Bv4  ||  phase0 phone (red PCB) with old GSM firmware   ||   YES   ||   Registered after entering PIN. Normal work after register. ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [mailto:plr@udgaard.com Peter Rasmussen]   ||   Copenhagen Denmark    || DK Sonofon     || Pre-paid BiBoB service since Oct. 2007 ||    GTA01Bv4  ||  Moko1   ||   YES   ||   Registered immediatly after entering PIN. Works after that. No /tmp/gsm.log appears ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Kevin_Dean | Kevin Dean]]   ||   Washington DC Metro Area, USA    || T-Mobile     || ||    GTA01Bv4  ||  Moko1   ||   YES   ||   Normal, can register to the network immediately, no PIN needed||   [http://www.monochromementality.com/data/files/logs/openmoko/2008-03-17/gsm.log.edited Log (Replaced my wife's # with 9991231122)]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Dennis_Wollersheim | Dennis Wollersheim]]   ||   Melbourne, Australia ||   Telstra     || ||    GTA01Bv4  ||  Moko4   ||   Yes   ||   Registers quickly, reregisters every 30 seconds or so||   [http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=556&amp;amp;action=view  gsm log]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:thomasg | Thomas Gstädtner]]   ||   Nuremberg, Germany   || T-Mobile (Ericsson RBS2206, GSM900) || 2004 || GTA01Bv4 || Moko 1 || Yes || Registers nearby immediately, w/ PIN or w/o || NO&lt;br /&gt;
|-&lt;br /&gt;
| [[User:thakoman | thakoman]]   ||   Kassel, Germany   || vodafone d2 || 2008 || GTA02BV5 || Moko 8 || Yes || The first SIM wasn'n found at all, The second made one call and after some minutes the firmware died!? Since that same issues as with the first one || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || vodafone d2 || 200x || GTA01Bv4 || Moko 1 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || vodafone d2 || 200x || GTA02 || Moko 6 || No || Does not register, pin entry works, net scan also. || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || e-plus || 200x || GTA02 (same as above) || Moko 6 || No || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ScaredyCat | ScaredyCat]]   ||   Ipswich, UK   || Virgin || 2007 || GTA01 || Moko 1 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ScaredyCat | ScaredyCat]]   ||   Lelystad, Netherlands   || Virgin (Roaming on T-Mobile NL) || 2007 || GTA01 || Moko 1 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[user:jluis|jluis]]   ||   Barcelona, Spain    ||   Orange (Amena)    || 082007 ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems|| No&lt;br /&gt;
|-&lt;br /&gt;
| [[user:jluis|jluis]]   ||   Barcelona, Spain    ||   Vodafone    || phone &amp;gt; 3 years ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems|| No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Joachim | Joachim Jaeger]]   ||   Eschbach, Germany    ||   O2     || Fonic prepaid card, 01/2008 ||    GTA01Bv4  || Moko 4   ||   YES   ||   Registers immediately after entering PIN. Normal work after register. ||   NO&lt;br /&gt;
|-&lt;br /&gt;
| [[user:liuxf|liuxf]]   ||   Beijing, China ||   CU-GSM || 2006 ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems|| No&lt;br /&gt;
|-&lt;br /&gt;
| [[user:ismo|ismo]]   ||   Zurich, Switzerland ||   sunrise || 2007 ||   GTA01Bv4 ||  Moko1   ||   YES   || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:emdete | emdete]]   ||   Duesseldorf, Germany   || vodafone || 200x || GTA02 || Moko 7 || Yes || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:homyx | homyx]]   ||   Ingolstadt, Germany   || o2 || 2005, 2007 || GTA01 || Moko 1 || yes || No Problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:BasilK | basilk]]   ||   Moskow, Russia   || MegaFon || 2008 ||  GTA01Bv4 || Moko 4 || YES || No Problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ibb | Ib Bentzen]]   || Copenhagen, Denmark || TDC Mobil (Telmore) || 4 yrs || GTA01Bv4 || Moko4 || YES || OK || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Zrich | zrich]]   || Cambridge, MA, USA || Cingular || &amp;gt; 3 Years || GTA02 || Moko7 || Yes || No Problems || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Infoport | William Vidrine]]   || Greensboro, NC, USA || AT&amp;amp;T || replaced SIM sold with service Jul-18-08; model 71234 O 4022 || GTA02 || Moko8 || Yes || doesn't try to register on boot; sometimes takes switching on/off to register; re-registers with Home network frequently || No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:robolange | Robert Lange]]   || Philadelphia, PA, USA || AT&amp;amp;T || obtained with AT&amp;amp;T prepaid phone in July 2008; model 71234 O 4022 || GTA02Bv5 || Moko8 || Yes || Had problems with OM2007.2 occasionally failing to power up the antenna, and with losing GSM connection necessitating a reboot every few hours.  With OM2008.9, I see none of these problems and the voice/sms works fine. || N/A&lt;br /&gt;
|-&lt;br /&gt;
| KB || Denmark || TDC || From TDC business in 2007 (64K43) didn't work, got new card for free (64K23) and that worked! || GTA02Bv5 || Moko8 || ¿What? || Works with new card || File not found&lt;br /&gt;
|-&lt;br /&gt;
| clare johnstone||Perth, Australia ||Vodafone AU || Prepaid 10 days||GTA02bv5 ||Moko8||YES ||no service briefly 2 min intervals for  10 hours today||MDBUS listing&lt;br /&gt;
|-&lt;br /&gt;
| [[User:gercamjr | Gerardo Camorlinga]]||Amarillo, TX, USA ||ATT || Prepaid $15 Motorola phone, pay as you go plan ||GTA02 ||Moko8||YES ||works great, used the gui script from [http://wiki.openmoko.org/wiki/Manually_using_GPRS Manually using GPRS]||No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:pini | Pini]]||Lyon, France ||SFR || &amp;gt; 3 years ||GTA02Bv5 ||??||YES ||Just fine||No&lt;br /&gt;
|-&lt;br /&gt;
| [[User:W23 | w23]] || Novosibirsk, Russia || MegaFon || prepaid, ~2005 || GTA02 || Moko9-beta || Yes (?) || No problems || No&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[FreeRunner unable to work with 3G SIM cards]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GSM]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_FreeRunner_Hardware_Issues</id>
		<title>Neo FreeRunner Hardware Issues</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner_Hardware_Issues"/>
				<updated>2009-11-16T08:53:41Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Some SIMs Don't Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Neo FreeRunner Menu}}&lt;br /&gt;
&lt;br /&gt;
This is a community-written page that discusses '''hardware issues''' with the FreeRunner/[[GTA02]] device. Information here is unofficial (and possibly incorrect) unless otherwise stated. Corrections and clarifications from Openmoko employees would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
Please '''DON'T PANIC''' when reading this page. Please give Openmoko employees time to investigate these issues and to develop a solution.  Some of the items may turn out to be non-issues, or may have software workarounds. The FreeRunner's software is still under heavily development and can help fix most of this problems.&lt;br /&gt;
&lt;br /&gt;
Please always file a bug report on the issues and mention the bug report number in this page. Otherwise it is impossible to check if a bug has been fixed or not.&lt;br /&gt;
&lt;br /&gt;
=== Active Issues ===&lt;br /&gt;
&lt;br /&gt;
==== Poor Audio Quality (FIXED) ====&lt;br /&gt;
Please use http://docs.openmoko.org/trac/attachment/ticket/2121/gsmhandset.state.new&lt;br /&gt;
for *all* Neo Freerunner. (2009-04-27 jOERG)&lt;br /&gt;
&lt;br /&gt;
Issue: The person on the other end of a GSM phone call may experience poor audio quality, to the point where he/she cannot carry on a normal conversation.&lt;br /&gt;
&lt;br /&gt;
There are three related aspects to this issue:&lt;br /&gt;
* Call is too quiet (mixer settings for mic and/or earpiece are set too low)&lt;br /&gt;
* Caller hears a loud echo of their own voice [http://docs.openmoko.org/trac/ticket/1267 #1267]&lt;br /&gt;
* Buzzing noise caused by GSM radio interference [http://docs.openmoko.org/trac/ticket/883 #883] [http://docs.openmoko.org/trac/ticket/1352 #1352] See [[GSM buzz]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Affects: all devices but only some users (depending on many factors)&lt;br /&gt;
&lt;br /&gt;
The source of the GSM buzz has been [http://lists.openmoko.org/pipermail/hardware/2008-August/000415.html identified]. It's a mere hw-issue, depending on the way you hold the device, and the local situation created by network settings made by the GSM-provider (mainly 1800/1900 seems to be affected), as well as your position relative to basestation. There is no way to fix GSM buzz by mixer-setting modifications. So all suggested settings here may improve a little the volume of buzz during you're *not* speaking only, while relative ratio of buzz/voice level while speaking can't be changed by mixer settings.&lt;br /&gt;
&lt;br /&gt;
Some [http://lists.openmoko.org/pipermail/hardware/2008-August/000451.html hidden Calypso commands] may help with the echo problem.&lt;br /&gt;
&lt;br /&gt;
hexedit, ghex /opt/Qtopia/plugins/phonevendors/libficgta01vendor.so&lt;br /&gt;
search &amp;quot;AT%N0125&amp;quot; and change to &amp;quot;AT%N0187&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Workarounds:&lt;br /&gt;
&lt;br /&gt;
# Using a bluetooth headset is a possibility.&lt;br /&gt;
# Using external GSM-antenna will stop buzz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Due to the multiple factors influencing the result of a single test, it's nearly impossible to find a setup that lets you compare for a decent &amp;quot;before / after&amp;quot; result. If you ever took an old analog TV portable to a place where you had to fiddle around with the antenna to try and make the snow and shadows vanish off the picture, you might have gotten a slight idea of what it's like to reproduce the same situation for decent tests. So probably most of the suggested alsa-improvements are mere random results. Even if they worked for provider A evidently, this doesn't mean there's any improvement by using same settings for provider B.&lt;br /&gt;
&lt;br /&gt;
This being said, here they are:&lt;br /&gt;
&lt;br /&gt;
# Better mixer settings: One confirmed good settings are here: http://www.mail-archive.com/support@lists.openmoko.org/msg00564.html. Please change accordingly in /usr/share/openmoko/scenarios/gsmhandset.state. Should eliminate/lessen echo and buzz problems. [[Neo alsamixer]] is the main article for setting the mixer settings.&lt;br /&gt;
&lt;br /&gt;
===== Better set of mixer settings =====&lt;br /&gt;
&lt;br /&gt;
Regarding 2. in the previous paragraph, here are my further tweaked settings:&lt;br /&gt;
&lt;br /&gt;
[mic volume &amp;amp; buzz problem]&lt;br /&gt;
* 'Mono Playback Volume'   (95)&lt;br /&gt;
* 'Mono Sidetone Playback Volume'  (2)&lt;br /&gt;
* 'Mic2 Capture Volume'     (3)&lt;br /&gt;
[speaker volume &amp;amp; echo problem]&lt;br /&gt;
* 'Speaker Playback Volume'  (112)&lt;br /&gt;
* 'Bypass Playback Volume'    (5)&lt;br /&gt;
&lt;br /&gt;
Lowering Mono Sidetone eliminated the buzz problem better. Please try out and report if you have good success... --[[User:TimoJyrinki|TimoJyrinki]] 08:19, 16 October 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
==== Can't boot with discharged or missing battery (FIXED) ====&lt;br /&gt;
&lt;br /&gt;
Issue: Neo FreeRunner requires battery power to boot, because Neo FreeRunner consumes too much current while booting to boot with only a charger. Since charging isn't enabled until the Neo FreeRunner has booted, this means that a discharged battery can not be charged. Some versions of uBoot don't continue booting and just charge bat (red LED flashes constantly) when probing bat voltage shows it's too weak to start FR. Let the device sit and charge for an hour, then reboot.&lt;br /&gt;
&lt;br /&gt;
Affects: All A5, older A6. With change of Vsys buffer capacitor to 100uF this issue has been fixed for good.&lt;br /&gt;
&lt;br /&gt;
Fixed(?) with [http://lists.openmoko.org/pipermail/openmoko-kernel/2008-July/003799.html Werner Almesberger patches] - [http://lists.openmoko.org/pipermail/commitlog/2008-July/005403.html more here] [http://lists.openmoko.org/pipermail/community/2008-July/023392.html additional information]&lt;br /&gt;
&lt;br /&gt;
I think this patch finally fixes the problem:&lt;br /&gt;
[http://www.abanet.ch/~hug/moko/uboot-battery/ Philipp Hugs patches]&lt;br /&gt;
&lt;br /&gt;
Workarounds:&lt;br /&gt;
&lt;br /&gt;
#First test if your FR starts with no bat inserted. If it does you can forget about this whole topic.&lt;br /&gt;
# Make sure that the battery never discharges completely&lt;br /&gt;
# Use [[:Image:Nokia-charging-stand.jpg|external stand-alone charger]] (compatible with the Nokia BL-5C battery)&lt;br /&gt;
# Boot the FreeRunner with an [[Neo_FreeRunner_Battery#Compatible_Replacement_Batteries|alternative battery]], or with a spare GTA01 or GTA02 battery, plug USB power, then switch to the empty battery.&lt;br /&gt;
# Boot the FreeRunner with a 4.5VDC external power source (steady hand and great care involved), plug USB power, then insert the empty battery.&lt;br /&gt;
## Oscilloscope digital clip probes fit perfectly on the Freerunner's battery connectors.  Make sure polarity is correct!&lt;br /&gt;
# Some users have reported that Neo FreeRunner '''is''' able to boot on USB power alone using the NOR u-boot, thus: press AUX, plug USB power, select boot. Reports of success would be appreciated.&lt;br /&gt;
## Does work with sequence described. If after pressing boot it just turns off again (happened a few times), then: press AUX, plug in USB power, cycle through the menu a few times to keep it from turning off without booting, after a minute or so press boot.  [[User:Imrehg|Imrehg]] 08:34, 10 September 2008 (UTC)&lt;br /&gt;
## This does indeed work with sequence described. After pressing boot, the screen went blank for a few seconds, but then the beast came to life again. That saved the day! [[User:Edictor|Edictor]]&lt;br /&gt;
## Trifirmed. Neither USB connection nor wall charger was able to wake my phone. But in NOR u-boot it worked (connected to the computer). I think this trick hasn't failed to anyone. --[[User:Flamma|Flamma]] 12:11, 17 September 2008 (UTC)&lt;br /&gt;
## Unfortunately this is not working for me.  My FreeRunner has been off for a few weeks and completely dead.  I tried various combinations of holding aux and plugging in to both wall and computer, no luck.  Tried with and without the battery in place, no luck.  Aux and power button / just power / aux then power.  No luck... --[[User:Safire|Safire]] 6 November 2008&lt;br /&gt;
## This is working ! It has prevent me from buying an external power charger. My freerunner had its battery discharged for about 2 weeks now, and I was able to boot and charge it. --[[User:JRD|JRD]] 23:37, 12 November 2008 (UTC)&lt;br /&gt;
## It has worked for me ! I have booted to 2008.9 Om with discharged battery (after connecting the FR to power supply and waiting a few minutes until AUX button red light stopped flashing) using the NOR boot menu. Tried the same with NAND boot menu and worked also !!! Then I could charge the battery. -- [[User:Emsyr|Emsyr]] 3:23, 20 November 2008 (UTC)&lt;br /&gt;
## I can boot to 2008.9 without battery and with USB connection = plug USB power (FR &amp;lt;-&amp;gt; PC) + press power button. However I cannot shutdown correctly. --[[User:Cynan|Cynan]] 13:43, 9 December 2008 (UTC)&lt;br /&gt;
## I can boot to 2008.9 without battery and with USB connection: press AUX button, then plug USB power, then press power button (keeping AUX pressed). NOTE that battery was fully charged. The problem wasn't battery but corrupted environment in NAND u-boot: with battery IN, no access to NOR u-boot&lt;br /&gt;
## Both my friend's freerunner and mine was completely discharged. This trick failed. Finally booted the freerunner with a BL-5C battery from an old nokia n-gage. With the power connected I then switched the batteries. --[[User:Unlotto|Unlotto]] 14:27, 25 January 2009 (UTC)&lt;br /&gt;
## Another confirmation that this works.  You may use the computer-USB cable or the AC adapter.  I held AUX, plugged in the USB, and the NOR boot menu started before I even hit the Power button.  For some reason, I have to cycle through the menu once before I choose boot, otherwise it will power off as soon as it loads the kernel.  I booted it, let it start up fully, and it continued charging.  After a minute or two, as a test I shut down and tried rebooting normally.  There was enough power in the battery at that point to boot normally from the AC adapter.  Note, I did not encounter this problem (using the AC adapter) until after I &amp;quot;upgraded&amp;quot; from the pre-installed May 2008 u-boot to the December 2008 u-boot; perhaps that is relevant. --Robolange 05:53, 1 February 2008 (UTC)&lt;br /&gt;
## This did ''not'' work for me (with the 1.3.2-moko12 u-boot). However, I was able to &amp;quot;jumpstart&amp;quot; my Freerunner with a bench supply and some micro-clips, as suggested above. (Worried I would fry something, I tried at lower voltages first, but it didn't start up until I set the supply to 4.5v, with the OM USB charger also attached.) Once it was well into the Linux kernel boot sequence I removed the clips and put in the battery to charge. --[[User:Wiml|Wiml]] 05:30, 9 April 2009 (UTC)&lt;br /&gt;
## This worked for me. Now I'm not afraid of letting my FreeRunner discharge. [[User:Cristianpark|Cristianpark]] 20:00, 30 August 2009 (GMT -5)&lt;br /&gt;
See also:&lt;br /&gt;
:[[Neo_FreeRunner_Battery|Neo FreeRunner Battery]]&lt;br /&gt;
&lt;br /&gt;
==== Battery discharges when charging completes ====&lt;br /&gt;
&lt;br /&gt;
Issue: If the Neo FreeRunner has been charging, when charging completes, it seems to drain the battery and not turn on charging again. This seems to be bug of PMU-registers setup, that shows up when PMU has to handle bat autonomously (=suspend). There might be issues our current scheme relies on wake-interrupt at bat-full which doesn't succeed, or something like that.&lt;br /&gt;
&lt;br /&gt;
Affects: Unknown.&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
&lt;br /&gt;
This has been fixed in linux. See&lt;br /&gt;
http://docs.openmoko.org/trac/ticket/1158&lt;br /&gt;
&lt;br /&gt;
==== Suspend/resume corrupts SD card's partition table ====&lt;br /&gt;
&lt;br /&gt;
Issue: Suspend/resume corrupts the partition table of the SD card&lt;br /&gt;
&lt;br /&gt;
Affects: Unknown.&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
&lt;br /&gt;
[[https://docs.openmoko.org/trac/ticket/1802#comment:6 Patched kernel]] might solve the problem&lt;br /&gt;
&lt;br /&gt;
Workarounds:&lt;br /&gt;
&lt;br /&gt;
# [[https://docs.openmoko.org/trac/ticket/1802#comment:5 Script]] as a temporary workaround&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
&lt;br /&gt;
:[[https://docs.openmoko.org/trac/ticket/1802  trac ticket]]&lt;br /&gt;
&lt;br /&gt;
==== Some SIMs Don't Work ====&lt;br /&gt;
&lt;br /&gt;
Issue: There are reports that some users cannot register with their GSM network when using certain [[SIM]] cards. See for example http://lists.openmoko.org/pipermail/community/2008-July/020370.html&lt;br /&gt;
&lt;br /&gt;
It is possible that there is more than one issue involved here. The observed problems ''might'' (i.e. some items are only speculation at this point) be caused by:&lt;br /&gt;
&lt;br /&gt;
* User error, not inserting the SIM in the correct orientation or not sliding the holder to the 'locked' position&lt;br /&gt;
&lt;br /&gt;
* Software issues that result in a locked SIM (not properly prompting the user for a PIN and then passing this to the SIM)&lt;br /&gt;
&lt;br /&gt;
* Mechanical issues with the SIM holder that prevent the pins from making reliable contact with the pads on the SIM. Note that only 6 of the 8 pins are used, and the remaining two are not connected.&lt;br /&gt;
&lt;br /&gt;
* Electrical incompatibility (some tests show problems with 1.8V SIMs while 2.9V ones work OK)&lt;br /&gt;
&lt;br /&gt;
* Firmware bugs in the TI Calypso GSM chipset. Note that one issue in this category was found and fixed on the GTA01 devices (#666 in Trac), and that specific problem should not affect the FreeRunner.&lt;br /&gt;
&lt;br /&gt;
* Defective SIMs, i.e. ones that do not comply with the applicable standards and are acknowledged as being defective by the carrier (even if they happen to work in some phones).&lt;br /&gt;
&lt;br /&gt;
* You may have true 3G operating at 2100 and your sim doesn't fallback to GSM. The Phone works on 850/1800/1900 or 900/1800/1900.&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
&lt;br /&gt;
* http://wiki.openmoko.org/wiki/Carriers/ATT&lt;br /&gt;
* http://wiki.openmoko.org/wiki/Carriers/Rogers&lt;br /&gt;
&lt;br /&gt;
Affects: Only a subset of users (details unknown).&lt;br /&gt;
&lt;br /&gt;
Status: Fixed in GSM firmware moko10-beta2 or later. See [[GSM/Flashing]] for instructions. Please add your information to [[FreeRunner_unable_to_work_with_3G_SIM_cards]] or [[GSM network registration]]&lt;br /&gt;
&lt;br /&gt;
Workarounds:&lt;br /&gt;
&lt;br /&gt;
# Please document your existing SIM card and provider in the table [[FreeRunner_unable_to_work_with_3G_SIM_cards|here]].&lt;br /&gt;
# If the table mentioned above shows any SIM cards known to work with your provider, make note of these numbers.&lt;br /&gt;
# Contact your network provider and request a new SIM card. You may wish to print out the table mentioned above and bring it with you to the store.&lt;br /&gt;
# Add your experience with the new SIM card to the table mentioned above.&lt;br /&gt;
&lt;br /&gt;
=== Known/Accepted Issues ===&lt;br /&gt;
&lt;br /&gt;
This section lists items that are acknowledged as being less than ideal, but are considered to be acceptable in the shipping product. They will not be discussed in detail on this page.&lt;br /&gt;
&lt;br /&gt;
* Poor performance + slow bus speed of the Glamo GPU - discussed to death on the mailing lists and IRC.&lt;br /&gt;
** stable-2.6.26 branch of kernel has wait states lowered, core speed increased from 50MHz to 80MHz and memory speed from 80MHz to 90MHz (the latter is also in stable branch) - these lessen the problem a bit, though it's slow still&lt;br /&gt;
* [http://lists.openmoko.org/pipermail/hardware/2008-April/000055.html GPS antenna switch] driven out-of-spec - does not appear to have a significant effect on device performance&lt;br /&gt;
* Poor low-frequency audio response with low-impedance headphones, e.g. as discussed in this thread:   http://lists.openmoko.org/pipermail/openmoko-kernel/2008-March/001999.html  (NOTE - this thread refers to pre-mass-production devices)&lt;br /&gt;
** Can be fixed to an semi-acceptable level (if not high fidelity most probably) by adjusting &amp;quot;Bass Volume&amp;quot; to full (15) and &amp;quot;Bass Filter&amp;quot; to &amp;quot;100Hz @ 8kHz&amp;quot; (bass will be boosted &amp;lt;= 600Hz when playing back at 48kHz) or &amp;quot;200Hz @ 8kHz&amp;quot; (&amp;lt;= 1200Hz @ 48kHz). The default is 130Hz @ 48kHz and does not help much with the more wider scope of low frequencies.&lt;br /&gt;
** Ideally someone would record output and find out which setting produces best output, ie. compensating for the loss of low frequencies without boosting too high frequencies with this &amp;quot;bass&amp;quot; boost.&lt;br /&gt;
&lt;br /&gt;
Actually with 16 Ohm headphones the cutoff frequency is more than 2kHz, so even 1200Hz @ 48kHz seems to be not appropriate.&lt;br /&gt;
If you have 30 Ohm, it might be just correct setting.&lt;br /&gt;
&lt;br /&gt;
=== Resolved Issues ===&lt;br /&gt;
&lt;br /&gt;
These are issues that have been discussed in the past, but have been fixed (or turned out not to be a problem) for the mass-produced devices.&lt;br /&gt;
&lt;br /&gt;
* Excessive LED current - Some early units lacked a current-limiting resistor for the LEDs. This has been fixed for the production units.&lt;br /&gt;
* Battery life - At this time it appears that the FreeRunner battery life will be acceptable once suspend/resume support has been implemented in software.&lt;br /&gt;
* slow GPS TTFF - see [[GPS Problems]]&lt;br /&gt;
==== Empty NOR Flash ====&lt;br /&gt;
&lt;br /&gt;
Issue: NOR flash (backup copy of u-boot) is not programmed. [http://docs.openmoko.org/trac/ticket/1568 #1568]&lt;br /&gt;
&lt;br /&gt;
Affects: Unknown - maybe only 1 or 2 devices? Also need to confirm that the bug report was from a mass-production unit rather than an earlier prototype.&lt;br /&gt;
&lt;br /&gt;
Status: Solved. The new devices are tested better if they have the NOR flashed programmed and aren't shipped if the test fail.&lt;br /&gt;
&lt;br /&gt;
Workarounds: Use the NAND copy of u-boot and be careful not to brick the device unless a debug-board is available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Debug board has wrong vendor/product ID ====&lt;br /&gt;
&lt;br /&gt;
Issue: A debug board is not reporting the expected USB Vendor/Product ID.&lt;br /&gt;
&lt;br /&gt;
Affects: Only [http://lists.openmoko.org/pipermail/device-owners/2008-July/001775.html one report] has been seen so far.&lt;br /&gt;
&lt;br /&gt;
Status: Probably a single case scenario.&lt;br /&gt;
&lt;br /&gt;
Workarounds: Edit configuration files (e.g. openocd.conf) to use the IDs that the board is reporting.&lt;br /&gt;
&lt;br /&gt;
== List of &amp;quot;Current issues&amp;quot; Imported from the &amp;quot;Community update page&amp;quot; ==&lt;br /&gt;
(to be sorted)&lt;br /&gt;
&lt;br /&gt;
The information below has been collected from various sources, feel free to add questions and comments here.&lt;br /&gt;
&lt;br /&gt;
===GPS Performance of the FreeRunner===&lt;br /&gt;
The poor GPS performance on the FreeRunner has been traced to an&lt;br /&gt;
interaction between the microSD card and the GPS unit. A software&lt;br /&gt;
and a hardware fixes are available, see [[GPS Problems]].&lt;br /&gt;
&lt;br /&gt;
===GTA02 battery status===&lt;br /&gt;
While writing a device driver for the new battery which provides an accurate counter of the charge state of the [[GTA02]], the driver developer discovered that the device driver does not get a reading of the charge state due to a very long response time with only one I/O signal when trying to read the charge state. To be able to read the battery status properly, it has been written that it will be necessary to re-design that part of the GTA02 for hardware version GTA02A5 to use two I/O signals to reduce the response time (one for transmitting commands, one for receiving data?). This was fixed (see [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=957#c1 Bug 957]).&lt;br /&gt;
&lt;br /&gt;
=== SMedia 3362 Documentation &amp;amp; OpenGL ES Drivers ===&lt;br /&gt;
There is an open source kdrive driver being written for the GTA02 which will use hardware to accelerate the XRender extension. While the chip is capable of 3D graphics, no OpenGL ES driver/library is avaliable and Openmoko developers will not be writing one in the near future (although they have not ruled it out in the long-term).&lt;br /&gt;
&lt;br /&gt;
Documentation for the SMedia 3362 has been promised ([http://lists.openmoko.org/pipermail/community/2007-September/010175.html see this post]). However, this refers to documentation Openmoko developers will be writing themselves, not the technical documentation SMedia have provided Openmoko with. The Openmoko developers had to sign an NDA with SMedia to obtain this documentation and are therefore unable to pass this information on to community developers. (See [http://lists.openmoko.org/pipermail/community/2007-November/011349.html this post] for details)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Draws too much current from USB ===&lt;br /&gt;
It may be that the Neo draws too much current from your USB host/hub, and that the USB host/hub switches off to prevent damages. &lt;br /&gt;
&lt;br /&gt;
The behaviour is controlled by a complex interaction between soft- and hardware, see [[Forcing fast charge mode]] and [[USB host]]. It may be that the host negotiates more power than the Hub is willing to provide. In case of problems, try to limit the current to e.g. 400mA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Neo FreeRunner Hardware]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2009-06-29T20:33:27Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contact: http://rzr.online.fr/contact.htm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[boxar]] : Download and check video at : http://rzr.online.fr/q/esd&lt;br /&gt;
* [[Mer]] : download bootable image : http://wiki.openmoko.org/wiki/Mer&lt;br /&gt;
* [[Arkanae]] : http://rzr.online.fr/q/pygame&lt;br /&gt;
&lt;br /&gt;
By the way I am available for linux mobile professional services :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/tags/openmoko&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2009-06-09T19:31:01Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contact: http://rzr.online.fr/contact.htm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[boxar]] : Download and check video at : http://rzr.online.fr/q/esd&lt;br /&gt;
* [[Mer]] : download bootable image : http://wiki.openmoko.org/wiki/Mer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By the way I am available for linux mobile professional services :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/tags/openmoko&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2009-06-09T19:30:29Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contact: http://rzr.online.fr/contact.htm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 * [[boxar]] : Download and check video at : http://rzr.online.fr/q/esd&lt;br /&gt;
 * [[Mer]] : download bootable image : http://wiki.openmoko.org/wiki/Mer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By the way I am available for linux mobile professional services :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/tags/openmoko&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2009-06-09T19:30:19Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contact: http://rzr.online.fr/contact.htm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  * [[boxar]] : Download and check video at : http://rzr.online.fr/q/esd&lt;br /&gt;
  * [[Mer]] : download bootable image : http://wiki.openmoko.org/wiki/Mer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By the way I am available for linux mobile professional services :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/tags/openmoko&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mer</id>
		<title>Mer</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mer"/>
				<updated>2009-06-09T19:28:44Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mer is an other [[Distribution]] based on [[Maemo]]&lt;br /&gt;
&lt;br /&gt;
With previous release of goshawknest (clap clap clap)&lt;br /&gt;
&lt;br /&gt;
I ([[User:RzR]]) was able to make a demo and to provide a bootable image of mer for freerunner&lt;br /&gt;
download it to your sdcard and boot it  Or check video demo at :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/mer-best-maemo-debianubuntu-mobiles-watch-freerunner-demo&lt;br /&gt;
&lt;br /&gt;
Refs :&lt;br /&gt;
&lt;br /&gt;
* http://goshawknest.wordpress.com/category/freerunner/&lt;br /&gt;
* http://wiki.maemo.org/Mer/Hardware/Freerunner#install_.2F_download&lt;br /&gt;
* http://wiki.openmoko.org/wiki/Debian&lt;br /&gt;
* http://wiki.debian.org/DebianOnFreeRunner&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mer</id>
		<title>Mer</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mer"/>
				<updated>2009-06-09T19:24:42Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;With previous release of goshawknest (clap clap clap)&lt;br /&gt;
&lt;br /&gt;
I was able to make a demo and to provide a bootable image of mer for freerunner&lt;br /&gt;
download it to your sdcard and boot it  Or check video demo at :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/mer-best-maemo-debianubuntu-mobiles-watch-freerunner-demo&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
 * http://wiki.maemo.org/Mer/Hardware/Freerunner#install_.2F_download&lt;br /&gt;
 * http://wiki.openmoko.org/wiki/Debian&lt;br /&gt;
 * http://wiki.debian.org/DebianOnFreeRunner&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Debian</id>
		<title>Debian</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Debian"/>
				<updated>2009-06-09T19:20:47Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Debian}}&lt;br /&gt;
&lt;br /&gt;
Debian is used on many other embedded devices. Using Debian on the FreeRunner gives access to the Huge army of software packaged in the Debian repositories, already compiled for the arm processors. Moreover, one can build one's own things without having to learn the OpenEmbedded way. For example compiling natively is a snap with Debian, just apt-get gcc&amp;amp;libc-dev.&lt;br /&gt;
&lt;br /&gt;
In the early days, one had to install [[Manual Debian|Debian manually]]. Now there is an installer script. The &amp;quot;official&amp;quot; instructions on how to install [http://wiki.debian.org/DebianOnFreeRunner Debian on FreeRunner] or [http://wiki.debian.org/DebianOnNeo1973 Debian on Neo1973] are hosted on Debian's wiki. This page is about post-install configuration and FreeRunner specific tips. For support or bug reporting please read the section [[Debian#Support|Support]].&lt;br /&gt;
&lt;br /&gt;
= Configuring a base system =&lt;br /&gt;
== Password ==&lt;br /&gt;
&lt;br /&gt;
The default root password is blank. You should change that as soon as possible&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
&lt;br /&gt;
Press the power button or run 'apm -s' to suspend.&lt;br /&gt;
To change the time for the display to darken/turn off edit or add in&lt;br /&gt;
&lt;br /&gt;
  ~/.frameworkd.conf or /etc/frameworkd.conf&lt;br /&gt;
&lt;br /&gt;
the section&lt;br /&gt;
&lt;br /&gt;
  [odeviced.idlenotifier]&lt;br /&gt;
  idle = 10&lt;br /&gt;
  idle_dim = 20&lt;br /&gt;
  idle_prelock = 12&lt;br /&gt;
  lock = 2&lt;br /&gt;
  suspend = 20&lt;br /&gt;
&lt;br /&gt;
idle_dim is the time in seconds to dim the display (which adds up to the idle time), idle_prelock is the time to turn it off.&lt;br /&gt;
&lt;br /&gt;
You can turn off Suspend completely by commenting out the entire section &amp;quot;Idleness Brightness Handling&amp;quot; in&lt;br /&gt;
&lt;br /&gt;
  /etc/freesmartphone/oevents/rules.yaml&lt;br /&gt;
&lt;br /&gt;
== Time ==&lt;br /&gt;
&lt;br /&gt;
The default time zone is UTC.  Reconfigure it by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dpkg-reconfigure tzdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To set the clock manually do something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# date -s 00:33&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you have a network connection, do something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get install ntpdate&lt;br /&gt;
# ntpdate-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to synchronize the internal clock with GPS time you can use a script like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
#&lt;br /&gt;
# Set the gps time&lt;br /&gt;
# Be sure your GPS is active before to launch this script&lt;br /&gt;
&lt;br /&gt;
import dbus&lt;br /&gt;
import subprocess&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
proxy = dbus.SystemBus().get_object('org.freesmartphone.frameworkd', '/org/freedesktop/Gypsy') # bus name, object name&lt;br /&gt;
interface = dbus.Interface(proxy, 'org.freedesktop.Gypsy.Time');&lt;br /&gt;
subprocess.call(['date',time.strftime( '%m%d%H%M%Y.%S', time.localtime(interface.GetTime()))])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to synchronize the internal clock with GPS time and use the program gpsd, you can use this script, also you can use it on another computer to synchronize the time. This script synchronize the hardware clock too. Use it like: &amp;quot;program.rb host port&amp;quot; or change the ARGV[0] and ARGV[1] vars.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env ruby&lt;br /&gt;
&lt;br /&gt;
require 'socket'&lt;br /&gt;
&lt;br /&gt;
if ARGV.size == 0&lt;br /&gt;
	ARGV[0]=&amp;quot;localhost&amp;quot;&lt;br /&gt;
	ARGV[1]=&amp;quot;2947&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
		@gpsserver = TCPSocket.open(ARGV[0],ARGV[1])&lt;br /&gt;
		sleep(0.1)&lt;br /&gt;
		@gpsserver.puts &amp;quot;r&amp;quot;&lt;br /&gt;
		result = &amp;quot;&amp;quot;&lt;br /&gt;
		while result[0,6] != &amp;quot;$GPZDA&amp;quot;&lt;br /&gt;
			result = @gpsserver.gets&lt;br /&gt;
		end&lt;br /&gt;
		if result[7,1] != &amp;quot;,&amp;quot;&lt;br /&gt;
			# Software clock&lt;br /&gt;
			system(&amp;quot;date -u #{result[20,2]}#{result[17,2]}#{result[7,2]}#{result[9,2]}#{result[23,4]}&amp;quot;)&lt;br /&gt;
			# Hardware clock&lt;br /&gt;
			system(&amp;quot;hwclock --set --date=\&amp;quot;#{result[23,4]}-#{result[20,2]}-#{result[17,2]} #{result[7,2]}:#{result[9,2]}:#{result[11,2]}\&amp;quot;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		@gpsserver.close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wifi ==&lt;br /&gt;
=== Using GUI ===&lt;br /&gt;
&lt;br /&gt;
If you don't want to mess up with configuration files and are looking for an easy gui for wireless configuration, then wifi-radar or wicd is what you are looking for.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install wifi-radar&lt;br /&gt;
wifi-radar&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install wicd&lt;br /&gt;
wicd-client -n&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are looking for more, read on...&lt;br /&gt;
&lt;br /&gt;
=== Using /etc/network/interfaces (simple mode) ===&lt;br /&gt;
&lt;br /&gt;
Make sure the following packages are installed:&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install wireless-tools wpasupplicant dhcp3-client&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming your wireless router uses WPA security and DHCP,&lt;br /&gt;
edit &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; to include a section like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
wpa-driver wext&lt;br /&gt;
wpa-ssid &amp;quot;MyWirelessName&amp;quot;&lt;br /&gt;
wpa-psk &amp;quot;MyWirelessPassword&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where, of course, you're using the name of your wireless network and its password&lt;br /&gt;
instead of ''MyWirelessName'' and ''MyWirelessPassword''.&lt;br /&gt;
&lt;br /&gt;
You can test by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifup eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can determine your IP address by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Issues:&lt;br /&gt;
* only works if in presence of wireless network on boot, or when manually running &amp;lt;code&amp;gt;ifup eth0&amp;lt;/code&amp;gt;&lt;br /&gt;
* booting away from wireless network is slower because waits for DHCP to time out&lt;br /&gt;
* does not reestablish connection when leaving wireless area and then returning&lt;br /&gt;
* does not support multiple wireless networks or open hot spots that you may travel between&lt;br /&gt;
&lt;br /&gt;
Once wpa_supplicant has begun managing your WiFi interface, you should type &amp;quot;wpa_action eth0 stop&amp;quot; instead of &amp;quot;ifdown eth0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Using wpa-supplicant (roaming mode)===&lt;br /&gt;
&lt;br /&gt;
To configure WPA to roam between wireless networks, you will need to create a new configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/wpa_supplicant/wpa_supplicant.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a template for this file (and more documentation) is available in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/share/doc/wpasupplicant/examples/wpa-roam.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll need to add networks to this file.  Examples:&lt;br /&gt;
&lt;br /&gt;
* WEP:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
network={&lt;br /&gt;
       ssid=&amp;quot;MySSID&amp;quot;&lt;br /&gt;
       key_mgmt=NONE&lt;br /&gt;
       wep_key0=&amp;quot;abcdefghijklm&amp;quot;&lt;br /&gt;
#      wep_key0=6162636465  # &amp;lt;- no quotes, so hex number&lt;br /&gt;
       wep_tx_keyidx=0&lt;br /&gt;
       id_str=&amp;quot;MySSID&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* No key:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
network={&lt;br /&gt;
       ssid=&amp;quot;SomeNetwork&amp;quot;&lt;br /&gt;
       key_mgmt=NONE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* WPA:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       network={&lt;br /&gt;
       ssid=&amp;quot;Example WPA Network&amp;quot;&lt;br /&gt;
       psk=&amp;quot;mysecretpassphrase&amp;quot;&lt;br /&gt;
       id_str=&amp;quot;home&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you'll need to edit /etc/network/interfaces.  This lets you configure your wireless networks to use dhcp, or other appropriate TCP/IP settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet manual&lt;br /&gt;
wpa-driver wext&lt;br /&gt;
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf&lt;br /&gt;
&lt;br /&gt;
# MySSID comes from an id_str above.&lt;br /&gt;
iface MySSID inet dhcp&lt;br /&gt;
&lt;br /&gt;
# default is what's used if there is no id_str setting.&lt;br /&gt;
# so the 'SomeNetwork' network will use DHCP.&lt;br /&gt;
iface default inet dhcp&lt;br /&gt;
&lt;br /&gt;
iface home inet static&lt;br /&gt;
# static interface settings, or whatever...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you want attempts to access the internet to default to eth0 (and not usb0), then comment out this line under usb0 adapter configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gateway 192.168.0.200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Roaming from network to network is not automatic.  Instead, you need to manually run &amp;quot;wpa_action eth0 stop; ifup eth0&amp;quot; to switch networks&lt;br /&gt;
&lt;br /&gt;
For some reason, I had to reboot for the id_str settings to take effect.  However, you should now be able to use &amp;quot;ifup eth0&amp;quot; to associate with the access point and &amp;quot;wpa_action eth0 stop&amp;quot; to down the wifi adapter.&lt;br /&gt;
&lt;br /&gt;
{{todo|Which of the issues that single network configurations suffer from are addressed by WPA roaming mode?  Would ifplugd / guessnet help, or just make things more complicated?}}&lt;br /&gt;
&lt;br /&gt;
=== Further reading ===&lt;br /&gt;
&lt;br /&gt;
To use all the possibilities of &amp;lt;code&amp;gt;wpasupplicant&amp;lt;/code&amp;gt; like roaming and automatic connection to different networks,&lt;br /&gt;
you should read &amp;lt;code&amp;gt;/usr/share/doc/wpasupplicant/README.Debian.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Bluetooth]] ==&lt;br /&gt;
&lt;br /&gt;
The FreeRunner uses the standard Linux bluez stack, installed with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get install bluez-utils&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There is also a module missing from /etc/modules, which is critical to getting your device recognized. (kudos to johnsu01 on irc.freenode.net:#openmoko-debian for the find)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo ohci-hcd &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first time you try this, you can also&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe ohci-hcd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only atypical part of using bluetooth on the FreeRunner is turning it on, which can be done with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mdbus -s org.freesmartphone.frameworkd  /org/freesmartphone/Device/PowerControl/Bluetooth SetPower 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the device should be visible using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# hcitool dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{todo|Then what to do next?}}&lt;br /&gt;
&lt;br /&gt;
== Packages manager ==&lt;br /&gt;
You can install &amp;lt;tt&amp;gt;[http://packages.debian.org/search?keywords=dselect dselect]&amp;lt;/tt&amp;gt;(~2.2MB) or &amp;lt;tt&amp;gt;[http://packages.debian.org/search?keywords=aptitude aptitude]&amp;lt;/tt&amp;gt;(~12MB) to visually inspect the available debian packages using the desktop's console.&amp;lt;br&amp;gt;&lt;br /&gt;
Also the gtk-based package-manager &amp;lt;tt&amp;gt;[http://packages.debian.org/search?keywords=synaptic synaptic]&amp;lt;/tt&amp;gt;(~15.7MB) is working &lt;br /&gt;
after installing &amp;lt;tt&amp;gt;[http://packages.debian.org/search?keywords=lsb-release lsb-release]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[http://packages.debian.org/search?keywords=hicolor-icon-theme hicolor-icon-theme]&amp;lt;/tt&amp;gt;, but it is very slow.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, on constrained systems, just issue the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;grep -e Package: -e Description /var/lib/dpkg/available|more&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Xglamo acceleration ==&lt;br /&gt;
By default debian uses fbdev, but we can use Xglamo to get better performance:&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install xserver-xglamo&amp;lt;/pre&amp;gt;&lt;br /&gt;
after that edit /etc/X11/xorg.conf and change the line&lt;br /&gt;
&amp;lt;pre&amp;gt;Driver          &amp;quot;fbdev&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
to:&lt;br /&gt;
&amp;lt;pre&amp;gt;Driver          &amp;quot;Xglamo&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
and if you want to run xserver as normal user:&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod u+s /usr/bin/Xglamo&amp;lt;/pre&amp;gt;&lt;br /&gt;
You may also want to force the X server to 96 dpi to have the same fonts as with fbdev. Add &amp;quot;-dpi 96&amp;quot; to the X_OPTIONS variable in '''/etc/init.d/nodm''':&amp;lt;pre&amp;gt;X_OPTIONS=&amp;quot;vt4 -nolisten tcp -dpi 96&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
with that you:&lt;br /&gt;
*can use xrandr&lt;br /&gt;
*don't have the pointer callibration bug with the rotated mode&lt;br /&gt;
*have better performances&lt;br /&gt;
&lt;br /&gt;
Using xglamo you must remember that:&lt;br /&gt;
*You can't use on xorg.conf the &amp;quot;Option Rotate&amp;quot; to rotate the screen&lt;br /&gt;
*You can't use the tslib patch to simulate right click&lt;br /&gt;
&lt;br /&gt;
== Running X as normal user ==&lt;br /&gt;
1. Create a new user&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# useradd -m -G audio,dialout,floppy,video,staff username&lt;br /&gt;
# passwd username&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Edit '''/etc/default/nodm''' (configuration file read by /etc/init.d/nodm) and change NODM_USER=root to NODM_USER=''username'' in it. Then to make sure changes are not lost on upgrade, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dpkg-divert --add /etc/init.d/nodm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will make new versions of /etc/init.d/nodm be written to /etc/init.d/nodm.distrib.&lt;br /&gt;
&lt;br /&gt;
3. Edit &amp;lt;code&amp;gt;/etc/X11/Xwrapper.config&amp;lt;/code&amp;gt; and change &amp;lt;code&amp;gt;allowed_users=console&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;allowed_users=anybody&amp;lt;/code&amp;gt; (Or use &amp;lt;code&amp;gt;dpkg-reconfigure x11-common&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
4. Copy /root/.xsession into ~username/, and change its ownership:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp /root/.xsesion ~username/&lt;br /&gt;
# chown username:username ~username/.xsession&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. Note that, if you ran zhone as root first, you may have to change ownership or remove /tmp/zhone.log, as a normal user is not able to write to a file owned by root.&lt;br /&gt;
&lt;br /&gt;
6. If you have already configured to use Xglamo as a driver, &amp;lt;tt&amp;gt;chmod u+s /usr/bin/Xglamo&amp;lt;/tt&amp;gt; (as can be read below)&lt;br /&gt;
&lt;br /&gt;
== Using dbus as a normal user ==&lt;br /&gt;
If you want to make calls or interact with the gps daemon through a dbus interface, you user will have to have the rights to do that. [http://lists.linuxtogo.org/pipermail/smartphones-userland/2009-January/000902.html One way] of adding these rights is as follows:&lt;br /&gt;
* '''copy''' /etc/dbus-1/system.d/frameworkd.conf to /etc/dbus-1/system.d/my-frameworkd.conf&lt;br /&gt;
* open /etc/dbus-1/system.d/my-frameworkd.conf and replace all instances of 'user=&amp;quot;root&amp;quot;' with 'user=&amp;quot;youruser&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
Alternatively, replace all instances of 'user=&amp;quot;root&amp;quot;' with 'group=&amp;quot;messagebus&amp;quot;' and add your user to the messagebus group.&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
Make sure to put your user in the audio group (&amp;quot;adduser &amp;lt;username&amp;gt; audio&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If there is no error but no sound, try these state files:&lt;br /&gt;
[[Talk:Manual_Debian#Sound]]&lt;br /&gt;
&lt;br /&gt;
== Keyboards and other input methods ==&lt;br /&gt;
&lt;br /&gt;
As a default the Matchbox keyboard is installed, which you can use to input characters into your neo. As an alternative you might want to install CellWriter. It is a grid-entry natural handwriting input panel. As you write characters into the cells, your writing is instantly recognized at the character level. It also features a full fledged onscreen keyboard.&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install cellwriter&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information can be found on the [http://risujin.org/cellwriter/ homepage].&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
&lt;br /&gt;
=== Debian way ===&lt;br /&gt;
When Debian is installed, the kernel is provided by the package &amp;lt;code&amp;gt;linux-image-2.6.24-openmoko-gta02&amp;lt;/code&amp;gt;. Your kernel will be keep updated like the other packages of the system. You should use this way if you are unsure and you need an (almost) stable system.&lt;br /&gt;
&lt;br /&gt;
'Caveat:' This package can be installed only in POSIX compliant filesystems, so it can not be used if your boot partition is a vfat one. The sole reason is that the tool &amp;lt;code&amp;gt;dpkg&amp;lt;/code&amp;gt; cannot create the required symlinks from uImage to uImage-kernelversion, since the file system does not know symlinks. To save the situation, it is suggested to install the package anyway, then having &amp;lt;code&amp;gt;/boot&amp;lt;/code&amp;gt; directory as a regular subdirectory, the first partition with the vfat not mounted. Once the kernel package was installed, copy the kernel image directly to the root (not a subdirectory) of the SD card's first partition.&lt;br /&gt;
&lt;br /&gt;
=== Openmoko way ===&lt;br /&gt;
Otherwise you can choose to manual install an OM kernel. But only do this if you know what you are doing.&lt;br /&gt;
At the moment there is a little problem in the question which kernel to use. Hopefully it will be solved in the near future.&lt;br /&gt;
&lt;br /&gt;
The original openmoko kernel works fine inclusive suspending and supports different really nice usb gadgets (not all working at the moment). :)&amp;lt;br&amp;gt;&lt;br /&gt;
download stable: http://downloads.openmoko.org/distro/releases/&amp;lt;br&amp;gt;&lt;br /&gt;
download testing: http://downloads.openmoko.org/distro/experimental/daily/&lt;br /&gt;
&lt;br /&gt;
The new FSO4 kernel works fine and suspend/resume is also possible. But this kernel still has no loadable usb gadget modules (10-Nov-2008). :/&amp;lt;br&amp;gt;&lt;br /&gt;
download testing: http://downloads.freesmartphone.org/fso-testing/images/&amp;lt;br&amp;gt;&lt;br /&gt;
download unstable: http://downloads.freesmartphone.org/fso-unstable/images/&lt;br /&gt;
# Download a recent'' kernel'' and ''rootfs'' (tar.gz) from one of the above mentioned sources. It's your decision if you want suspend or usb gadget modules at the moment.&lt;br /&gt;
# Backup your running kernel like &amp;lt;code&amp;gt;mv /boot/uImage.bin /boot/uImage.bin.old&amp;lt;/code&amp;gt;, then &amp;lt;br&amp;gt;copy the downloaded uImage file to the freerunner as &amp;lt;tt&amp;gt;/boot/uImage.bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Backup your actual modules like &amp;lt;code&amp;gt;mv /lib/modules/2.6.24 /lib/modules/2.6.24.old&amp;lt;/code&amp;gt;, then &amp;lt;br&amp;gt;extract the downloaded rootfs tar.gz to a temporary directory and copy &amp;lt;tt&amp;gt;lib/modules/2.6.24&amp;lt;/tt&amp;gt; from the temp directory to &amp;lt;tt&amp;gt;/lib/modules/2.6.24&amp;lt;/tt&amp;gt; on the FreeRunner.&lt;br /&gt;
# Do a &amp;lt;code&amp;gt;chown -R root.root /lib/modules/2.6.24&amp;lt;/code&amp;gt; because the owner from the tar.gz is something else (for me).&lt;br /&gt;
# Run a &amp;lt;code&amp;gt;depmod -a&amp;lt;/code&amp;gt;.&lt;br /&gt;
# This step is only needed for the OM kernel but it doesn't harm the FSO kernel setup. Add &amp;quot;g_ether&amp;quot; Module to /etc/modules like &amp;lt;code&amp;gt;echo g_ether &amp;gt;&amp;gt; /etc/modules&amp;lt;/code&amp;gt;. I read in an email, that the module &amp;quot;ohci-hcd&amp;quot; is also needed for some bluetooth functions, but i don't know this for real. I inserted it to my modules file to be on the safe side.&lt;br /&gt;
# Reboot and hope everything works as expected. :)&lt;br /&gt;
&lt;br /&gt;
= Desktop environments =&lt;br /&gt;
== Illume ==&lt;br /&gt;
[[Image:Debian_illume_zhone.png|right|thumb|300px|Debian with illume, and Zhone running]]&lt;br /&gt;
[[Image:Debian_illume_zhone_kb.png|right|thumb|300px|Debian with illume, and Zhone running, with the on-screen keyboard visible]]&lt;br /&gt;
Illume, the desktop environment used in recent openmoko distribution releases, is also available under Debian.  It's part of the Enlightenment window manager version 17 (which is currently in the alpha stage of development), which the Debian FSO package maintainers have placed in their repository.  If you have a Debian FSO system running, you can use the following commands to install illume.&lt;br /&gt;
&lt;br /&gt;
 apt-get install e17&lt;br /&gt;
&lt;br /&gt;
Then use the following commands to ensure that it starts on boot.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove zhone-session&lt;br /&gt;
 apt-get install nodm&lt;br /&gt;
 &lt;br /&gt;
 mv /root/.xsession /root/.xsession.backup &lt;br /&gt;
 cat &amp;lt;&amp;lt; END &amp;gt; /root/.xsession&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 zhone &amp;amp;&lt;br /&gt;
 enlightenment_start&lt;br /&gt;
 END&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Matchbox with fbpanel ==&lt;br /&gt;
It is not really a Desktop environment, but using fbpanel with Matchbox you can have a fast, lightweight, gtk2 desktop panel.&lt;br /&gt;
[[Image:Debian_fbpanel_zhone.png|right|thumb|300px|Debian with fbpanel, matchbox-window-manager and Zhone running]]&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Install fbpanel:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install fbpanel&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Customize the X startup process:&lt;br /&gt;
&amp;lt;pre&amp;gt;~/.xsession&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
export GTK_MODULES=libgtkstylus.so&lt;br /&gt;
zhone &amp;amp;&lt;br /&gt;
xsetroot -solid black&lt;br /&gt;
matchbox-keyboard-toggle &amp;amp;&lt;br /&gt;
matchbox-window-manager -use_titlebar yes &amp;amp;&lt;br /&gt;
# -use_titlebar yes to minimize &amp;amp; toggle between apps&lt;br /&gt;
# fbpanel's taskbar does not work with matchbox-window-manager&lt;br /&gt;
#~/bin/auxlaunch &amp;amp;&lt;br /&gt;
while true;&lt;br /&gt;
do&lt;br /&gt;
fbpanel;&lt;br /&gt;
sleep 1;&lt;br /&gt;
done;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Read http://fbpanel.sourceforge.net/docs.html#config&lt;br /&gt;
&amp;lt;pre&amp;gt;~/.fbpanel/default&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/.fbpanel&lt;br /&gt;
cp /etc/fbpanel/default ~/.fbpanel/default&lt;br /&gt;
nano ~/.fbpanel/default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove section with 'taskbar' plugin - it's useless with matchbox-window-manager. You may add plugin 'cpu'&lt;br /&gt;
&amp;lt;pre&amp;gt;Plugin {&lt;br /&gt;
type = cpu&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also, plugin 'genmon' is useful:&lt;br /&gt;
&amp;lt;pre&amp;gt;Plugin {&lt;br /&gt;
type = genmon&lt;br /&gt;
config {&lt;br /&gt;
Command = echo -e $(grep &amp;quot;MemFree&amp;quot; /proc/meminfo | awk '{printf &amp;quot;%0.2f&amp;quot;, $2 / 1024}') &amp;quot;|&amp;quot;\&lt;br /&gt;
$(cat /proc/loadavg | awk '{print $3}') &amp;quot;|&amp;quot; $(apm | awk '{print $5}')&lt;br /&gt;
PollingTime = 60&lt;br /&gt;
TextSize = small&lt;br /&gt;
TextColor = darkblue&lt;br /&gt;
}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
After 'killall fbpanel' it will show: free mem in megabytes | loadavg | battery % left.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Default theme is ugly. You can change it and / or make fonts bigger:&lt;br /&gt;
&amp;lt;pre&amp;gt;~/.gtkrc-2.0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-cache search gtk2-engines&lt;br /&gt;
sudo apt-get install gtk2-engines gtk-theme-switch&lt;br /&gt;
DISPLAY=:0 gtk-theme-switch2&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now choose your theme, font and save it. To see changes do 'killall fbpanel'.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to use killall, install the psmisc package:&lt;br /&gt;
 apt-get install psmisc&lt;br /&gt;
&lt;br /&gt;
Some of the icons rely on the hicolor-icon-theme:&lt;br /&gt;
 apt-get install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
== XFCE ==&lt;br /&gt;
The debian installation script installs by default the matchbox window manager. It doesn't feature a desktop environment. '''xfce''' is a small and lightweight desktop environment and so is quite fast for the FreeRunner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install xfce4&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit your .xsession to launch xfce4 at X startup :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
xfce4-session&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit section [Failsafe Session] of /etc/xdg/xfce4-session/xfce4-session.rc (or ~/.config/xfce4-session/xfce4-session.rc) to handle the auto-started apps. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;[Failsafe Session]&lt;br /&gt;
Count=3&lt;br /&gt;
Client0_Command=xfce4-panel&lt;br /&gt;
Client0_PerScreen=False&lt;br /&gt;
Client1_Command=xfdesktop&lt;br /&gt;
Client1_PerScreen=False&lt;br /&gt;
Client2_Command=zhone&lt;br /&gt;
Client2_PerScreen=True&amp;lt;/pre&amp;gt;&lt;br /&gt;
Start XFCE !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/init.d/nodm restart&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The desktop takes a while to start but once up was snappy as can be expected.&lt;br /&gt;
I've not yet looked at the reason for the seemingly too slow start for the desktop.&lt;br /&gt;
&lt;br /&gt;
zhone is available from the &amp;quot;Office&amp;quot; menu in xfce.&lt;br /&gt;
The matchbox keyboard is available in &amp;quot;Accessories&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you want to display the screen on the long side (ie rotated, 4:3 aspect), add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Option          &amp;quot;Rotate&amp;quot;                &amp;quot;CCW&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then (re)start xfce.&lt;br /&gt;
&lt;br /&gt;
If you want to be able to shutdown/restart the device, add the following line to ''/etc/sudoers'' (don't forget to replace ''username'' with your actual username):&lt;br /&gt;
&amp;lt;pre&amp;gt;username localhost = NOPASSWD: /usr/sbin/xfsm-shutdown-helper&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using matchbox-window-manager with XFCE ===&lt;br /&gt;
&lt;br /&gt;
XFCE's window manager is poorly configured for use with the FreeRunner.  Fortunately, matchbox's window manager is compatible with xfce.  To use the matchbox window manager, modify ~/.xsession as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
exec matchbox-window-manager -use_titlebar no -use_cursor no &amp;amp;&lt;br /&gt;
xfce4-session&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LXDE ==&lt;br /&gt;
&lt;br /&gt;
I you want a really nice desktop enviroment but you think XFCE is too fat, you can try to install [http://en.wikipedia.org/wiki/LXDE LXDE]. It give to you the GTK comfort, but use only a fraction of the ram needed by XFCE.&lt;br /&gt;
[[Image:Debian_lxde_zhone.png|right|thumb|300px|Debian with lxde and Zhone running]]&lt;br /&gt;
To install it:&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install lxde&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to launch it create a &amp;lt;code&amp;gt;/etc/init.d/lxde&amp;lt;/code&amp;gt; script in the same way descripted for xfce4, replacing &amp;lt;code&amp;gt;startxfce4&amp;lt;/code&amp;gt; occurrences with &amp;lt;code&amp;gt;startlxde&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Additional Software =&lt;br /&gt;
== Web Browser ==&lt;br /&gt;
[http://lists.openmoko.org/nabble.html#nabble-td781547 Arne Anka suggested] trying the light-weight webkit-based [http://en.wikipedia.org/wiki/Midori_(browser) midori] browser:&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install midori&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another light-weight browser is [http://en.wikipedia.org/wiki/Dillo Dillo]. It can be easily installed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install dillo&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you think the previous options are quite slow on Freerunner try Links2.&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install links2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run as:&lt;br /&gt;
&amp;lt;pre&amp;gt;xlinks2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GPS ==&lt;br /&gt;
Openmoko Freerunner has integrated a good AGPS chip that can be used to know in every moment the phone position.&lt;br /&gt;
The most known free applications to use gps with graphical maps are:&lt;br /&gt;
&lt;br /&gt;
*{{main|TangoGPS}}&lt;br /&gt;
*{{main|Navit}} (Attention: Navit is not yet present on Debian repository)&lt;br /&gt;
&lt;br /&gt;
== E-Book reader ==&lt;br /&gt;
&lt;br /&gt;
To read an E-Book you have diffent possibilities:&lt;br /&gt;
&lt;br /&gt;
* [[FBReader]] a good reader that can display txt, fb2, html and various other formats.&lt;br /&gt;
* [[Epdfview]] a simple and lightweight PDF viewer, it can be installed from Debian repository.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Evince Evince] the official Gnome viewer, it can display pdf, djvu, cbz, and other formats.&lt;br /&gt;
There is also an hack to convert drm protected adobe ebooks to .cbz files readable as mentioned on the mailing list.&lt;br /&gt;
&lt;br /&gt;
== PIM ==&lt;br /&gt;
&lt;br /&gt;
[http://clay.ll.pl/osmo/ Osmo] is a lightweigt pim application. Although you will not be able to make phonecalls right from its adressbook it is still helpful for managing contacts and appointments.&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install osmo&amp;lt;/pre&amp;gt;&lt;br /&gt;
It reads iCal-files, which you might want to syncronize with your desktop with [http://www.cis.upenn.edu/~bcpierce/unison/ unison].&lt;br /&gt;
Start it with the option --tinygui to fit it on the screen. If xfce or other are installed you can start it via the menu with that option by changing in &amp;lt;pre&amp;gt;/usr/share/applications/osmo.desktop&amp;lt;/pre&amp;gt; the according line to&lt;br /&gt;
&amp;lt;pre&amp;gt;Exec=osmo --tinygui&amp;lt;/pre&amp;gt;&lt;br /&gt;
Just make sure you have a working swap: it takes quite some memory!&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
== Making the cursor invisible ==&lt;br /&gt;
&lt;br /&gt;
=== Using matchbox ===&lt;br /&gt;
&lt;br /&gt;
Matchbox has an option, &amp;lt;code&amp;gt;use_cursor&amp;lt;/code&amp;gt;, that can be used to control whether to show the cursor.&lt;br /&gt;
For the default setup, edit &amp;lt;code&amp;gt;/usr/bin/zhone-session&amp;lt;/code&amp;gt; and change the matchbox command to&lt;br /&gt;
matchbox-window-manager -use_titlebar no -use_cursor no&lt;br /&gt;
&lt;br /&gt;
=== Using unclutter ===&lt;br /&gt;
&lt;br /&gt;
Unclutter is a program that hides the cursor after a period of inactivity. To use unclutter, install it&lt;br /&gt;
#apt-get install unclutter&lt;br /&gt;
and choose ''Yes'' to the question &amp;lt;code&amp;gt;Start unclutter automatically?&amp;lt;/code&amp;gt;. To change settings edit&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/default/unclutter&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Changing the cursor ===&lt;br /&gt;
To make the cursor invisible create a file called empty.cursor with this content:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define empty.cursor_width 16&lt;br /&gt;
#define empty.cursor_height 16&lt;br /&gt;
static unsigned char empty.cursor_bits[] = {&lt;br /&gt;
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&lt;br /&gt;
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you can execute:&lt;br /&gt;
xsetroot -cursor empty.cursor empty.cursor&lt;br /&gt;
and the cursor will be invisible. To make this permanent you have to invent something ;) It must be executed after zhone has finished starting up.&lt;br /&gt;
&lt;br /&gt;
== Running X applications on your desktop in nested X server ==&lt;br /&gt;
Sometimes it is helpful to have a big screen, keyboard and mouse. You can run X applications in a nested X server window.&lt;br /&gt;
On your desktop install the nested X server application Xephyr (better that Xnest)&lt;br /&gt;
apt-get install xserver-xephyr&lt;br /&gt;
Run a nested X server as display=:1&lt;br /&gt;
Xephyr :1 -ac -br -screen 480x640 -reset -terminate &amp;amp;&lt;br /&gt;
Now you are able to run apps on your Neo which will display on your desktop PC. Make sure to set the display, for example if &amp;quot;mydesktop&amp;quot; is your desktop hostname&lt;br /&gt;
DISPLAY=mydesktop:1 xfce4-session &amp;amp;&lt;br /&gt;
&lt;br /&gt;
== Running X applications directly on your desktop ==&lt;br /&gt;
The major advantage of this method is that it doesn't impose any size restrictions on the application, which makes it very helpful for applications which require a lot of screen space to work properly, eg. synaptic. &lt;br /&gt;
Edit the file /etc/ssh/ssh_config. In section &amp;quot;Host *&amp;quot; uncomment the &amp;quot;ForwardX11Trusted yes&amp;quot; entry. Restart dropbear by issuing the command &amp;quot;/etc/init.d/dropbear restart&amp;quot;. Now log in to your neo with the following command: &amp;quot;ssh -Y root@freerunner&amp;quot;, where freerunner is, as always, the IP Adress of your device. Now any X application you start on the neo will be displayed on the host screen. &lt;br /&gt;
If you want an application to be displayed on the freerunner screen, use &amp;quot;DISPLAY=:0.0 application&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Simulating right click with stylus ==&lt;br /&gt;
=== With fbdev driver from xserver-xorg ===&lt;br /&gt;
 &lt;br /&gt;
The official Debian package of xserver-xorg-input-tslib (Version 0.0.5-4 and up) includes an easy way to right click with the stylus. To activate it add a new line to your xorg.conf in the InputDevice section.&lt;br /&gt;
&lt;br /&gt;
 Option          &amp;quot;EmulateRightButton&amp;quot;    &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You also have to change the device specification in your xorg.conf from TslibDevice to Device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-        Option          &amp;quot;TslibDevice&amp;quot;           &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
+        Option          &amp;quot;Device&amp;quot;                &amp;quot;/dev/input/event1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this way, to get a right click you can simply tap and hold the stylus and after a while a right click will occurs.&lt;br /&gt;
&lt;br /&gt;
'''Warning''': tslib patch is incompatible with &amp;lt;code&amp;gt;xserver-xglamo&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;libgtkstylus&amp;lt;/code&amp;gt; instead (see below).&lt;br /&gt;
&lt;br /&gt;
=== With Xglamo driver from xserver-xglamo ===&lt;br /&gt;
# &amp;lt;pre&amp;gt;apt-get install libgtkstylus&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert this line at the beginning of '''~/.xsession''':&amp;lt;pre&amp;gt;export GTK_MODULES=libgtkstylus.so &amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using the mouse and keyboard from your desktop on the OM device ==&lt;br /&gt;
=== Method 1: xsession export (works with a linux host) ===&lt;br /&gt;
If you are running Linux (or a similar xorg capable operating system) on your Desktop, you can export your xsession to the openmoko device and use your mouse and keyboard on the Neo screen. A little program called x2x makes it even possible to do this simultaneously on the fly. When activated you just move your mouse to the edge of your monitor and then the mouse cursor continues on the screen of your openmoko device. If you select a window on the OM, the input of your keyboard is automatically entered in that window. You can even use the clipboard to copy data from tour desktop to OM and in the reverse direction.&lt;br /&gt;
&lt;br /&gt;
Configure your desktop computer to export your xsession:&lt;br /&gt;
On your desktop (with root permissions):&lt;br /&gt;
Make sure that sshd is installed and in /etc/ssh/sshd_config you have set&lt;br /&gt;
X11Forwarding yes&lt;br /&gt;
&lt;br /&gt;
In K/Ubuntu sshd is in the package openssh-server.&lt;br /&gt;
&lt;br /&gt;
On your OM device install x2x (with root permissions):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install xauth x2x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now open a new X terminal on your desktop computer. You MUST be the same user that is running the xsession on your desktop (i.e. do not su to root or another user in your x terminal!). Use the same username that is running an xsession on your OM device. Assuming that you have a usb networking connection to OM (with standard configuration) on the user prompt of your desktop type:&lt;br /&gt;
user@desktop:~$ ssh -X openmoko@192.168.0.202 &amp;quot;/usr/bin/x2x -east -to :0.0&amp;quot;&lt;br /&gt;
Hit return and enter your password. The xterm window will be unresponsive after that, but keep it open until you disconnect your OM device.&lt;br /&gt;
&lt;br /&gt;
Now move your mouse cursor across the right edge of your monitor. It should enter the screen of your OM device from the left. Of course you can also use -west, -north or -south, depending on your preference where you place your OM.&lt;br /&gt;
&lt;br /&gt;
If computer says:&lt;br /&gt;
sh: /usr/X11R6/bin/xauth: No such file or directory&lt;br /&gt;
X11 connection rejected because of wrong authentication.&lt;br /&gt;
x2x - error: can not open display localhost:11.0&lt;br /&gt;
&lt;br /&gt;
It means you haven't installed xauth on your OM. So on your OM (with root permissions)&lt;br /&gt;
apt-get install xauth&lt;br /&gt;
&lt;br /&gt;
=== Method 2: synergy (works with a windows/linux host) ===&lt;br /&gt;
With this method you can have the following functionality:&lt;br /&gt;
* Mouse moves from screen edge to the next screen&lt;br /&gt;
* Keyboard types on the focused window&lt;br /&gt;
* Clipboard is transferred as well&lt;br /&gt;
* Connect as many computers and screens you wish&lt;br /&gt;
* Connect windows computers too&lt;br /&gt;
&lt;br /&gt;
All devices/computers in question should be able to install [http://synergy2.sourceforge.net synergy].&lt;br /&gt;
Windows computers can use an installer exe.&lt;br /&gt;
Debian devices have a package ready to be used.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install synergy quicksynergy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
quick synergy will appear in your XFCE programs menu (Accessories-&amp;gt;QuickSynergy).&lt;br /&gt;
Run it, switch to the &amp;quot;Use&amp;quot; tab, enter the IP address of the computer with the mouse and keyboard you wish to use, and press Execute.&lt;br /&gt;
&lt;br /&gt;
In the windows host, (or linux) run the synergy after installation,&lt;br /&gt;
and configure it to share its keyboard and mouse(server),&lt;br /&gt;
configuration is fairly simple, you add all the hostnames of the devices/computers that ever would be joined to the &amp;quot;screens&amp;quot; list, and create 2 links for each connection.&lt;br /&gt;
&lt;br /&gt;
If your desktop's hostname is homepc, and the device's is debian_gta02, and i place the device to the left of the desktop, the links would look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
homepc is right of debian_gta02&lt;br /&gt;
debian_gta02 is left of homepc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now move back to the main screen, and press Start.&lt;br /&gt;
&lt;br /&gt;
That should be it, in windows you should have an icon with a yellow lightning in it when synergy is connected and working.&lt;br /&gt;
Synergy supports connection of more then one screen so one could set up a full lab with only one keyboard and mouse :)&lt;br /&gt;
&lt;br /&gt;
= See also=&lt;br /&gt;
== Derivative distributions ==&lt;br /&gt;
&lt;br /&gt;
Several distributions are sharing Debian's infrastructure - this is long known. For the OpenMoko, &lt;br /&gt;
* [[Fyp]] extends the basic Debian installation while avoiding the need of an SD&lt;br /&gt;
* [[Mer]] : based on [[Maemo]] ; see demo and download image at http://digg.com/linux_unix/mer_merge_of_maemo_debian_ubuntu_on_freerunner_mobile_ddl&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
&lt;br /&gt;
To have more information about Debian go to [http://www.debian.org Debian homepage].&lt;br /&gt;
&lt;br /&gt;
If you have some problems, you can find support in [http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland smartphone mailing list]. Report your discovered bugs to this list but remember to put [mailto:nomeata@debian.org Joachim Breitner] in CC.&lt;br /&gt;
&lt;br /&gt;
If you'd like to help the packaging activities, you can join the [http://lists.alioth.debian.org/mailman/listinfo/pkg-fso-maint fso maintainer list].&lt;br /&gt;
&lt;br /&gt;
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]&lt;br /&gt;
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html].&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please always inform the [http://wiki.debian.org/Teams/DebianFSO FreeSmartphoneOrg] packaging group about issues that you spot. Explicit instructions on how to report issues are given [http://wiki.debian.org/DebianOnFreeRunner#head-c33d5a71a5654ad5592accc5e699ec6f64933582 here].&lt;br /&gt;
&lt;br /&gt;
The previously here reported issue on install.sh has been addressed by the Debian FSO team.&lt;br /&gt;
&lt;br /&gt;
'''apt-get segmentation fault''' Whenever you get a segmentation fault while using apt-get or aptitude, clean the database so it will rebuild it&lt;br /&gt;
  rm /var/cache/apt/*.bin&lt;br /&gt;
&lt;br /&gt;
However, this is obviously not a *solution*, but a mere workaround. Whoever it was who reported it, please try reproduce that behaviour and report it to the Debian bug tracking system. &lt;br /&gt;
&lt;br /&gt;
'''If Zhone doesn't start''' it is most likely due to a bug in the python-evas package[http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/b5c47db469394e98/1b529e538774d3e0?lnk=raot] (fixed in new install). Install the alternate package:&lt;br /&gt;
  wget http://www.ginguppin.de/files/python-evas_0.2.1-2_armel.deb&lt;br /&gt;
  dpkg -i python-evas_0.2.1-2_armel.deb&lt;br /&gt;
&lt;br /&gt;
[[Category:Debian]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mer</id>
		<title>Mer</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mer"/>
				<updated>2009-06-09T16:00:14Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;With previous release of goshawknest (clap clap clap)&lt;br /&gt;
&lt;br /&gt;
I was able to make a demo and to provide a bootable image of mer for freerunner&lt;br /&gt;
download it to your sdcard and boot it  Or check video demo at :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/mer-best-maemo-debianubuntu-mobiles-watch-freerunner-demo&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
&lt;br /&gt;
http://wiki.maemo.org/Mer/Hardware/Freerunner#install_.2F_download&lt;br /&gt;
http://wiki.openmoko.org/wiki/Mer&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mer</id>
		<title>Mer</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mer"/>
				<updated>2009-06-09T15:57:27Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: New page:  With precious release of goshawknest  I was able to make a demo and to provide a bootable image of mer for freerunner download and check video demo at :  http://www.newlc.com/en/mer-best-...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
With precious release of goshawknest&lt;br /&gt;
&lt;br /&gt;
I was able to make a demo and to provide a bootable image of mer for freerunner&lt;br /&gt;
download and check video demo at :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/mer-best-maemo-debianubuntu-mobiles-watch-freerunner-demo&lt;br /&gt;
&lt;br /&gt;
Also: &lt;br /&gt;
&lt;br /&gt;
http://wiki.maemo.org/Mer/Hardware/Freerunner#install_.2F_download&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2009-06-01T18:54:28Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contact: http://rzr.online.fr/contact.htm&lt;br /&gt;
&lt;br /&gt;
=== boxar ===&lt;br /&gt;
&lt;br /&gt;
Download and check video at :&lt;br /&gt;
http://rzr.online.fr/q/esd&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
&lt;br /&gt;
By the way I am available for linux mobile professional services :&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/tags/openmoko&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Applications</id>
		<title>Applications</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Applications"/>
				<updated>2009-06-01T18:52:43Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Audio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Applications}}&lt;br /&gt;
This is the wiki's master application list for the Openmoko smartphones. &lt;br /&gt;
&lt;br /&gt;
== How to register new applications ?==&lt;br /&gt;
&lt;br /&gt;
This list can not be exhaustive, as new things are showing up every week. This page is here to help spreading awareness about applications. Here are instructions on how to add a specific application to this list. There are many ways to go&lt;br /&gt;
&lt;br /&gt;
Method 1 (preferred):&lt;br /&gt;
* Register your application at http://opkg.org. You will get a package number there, for example 33.&lt;br /&gt;
* Notify the community mailing list.&lt;br /&gt;
* Come back here, click on &amp;quot;edit&amp;quot; next to the appropriate section title, then add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* {{opkg.org|33|Application name}} A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method 2: Just link to wherever the application is hosted.&lt;br /&gt;
* Click on &amp;quot;edit&amp;quot; next to the appropriate section title, add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* [http://your.host.domain/the/path/to/app/page.html Application name] A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method 3: Create a new page in this wiki.&lt;br /&gt;
* Click on &amp;quot;edit&amp;quot; next to the appropriate section title, then add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* [[Application name]] A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The application name will appear in red, click on it to create and edit the new page.&lt;br /&gt;
&lt;br /&gt;
== Audio ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.faltantornillos.net/proyectos/gnu/brightPlayer/brightPlayerOM2008v0.1.tar.gz Bright Player] - Fast, lightweight and easy random music player.&lt;br /&gt;
* [[Dictator]] - Record mic, incoming GSM-sound, or a whole Phonecall&lt;br /&gt;
* {{opkg.org|55|ePiano}} - epiano is going to be a virtual piano&lt;br /&gt;
* [[Fingertier]] - minimal and finger friendly music player&lt;br /&gt;
* [[Fourier]]- Realtime frequency analysis of sound data.&lt;br /&gt;
* [[Guitartune]] - Tune musical Instruments.&lt;br /&gt;
* [[GTick]] - GTick is a metronome application written for GNU/Linux&lt;br /&gt;
* [[Intone]] - Elementary based mplayer frontend (for audio files).&lt;br /&gt;
* [[Mokoko]]- Play music.&lt;br /&gt;
* {{opkg.org|151|MokoPod}} - Retrieve and listen to podcasts &lt;br /&gt;
* [[Neoqplayer]] - Renamed as GorshPlayer: a multimedia player written in Qt4: play and retreive podcasts feeds, more reactive interface, now able to play videos ( in svn ).&lt;br /&gt;
* [http://fisoft.eu/standa/openmoko/omshuffle_0.1_arm.ipk omShuffle] - Inspired by Bright Player with volume control. Needs mplayer to work.&lt;br /&gt;
* [[Openmoko-mediaplayer2]] - Play music and video (mp3...)&lt;br /&gt;
* [[Openmokast]] - Play audio stream and slideshow stream&lt;br /&gt;
* [[Pythm]] - Audio player GUI using mplayer and mpd as backend.&lt;br /&gt;
* [[PyRok]] - Audio player which uses Gstreamer for playback and Pygame for GUI.&lt;br /&gt;
* [[Satan]] - Create your own music!&lt;br /&gt;
* [[Voicenote]] - Voicenote is a script which allows to record any sound from the microphone into a wav file. It can play the created files too. It is intended to be an easy and quick way to do so.&lt;br /&gt;
* [http://rzr.online.fr/q/esd boxar] - Touchscreen as a finger friendly piano -- [[User:RzR]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== BlueTooth ==&lt;br /&gt;
* [[Coypu]] - Utility for send file via BlueTooth&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Games ==&lt;br /&gt;
&lt;br /&gt;
* [[Games/Om 2007.2]] - Many small games on Om 2007.2&lt;br /&gt;
* [[Om 2008.8 Sudoku]] - Number placement based puzzle game&lt;br /&gt;
* [[Moko-sudoku]] - Another sudoku puzzle game.&lt;br /&gt;
* {{opkg.org|60|ScummVM}} ([[Scummvm|Wiki]]) Virtual Machine for several classic graphical point-and-click adventure games&lt;br /&gt;
* [[Kobodeluxe]] - A top-view space shooter, available from 2008.8 repositories.&lt;br /&gt;
* [[Pingus]] - Pingus is a lemmings clone with penguins.&lt;br /&gt;
* [[Duke Nukem 3D]] - Legendary First Person Shooter.&lt;br /&gt;
* [[Numptyphysics]] - A drawing puzzle game.&lt;br /&gt;
* [[Gnuboy]] - An emulator for the handheld gaming all-time bestseller.&lt;br /&gt;
* [[XBill]] - Little action game to stop Bill from installing Windows(tm) on computers.&lt;br /&gt;
* [[Xlogical]]-A puzzle based game where you turn spinners to move balls around.&lt;br /&gt;
* [[Liquid War]]-Liquid War is a truly original multiplayer wargame.&lt;br /&gt;
* [http://unsyncopated.com/BrainSolvent/Doom%20Port DOOM]- Classic FPS. Freerunner/1973&lt;br /&gt;
* [[MBAC]]- MBAC is &amp;quot;Moko Bulls and Cows&amp;quot;, a classic game for openmoko written in pygtk similar to mastermind.&lt;br /&gt;
* [[OpenVibe]] - The first opensource vibrator.&lt;br /&gt;
* [[OpenTTD]] - OpenTransportTycoonDeluxe, ported to openmoko, using only GPLed datafiles.&lt;br /&gt;
* [http://scalde.free.fr/index.php?option=com_content&amp;amp;view=article&amp;amp;id=93:pong-pogresses&amp;amp;catid=43:openmoko&amp;amp;Itemid=66 Pong progresses]- This is a little pong game for the openmoko freerunner. The screen is devided in halves, so you can touch the right half to move the paddle right and the left half to move it left.&lt;br /&gt;
* [[OpenMooCow]] - OpenMooCow reads information out of your accelerometers. Now, if you turn the phone upside down and back again, it &amp;quot;moos&amp;quot; like one of the little toys.&lt;br /&gt;
* [[Freerunner LightSaber]]-Application as iphone LightSaber.&lt;br /&gt;
* [[CellHunter]] - A game you earn points by collecting cells (in english now).&lt;br /&gt;
* [[XSkat]] - XSkat lets you play the card game Skat defined by the official Skat Order.&lt;br /&gt;
* {{opkg.org|136|OpenMiaoCat}} OpenMiaoCat, like OpenMooCow, makes your phone became a cat!&lt;br /&gt;
* {{opkg.org|149|I'm Rich}} I'm Rich application&lt;br /&gt;
* {{opkg.org|121|Mokomaze}} Ball-in-the-labyrinth game&lt;br /&gt;
* [[Acceleroids]] Shoot-the-asteroids game&lt;br /&gt;
* {{opkg.org|169|Black Sheep}} Fight insomnia!&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== GPS ==&lt;br /&gt;
&lt;br /&gt;
* [[GPS Sight]] - Display GPS information, location, tracks, etc, without maps.&lt;br /&gt;
* [[Gpsdrive]] - Car (bike, etc) navigation system&lt;br /&gt;
* [[Om 2008.8 Locations]] - (aka Splinter) - Location sharing based on GPS and SMS&lt;br /&gt;
* [[Navit]] - Car navigation system with routing engine&lt;br /&gt;
* [[TangoGPS]] - Display map (OSM..), record GPS tracks...&lt;br /&gt;
* [[Pyroute]] - Pyroute is a routing program written in Python. It features mobile phone GUI for maps, GPS, and routing.&lt;br /&gt;
* [http://www.mumpot.org/ mumpot] - Display map (OSM), routing, OSM editing, a bit of live editing&lt;br /&gt;
* [[QMapControl]] - Display maps (OSM..) and add points, lines...&lt;br /&gt;
* [[Qpegps]] - Display map with current position&lt;br /&gt;
* [[Idle Hands]] - Give a task to you based on your location&lt;br /&gt;
* [[Gtkaddpoi]] - Utility for add a POI to TangoGPS using address or coordinates and export to Navit or to .kml file.&lt;br /&gt;
* [[Gpsdcontrol]]-A simple python script for start or stop gpsd daemon with a button on the desktop.&lt;br /&gt;
* [[OpenBmap]]-a free and open map of wireless communicating objects (e.g. cellular antenna, Wi-Fi, Bluetooth). It provides tools to mutualize data, create and access this map.&lt;br /&gt;
* {{opkg.org|162|gvSIG Mobile}} - This is an unofficial port of gvSIG Mobile (http://www.gvsig.gva.es/) to the Openmoko platform. gvSIG Mobile for Openmoko is currently a GPS-enabled projection-aware map viewer. [http://gvsigmobileonopenmoko.wordpress.com/ Homepage].&lt;br /&gt;
* {{opkg.org|175|BikeAtor}} - Like TangoGPS BikeAtor can display OSM Maps. The Speedometer displays the most interesting values of the trip.&lt;br /&gt;
* {{opkg.org|178|bicirutas}} - This application looks for mtb routes in www.bicirutas.net (routes in Spain, Portugal, United Kingdom, France, Italy and Germany). It gets the current position from the gps system and downloads nearby routes. Then you can follow them with tangogps application.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
* [[Orrery]] - Displays the night sky&lt;br /&gt;
* [[OMView]] - Image viewer&lt;br /&gt;
* [[PyPenNotes]] - Write notes using pen and touchscreen&lt;br /&gt;
* [[Gpe-scap]] - Take screenshots&lt;br /&gt;
* [[Flash|Gnash]]-Play flash file on Neo&lt;br /&gt;
* [[Neon]] - Image viewer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Internet ==&lt;br /&gt;
&lt;br /&gt;
* [[Twinkle]] - Voice over IP&lt;br /&gt;
* [[Linphone]] - Voice over IP&lt;br /&gt;
* [[Midori]] - Webkit based web browser&lt;br /&gt;
* [[Minimo]] - Mozilla based web browser&lt;br /&gt;
* [http://www.dillo.org/ Dillo] - Multiplatform fast and small web browser ([http://misc.andi.de1.cc/dillo/ .ipk]).&lt;br /&gt;
* [[Mokopedia]] - Read small Wikipedia dumps offline&lt;br /&gt;
* [[Offline Wikipedia reader]] - store the entire content of wikipedia (single-language, excluding images), on a single 8GB microSD card&lt;br /&gt;
* [[Openmoko-browser2]] - The original Openmoko web browser&lt;br /&gt;
* [[Openmokast]] - Play audio stream and slideshow stream&lt;br /&gt;
* [[Openmoko Mail]] - E-mail client&lt;br /&gt;
* [[Pidgin]] - Instant messaging client (ICQ, MSN, Jabber, Yahoo and more.)&lt;br /&gt;
* [[CenterIM]] - Instant messaging client (terminal-based).&lt;br /&gt;
* [[PyFeedRead]] - RSS feed reader&lt;br /&gt;
* [[Qtmail]] - Default mail program on Om 2008.8&lt;br /&gt;
* [[TwitterMoko]] - A Twitter client for Openmoko&lt;br /&gt;
* [http://code.google.com/p/pyqt-browser/ pyqt-browser] - modified the sample code from python-pyqt4 and changed it to use webkit for web browsing. &lt;br /&gt;
* [http://we.trekbeyond.org/~kd8ikt/moko/shr_pkgz/ ettercap-ng]&lt;br /&gt;
* [http://www.netsurf-browser.org/ netsurf]-A new browser for Neo FreeRunner.&lt;br /&gt;
* {{opkg.org|205|GPRSModem}} - Converts your neo in a GPRS modem.&lt;br /&gt;
&lt;br /&gt;
== Office ==&lt;br /&gt;
* [[Epdfview]] - PDF reader.&lt;br /&gt;
* Evince - Document reader for PDF, PS, DJVU and more.&lt;br /&gt;
* [[FBReader]] - E-book reader program (TXT, FB2, HTML and more)&lt;br /&gt;
* [[Gutenflash]] - Fast text reader by scrolling text&lt;br /&gt;
* [[OMoney]] - A bookkeeping application&lt;br /&gt;
* {{opkg.org|191|PISI}} - PISI is synchronizing (PIM) information&lt;br /&gt;
* [[e-tasks]] - An elementary task manager&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
* [[Mofi]] - Wifi setup tool&lt;br /&gt;
* [[Lint-wifi]] - Wifi setup tool&lt;br /&gt;
* [[KnjMokoWifi]] - Wifi setup tool&lt;br /&gt;
* [[KnjMokoOPKG]] - A graphical frontend to OPKG.&lt;br /&gt;
* [[Om 2008.8 Installer]] - Graphical software installer&lt;br /&gt;
* [[Opkg]] - Command line software installer&lt;br /&gt;
* [[Sephora]] - Settings manager&lt;br /&gt;
* [[SettingsGUI]] - Edit various settings&lt;br /&gt;
* [[Wicd]] - Wifi setup tool&lt;br /&gt;
* [[ZOMG!]] - A graphical package manager (opkg frontend -&amp;gt; should work on any distro)&lt;br /&gt;
* [[Timezone|tzdata]]- Customise your time zone setting.&lt;br /&gt;
* [[momtools]] - an application to control Wifi, gprs and some other stuff&lt;br /&gt;
* [[Wlan]] - Wlan is an application to manage wireless connection on the Freerunner&lt;br /&gt;
&lt;br /&gt;
== System ==&lt;br /&gt;
* [[Aphasia]] - A system built on Erlang and a vertical application for people with apahasia.&lt;br /&gt;
* [http://www.pierrox.net/auimd/ AUIMD] - AUIMD is a PyQt graphical user interface for mobile devices.&lt;br /&gt;
* [[Auxlaunch]] - Finger-friendly app launcher and window switcher&lt;br /&gt;
* [[Display Locker]] - Screen lock&lt;br /&gt;
* [[Gwaterpas]] - levelling tool using accelerometer&lt;br /&gt;
* [[Gestures]] - Detect movement and display information, rotate screen&lt;br /&gt;
* [[Keychain]] - SSH keys&lt;br /&gt;
* [[MokoFEM]] - Monitors GSM information&lt;br /&gt;
* [[Mokostat]] - Monitors battery&lt;br /&gt;
* [[Openmoko Bluetooth remote controller|ReMoko]] - Control stuff via BlueTooth&lt;br /&gt;
* [[Rotate]] - Rotate screen when phone is rotated&lt;br /&gt;
* [[Vala-terminal]] - Command prompt with tabs&lt;br /&gt;
* [[Ts calibrate]] - Calibrates touchscreen&lt;br /&gt;
* [[Zedlock]] - Screen locker&lt;br /&gt;
* [http://fso-control.projects.openmoko.org/ fso-control] - Popup Power menu to shutdown/suspend/reboot.&lt;br /&gt;
* [[omkeys_functions]] - Remap AUX key bindings&lt;br /&gt;
* [[Siglaunchd]] - A daemon that listens to dbus signals and launches appliactions upon arrival.&lt;br /&gt;
* [[Pexpect]]-a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Telephony ==&lt;br /&gt;
* [[Dialer/2007.2]] - The dialer application in Om 2007.2&lt;br /&gt;
* [[Openmoko SMS Middleware]]- SMS middleware is a Openmoko middleware software for additional features related to SMS. Plugin architecture and Python based code gives this project lots of flexibility and enchancebility.&lt;br /&gt;
* [[Paroli]] -Paroli is an integrated phone application based on Tichy (and so also written in python). &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
* [[Unison]] - Unison is a file-synchronization tool for Unix and Windows. It determines all differences between two directory trees and lets the user decide, how to proceed with every differing file. &lt;br /&gt;
* [[HP48 Series RPN Calculator]] - Calculator with many functions&lt;br /&gt;
* [[qwo]]- An alternative input method.&lt;br /&gt;
* {{opkg.org|57|fido}} - [[fido]] is a todo list\note manager written with elementary&lt;br /&gt;
* [http://meuk.spritesserver.nl/lightsaber-0.1.tgz The Lightsaber]. Pre-alpha starwaresque orphanware.&lt;br /&gt;
* [[NeoTool]] NeoTool is a bash script for your desktop system to provide a friendly GUI frontend to some common management tasks.&lt;br /&gt;
* [[NeoCon]] - neocon is a handy serial console utility (not only) for u-boot.  The main feature of neocon is actually that you can give it a list of devices and it will pick one that works.&lt;br /&gt;
* [http://techiem2.net/index.php?/archives/10-Freerunner-USB-Mode-Control-Program.html usbmode]-a quick pygtk program. &lt;br /&gt;
* [[Enotes]] - Enotes is the implementation of a TODOlist manager written with elementary to appear better with distribution that use illume, like SHR.&lt;br /&gt;
* [[LED clock]] - When an Openmoko is sitting unused at night, turn it into an alarm clock with large 7-segment digits on a black background in landscape mode. &lt;br /&gt;
* [[MokoGeocaching]] - Utility for add a POI to TangoGPS using geocaching.com &lt;br /&gt;
* [[Wrench]] - Modual used utility enlightenment_remote.&lt;br /&gt;
* [[Yaouh!]] - Yet Another OSM Updater H.&lt;br /&gt;
* [[ShortOm]] - Graphical launcher for shell or application, with editable config file, and log result page.&lt;br /&gt;
* [[Pimlico]]-Pimlico is a suite of lightweight Personal Information Management (PIM) applications designed primarily for handheld and mobile devices&lt;br /&gt;
* [http://projects.openmoko.org/projects/otp4neo/ OTP4Neo] One time password generator&lt;br /&gt;
* [http://projects.openmoko.org/projects/ffalarms/ FFAlarm] is a program to set multiple alarms a day using a finger friendly user interface&lt;br /&gt;
* [[OpenWrt]]-basic support for the Openmoko &amp;quot;Freerunner&amp;quot;! Kernel (2.6.28) is building and booting.&lt;br /&gt;
* [[Enscribi]]-a handwriting recognition input method for Linux. It's mainly developed for the Openmoko Freerunner smartphone.&lt;br /&gt;
* [[GridPad]]-GridPad is an alternative input method for entering text with your finger, a Simple Character Recognizer Software.&lt;br /&gt;
* [[sortdesk]] sort your om-desktop in categories&lt;br /&gt;
* [[Mokometeo]] is a widget which fetches the weather forecast from yahoo, for a list of cities&lt;br /&gt;
* {{opkg.org|176|CoovaChilli}} - It turns your phone's WiFi network into an Ad-Hoc Hotspot!&lt;br /&gt;
&lt;br /&gt;
==Setting Application==&lt;br /&gt;
* [[Wmiconfig]]- wmiconfig is a tool written by Atheros Communications Inc to configure the Ar6k WIFI chip used in the Neo Freerunner. This is a standalone C executable, released under GPL v2.&lt;br /&gt;
* [[GTA02 sysfs]]- sysfs is a filesystem that is mounted on /sys which contains various fake &amp;quot;files&amp;quot; that are actually filled by a variety of drivers and other kernel subsystems.  You can use it to change settings and behaviours of the kernel and drivers dynamically.&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
* [[Video Player]] - Using Mplayer on Openmoko smartphones.&lt;br /&gt;
* [http://katastrophos.net/andre/blog/software/quasar-media-player/ Quasar] - a mplayer frontend for X11.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== daemon ==&lt;br /&gt;
* [[PyPhonelog]] - daemon uses the framework to track and log all the calls made to and from the moko.&lt;br /&gt;
* [[Lscd]] - LSC library/daemon on Linux System.&lt;br /&gt;
&lt;br /&gt;
== An automatic list of application-related wiki pages ==&lt;br /&gt;
&lt;br /&gt;
The pages linked above are all maintained manually. We also maintain an automatic categorization system by tagging wiki pages. Here is the list of application-related pages in this wiki. Normally, every page listed below should be also listed above in the same category. The converse is false: there are applications without a wiki page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px black; padding: 1ex&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Applications in this Wiki:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;categorytree mode=pages depth=2 hideroot=on&amp;gt;Applications&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where to find more applications? ==&lt;br /&gt;
&lt;br /&gt;
At [http://opkg.org opkg.org] !&lt;br /&gt;
&lt;br /&gt;
Not all Openmoko apps are listed on this wiki - there are much more [http://projects.openmoko.org/softwaremap/ projects at the Openmoko GForge] than the wiki can list, not to mention self-hosted applications on their own websites. Actually the phones can run most Linux based Free Software, using for example the [[Debian]] distribution. The [http://handhelds.freshmeat.net/browse/1038/ mobile phones section of Freshmeat] may be a interesting place to look.&lt;br /&gt;
&lt;br /&gt;
Note also that there are many packages in the repository that are not installed by default. If what you want is a classic, chances are that it is already packaged. Suppose you want to install Perl:&lt;br /&gt;
 opkg list|grep perl&lt;br /&gt;
 opkg install perl&lt;br /&gt;
&lt;br /&gt;
More application download related pages:&lt;br /&gt;
&lt;br /&gt;
* [[Community Repository]]&lt;br /&gt;
* [[Users Repositories]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to find full distributions ? ==&lt;br /&gt;
&lt;br /&gt;
* [[Download]]: for complete system downloads&lt;br /&gt;
&lt;br /&gt;
== The usual warnings ==&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
* Some of these software are developed by Openmoko Inc. and some are contributed by the community. Any problems with community contributed software should be reported to the individual software developer rather than the Openmoko core team.&lt;br /&gt;
* Most programs listed here are not mature/stable, but only useable/beta.&lt;br /&gt;
* Many programs listed here are not yet packaged for your distribution and integrated in its repositories. Whichever it is.&lt;br /&gt;
* Installing experimental software from the internet is certain to break things. Running it as root is a very insecure thing to do. Kown that you will be burned, have backups, and be ready to apologize to everybody in your phone contact list in case they receive strange SMSs...&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications|Applications]]&lt;br /&gt;
[[Category:Basic End User]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Applications</id>
		<title>Applications</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Applications"/>
				<updated>2009-06-01T18:52:11Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Audio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Applications}}&lt;br /&gt;
This is the wiki's master application list for the Openmoko smartphones. &lt;br /&gt;
&lt;br /&gt;
== How to register new applications ?==&lt;br /&gt;
&lt;br /&gt;
This list can not be exhaustive, as new things are showing up every week. This page is here to help spreading awareness about applications. Here are instructions on how to add a specific application to this list. There are many ways to go&lt;br /&gt;
&lt;br /&gt;
Method 1 (preferred):&lt;br /&gt;
* Register your application at http://opkg.org. You will get a package number there, for example 33.&lt;br /&gt;
* Notify the community mailing list.&lt;br /&gt;
* Come back here, click on &amp;quot;edit&amp;quot; next to the appropriate section title, then add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* {{opkg.org|33|Application name}} A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method 2: Just link to wherever the application is hosted.&lt;br /&gt;
* Click on &amp;quot;edit&amp;quot; next to the appropriate section title, add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* [http://your.host.domain/the/path/to/app/page.html Application name] A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method 3: Create a new page in this wiki.&lt;br /&gt;
* Click on &amp;quot;edit&amp;quot; next to the appropriate section title, then add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* [[Application name]] A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The application name will appear in red, click on it to create and edit the new page.&lt;br /&gt;
&lt;br /&gt;
== Audio ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.faltantornillos.net/proyectos/gnu/brightPlayer/brightPlayerOM2008v0.1.tar.gz Bright Player] - Fast, lightweight and easy random music player.&lt;br /&gt;
* [[Dictator]] - Record mic, incoming GSM-sound, or a whole Phonecall&lt;br /&gt;
* {{opkg.org|55|ePiano}} - epiano is going to be a virtual piano&lt;br /&gt;
* [[Fingertier]] - minimal and finger friendly music player&lt;br /&gt;
* [[Fourier]]- Realtime frequency analysis of sound data.&lt;br /&gt;
* [[Guitartune]] - Tune musical Instruments.&lt;br /&gt;
* [[GTick]] - GTick is a metronome application written for GNU/Linux&lt;br /&gt;
* [[Intone]] - Elementary based mplayer frontend (for audio files).&lt;br /&gt;
* [[Mokoko]]- Play music.&lt;br /&gt;
* {{opkg.org|151|MokoPod}} - Retrieve and listen to podcasts &lt;br /&gt;
* [[Neoqplayer]] - Renamed as GorshPlayer: a multimedia player written in Qt4: play and retreive podcasts feeds, more reactive interface, now able to play videos ( in svn ).&lt;br /&gt;
* [http://fisoft.eu/standa/openmoko/omshuffle_0.1_arm.ipk omShuffle] - Inspired by Bright Player with volume control. Needs mplayer to work.&lt;br /&gt;
* [[Openmoko-mediaplayer2]] - Play music and video (mp3...)&lt;br /&gt;
* [[Openmokast]] - Play audio stream and slideshow stream&lt;br /&gt;
* [[Pythm]] - Audio player GUI using mplayer and mpd as backend.&lt;br /&gt;
* [[PyRok]] - Audio player which uses Gstreamer for playback and Pygame for GUI.&lt;br /&gt;
* [[Satan]] - Create your own music!&lt;br /&gt;
* [[Voicenote]] - Voicenote is a script which allows to record any sound from the microphone into a wav file. It can play the created files too. It is intended to be an easy and quick way to do so.&lt;br /&gt;
* [[http://rzr.online.fr/q/esd boxar]] - Touchscreen as a finger friendly piano -- [[User:RzR]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== BlueTooth ==&lt;br /&gt;
* [[Coypu]] - Utility for send file via BlueTooth&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Games ==&lt;br /&gt;
&lt;br /&gt;
* [[Games/Om 2007.2]] - Many small games on Om 2007.2&lt;br /&gt;
* [[Om 2008.8 Sudoku]] - Number placement based puzzle game&lt;br /&gt;
* [[Moko-sudoku]] - Another sudoku puzzle game.&lt;br /&gt;
* {{opkg.org|60|ScummVM}} ([[Scummvm|Wiki]]) Virtual Machine for several classic graphical point-and-click adventure games&lt;br /&gt;
* [[Kobodeluxe]] - A top-view space shooter, available from 2008.8 repositories.&lt;br /&gt;
* [[Pingus]] - Pingus is a lemmings clone with penguins.&lt;br /&gt;
* [[Duke Nukem 3D]] - Legendary First Person Shooter.&lt;br /&gt;
* [[Numptyphysics]] - A drawing puzzle game.&lt;br /&gt;
* [[Gnuboy]] - An emulator for the handheld gaming all-time bestseller.&lt;br /&gt;
* [[XBill]] - Little action game to stop Bill from installing Windows(tm) on computers.&lt;br /&gt;
* [[Xlogical]]-A puzzle based game where you turn spinners to move balls around.&lt;br /&gt;
* [[Liquid War]]-Liquid War is a truly original multiplayer wargame.&lt;br /&gt;
* [http://unsyncopated.com/BrainSolvent/Doom%20Port DOOM]- Classic FPS. Freerunner/1973&lt;br /&gt;
* [[MBAC]]- MBAC is &amp;quot;Moko Bulls and Cows&amp;quot;, a classic game for openmoko written in pygtk similar to mastermind.&lt;br /&gt;
* [[OpenVibe]] - The first opensource vibrator.&lt;br /&gt;
* [[OpenTTD]] - OpenTransportTycoonDeluxe, ported to openmoko, using only GPLed datafiles.&lt;br /&gt;
* [http://scalde.free.fr/index.php?option=com_content&amp;amp;view=article&amp;amp;id=93:pong-pogresses&amp;amp;catid=43:openmoko&amp;amp;Itemid=66 Pong progresses]- This is a little pong game for the openmoko freerunner. The screen is devided in halves, so you can touch the right half to move the paddle right and the left half to move it left.&lt;br /&gt;
* [[OpenMooCow]] - OpenMooCow reads information out of your accelerometers. Now, if you turn the phone upside down and back again, it &amp;quot;moos&amp;quot; like one of the little toys.&lt;br /&gt;
* [[Freerunner LightSaber]]-Application as iphone LightSaber.&lt;br /&gt;
* [[CellHunter]] - A game you earn points by collecting cells (in english now).&lt;br /&gt;
* [[XSkat]] - XSkat lets you play the card game Skat defined by the official Skat Order.&lt;br /&gt;
* {{opkg.org|136|OpenMiaoCat}} OpenMiaoCat, like OpenMooCow, makes your phone became a cat!&lt;br /&gt;
* {{opkg.org|149|I'm Rich}} I'm Rich application&lt;br /&gt;
* {{opkg.org|121|Mokomaze}} Ball-in-the-labyrinth game&lt;br /&gt;
* [[Acceleroids]] Shoot-the-asteroids game&lt;br /&gt;
* {{opkg.org|169|Black Sheep}} Fight insomnia!&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== GPS ==&lt;br /&gt;
&lt;br /&gt;
* [[GPS Sight]] - Display GPS information, location, tracks, etc, without maps.&lt;br /&gt;
* [[Gpsdrive]] - Car (bike, etc) navigation system&lt;br /&gt;
* [[Om 2008.8 Locations]] - (aka Splinter) - Location sharing based on GPS and SMS&lt;br /&gt;
* [[Navit]] - Car navigation system with routing engine&lt;br /&gt;
* [[TangoGPS]] - Display map (OSM..), record GPS tracks...&lt;br /&gt;
* [[Pyroute]] - Pyroute is a routing program written in Python. It features mobile phone GUI for maps, GPS, and routing.&lt;br /&gt;
* [http://www.mumpot.org/ mumpot] - Display map (OSM), routing, OSM editing, a bit of live editing&lt;br /&gt;
* [[QMapControl]] - Display maps (OSM..) and add points, lines...&lt;br /&gt;
* [[Qpegps]] - Display map with current position&lt;br /&gt;
* [[Idle Hands]] - Give a task to you based on your location&lt;br /&gt;
* [[Gtkaddpoi]] - Utility for add a POI to TangoGPS using address or coordinates and export to Navit or to .kml file.&lt;br /&gt;
* [[Gpsdcontrol]]-A simple python script for start or stop gpsd daemon with a button on the desktop.&lt;br /&gt;
* [[OpenBmap]]-a free and open map of wireless communicating objects (e.g. cellular antenna, Wi-Fi, Bluetooth). It provides tools to mutualize data, create and access this map.&lt;br /&gt;
* {{opkg.org|162|gvSIG Mobile}} - This is an unofficial port of gvSIG Mobile (http://www.gvsig.gva.es/) to the Openmoko platform. gvSIG Mobile for Openmoko is currently a GPS-enabled projection-aware map viewer. [http://gvsigmobileonopenmoko.wordpress.com/ Homepage].&lt;br /&gt;
* {{opkg.org|175|BikeAtor}} - Like TangoGPS BikeAtor can display OSM Maps. The Speedometer displays the most interesting values of the trip.&lt;br /&gt;
* {{opkg.org|178|bicirutas}} - This application looks for mtb routes in www.bicirutas.net (routes in Spain, Portugal, United Kingdom, France, Italy and Germany). It gets the current position from the gps system and downloads nearby routes. Then you can follow them with tangogps application.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
* [[Orrery]] - Displays the night sky&lt;br /&gt;
* [[OMView]] - Image viewer&lt;br /&gt;
* [[PyPenNotes]] - Write notes using pen and touchscreen&lt;br /&gt;
* [[Gpe-scap]] - Take screenshots&lt;br /&gt;
* [[Flash|Gnash]]-Play flash file on Neo&lt;br /&gt;
* [[Neon]] - Image viewer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Internet ==&lt;br /&gt;
&lt;br /&gt;
* [[Twinkle]] - Voice over IP&lt;br /&gt;
* [[Linphone]] - Voice over IP&lt;br /&gt;
* [[Midori]] - Webkit based web browser&lt;br /&gt;
* [[Minimo]] - Mozilla based web browser&lt;br /&gt;
* [http://www.dillo.org/ Dillo] - Multiplatform fast and small web browser ([http://misc.andi.de1.cc/dillo/ .ipk]).&lt;br /&gt;
* [[Mokopedia]] - Read small Wikipedia dumps offline&lt;br /&gt;
* [[Offline Wikipedia reader]] - store the entire content of wikipedia (single-language, excluding images), on a single 8GB microSD card&lt;br /&gt;
* [[Openmoko-browser2]] - The original Openmoko web browser&lt;br /&gt;
* [[Openmokast]] - Play audio stream and slideshow stream&lt;br /&gt;
* [[Openmoko Mail]] - E-mail client&lt;br /&gt;
* [[Pidgin]] - Instant messaging client (ICQ, MSN, Jabber, Yahoo and more.)&lt;br /&gt;
* [[CenterIM]] - Instant messaging client (terminal-based).&lt;br /&gt;
* [[PyFeedRead]] - RSS feed reader&lt;br /&gt;
* [[Qtmail]] - Default mail program on Om 2008.8&lt;br /&gt;
* [[TwitterMoko]] - A Twitter client for Openmoko&lt;br /&gt;
* [http://code.google.com/p/pyqt-browser/ pyqt-browser] - modified the sample code from python-pyqt4 and changed it to use webkit for web browsing. &lt;br /&gt;
* [http://we.trekbeyond.org/~kd8ikt/moko/shr_pkgz/ ettercap-ng]&lt;br /&gt;
* [http://www.netsurf-browser.org/ netsurf]-A new browser for Neo FreeRunner.&lt;br /&gt;
* {{opkg.org|205|GPRSModem}} - Converts your neo in a GPRS modem.&lt;br /&gt;
&lt;br /&gt;
== Office ==&lt;br /&gt;
* [[Epdfview]] - PDF reader.&lt;br /&gt;
* Evince - Document reader for PDF, PS, DJVU and more.&lt;br /&gt;
* [[FBReader]] - E-book reader program (TXT, FB2, HTML and more)&lt;br /&gt;
* [[Gutenflash]] - Fast text reader by scrolling text&lt;br /&gt;
* [[OMoney]] - A bookkeeping application&lt;br /&gt;
* {{opkg.org|191|PISI}} - PISI is synchronizing (PIM) information&lt;br /&gt;
* [[e-tasks]] - An elementary task manager&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
* [[Mofi]] - Wifi setup tool&lt;br /&gt;
* [[Lint-wifi]] - Wifi setup tool&lt;br /&gt;
* [[KnjMokoWifi]] - Wifi setup tool&lt;br /&gt;
* [[KnjMokoOPKG]] - A graphical frontend to OPKG.&lt;br /&gt;
* [[Om 2008.8 Installer]] - Graphical software installer&lt;br /&gt;
* [[Opkg]] - Command line software installer&lt;br /&gt;
* [[Sephora]] - Settings manager&lt;br /&gt;
* [[SettingsGUI]] - Edit various settings&lt;br /&gt;
* [[Wicd]] - Wifi setup tool&lt;br /&gt;
* [[ZOMG!]] - A graphical package manager (opkg frontend -&amp;gt; should work on any distro)&lt;br /&gt;
* [[Timezone|tzdata]]- Customise your time zone setting.&lt;br /&gt;
* [[momtools]] - an application to control Wifi, gprs and some other stuff&lt;br /&gt;
* [[Wlan]] - Wlan is an application to manage wireless connection on the Freerunner&lt;br /&gt;
&lt;br /&gt;
== System ==&lt;br /&gt;
* [[Aphasia]] - A system built on Erlang and a vertical application for people with apahasia.&lt;br /&gt;
* [http://www.pierrox.net/auimd/ AUIMD] - AUIMD is a PyQt graphical user interface for mobile devices.&lt;br /&gt;
* [[Auxlaunch]] - Finger-friendly app launcher and window switcher&lt;br /&gt;
* [[Display Locker]] - Screen lock&lt;br /&gt;
* [[Gwaterpas]] - levelling tool using accelerometer&lt;br /&gt;
* [[Gestures]] - Detect movement and display information, rotate screen&lt;br /&gt;
* [[Keychain]] - SSH keys&lt;br /&gt;
* [[MokoFEM]] - Monitors GSM information&lt;br /&gt;
* [[Mokostat]] - Monitors battery&lt;br /&gt;
* [[Openmoko Bluetooth remote controller|ReMoko]] - Control stuff via BlueTooth&lt;br /&gt;
* [[Rotate]] - Rotate screen when phone is rotated&lt;br /&gt;
* [[Vala-terminal]] - Command prompt with tabs&lt;br /&gt;
* [[Ts calibrate]] - Calibrates touchscreen&lt;br /&gt;
* [[Zedlock]] - Screen locker&lt;br /&gt;
* [http://fso-control.projects.openmoko.org/ fso-control] - Popup Power menu to shutdown/suspend/reboot.&lt;br /&gt;
* [[omkeys_functions]] - Remap AUX key bindings&lt;br /&gt;
* [[Siglaunchd]] - A daemon that listens to dbus signals and launches appliactions upon arrival.&lt;br /&gt;
* [[Pexpect]]-a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Telephony ==&lt;br /&gt;
* [[Dialer/2007.2]] - The dialer application in Om 2007.2&lt;br /&gt;
* [[Openmoko SMS Middleware]]- SMS middleware is a Openmoko middleware software for additional features related to SMS. Plugin architecture and Python based code gives this project lots of flexibility and enchancebility.&lt;br /&gt;
* [[Paroli]] -Paroli is an integrated phone application based on Tichy (and so also written in python). &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
* [[Unison]] - Unison is a file-synchronization tool for Unix and Windows. It determines all differences between two directory trees and lets the user decide, how to proceed with every differing file. &lt;br /&gt;
* [[HP48 Series RPN Calculator]] - Calculator with many functions&lt;br /&gt;
* [[qwo]]- An alternative input method.&lt;br /&gt;
* {{opkg.org|57|fido}} - [[fido]] is a todo list\note manager written with elementary&lt;br /&gt;
* [http://meuk.spritesserver.nl/lightsaber-0.1.tgz The Lightsaber]. Pre-alpha starwaresque orphanware.&lt;br /&gt;
* [[NeoTool]] NeoTool is a bash script for your desktop system to provide a friendly GUI frontend to some common management tasks.&lt;br /&gt;
* [[NeoCon]] - neocon is a handy serial console utility (not only) for u-boot.  The main feature of neocon is actually that you can give it a list of devices and it will pick one that works.&lt;br /&gt;
* [http://techiem2.net/index.php?/archives/10-Freerunner-USB-Mode-Control-Program.html usbmode]-a quick pygtk program. &lt;br /&gt;
* [[Enotes]] - Enotes is the implementation of a TODOlist manager written with elementary to appear better with distribution that use illume, like SHR.&lt;br /&gt;
* [[LED clock]] - When an Openmoko is sitting unused at night, turn it into an alarm clock with large 7-segment digits on a black background in landscape mode. &lt;br /&gt;
* [[MokoGeocaching]] - Utility for add a POI to TangoGPS using geocaching.com &lt;br /&gt;
* [[Wrench]] - Modual used utility enlightenment_remote.&lt;br /&gt;
* [[Yaouh!]] - Yet Another OSM Updater H.&lt;br /&gt;
* [[ShortOm]] - Graphical launcher for shell or application, with editable config file, and log result page.&lt;br /&gt;
* [[Pimlico]]-Pimlico is a suite of lightweight Personal Information Management (PIM) applications designed primarily for handheld and mobile devices&lt;br /&gt;
* [http://projects.openmoko.org/projects/otp4neo/ OTP4Neo] One time password generator&lt;br /&gt;
* [http://projects.openmoko.org/projects/ffalarms/ FFAlarm] is a program to set multiple alarms a day using a finger friendly user interface&lt;br /&gt;
* [[OpenWrt]]-basic support for the Openmoko &amp;quot;Freerunner&amp;quot;! Kernel (2.6.28) is building and booting.&lt;br /&gt;
* [[Enscribi]]-a handwriting recognition input method for Linux. It's mainly developed for the Openmoko Freerunner smartphone.&lt;br /&gt;
* [[GridPad]]-GridPad is an alternative input method for entering text with your finger, a Simple Character Recognizer Software.&lt;br /&gt;
* [[sortdesk]] sort your om-desktop in categories&lt;br /&gt;
* [[Mokometeo]] is a widget which fetches the weather forecast from yahoo, for a list of cities&lt;br /&gt;
* {{opkg.org|176|CoovaChilli}} - It turns your phone's WiFi network into an Ad-Hoc Hotspot!&lt;br /&gt;
&lt;br /&gt;
==Setting Application==&lt;br /&gt;
* [[Wmiconfig]]- wmiconfig is a tool written by Atheros Communications Inc to configure the Ar6k WIFI chip used in the Neo Freerunner. This is a standalone C executable, released under GPL v2.&lt;br /&gt;
* [[GTA02 sysfs]]- sysfs is a filesystem that is mounted on /sys which contains various fake &amp;quot;files&amp;quot; that are actually filled by a variety of drivers and other kernel subsystems.  You can use it to change settings and behaviours of the kernel and drivers dynamically.&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
* [[Video Player]] - Using Mplayer on Openmoko smartphones.&lt;br /&gt;
* [http://katastrophos.net/andre/blog/software/quasar-media-player/ Quasar] - a mplayer frontend for X11.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== daemon ==&lt;br /&gt;
* [[PyPhonelog]] - daemon uses the framework to track and log all the calls made to and from the moko.&lt;br /&gt;
* [[Lscd]] - LSC library/daemon on Linux System.&lt;br /&gt;
&lt;br /&gt;
== An automatic list of application-related wiki pages ==&lt;br /&gt;
&lt;br /&gt;
The pages linked above are all maintained manually. We also maintain an automatic categorization system by tagging wiki pages. Here is the list of application-related pages in this wiki. Normally, every page listed below should be also listed above in the same category. The converse is false: there are applications without a wiki page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px black; padding: 1ex&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Applications in this Wiki:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;categorytree mode=pages depth=2 hideroot=on&amp;gt;Applications&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where to find more applications? ==&lt;br /&gt;
&lt;br /&gt;
At [http://opkg.org opkg.org] !&lt;br /&gt;
&lt;br /&gt;
Not all Openmoko apps are listed on this wiki - there are much more [http://projects.openmoko.org/softwaremap/ projects at the Openmoko GForge] than the wiki can list, not to mention self-hosted applications on their own websites. Actually the phones can run most Linux based Free Software, using for example the [[Debian]] distribution. The [http://handhelds.freshmeat.net/browse/1038/ mobile phones section of Freshmeat] may be a interesting place to look.&lt;br /&gt;
&lt;br /&gt;
Note also that there are many packages in the repository that are not installed by default. If what you want is a classic, chances are that it is already packaged. Suppose you want to install Perl:&lt;br /&gt;
 opkg list|grep perl&lt;br /&gt;
 opkg install perl&lt;br /&gt;
&lt;br /&gt;
More application download related pages:&lt;br /&gt;
&lt;br /&gt;
* [[Community Repository]]&lt;br /&gt;
* [[Users Repositories]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to find full distributions ? ==&lt;br /&gt;
&lt;br /&gt;
* [[Download]]: for complete system downloads&lt;br /&gt;
&lt;br /&gt;
== The usual warnings ==&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
* Some of these software are developed by Openmoko Inc. and some are contributed by the community. Any problems with community contributed software should be reported to the individual software developer rather than the Openmoko core team.&lt;br /&gt;
* Most programs listed here are not mature/stable, but only useable/beta.&lt;br /&gt;
* Many programs listed here are not yet packaged for your distribution and integrated in its repositories. Whichever it is.&lt;br /&gt;
* Installing experimental software from the internet is certain to break things. Running it as root is a very insecure thing to do. Kown that you will be burned, have backups, and be ready to apologize to everybody in your phone contact list in case they receive strange SMSs...&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications|Applications]]&lt;br /&gt;
[[Category:Basic End User]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Applications</id>
		<title>Applications</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Applications"/>
				<updated>2009-06-01T18:50:27Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Audio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Applications}}&lt;br /&gt;
This is the wiki's master application list for the Openmoko smartphones. &lt;br /&gt;
&lt;br /&gt;
== How to register new applications ?==&lt;br /&gt;
&lt;br /&gt;
This list can not be exhaustive, as new things are showing up every week. This page is here to help spreading awareness about applications. Here are instructions on how to add a specific application to this list. There are many ways to go&lt;br /&gt;
&lt;br /&gt;
Method 1 (preferred):&lt;br /&gt;
* Register your application at http://opkg.org. You will get a package number there, for example 33.&lt;br /&gt;
* Notify the community mailing list.&lt;br /&gt;
* Come back here, click on &amp;quot;edit&amp;quot; next to the appropriate section title, then add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* {{opkg.org|33|Application name}} A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method 2: Just link to wherever the application is hosted.&lt;br /&gt;
* Click on &amp;quot;edit&amp;quot; next to the appropriate section title, add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* [http://your.host.domain/the/path/to/app/page.html Application name] A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Method 3: Create a new page in this wiki.&lt;br /&gt;
* Click on &amp;quot;edit&amp;quot; next to the appropriate section title, then add a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;* [[Application name]] A short description&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The application name will appear in red, click on it to create and edit the new page.&lt;br /&gt;
&lt;br /&gt;
== Audio ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.faltantornillos.net/proyectos/gnu/brightPlayer/brightPlayerOM2008v0.1.tar.gz Bright Player] - Fast, lightweight and easy random music player.&lt;br /&gt;
* [[Dictator]] - Record mic, incoming GSM-sound, or a whole Phonecall&lt;br /&gt;
* {{opkg.org|55|ePiano}} - epiano is going to be a virtual piano&lt;br /&gt;
* [[Fingertier]] - minimal and finger friendly music player&lt;br /&gt;
* [[Fourier]]- Realtime frequency analysis of sound data.&lt;br /&gt;
* [[Guitartune]] - Tune musical Instruments.&lt;br /&gt;
* [[GTick]] - GTick is a metronome application written for GNU/Linux&lt;br /&gt;
* [[Intone]] - Elementary based mplayer frontend (for audio files).&lt;br /&gt;
* [[Mokoko]]- Play music.&lt;br /&gt;
* {{opkg.org|151|MokoPod}} - Retrieve and listen to podcasts &lt;br /&gt;
* [[Neoqplayer]] - Renamed as GorshPlayer: a multimedia player written in Qt4: play and retreive podcasts feeds, more reactive interface, now able to play videos ( in svn ).&lt;br /&gt;
* [http://fisoft.eu/standa/openmoko/omshuffle_0.1_arm.ipk omShuffle] - Inspired by Bright Player with volume control. Needs mplayer to work.&lt;br /&gt;
* [[Openmoko-mediaplayer2]] - Play music and video (mp3...)&lt;br /&gt;
* [[Openmokast]] - Play audio stream and slideshow stream&lt;br /&gt;
* [[Pythm]] - Audio player GUI using mplayer and mpd as backend.&lt;br /&gt;
* [[PyRok]] - Audio player which uses Gstreamer for playback and Pygame for GUI.&lt;br /&gt;
* [[Satan]] - Create your own music!&lt;br /&gt;
* [[Voicenote]] - Voicenote is a script which allows to record any sound from the microphone into a wav file. It can play the created files too. It is intended to be an easy and quick way to do so.&lt;br /&gt;
* [[boxar]] - Use the touchscreen as a finger friendly piano&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== BlueTooth ==&lt;br /&gt;
* [[Coypu]] - Utility for send file via BlueTooth&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Games ==&lt;br /&gt;
&lt;br /&gt;
* [[Games/Om 2007.2]] - Many small games on Om 2007.2&lt;br /&gt;
* [[Om 2008.8 Sudoku]] - Number placement based puzzle game&lt;br /&gt;
* [[Moko-sudoku]] - Another sudoku puzzle game.&lt;br /&gt;
* {{opkg.org|60|ScummVM}} ([[Scummvm|Wiki]]) Virtual Machine for several classic graphical point-and-click adventure games&lt;br /&gt;
* [[Kobodeluxe]] - A top-view space shooter, available from 2008.8 repositories.&lt;br /&gt;
* [[Pingus]] - Pingus is a lemmings clone with penguins.&lt;br /&gt;
* [[Duke Nukem 3D]] - Legendary First Person Shooter.&lt;br /&gt;
* [[Numptyphysics]] - A drawing puzzle game.&lt;br /&gt;
* [[Gnuboy]] - An emulator for the handheld gaming all-time bestseller.&lt;br /&gt;
* [[XBill]] - Little action game to stop Bill from installing Windows(tm) on computers.&lt;br /&gt;
* [[Xlogical]]-A puzzle based game where you turn spinners to move balls around.&lt;br /&gt;
* [[Liquid War]]-Liquid War is a truly original multiplayer wargame.&lt;br /&gt;
* [http://unsyncopated.com/BrainSolvent/Doom%20Port DOOM]- Classic FPS. Freerunner/1973&lt;br /&gt;
* [[MBAC]]- MBAC is &amp;quot;Moko Bulls and Cows&amp;quot;, a classic game for openmoko written in pygtk similar to mastermind.&lt;br /&gt;
* [[OpenVibe]] - The first opensource vibrator.&lt;br /&gt;
* [[OpenTTD]] - OpenTransportTycoonDeluxe, ported to openmoko, using only GPLed datafiles.&lt;br /&gt;
* [http://scalde.free.fr/index.php?option=com_content&amp;amp;view=article&amp;amp;id=93:pong-pogresses&amp;amp;catid=43:openmoko&amp;amp;Itemid=66 Pong progresses]- This is a little pong game for the openmoko freerunner. The screen is devided in halves, so you can touch the right half to move the paddle right and the left half to move it left.&lt;br /&gt;
* [[OpenMooCow]] - OpenMooCow reads information out of your accelerometers. Now, if you turn the phone upside down and back again, it &amp;quot;moos&amp;quot; like one of the little toys.&lt;br /&gt;
* [[Freerunner LightSaber]]-Application as iphone LightSaber.&lt;br /&gt;
* [[CellHunter]] - A game you earn points by collecting cells (in english now).&lt;br /&gt;
* [[XSkat]] - XSkat lets you play the card game Skat defined by the official Skat Order.&lt;br /&gt;
* {{opkg.org|136|OpenMiaoCat}} OpenMiaoCat, like OpenMooCow, makes your phone became a cat!&lt;br /&gt;
* {{opkg.org|149|I'm Rich}} I'm Rich application&lt;br /&gt;
* {{opkg.org|121|Mokomaze}} Ball-in-the-labyrinth game&lt;br /&gt;
* [[Acceleroids]] Shoot-the-asteroids game&lt;br /&gt;
* {{opkg.org|169|Black Sheep}} Fight insomnia!&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== GPS ==&lt;br /&gt;
&lt;br /&gt;
* [[GPS Sight]] - Display GPS information, location, tracks, etc, without maps.&lt;br /&gt;
* [[Gpsdrive]] - Car (bike, etc) navigation system&lt;br /&gt;
* [[Om 2008.8 Locations]] - (aka Splinter) - Location sharing based on GPS and SMS&lt;br /&gt;
* [[Navit]] - Car navigation system with routing engine&lt;br /&gt;
* [[TangoGPS]] - Display map (OSM..), record GPS tracks...&lt;br /&gt;
* [[Pyroute]] - Pyroute is a routing program written in Python. It features mobile phone GUI for maps, GPS, and routing.&lt;br /&gt;
* [http://www.mumpot.org/ mumpot] - Display map (OSM), routing, OSM editing, a bit of live editing&lt;br /&gt;
* [[QMapControl]] - Display maps (OSM..) and add points, lines...&lt;br /&gt;
* [[Qpegps]] - Display map with current position&lt;br /&gt;
* [[Idle Hands]] - Give a task to you based on your location&lt;br /&gt;
* [[Gtkaddpoi]] - Utility for add a POI to TangoGPS using address or coordinates and export to Navit or to .kml file.&lt;br /&gt;
* [[Gpsdcontrol]]-A simple python script for start or stop gpsd daemon with a button on the desktop.&lt;br /&gt;
* [[OpenBmap]]-a free and open map of wireless communicating objects (e.g. cellular antenna, Wi-Fi, Bluetooth). It provides tools to mutualize data, create and access this map.&lt;br /&gt;
* {{opkg.org|162|gvSIG Mobile}} - This is an unofficial port of gvSIG Mobile (http://www.gvsig.gva.es/) to the Openmoko platform. gvSIG Mobile for Openmoko is currently a GPS-enabled projection-aware map viewer. [http://gvsigmobileonopenmoko.wordpress.com/ Homepage].&lt;br /&gt;
* {{opkg.org|175|BikeAtor}} - Like TangoGPS BikeAtor can display OSM Maps. The Speedometer displays the most interesting values of the trip.&lt;br /&gt;
* {{opkg.org|178|bicirutas}} - This application looks for mtb routes in www.bicirutas.net (routes in Spain, Portugal, United Kingdom, France, Italy and Germany). It gets the current position from the gps system and downloads nearby routes. Then you can follow them with tangogps application.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
* [[Orrery]] - Displays the night sky&lt;br /&gt;
* [[OMView]] - Image viewer&lt;br /&gt;
* [[PyPenNotes]] - Write notes using pen and touchscreen&lt;br /&gt;
* [[Gpe-scap]] - Take screenshots&lt;br /&gt;
* [[Flash|Gnash]]-Play flash file on Neo&lt;br /&gt;
* [[Neon]] - Image viewer&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Internet ==&lt;br /&gt;
&lt;br /&gt;
* [[Twinkle]] - Voice over IP&lt;br /&gt;
* [[Linphone]] - Voice over IP&lt;br /&gt;
* [[Midori]] - Webkit based web browser&lt;br /&gt;
* [[Minimo]] - Mozilla based web browser&lt;br /&gt;
* [http://www.dillo.org/ Dillo] - Multiplatform fast and small web browser ([http://misc.andi.de1.cc/dillo/ .ipk]).&lt;br /&gt;
* [[Mokopedia]] - Read small Wikipedia dumps offline&lt;br /&gt;
* [[Offline Wikipedia reader]] - store the entire content of wikipedia (single-language, excluding images), on a single 8GB microSD card&lt;br /&gt;
* [[Openmoko-browser2]] - The original Openmoko web browser&lt;br /&gt;
* [[Openmokast]] - Play audio stream and slideshow stream&lt;br /&gt;
* [[Openmoko Mail]] - E-mail client&lt;br /&gt;
* [[Pidgin]] - Instant messaging client (ICQ, MSN, Jabber, Yahoo and more.)&lt;br /&gt;
* [[CenterIM]] - Instant messaging client (terminal-based).&lt;br /&gt;
* [[PyFeedRead]] - RSS feed reader&lt;br /&gt;
* [[Qtmail]] - Default mail program on Om 2008.8&lt;br /&gt;
* [[TwitterMoko]] - A Twitter client for Openmoko&lt;br /&gt;
* [http://code.google.com/p/pyqt-browser/ pyqt-browser] - modified the sample code from python-pyqt4 and changed it to use webkit for web browsing. &lt;br /&gt;
* [http://we.trekbeyond.org/~kd8ikt/moko/shr_pkgz/ ettercap-ng]&lt;br /&gt;
* [http://www.netsurf-browser.org/ netsurf]-A new browser for Neo FreeRunner.&lt;br /&gt;
* {{opkg.org|205|GPRSModem}} - Converts your neo in a GPRS modem.&lt;br /&gt;
&lt;br /&gt;
== Office ==&lt;br /&gt;
* [[Epdfview]] - PDF reader.&lt;br /&gt;
* Evince - Document reader for PDF, PS, DJVU and more.&lt;br /&gt;
* [[FBReader]] - E-book reader program (TXT, FB2, HTML and more)&lt;br /&gt;
* [[Gutenflash]] - Fast text reader by scrolling text&lt;br /&gt;
* [[OMoney]] - A bookkeeping application&lt;br /&gt;
* {{opkg.org|191|PISI}} - PISI is synchronizing (PIM) information&lt;br /&gt;
* [[e-tasks]] - An elementary task manager&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
* [[Mofi]] - Wifi setup tool&lt;br /&gt;
* [[Lint-wifi]] - Wifi setup tool&lt;br /&gt;
* [[KnjMokoWifi]] - Wifi setup tool&lt;br /&gt;
* [[KnjMokoOPKG]] - A graphical frontend to OPKG.&lt;br /&gt;
* [[Om 2008.8 Installer]] - Graphical software installer&lt;br /&gt;
* [[Opkg]] - Command line software installer&lt;br /&gt;
* [[Sephora]] - Settings manager&lt;br /&gt;
* [[SettingsGUI]] - Edit various settings&lt;br /&gt;
* [[Wicd]] - Wifi setup tool&lt;br /&gt;
* [[ZOMG!]] - A graphical package manager (opkg frontend -&amp;gt; should work on any distro)&lt;br /&gt;
* [[Timezone|tzdata]]- Customise your time zone setting.&lt;br /&gt;
* [[momtools]] - an application to control Wifi, gprs and some other stuff&lt;br /&gt;
* [[Wlan]] - Wlan is an application to manage wireless connection on the Freerunner&lt;br /&gt;
&lt;br /&gt;
== System ==&lt;br /&gt;
* [[Aphasia]] - A system built on Erlang and a vertical application for people with apahasia.&lt;br /&gt;
* [http://www.pierrox.net/auimd/ AUIMD] - AUIMD is a PyQt graphical user interface for mobile devices.&lt;br /&gt;
* [[Auxlaunch]] - Finger-friendly app launcher and window switcher&lt;br /&gt;
* [[Display Locker]] - Screen lock&lt;br /&gt;
* [[Gwaterpas]] - levelling tool using accelerometer&lt;br /&gt;
* [[Gestures]] - Detect movement and display information, rotate screen&lt;br /&gt;
* [[Keychain]] - SSH keys&lt;br /&gt;
* [[MokoFEM]] - Monitors GSM information&lt;br /&gt;
* [[Mokostat]] - Monitors battery&lt;br /&gt;
* [[Openmoko Bluetooth remote controller|ReMoko]] - Control stuff via BlueTooth&lt;br /&gt;
* [[Rotate]] - Rotate screen when phone is rotated&lt;br /&gt;
* [[Vala-terminal]] - Command prompt with tabs&lt;br /&gt;
* [[Ts calibrate]] - Calibrates touchscreen&lt;br /&gt;
* [[Zedlock]] - Screen locker&lt;br /&gt;
* [http://fso-control.projects.openmoko.org/ fso-control] - Popup Power menu to shutdown/suspend/reboot.&lt;br /&gt;
* [[omkeys_functions]] - Remap AUX key bindings&lt;br /&gt;
* [[Siglaunchd]] - A daemon that listens to dbus signals and launches appliactions upon arrival.&lt;br /&gt;
* [[Pexpect]]-a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Telephony ==&lt;br /&gt;
* [[Dialer/2007.2]] - The dialer application in Om 2007.2&lt;br /&gt;
* [[Openmoko SMS Middleware]]- SMS middleware is a Openmoko middleware software for additional features related to SMS. Plugin architecture and Python based code gives this project lots of flexibility and enchancebility.&lt;br /&gt;
* [[Paroli]] -Paroli is an integrated phone application based on Tichy (and so also written in python). &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
* [[Unison]] - Unison is a file-synchronization tool for Unix and Windows. It determines all differences between two directory trees and lets the user decide, how to proceed with every differing file. &lt;br /&gt;
* [[HP48 Series RPN Calculator]] - Calculator with many functions&lt;br /&gt;
* [[qwo]]- An alternative input method.&lt;br /&gt;
* {{opkg.org|57|fido}} - [[fido]] is a todo list\note manager written with elementary&lt;br /&gt;
* [http://meuk.spritesserver.nl/lightsaber-0.1.tgz The Lightsaber]. Pre-alpha starwaresque orphanware.&lt;br /&gt;
* [[NeoTool]] NeoTool is a bash script for your desktop system to provide a friendly GUI frontend to some common management tasks.&lt;br /&gt;
* [[NeoCon]] - neocon is a handy serial console utility (not only) for u-boot.  The main feature of neocon is actually that you can give it a list of devices and it will pick one that works.&lt;br /&gt;
* [http://techiem2.net/index.php?/archives/10-Freerunner-USB-Mode-Control-Program.html usbmode]-a quick pygtk program. &lt;br /&gt;
* [[Enotes]] - Enotes is the implementation of a TODOlist manager written with elementary to appear better with distribution that use illume, like SHR.&lt;br /&gt;
* [[LED clock]] - When an Openmoko is sitting unused at night, turn it into an alarm clock with large 7-segment digits on a black background in landscape mode. &lt;br /&gt;
* [[MokoGeocaching]] - Utility for add a POI to TangoGPS using geocaching.com &lt;br /&gt;
* [[Wrench]] - Modual used utility enlightenment_remote.&lt;br /&gt;
* [[Yaouh!]] - Yet Another OSM Updater H.&lt;br /&gt;
* [[ShortOm]] - Graphical launcher for shell or application, with editable config file, and log result page.&lt;br /&gt;
* [[Pimlico]]-Pimlico is a suite of lightweight Personal Information Management (PIM) applications designed primarily for handheld and mobile devices&lt;br /&gt;
* [http://projects.openmoko.org/projects/otp4neo/ OTP4Neo] One time password generator&lt;br /&gt;
* [http://projects.openmoko.org/projects/ffalarms/ FFAlarm] is a program to set multiple alarms a day using a finger friendly user interface&lt;br /&gt;
* [[OpenWrt]]-basic support for the Openmoko &amp;quot;Freerunner&amp;quot;! Kernel (2.6.28) is building and booting.&lt;br /&gt;
* [[Enscribi]]-a handwriting recognition input method for Linux. It's mainly developed for the Openmoko Freerunner smartphone.&lt;br /&gt;
* [[GridPad]]-GridPad is an alternative input method for entering text with your finger, a Simple Character Recognizer Software.&lt;br /&gt;
* [[sortdesk]] sort your om-desktop in categories&lt;br /&gt;
* [[Mokometeo]] is a widget which fetches the weather forecast from yahoo, for a list of cities&lt;br /&gt;
* {{opkg.org|176|CoovaChilli}} - It turns your phone's WiFi network into an Ad-Hoc Hotspot!&lt;br /&gt;
&lt;br /&gt;
==Setting Application==&lt;br /&gt;
* [[Wmiconfig]]- wmiconfig is a tool written by Atheros Communications Inc to configure the Ar6k WIFI chip used in the Neo Freerunner. This is a standalone C executable, released under GPL v2.&lt;br /&gt;
* [[GTA02 sysfs]]- sysfs is a filesystem that is mounted on /sys which contains various fake &amp;quot;files&amp;quot; that are actually filled by a variety of drivers and other kernel subsystems.  You can use it to change settings and behaviours of the kernel and drivers dynamically.&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
&lt;br /&gt;
* [[Video Player]] - Using Mplayer on Openmoko smartphones.&lt;br /&gt;
* [http://katastrophos.net/andre/blog/software/quasar-media-player/ Quasar] - a mplayer frontend for X11.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== daemon ==&lt;br /&gt;
* [[PyPhonelog]] - daemon uses the framework to track and log all the calls made to and from the moko.&lt;br /&gt;
* [[Lscd]] - LSC library/daemon on Linux System.&lt;br /&gt;
&lt;br /&gt;
== An automatic list of application-related wiki pages ==&lt;br /&gt;
&lt;br /&gt;
The pages linked above are all maintained manually. We also maintain an automatic categorization system by tagging wiki pages. Here is the list of application-related pages in this wiki. Normally, every page listed below should be also listed above in the same category. The converse is false: there are applications without a wiki page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: solid 1px black; padding: 1ex&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Applications in this Wiki:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;categorytree mode=pages depth=2 hideroot=on&amp;gt;Applications&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where to find more applications? ==&lt;br /&gt;
&lt;br /&gt;
At [http://opkg.org opkg.org] !&lt;br /&gt;
&lt;br /&gt;
Not all Openmoko apps are listed on this wiki - there are much more [http://projects.openmoko.org/softwaremap/ projects at the Openmoko GForge] than the wiki can list, not to mention self-hosted applications on their own websites. Actually the phones can run most Linux based Free Software, using for example the [[Debian]] distribution. The [http://handhelds.freshmeat.net/browse/1038/ mobile phones section of Freshmeat] may be a interesting place to look.&lt;br /&gt;
&lt;br /&gt;
Note also that there are many packages in the repository that are not installed by default. If what you want is a classic, chances are that it is already packaged. Suppose you want to install Perl:&lt;br /&gt;
 opkg list|grep perl&lt;br /&gt;
 opkg install perl&lt;br /&gt;
&lt;br /&gt;
More application download related pages:&lt;br /&gt;
&lt;br /&gt;
* [[Community Repository]]&lt;br /&gt;
* [[Users Repositories]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to find full distributions ? ==&lt;br /&gt;
&lt;br /&gt;
* [[Download]]: for complete system downloads&lt;br /&gt;
&lt;br /&gt;
== The usual warnings ==&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
* Some of these software are developed by Openmoko Inc. and some are contributed by the community. Any problems with community contributed software should be reported to the individual software developer rather than the Openmoko core team.&lt;br /&gt;
* Most programs listed here are not mature/stable, but only useable/beta.&lt;br /&gt;
* Many programs listed here are not yet packaged for your distribution and integrated in its repositories. Whichever it is.&lt;br /&gt;
* Installing experimental software from the internet is certain to break things. Running it as root is a very insecure thing to do. Kown that you will be burned, have backups, and be ready to apologize to everybody in your phone contact list in case they receive strange SMSs...&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications|Applications]]&lt;br /&gt;
[[Category:Basic End User]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Android_on_Freerunner</id>
		<title>Android on Freerunner</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Android_on_Freerunner"/>
				<updated>2009-03-07T13:51:40Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Android on Freerunner}}&lt;br /&gt;
&lt;br /&gt;
{|align=right&lt;br /&gt;
|__TOC__&lt;br /&gt;
|}&lt;br /&gt;
[[Image:Freerunner-android-01.png]]&lt;br /&gt;
= Introduction = &lt;br /&gt;
This page is dedicated to the installation of [[Android]] (an [[Open Handset Alliance]] Project) on the [[Neo 1973]] and [[Neo FreeRunner]] handsets.&lt;br /&gt;
&lt;br /&gt;
You can find other information, such as porting, development and day to day usage here : [[Android]]&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
&lt;br /&gt;
=== Using this guide ===&lt;br /&gt;
&lt;br /&gt;
*1&lt;br /&gt;
&lt;br /&gt;
If you see a command like this, you must run it as root&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
If you see one like this, you can run it as a regular user&lt;br /&gt;
&lt;br /&gt;
 $&lt;br /&gt;
&lt;br /&gt;
*2&lt;br /&gt;
&lt;br /&gt;
When you see these commands&lt;br /&gt;
&lt;br /&gt;
 adb&lt;br /&gt;
&lt;br /&gt;
 dfu-util&lt;br /&gt;
&lt;br /&gt;
it is assumed that you have them installed on your system and inside your /usr/bin. This may not be the case, you may just have downloaded the binary. If so, you need to change to the directory you downloaded the binary too then issue the same commands adding a ./ before it eg. &lt;br /&gt;
&lt;br /&gt;
 ./adb&lt;br /&gt;
&lt;br /&gt;
 ./dfu-util&lt;br /&gt;
&lt;br /&gt;
adb connects to Android but you need to have made sure you have set it up first. Make sure your FreeRunner was booted while being plugged in to a USB port. Then following run the following commands:&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # adb kill-server&lt;br /&gt;
 # ADBHOST=192.168.0.202 adb devices&lt;br /&gt;
&lt;br /&gt;
You should now have no trouble using adb.&lt;br /&gt;
&lt;br /&gt;
=== Registering with the GSM network ===&lt;br /&gt;
&lt;br /&gt;
Before you install Android on your FreeRunner you should check, using the operating system it came with, that your sim card will register with your network.&lt;br /&gt;
&lt;br /&gt;
The version of internal [[GSM]] [[firmware]] that comes preloaded on the FreeRunner has compatibility issues with a feature on newer [[sim]] cards. This effects [[3G]], o2 sims and possibly others. if you have one of those you will probably need to upgrade your GSM firmware to get the sim to register with the network. Doing that first means you know it's working before you install Android.&lt;br /&gt;
&lt;br /&gt;
[http://wiki.openmoko.org/wiki/GSM/Flashing GSM/Flashing]&lt;br /&gt;
&lt;br /&gt;
To flash your GSM firmware you will need to have [[USB]] networking setup between your desktop and the OM distribution installed on your FreeRunner. However, your FreeRunner does not need internet access as you can download the GSM firmware files on your desktop PC and transfer them to your FreeRunner using [http://unixhelp.ed.ac.uk/CGI/man-cgi?scp+1 scp]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.openmoko.org/wiki/Usb_networking USB Networking]&lt;br /&gt;
&lt;br /&gt;
== Configuring the Bootloader ==&lt;br /&gt;
&lt;br /&gt;
There are two bootloaders you can use to boot Android; [http://wiki.openmoko.org/wiki/Qi Qi] and [http://wiki.openmoko.org/wiki/Uboot Uboot]. Uboot comes installed on the FreeRunner, Qi is a replacement and is thought to be superior. However there have been, and probably still are, problems when using Qi and Android so Uboot is recommended at this point.&lt;br /&gt;
&lt;br /&gt;
You can download images for them both here:&lt;br /&gt;
&lt;br /&gt;
[http://people.openmoko.org/andy/ Andy Tracking Images] (For Qi on the FreeRunner grab the image starting qi-s3c2442)&lt;br /&gt;
&lt;br /&gt;
The Android kernel image can be more than 2MB in size. The UBoot environment that comes with your FreeRunner is only able to boot a kernel 2MB in size or less. To use a kernel larger than 2MB you need to:&lt;br /&gt;
&lt;br /&gt;
* Change to the [http://wiki.openmoko.org/wiki/Qi Qi Bootloader]. It supports 2MB kernels out of the box.&lt;br /&gt;
&lt;br /&gt;
* Adjust your [[Uboot]] environment to [http://meinopenmoko.blogspot.com/2008/12/prepare-uboot-to-boot-android.html support a Kernel of more than 2 MB]&lt;br /&gt;
&lt;br /&gt;
 setenv bootcmd setenv bootargs \${bootargs_base} \${mtdparts}\; nand read.e 0x32000000 kernel 0x300000\; bootm 0x32000000&lt;br /&gt;
 saveenv&lt;br /&gt;
&lt;br /&gt;
== Installing Android on the Internal Flash ==&lt;br /&gt;
&lt;br /&gt;
=== Preparing the SD Card ===&lt;br /&gt;
&lt;br /&gt;
The [[SD]] Card in your FreeRunner needs to be configured with two 2 primary partitions before Android will boot. First a VFAT/MSDOS (16 or 32) which acts as the '/sdcard' storage area (for pictures, movies, music, etc). Second an ext3 primary partition which Android uses as '/data' with in which it stores settings, caches, etc.&lt;br /&gt;
&lt;br /&gt;
==== On Linux ====&lt;br /&gt;
&lt;br /&gt;
Insert the Mico SD Card from your FreeRunner into your Linux desktop then bring up a Terminal and type&lt;br /&gt;
&lt;br /&gt;
    $ dmesg | grep sd&lt;br /&gt;
&lt;br /&gt;
You will get an output like this, in this instance we can see that the SD Card has been assigned the device name 'sde'&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    sd 9:0:0:0: [sde] Attached SCSI removable disk&lt;br /&gt;
    ...&lt;br /&gt;
    &lt;br /&gt;
Now, as root, use 'fdisk' to partition the device.&lt;br /&gt;
&lt;br /&gt;
   # fdisk /dev/sde &lt;br /&gt;
&lt;br /&gt;
Pressing 'p' will show you the current partitions on the SD Card 'd' will delete them and 'n' will create a new one. Create a primary partition for your media. Then another primary partition for Android to store its data on.&lt;br /&gt;
&lt;br /&gt;
On a 1Gig card I used 768MB for the first partition ('+768MB' in fdisk) and the remainder for Android data. Here is fdisk's partition output:&lt;br /&gt;
&lt;br /&gt;
       Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
    /dev/sde1               1         769      750513+  83  Linux&lt;br /&gt;
    /dev/sde2             770        1016      241072   83  Linux&lt;br /&gt;
&lt;br /&gt;
Now all that's left to do is format the partitions with the appropriate filesystem But first hit 'w' in fdisk to write the changes to the SD Card.&lt;br /&gt;
&lt;br /&gt;
Then format like this:&lt;br /&gt;
&lt;br /&gt;
    # mkfs.vfat -v -n and-media -F 32 /dev/sde1&lt;br /&gt;
    # mkfs.ext3 -v -L and-data /dev/sde2&lt;br /&gt;
&lt;br /&gt;
That's it, you can now remove the SD card from your desktop. If you re-insert it you will have two new usb disk devices.&lt;br /&gt;
{{Note|After Android has booted you will only be able to access the 'data' partition as root.}}There is no need to populate the ext3 partition at all. The VFAT partition can be populated with media content (ring tones etc.) if you so desire. {{Note|It can be worth reformatting the data partition when you upgrade the Android OS on your phone. Old settings can result in problems, wifi for example. But remember that formatting the Data partition will result in your preferences, text messages and contacts etc. being erased.}}&lt;br /&gt;
&lt;br /&gt;
==== On FreeRunner (2008.x) ====&lt;br /&gt;
&lt;br /&gt;
The SD card can be formatted from within an existing 2008.x installation on your FreeRunner.&lt;br /&gt;
SSH as root into the FreeRunner and use 'fdisk' to partition the device.&lt;br /&gt;
&lt;br /&gt;
   # fdisk /dev/mmcblk0&lt;br /&gt;
&lt;br /&gt;
After this create the partitions as described in the step above.&lt;br /&gt;
&lt;br /&gt;
To format the new vfat partition you will need dosfstools which can be downloaded from&lt;br /&gt;
&lt;br /&gt;
    [http://members.shaw.ca/mmontour/neo/dosfstools_2.11-r0_armv4t.ipk dosfstools_2.11-r0_armv4t.ipk]&lt;br /&gt;
&lt;br /&gt;
Use any SCP client to copy this file to your FreeRunner and install using&lt;br /&gt;
&lt;br /&gt;
    opkg install dosfstools_2.11-r0_armv4t.ipk&lt;br /&gt;
&lt;br /&gt;
Once the installation is complete format the partitions:&lt;br /&gt;
&lt;br /&gt;
    # mkfs.vfat -v -n and-media /dev/mmcblk0p1&lt;br /&gt;
    # mkfs.ext3 -v -L and-data /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
NOTE: In case you are unable to format the partitions because they are already mounted for some reason you can get a list of process IDs that are using it by running:&lt;br /&gt;
&lt;br /&gt;
    # fuser -m /media/card&lt;br /&gt;
&lt;br /&gt;
Then kill all the processes that were using the card and try formatting again.&lt;br /&gt;
&lt;br /&gt;
==== On other OS's ====&lt;br /&gt;
&lt;br /&gt;
There are no open source or free partition editors on Windows or Mac that can manage an ext3 partition. If you do not have Linux installed you can use the [http://gparted.sourceforge.net/ GParted] bootable CD. This CD will boot into a graphical environment with which you can partition your SD Card. You may have to boot with the SD Card inserted for GParted to recognize it as a drive.&lt;br /&gt;
&lt;br /&gt;
=== Downloading Android Images ===&lt;br /&gt;
&lt;br /&gt;
Next, Grab yourself the latest Android images. There are two parts you need to flash, the kernel (uImage*.bin) and the root fs (android*.jffs2). [http://www.koolu.com/ Koolu] release images and you can get them here:&lt;br /&gt;
&lt;br /&gt;
    [http://freerunner.android.koolu.com/release-files Release files (Android FreeRunner)]&lt;br /&gt;
&lt;br /&gt;
Koolu are not the only people working on porting Android to the FreeRunner and although collaboration is hopefully on the way, there are other places to get images:&lt;br /&gt;
&lt;br /&gt;
Michael Trimarchi's (panicking) images are the most up to date and functional:&lt;br /&gt;
&lt;br /&gt;
    [http://panicking.kicks-ass.org/download/ Michael Trimarchi's images with latest fixes]&lt;br /&gt;
&lt;br /&gt;
Sean McNeil has placed an older 2.6.26 kernel and root fs at:&lt;br /&gt;
&lt;br /&gt;
    [http://people.openmoko.org/sean_mcneil/ Sean McNeil images]&lt;br /&gt;
&lt;br /&gt;
=== Flashing the FreeRunner ===&lt;br /&gt;
&lt;br /&gt;
==== On Linux ====&lt;br /&gt;
&lt;br /&gt;
To flash your FreeRunner, replace what ever phone stack you have on there at the moment with Android, first download [http://wiki.openmoko.org/wiki/Dfu-util dfu-util], this is the program that will flash your phone.&lt;br /&gt;
&lt;br /&gt;
Once you have that installed (whether by simply downloading the binary or installing an rpm) Open up a terminal and cd to where you downloaded the images too eg.&lt;br /&gt;
&lt;br /&gt;
    # cd /home/joe/Downloads&lt;br /&gt;
&lt;br /&gt;
Plug your FreeRunner into a USB port and boot it into the nand boot loader; Hold down the aux button and then the power button until nor appears.&lt;br /&gt;
&lt;br /&gt;
{{Note|The FreeRunner will only stay in in the nand bootloader state for about 30 seconds with no activity.}}Now Flash the kernel image (you will need to be root) with this command:&lt;br /&gt;
&lt;br /&gt;
    # dfu-util -a kernel -R -D uImage-moredrivers-GTA02.bin&lt;br /&gt;
&lt;br /&gt;
and finally the root fs with this one:&lt;br /&gt;
&lt;br /&gt;
    # dfu-util -a rootfs -R -D androidfs-koolu-beta3.jffs2&lt;br /&gt;
&lt;br /&gt;
{{Note|The './' part assumes you are using the binary download and that it was downloaded to the same place as your images. If you are, remember to make the dfu-util binary executable.}}If you find that dfu-util complains about there being more than one USB device available it might be because you have a webcam or some other device plugged in. If you can not remove the other device follow this procedure:&lt;br /&gt;
&lt;br /&gt;
Unplug your FreeRunner and run the command&lt;br /&gt;
&lt;br /&gt;
    # dfu-utils --list&lt;br /&gt;
&lt;br /&gt;
This will list the other connected usb devices. Now plug your FreeRunner back in and run the command again, the new device will be your FreeRunner. You can now go ahead and flash with the added command '-d FREERUNNER_DEVICE' eg.&lt;br /&gt;
&lt;br /&gt;
    # dfu-util -d 0x1d50:0x5119 -a rootfs -R -D freerunner-v13.jffs2&lt;br /&gt;
&lt;br /&gt;
== Installing Android on an SD card ==&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
There are currently a few prebuilt images:&lt;br /&gt;
[http://activationrecord.net/radekp/openmoko/android/ Radek Polak's SD card images] (install on ext3, first partition on SD must be FAT16)&lt;br /&gt;
&lt;br /&gt;
=== Using jffs2 images ===&lt;br /&gt;
&lt;br /&gt;
You can also boot from the SD Card using the pre built images like so :-&lt;br /&gt;
* Mount the image using [http://wiki.openmoko.org/images/8/82/Mntjffs.sh this] script like so &lt;br /&gt;
   sudo ./Mntjffs.sh freerunner-v5.jffs2 image/&lt;br /&gt;
* Then copy (cp -R) the files in directory image/ to any of the first three partitions on the SD Card (if using Qi) eg cp -R /your-path/image/* /media/android/&lt;br /&gt;
* cd /media/android.&lt;br /&gt;
* wget http://activationrecord.net/radekp/openmoko/android/init.rc .&lt;br /&gt;
* mkdir boot&lt;br /&gt;
* copy the kernel here and name it uImage-GTA02.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some notes about booting android from sdcard : &lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
* Build android from source. See [http://trac.koolu.org/ koolu website] for directions.&lt;br /&gt;
* Use the first script in [http://lists.openmoko.org/pipermail/community/2008-December/036982.html this mail] (adapt to your filesystem) to stage your android install.&lt;br /&gt;
* copy the contents of this directory on a ext3 partition on your sdcard.&lt;br /&gt;
* add a /boot directory on your sdcard.&lt;br /&gt;
* copy the uImage-android kernel (see above) and copy it inside your /boot with the exact name '''uImage-GTA02.bin'''&lt;br /&gt;
* I changed the init.rc (in your root on the sd) to remove mounts that could be problematic (/data for example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- filesystem/root/init.rc	2008-12-15 17:51:14.000000000 +0100&lt;br /&gt;
+++ phyce.init.rc	2008-12-19 15:56:25.000000000 +0100&lt;br /&gt;
@@ -24,7 +24,7 @@&lt;br /&gt;
     mkdir /sqlite_stmt_journals 01777 root root&lt;br /&gt;
     mount tmpfs tmpfs /sqlite_stmt_journals size=4m&lt;br /&gt;
 &lt;br /&gt;
-    mount rootfs rootfs / ro remount&lt;br /&gt;
+    mount rootfs rootfs / rw remount&lt;br /&gt;
 &lt;br /&gt;
     write /proc/sys/kernel/panic_on_oops 1&lt;br /&gt;
     write /proc/sys/kernel/hung_task_timeout_secs 0&lt;br /&gt;
@@ -38,14 +38,14 @@&lt;br /&gt;
 #    mount yaffs2 mtd@system /system ro remount&lt;br /&gt;
 &lt;br /&gt;
     # We chown/chmod /data again so because mount is run as root + defaults&lt;br /&gt;
-    mount ext3 /dev/block/mmcblk0p2 /data nosuid nodev&lt;br /&gt;
-    chown system system /data&lt;br /&gt;
-    chmod 0771 /data&lt;br /&gt;
+#    mount ext3 /dev/block/mmcblk0p2 /data nosuid nodev&lt;br /&gt;
+#    chown system system /data&lt;br /&gt;
+#    chmod 0771 /data&lt;br /&gt;
 &lt;br /&gt;
     # Same reason as /data above&lt;br /&gt;
-    mount yaffs2 mtd@cache /cache nosuid nodev&lt;br /&gt;
-    chown system cache /cache&lt;br /&gt;
-    chmod 0770 /cache&lt;br /&gt;
+#    mount yaffs2 mtd@cache /cache nosuid nodev&lt;br /&gt;
+#    chown system cache /cache&lt;br /&gt;
+#    chmod 0770 /cache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install [[Qi]] on you NAND flash. You can still boot whatever distro you've got on internal flash using the NOR bootloader. You should try the magic file in /boot to show kernel messages.&lt;br /&gt;
* boot the GTA02, and pray.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remote access to Android (adb) ==&lt;br /&gt;
&lt;br /&gt;
Although this is not technically part of installing Android it is very useful to have set up. Android Debug Bridge (adb) is a versatile tool that lets you manage the state of a device, in this case, your FreeRunner.&lt;br /&gt;
&lt;br /&gt;
Some ways you can use adb include:&lt;br /&gt;
&lt;br /&gt;
* Run shell commands on the phone.&lt;br /&gt;
* Copy files from your desktop to the phone and Vice-versa.&lt;br /&gt;
&lt;br /&gt;
You can find out about it on the [http://developer.android.com/guide/developing/tools/adb.html Android developers page] and a page on this wiki [[Android debug bridge]]&lt;br /&gt;
&lt;br /&gt;
However if you would just like a very quick getting started guide, read on. You can download a binary from [http://people.openmoko.org/sean_mcneil/adb here]. Then if you like copy it to /usr/bin (and don't forget to make it executable).&lt;br /&gt;
&lt;br /&gt;
First you must boot Android while it is plugged in to a USB port, you can unplug it and re-plug it all you like after that but for the USB connection to work it must be connected at boot time.&lt;br /&gt;
&lt;br /&gt;
Next issue this command to set up USB networking...&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
Then this one because it helps make sure everything works nicely...&lt;br /&gt;
&lt;br /&gt;
 # adb kill-server&lt;br /&gt;
&lt;br /&gt;
Followed by this to find your phone...&lt;br /&gt;
&lt;br /&gt;
 ADBHOST=192.168.0.202 adb devices&lt;br /&gt;
&lt;br /&gt;
{{Note|Remember that if you didn't copy adb to /usr/bin you will need to run these commands from the directory you downloaded it too and put ./ in front of adb.}}Now you are free to remotely connect to your Android phone, here are a couple of commands you might find useful&lt;br /&gt;
&lt;br /&gt;
*Copy a file to your SD card:&lt;br /&gt;
&lt;br /&gt;
 # adb push YOUR_FILE /sdcard/&lt;br /&gt;
&lt;br /&gt;
*Copy a log file from your phone to your computer:&lt;br /&gt;
&lt;br /&gt;
  # adb logcat -d &amp;gt; android.log&lt;br /&gt;
&lt;br /&gt;
*If you just want to log in to the Android shell:&lt;br /&gt;
&lt;br /&gt;
 # adb shell&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
=== SD card won't mount ===&lt;br /&gt;
&lt;br /&gt;
There should be a /sdcard directory on your FreeRunner, for some reason this does not always get created (the command is in the 'init.rc' but does not always work). To create the correct dir on your FreeRunner and so enable your SD card, do the following.&lt;br /&gt;
&lt;br /&gt;
* Plug your FreeRunner into a USB port, boot Android and then enter these commands:&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # adb kill-server&lt;br /&gt;
 # ADBHOST=192.168.0.202 adb devices&lt;br /&gt;
 # adb shell mount -o remount,rw /dev/root /&lt;br /&gt;
 # adb shell&lt;br /&gt;
&lt;br /&gt;
 # mkdir /sdcard&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
* Then reboot your FreeRunner&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Android|Main Android page on this wiki]]&lt;br /&gt;
* Video of usability : http://digg.com/linux_unix/Video_demo_of_Freerunner_running_Android_Cupcake_Tutorial&lt;br /&gt;
&lt;br /&gt;
[[category:Distributions]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Android</id>
		<title>Android</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Android"/>
				<updated>2009-03-07T13:48:03Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Android}}&lt;br /&gt;
{{Distributions|Android}}&lt;br /&gt;
&lt;br /&gt;
{|align=right&lt;br /&gt;
|__TOC__&lt;br /&gt;
|}&lt;br /&gt;
[[Image:Android-logo.png]]&lt;br /&gt;
= Introduction = &lt;br /&gt;
This page is the central place for documentation about Android on the [[Neo1973 Hardware|Neo 1973]] and [[Neo_FreeRunner_GTA02_Hardware|FreeRunner]] handsets.&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/android/ Android] is a software stack for mobile devices developed by the [http://www.openhandsetalliance.com/ The Open Handset Alliance.] Although Android is publicized as being [[open source software]] (most of the source code has been released) parts of the code have not been released yet.&lt;br /&gt;
&lt;br /&gt;
A lot of work is being done to get Android functioning properly on the [[FreeRunner]] and it is likely, in the near future, to be the distribution most suited for using the FreeRunner as a phone.&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
See: [[Android usage]] for detailed instructions on using Android on the FreeRunner.&lt;br /&gt;
&lt;br /&gt;
Android is gaining functionality on the FreeRunner all the time and with Michael Trimarchi's [http://panicking.kicks-ass.org/download/ (panicking)] images it is possible to use as an everyday phone. Prerequisites for the best success seem to be:&lt;br /&gt;
&lt;br /&gt;
* Use the jffs version 14.6 and the kernel v13.&lt;br /&gt;
* Uboot (possibly better still, the original version that comes with the FreeRunner)&lt;br /&gt;
* The original GSM firmware (moko10 may cause some issues)&lt;br /&gt;
&lt;br /&gt;
You can then hope to achieve :&lt;br /&gt;
&lt;br /&gt;
* GSM calls&lt;br /&gt;
* SMS&lt;br /&gt;
* Adding, removing and importing contacts&lt;br /&gt;
* GPRS&lt;br /&gt;
* Wi-Fi&lt;br /&gt;
&lt;br /&gt;
Caveats&lt;br /&gt;
&lt;br /&gt;
* Volume during voice calls is very low.&lt;br /&gt;
* Wi-Fi does not reconnect after sleep - [http://wiki.openmoko.org/wiki/Android_usage#Wifi setup]&lt;br /&gt;
* You have to disable PIN security on your SIM card.&lt;br /&gt;
&lt;br /&gt;
[http://spreadsheets.google.com/ccc?key=popRpaZG1txEXGHDDboxtIA&amp;amp;hl=en_GB Android function sheet]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
http://digg.com/linux_unix/Video_demo_of_Freerunner_running_Android_Cupcake_Tutorial : Short Video demo of Android on [[FreeRunner]] to show how usable it is.&lt;br /&gt;
&lt;br /&gt;
http://andappstore.com/&lt;br /&gt;
&lt;br /&gt;
http://slideme.org/&lt;br /&gt;
&lt;br /&gt;
http://www.openintents.org/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
See: [[Android on Freerunner]] for how to [[flash]] your FreeRunner with Android&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
See: [[Android porting]]&lt;br /&gt;
&lt;br /&gt;
There are developers being paid to work on the port by [http://koolu.com/ Koolu.]&lt;br /&gt;
For details on the project source and some real detailed instructions on building the source, see the [http://trac.koolu.org/ the Koolu Trac Website for Android].&lt;br /&gt;
&lt;br /&gt;
There is also some great unpaid work going on at [http://panicking.kicks-ass.org/blog/index.php Linux Embedded]&lt;br /&gt;
&lt;br /&gt;
= News =&lt;br /&gt;
* 07 March 09 - Panicking released a cupcake [[rootfs]]&lt;br /&gt;
* 26 February 09 - As promised, Sean McNeil has released source code to [[GSM]] libraries [https://review.source.android.com/Gerrit#change,9013 Source]&lt;br /&gt;
* 20090204 Koolu releases its Beta3 Android [http://freerunner.android.koolu.com/release-files release].&lt;br /&gt;
** Changelog:&lt;br /&gt;
*** Added GPS library that supports GPS under Android&lt;br /&gt;
*** MAX_PROCESSES patch to enable more background processes to be run (fixes Pictures application)&lt;br /&gt;
*** Added Dalvik optimization setting&lt;br /&gt;
*** Started including 3rd party applications&lt;br /&gt;
*** Updated user interfaces for GPS and Bluetooth to match new kernel&lt;br /&gt;
*** Now report RSSI of Wifi signals to upper application layer&lt;br /&gt;
*** Enable libsoundpool compilation to support audible clicks&lt;br /&gt;
&lt;br /&gt;
* 20090122 Koolu releases its Beta2 Android [http://freerunner.android.koolu.com/release-files release].&lt;br /&gt;
&lt;br /&gt;
* 20081219 Koolu releases its Beta Android [http://forum.koolu.org/files/androidfs-koolu-1_0.jffs2 Image] and [http://forum.koolu.org/files/uImage-android-patched_bc2caff9cdef8a16.bin kernel].&lt;br /&gt;
&lt;br /&gt;
* 20081202 [http://www.koolu.com Koolu], a Freerunner distributor, has released the source code of their Android port at [http://git.koolu.org http://git.koolu.org]. For details on the project source and some real detailed instructions on building the source, see the [http://trac.koolu.org/ the Koolu Trac Website for Android].  TODO: Find out where this link supposed to go-&amp;gt;See the [[Android_porting#Building the Koolu Android Source]] instructions below for how to build an Android image for Freerunner.&lt;br /&gt;
&lt;br /&gt;
* 20081104 The first Android-image has been successfully created by Sean McNeil!  - sms and calling works, wifi and bluetooth doesn't. [http://onlinedev.blogspot.com/2008/11/porting-android-phase-3-done.html ''news-source'']&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* Videos : [http://digg.com/linux_unix/Video_demo_of_Freerunner_running_Android_Cupcake_Tutorial]&lt;br /&gt;
* [http://tw.youtube.com/watch?v=m4NbsLmF9j0 YouTube Video 1]&lt;br /&gt;
* [http://tw.youtube.com/watch?v=r6Op-7tNTiw YouTube Video 2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributions]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Android_on_Freerunner</id>
		<title>Android on Freerunner</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Android_on_Freerunner"/>
				<updated>2009-03-07T12:44:53Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Android on Freerunner}}&lt;br /&gt;
&lt;br /&gt;
{|align=right&lt;br /&gt;
|__TOC__&lt;br /&gt;
|}&lt;br /&gt;
[[Image:Freerunner-android-01.png]]&lt;br /&gt;
= Introduction = &lt;br /&gt;
This page is dedicated to the installation of Android (an Open Handset Alliance Project) on the [[Neo 1973]] and [[Neo FreeRunner]] handsets.&lt;br /&gt;
&lt;br /&gt;
You can find other information, such as porting, development and day to day usage here : [[Android]]&lt;br /&gt;
&lt;br /&gt;
== Before you start ==&lt;br /&gt;
&lt;br /&gt;
=== Using this guide ===&lt;br /&gt;
&lt;br /&gt;
*1&lt;br /&gt;
&lt;br /&gt;
If you see a command like this, you must run it as root&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
If you see one like this, you can run it as a regular user&lt;br /&gt;
&lt;br /&gt;
 $&lt;br /&gt;
&lt;br /&gt;
*2&lt;br /&gt;
&lt;br /&gt;
When you see these commands&lt;br /&gt;
&lt;br /&gt;
 adb&lt;br /&gt;
&lt;br /&gt;
 dfu-util&lt;br /&gt;
&lt;br /&gt;
it is assumed that you have them installed on your system and inside your /usr/bin. This may not be the case, you may just have downloaded the binary. If so, you need to change to the directory you downloaded the binary too then issue the same commands adding a ./ before it eg. &lt;br /&gt;
&lt;br /&gt;
 ./adb&lt;br /&gt;
&lt;br /&gt;
 ./dfu-util&lt;br /&gt;
&lt;br /&gt;
adb connects to Android but you need to have made sure you have set it up first. Make sure your FreeRunner was booted while being plugged in to a USB port. Then following run the following commands:&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # adb kill-server&lt;br /&gt;
 # ADBHOST=192.168.0.202 adb devices&lt;br /&gt;
&lt;br /&gt;
You should now have no trouble using adb.&lt;br /&gt;
&lt;br /&gt;
=== Registering with the GSM network ===&lt;br /&gt;
&lt;br /&gt;
Before you install Android on your FreeRunner you should check, using the operating system it came with, that your sim card will register with your network.&lt;br /&gt;
&lt;br /&gt;
The version of internal GSM firmware that comes preloaded on the FreeRunner has compatibility issues with a feature on newer sim cards. This effects 3G, o2 sims and possibly others. if you have one of those you will probably need to upgrade your GSM firmware to get the sim to register with the network. Doing that first means you know it's working before you install Android.&lt;br /&gt;
&lt;br /&gt;
[http://wiki.openmoko.org/wiki/GSM/Flashing GSM/Flashing]&lt;br /&gt;
&lt;br /&gt;
To flash your GSM firmware you will need to have USB networking setup between your desktop and the Om distribution installed on your FreeRunner. However, your FreeRunner does not need internet access as you can download the GSM firmware files on your desktop PC and transfer them to your FreeRunner using [http://unixhelp.ed.ac.uk/CGI/man-cgi?scp+1 scp]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.openmoko.org/wiki/Usb_networking USB Networking]&lt;br /&gt;
&lt;br /&gt;
== Configuring the Bootloader ==&lt;br /&gt;
&lt;br /&gt;
There are two bootloaders you can use to boot Android; [http://wiki.openmoko.org/wiki/Qi Qi] and [http://wiki.openmoko.org/wiki/Uboot Uboot]. Uboot comes installed on the FreeRunner, Qi is a replacement and is thought to be superior. However there have been, and probably still are, problems when using Qi and Android so Uboot is recommended at this point.&lt;br /&gt;
&lt;br /&gt;
You can download images for them both here:&lt;br /&gt;
&lt;br /&gt;
[http://people.openmoko.org/andy/ Andy Tracking Images] (For Qi on the FreeRunner grab the image starting qi-s3c2442)&lt;br /&gt;
&lt;br /&gt;
The Android kernel image can be more than 2MB in size. The UBoot environment that comes with your FreeRunner is only able to boot a kernel 2MB in size or less. To use a kernel larger than 2MB you need to:&lt;br /&gt;
&lt;br /&gt;
* Change to the [http://wiki.openmoko.org/wiki/Qi Qi Bootloader]. It supports 2MB kernels out of the box.&lt;br /&gt;
&lt;br /&gt;
* Adjust your [[Uboot]] environment to [http://meinopenmoko.blogspot.com/2008/12/prepare-uboot-to-boot-android.html support a Kernel of more than 2 MB]&lt;br /&gt;
&lt;br /&gt;
 setenv bootcmd setenv bootargs \${bootargs_base} \${mtdparts}\; nand read.e 0x32000000 kernel 0x300000\; bootm 0x32000000&lt;br /&gt;
 saveenv&lt;br /&gt;
&lt;br /&gt;
== Installing Android on the Internal Flash ==&lt;br /&gt;
&lt;br /&gt;
=== Preparing the SD Card ===&lt;br /&gt;
&lt;br /&gt;
The SD Card in your FreeRunner needs to be configured with two 2 primary partitions before Android will boot. First a VFAT/MSDOS (16 or 32) which acts as the '/sdcard' storage area (for pictures, movies, music, etc). Second an ext3 primary partition which Android uses as '/data' with in which it stores settings, caches, etc.&lt;br /&gt;
&lt;br /&gt;
==== On Linux ====&lt;br /&gt;
&lt;br /&gt;
Insert the Mico SD Card from your FreeRunner into your Linux desktop then bring up a Terminal and type&lt;br /&gt;
&lt;br /&gt;
    $ dmesg | grep sd&lt;br /&gt;
&lt;br /&gt;
You will get an output like this, in this instance we can see that the SD Card has been assigned the device name 'sde'&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    sd 9:0:0:0: [sde] Attached SCSI removable disk&lt;br /&gt;
    ...&lt;br /&gt;
    &lt;br /&gt;
Now, as root, use 'fdisk' to partition the device.&lt;br /&gt;
&lt;br /&gt;
   # fdisk /dev/sde &lt;br /&gt;
&lt;br /&gt;
Pressing 'p' will show you the current partitions on the SD Card 'd' will delete them and 'n' will create a new one. Create a primary partition for your media. Then another primary partition for Android to store its data on.&lt;br /&gt;
&lt;br /&gt;
On a 1Gig card I used 768MB for the first partition ('+768MB' in fdisk) and the remainder for Android data. Here is fdisk's partition output:&lt;br /&gt;
&lt;br /&gt;
       Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
    /dev/sde1               1         769      750513+  83  Linux&lt;br /&gt;
    /dev/sde2             770        1016      241072   83  Linux&lt;br /&gt;
&lt;br /&gt;
Now all that's left to do is format the partitions with the appropriate filesystem But first hit 'w' in fdisk to write the changes to the SD Card.&lt;br /&gt;
&lt;br /&gt;
Then format like this:&lt;br /&gt;
&lt;br /&gt;
    # mkfs.vfat -v -n and-media -F 32 /dev/sde1&lt;br /&gt;
    # mkfs.ext3 -v -L and-data /dev/sde2&lt;br /&gt;
&lt;br /&gt;
That's it, you can now remove the SD card from your desktop. If you re-insert it you will have two new usb disk devices.&lt;br /&gt;
{{Note|After Android has booted you will only be able to access the 'data' partition as root.}}There is no need to populate the ext3 partition at all. The VFAT partition can be populated with media content (ring tones etc.) if you so desire. {{Note|It can be worth reformatting the data partition when you upgrade the Android OS on your phone. Old settings can result in problems, wifi for example. But remember that formatting the Data partition will result in your preferences, text messages and contacts etc. being erased.}}&lt;br /&gt;
&lt;br /&gt;
==== On FreeRunner (2008.x) ====&lt;br /&gt;
&lt;br /&gt;
The SD card can be formatted from within an existing 2008.x installation on your FreeRunner.&lt;br /&gt;
SSH as root into the FreeRunner and use 'fdisk' to partition the device.&lt;br /&gt;
&lt;br /&gt;
   # fdisk /dev/mmcblk0&lt;br /&gt;
&lt;br /&gt;
After this create the partitions as described in the step above.&lt;br /&gt;
&lt;br /&gt;
To format the new vfat partition you will need dosfstools which can be downloaded from&lt;br /&gt;
&lt;br /&gt;
    [http://members.shaw.ca/mmontour/neo/dosfstools_2.11-r0_armv4t.ipk dosfstools_2.11-r0_armv4t.ipk]&lt;br /&gt;
&lt;br /&gt;
Use any SCP client to copy this file to your FreeRunner and install using&lt;br /&gt;
&lt;br /&gt;
    opkg install dosfstools_2.11-r0_armv4t.ipk&lt;br /&gt;
&lt;br /&gt;
Once the installation is complete format the partitions:&lt;br /&gt;
&lt;br /&gt;
    # mkfs.vfat -v -n and-media /dev/mmcblk0p1&lt;br /&gt;
    # mkfs.ext3 -v -L and-data /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
NOTE: In case you are unable to format the partitions because they are already mounted for some reason you can get a list of process IDs that are using it by running:&lt;br /&gt;
&lt;br /&gt;
    # fuser -m /media/card&lt;br /&gt;
&lt;br /&gt;
Then kill all the processes that were using the card and try formatting again.&lt;br /&gt;
&lt;br /&gt;
==== On other OS's ====&lt;br /&gt;
&lt;br /&gt;
There are no open source or free partition editors on Windows or Mac that can manage an ext3 partition. If you do not have Linux installed you can use the [http://gparted.sourceforge.net/ GParted] bootable CD. This CD will boot into a graphical environment with which you can partition your SD Card. You may have to boot with the SD Card inserted for GParted to recognize it as a drive.&lt;br /&gt;
&lt;br /&gt;
=== Downloading Android Images ===&lt;br /&gt;
&lt;br /&gt;
Next, Grab yourself the latest Android images. There are two parts you need to flash, the kernel (uImage*.bin) and the root fs (android*.jffs2). [http://www.koolu.com/ Koolu] release images and you can get them here:&lt;br /&gt;
&lt;br /&gt;
    [http://freerunner.android.koolu.com/release-files Release files (Android FreeRunner)]&lt;br /&gt;
&lt;br /&gt;
Koolu are not the only people working on porting Android to the FreeRunner and although collaboration is hopefully on the way, there are other places to get images:&lt;br /&gt;
&lt;br /&gt;
Michael Trimarchi's (panicking) images are the most up to date and functional:&lt;br /&gt;
&lt;br /&gt;
    [http://panicking.kicks-ass.org/download/ Michael Trimarchi's images with latest fixes]&lt;br /&gt;
&lt;br /&gt;
Sean McNeil has placed an older 2.6.26 kernel and root fs at:&lt;br /&gt;
&lt;br /&gt;
    [http://people.openmoko.org/sean_mcneil/ Sean McNeil images]&lt;br /&gt;
&lt;br /&gt;
=== Flashing the FreeRunner ===&lt;br /&gt;
&lt;br /&gt;
==== On Linux ====&lt;br /&gt;
&lt;br /&gt;
To flash your FreeRunner, replace what ever phone stack you have on there at the moment with Android, first download [http://wiki.openmoko.org/wiki/Dfu-util dfu-util], this is the program that will flash your phone.&lt;br /&gt;
&lt;br /&gt;
Once you have that installed (whether by simply downloading the binary or installing an rpm) Open up a terminal and cd to where you downloaded the images too eg.&lt;br /&gt;
&lt;br /&gt;
    # cd /home/joe/Downloads&lt;br /&gt;
&lt;br /&gt;
Plug your FreeRunner into a USB port and boot it into the nand boot loader; Hold down the aux button and then the power button until nor appears.&lt;br /&gt;
&lt;br /&gt;
{{Note|The FreeRunner will only stay in in the nand bootloader state for about 30 seconds with no activity.}}Now Flash the kernel image (you will need to be root) with this command:&lt;br /&gt;
&lt;br /&gt;
    # dfu-util -a kernel -R -D uImage-moredrivers-GTA02.bin&lt;br /&gt;
&lt;br /&gt;
and finally the root fs with this one:&lt;br /&gt;
&lt;br /&gt;
    # dfu-util -a rootfs -R -D androidfs-koolu-beta3.jffs2&lt;br /&gt;
&lt;br /&gt;
{{Note|The './' part assumes you are using the binary download and that it was downloaded to the same place as your images. If you are, remember to make the dfu-util binary executable.}}If you find that dfu-util complains about there being more than one USB device available it might be because you have a webcam or some other device plugged in. If you can not remove the other device follow this procedure:&lt;br /&gt;
&lt;br /&gt;
Unplug your FreeRunner and run the command&lt;br /&gt;
&lt;br /&gt;
    # dfu-utils --list&lt;br /&gt;
&lt;br /&gt;
This will list the other connected usb devices. Now plug your FreeRunner back in and run the command again, the new device will be your FreeRunner. You can now go ahead and flash with the added command '-d FREERUNNER_DEVICE' eg.&lt;br /&gt;
&lt;br /&gt;
    # dfu-util -d 0x1d50:0x5119 -a rootfs -R -D freerunner-v13.jffs2&lt;br /&gt;
&lt;br /&gt;
== Installing Android on an SD card ==&lt;br /&gt;
&lt;br /&gt;
=== Images ===&lt;br /&gt;
&lt;br /&gt;
There are currently a few prebuild images:&lt;br /&gt;
[http://activationrecord.net/radekp/openmoko/android/ Radek Polak's SD card images] (install on ext3, first partition on SD must be FAT16)&lt;br /&gt;
&lt;br /&gt;
=== Using jffs2 images ===&lt;br /&gt;
&lt;br /&gt;
You can also boot from the SD Card using the pre built images like so :-&lt;br /&gt;
* Mount the image using [http://wiki.openmoko.org/images/8/82/Mntjffs.sh this] script like so &lt;br /&gt;
   sudo ./Mntjffs.sh freerunner-v5.jffs2 image/&lt;br /&gt;
* Then copy (cp -R) the files in directory image/ to any of the first three partitions on the SD Card (if using Qi) eg cp -R /your-path/image/* /media/android/&lt;br /&gt;
* cd /media/android.&lt;br /&gt;
* wget http://activationrecord.net/radekp/openmoko/android/init.rc .&lt;br /&gt;
* mkdir boot&lt;br /&gt;
* copy the kernel here and name it uImage-GTA02.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some notes about booting android from sdcard : &lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
* Build android from source. See [http://trac.koolu.org/ koolu website] for directions.&lt;br /&gt;
* Use the first script in [http://lists.openmoko.org/pipermail/community/2008-December/036982.html this mail] (adapt to your filesystem) to stage your android install.&lt;br /&gt;
* copy the contents of this directory on a ext3 partition on your sdcard.&lt;br /&gt;
* add a /boot directory on your sdcard.&lt;br /&gt;
* copy the uImage-android kernel (see above) and copy it inside your /boot with the exact name '''uImage-GTA02.bin'''&lt;br /&gt;
* I changed the init.rc (in your root on the sd) to remove mounts that could be problematic (/data for example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- filesystem/root/init.rc	2008-12-15 17:51:14.000000000 +0100&lt;br /&gt;
+++ phyce.init.rc	2008-12-19 15:56:25.000000000 +0100&lt;br /&gt;
@@ -24,7 +24,7 @@&lt;br /&gt;
     mkdir /sqlite_stmt_journals 01777 root root&lt;br /&gt;
     mount tmpfs tmpfs /sqlite_stmt_journals size=4m&lt;br /&gt;
 &lt;br /&gt;
-    mount rootfs rootfs / ro remount&lt;br /&gt;
+    mount rootfs rootfs / rw remount&lt;br /&gt;
 &lt;br /&gt;
     write /proc/sys/kernel/panic_on_oops 1&lt;br /&gt;
     write /proc/sys/kernel/hung_task_timeout_secs 0&lt;br /&gt;
@@ -38,14 +38,14 @@&lt;br /&gt;
 #    mount yaffs2 mtd@system /system ro remount&lt;br /&gt;
 &lt;br /&gt;
     # We chown/chmod /data again so because mount is run as root + defaults&lt;br /&gt;
-    mount ext3 /dev/block/mmcblk0p2 /data nosuid nodev&lt;br /&gt;
-    chown system system /data&lt;br /&gt;
-    chmod 0771 /data&lt;br /&gt;
+#    mount ext3 /dev/block/mmcblk0p2 /data nosuid nodev&lt;br /&gt;
+#    chown system system /data&lt;br /&gt;
+#    chmod 0771 /data&lt;br /&gt;
 &lt;br /&gt;
     # Same reason as /data above&lt;br /&gt;
-    mount yaffs2 mtd@cache /cache nosuid nodev&lt;br /&gt;
-    chown system cache /cache&lt;br /&gt;
-    chmod 0770 /cache&lt;br /&gt;
+#    mount yaffs2 mtd@cache /cache nosuid nodev&lt;br /&gt;
+#    chown system cache /cache&lt;br /&gt;
+#    chmod 0770 /cache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install [[Qi]] on you NAND flash. You can still boot whatever distro you've got on internal flash using the NOR bootloader. You should try the magic file in /boot to show kernel messages.&lt;br /&gt;
* boot the GTA02, and pray.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Remote access to Android (adb) ==&lt;br /&gt;
&lt;br /&gt;
Although this is not technically part of installing Android it is very useful to have set up. Android Debug Bridge (adb) is a versatile tool that lets you manage the state of a device, in this case, your FreeRunner.&lt;br /&gt;
&lt;br /&gt;
Some ways you can use adb include:&lt;br /&gt;
&lt;br /&gt;
* Run shell commands on the phone.&lt;br /&gt;
* Copy files from your desktop to the phone and Vice-versa.&lt;br /&gt;
&lt;br /&gt;
You can find out about it on the [http://developer.android.com/guide/developing/tools/adb.html Android developers page] and a page on this wiki [[Android debug bridge]]&lt;br /&gt;
&lt;br /&gt;
However if you would just like a very quick getting started guide, read on. You can download a binary from [http://people.openmoko.org/sean_mcneil/adb here]. Then if you like copy it to /usr/bin (and don't forget to make it executable).&lt;br /&gt;
&lt;br /&gt;
First you must boot Android while it is plugged in to a USB port, you can unplug it and re-plug it all you like after that but for the USB connection to work it must be connected at boot time.&lt;br /&gt;
&lt;br /&gt;
Next issue this command to set up USB networking...&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
Then this one because it helps make sure everything works nicely...&lt;br /&gt;
&lt;br /&gt;
 # adb kill-server&lt;br /&gt;
&lt;br /&gt;
Followed by this to find your phone...&lt;br /&gt;
&lt;br /&gt;
 ADBHOST=192.168.0.202 adb devices&lt;br /&gt;
&lt;br /&gt;
{{Note|Remember that if you didn't copy adb to /usr/bin you will need to run these commands from the directory you downloaded it too and put ./ in front of adb.}}Now you are free to remotely connect to your Android phone, here are a couple of commands you might find useful&lt;br /&gt;
&lt;br /&gt;
*Copy a file to your SD card:&lt;br /&gt;
&lt;br /&gt;
 # adb push YOUR_FILE /sdcard/&lt;br /&gt;
&lt;br /&gt;
*Copy a log file from your phone to your computer:&lt;br /&gt;
&lt;br /&gt;
  # adb logcat -d &amp;gt; android.log&lt;br /&gt;
&lt;br /&gt;
*If you just want to log in to the Android shell:&lt;br /&gt;
&lt;br /&gt;
 # adb shell&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
=== SD card won't mount ===&lt;br /&gt;
&lt;br /&gt;
There should be a /sdcard directory on your FreeRunner, for some reason this does not always get created (the command is in the 'init.rc' but does not always work). To create the correct dir on your FreeRunner and so enable your SD card, do the following.&lt;br /&gt;
&lt;br /&gt;
* Plug your FreeRunner into a USB port, boot Android and then enter these commands:&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # adb kill-server&lt;br /&gt;
 # ADBHOST=192.168.0.202 adb devices&lt;br /&gt;
 # adb shell mount -o remount,rw /dev/root /&lt;br /&gt;
 # adb shell&lt;br /&gt;
&lt;br /&gt;
 # mkdir /sdcard&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
* Then reboot your FreeRunner&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Android|Main Android page on this wiki]]&lt;br /&gt;
* Video of usability : http://www.newlc.com/en/freerunner-mobile-which-support-android-cupcake&lt;br /&gt;
&lt;br /&gt;
[[category:Distributions]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Android</id>
		<title>Android</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Android"/>
				<updated>2009-03-07T12:43:27Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Android}}&lt;br /&gt;
{{Distributions|Android}}&lt;br /&gt;
&lt;br /&gt;
{|align=right&lt;br /&gt;
|__TOC__&lt;br /&gt;
|}&lt;br /&gt;
[[Image:Android-logo.png]]&lt;br /&gt;
= Introduction = &lt;br /&gt;
This page is the central place for documentation about Android on the [[Neo1973 Hardware|Neo 1973]] and [[Neo_FreeRunner_GTA02_Hardware|FreeRunner]] handsets.&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/android/ Android] is a software stack for mobile devices developed by the [http://www.openhandsetalliance.com/ The Open Handset Alliance.] Although Android is publicised as being open source software (most of the source code has been released) parts of the code have not been released yet.&lt;br /&gt;
&lt;br /&gt;
A lot of work is being done to get Android functioning properly on the FreeRunner and it is likely, in the near future, to be the distribution most suited for using the FreeRunner as a phone.&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
See: [[Android usage]] for detailed instructions on using Android on the FreeRunner.&lt;br /&gt;
&lt;br /&gt;
Android is gaining functionality on the FreeRunner all the time and with Michael Trimarchi's [http://panicking.kicks-ass.org/download/ (panicking)] images it is possible to use as an everyday phone. Prerequisites for the best success seem to be:&lt;br /&gt;
&lt;br /&gt;
* Use the jffs version 14.6 and the kernel v13.&lt;br /&gt;
* Uboot (possibly better still, the original version that comes with the FreeRunner)&lt;br /&gt;
* The original GSM firmware (moko10 may cause some issues)&lt;br /&gt;
&lt;br /&gt;
You can then hope to achive:&lt;br /&gt;
&lt;br /&gt;
* GSM calls&lt;br /&gt;
* SMS&lt;br /&gt;
* Adding, removing and importing contacts&lt;br /&gt;
* GPRS&lt;br /&gt;
* Wi-Fi&lt;br /&gt;
&lt;br /&gt;
Caveats&lt;br /&gt;
&lt;br /&gt;
* Volume during voice calls is very low.&lt;br /&gt;
* Wi-Fi does not reconnect after sleep - [http://wiki.openmoko.org/wiki/Android_usage#Wifi setup]&lt;br /&gt;
* You have to disable PIN security on your SIM card.&lt;br /&gt;
&lt;br /&gt;
[http://spreadsheets.google.com/ccc?key=popRpaZG1txEXGHDDboxtIA&amp;amp;hl=en_GB Android function sheet]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
http://www.newlc.com/en/freerunner-mobile-which-support-android-cupcake : Short Video demo of Android on [[FreeRunner]] to show how usable it is.&lt;br /&gt;
&lt;br /&gt;
http://andappstore.com/&lt;br /&gt;
&lt;br /&gt;
http://slideme.org/&lt;br /&gt;
&lt;br /&gt;
http://www.openintents.org/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
See: [[Android on Freerunner]] for how to flash your FreeRunner with Android&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
See: [[Android porting]]&lt;br /&gt;
&lt;br /&gt;
There are developers being paid to work on the port by [http://koolu.com/ Koolu.]&lt;br /&gt;
For details on the project source and some real detailed instructions on building the source, see the [http://trac.koolu.org/ the Koolu Trac Website for Android].&lt;br /&gt;
&lt;br /&gt;
There is also some great unpaid work going on at [http://panicking.kicks-ass.org/blog/index.php Linux Embedded]&lt;br /&gt;
&lt;br /&gt;
= News =&lt;br /&gt;
* 26 February 09 - As promised, Sean McNeil has released source code to GSM libraries [https://review.source.android.com/Gerrit#change,9013 Source]&lt;br /&gt;
* 20090204 Koolu releases its Beta3 Android [http://freerunner.android.koolu.com/release-files release].&lt;br /&gt;
** Changelog:&lt;br /&gt;
*** Added GPS library that supports GPS under Android&lt;br /&gt;
*** MAX_PROCESSES patch to enable more background processes to be run (fixes Pictures application)&lt;br /&gt;
*** Added Dalvik optimization setting&lt;br /&gt;
*** Started including 3rd party applications&lt;br /&gt;
*** Updated user interfaces for GPS and Bluetooth to match new kernel&lt;br /&gt;
*** Now report RSSI of Wifi signals to upper application layer&lt;br /&gt;
*** Enable libsoundpool compilation to support audible clicks&lt;br /&gt;
&lt;br /&gt;
* 20090122 Koolu releases its Beta2 Android [http://freerunner.android.koolu.com/release-files release].&lt;br /&gt;
&lt;br /&gt;
* 20081219 Koolu releases its Beta Android [http://forum.koolu.org/files/androidfs-koolu-1_0.jffs2 Image] and [http://forum.koolu.org/files/uImage-android-patched_bc2caff9cdef8a16.bin kernel].&lt;br /&gt;
&lt;br /&gt;
* 20081202 [http://www.koolu.com Koolu], a Freerunner distributor, has released the source code of their Android port at [http://git.koolu.org http://git.koolu.org]. For details on the project source and some real detailed instructions on building the source, see the [http://trac.koolu.org/ the Koolu Trac Website for Android].  TODO: Find out where this link supposed to go-&amp;gt;See the [[Android_porting#Building the Koolu Android Source]] instructions below for how to build an Android image for Freerunner.&lt;br /&gt;
&lt;br /&gt;
* 20081104 The first Android-image has been successfully created by Sean McNeil!  - sms and calling works, wifi and bluetooth doesn't. [http://onlinedev.blogspot.com/2008/11/porting-android-phase-3-done.html ''news-source'']&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [http://tw.youtube.com/watch?v=m4NbsLmF9j0 YouTube Video 1]&lt;br /&gt;
* [http://tw.youtube.com/watch?v=r6Op-7tNTiw YouTube Video 2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributions]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:RzR</id>
		<title>User:RzR</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:RzR"/>
				<updated>2009-03-03T09:19:34Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: New page: http://www.newlc.com/en/tags/openmoko&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.newlc.com/en/tags/openmoko&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_under_QEMU</id>
		<title>Openmoko under QEMU</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_under_QEMU"/>
				<updated>2009-03-03T09:18:39Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Pre-built binaries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Openmoko under QEMU}}&lt;br /&gt;
[http://en.wikipedia.org/wiki/Qemu QEMU] can be used in at least three ways to run Openmoko. Depending on the purpose that you are going to use the emulator for, you should decide on the target platform.&lt;br /&gt;
&lt;br /&gt;
*''PC'' - Openmoko can be built to run on regular i386 hardware, 32- or 64-bit and this is probably the fastest way to get Openmoko running if you want to get an impression of how it looks.  In this scenario QEMU would only serve for isolating your Openmoko installation from your normal system, or, if you're not on a UNIX system, QEMU provides a non-intrusive way to get Linux up quickly. More information can be found in the [[FAQ]] and [[Getting Openmoko working on host with Xoo|here]].&lt;br /&gt;
&lt;br /&gt;
*''Integrator/CP'' - this is the default ARM-based machine that QEMU knows about. This target is used with MACHINE=&amp;quot;qemuarm&amp;quot; and it is sufficient to run the original Openmoko rootfs image, although it doesn't emulate any of the [[:Category:Neo1973 Hardware | Neo1973 Hardware]] except the very CPU core. Read more in the [[FAQ#Q:_Is_there_an_emulator_available_for_Openmoko.3F|FAQ]].&lt;br /&gt;
&lt;br /&gt;
*''Neo1973'' - the QEMU tree available from Openmoko repositories is also capable of emulating most of the actual [[Neo1973]] (GTA01) hardware, although not all of it. Additionally, Neo FreeRunner emulation is a work-in-progress. When all of the emulator parts are more mature our code is going to be submitted and merged to the main QEMU development tree.&lt;br /&gt;
&lt;br /&gt;
== Neo1973 emulation ==&lt;br /&gt;
&lt;br /&gt;
This target will (obviously) run original Openmoko rootfs images, but then it should also be able to run the original u-boot and kernel images, the same ones that a real Neo1973 (GTA01) uses. Among other differences you will notice between this approach and the Integrator/CP target is you also get correct screen resolution, some (fake) battery readings, and other goodness. Currently missing parts of the GTA01 emulator are: [[Hardware:AGPS|AGPS]] and [[Bluetooth]] - these things will still be worked on, as well as general usability. Even with these things missing, QEMU should provide substantial help in debugging kernel and u-boot issues to developers.&lt;br /&gt;
&lt;br /&gt;
What QEMU can '''*not*''' be used for, and probably no other emulator can, is speed measures and getting the general feel of Openmoko performance. Code running in qemu runs with the maximum speed your host computer can provide with an overhead of translating target code to host code, and this overhead is not uniform across different instructions. This means that even if your virtual Neo reports near 100 BogoMIPS (which is the speed of a real Neo), different actions performed in the emulator will not run with the same speed. On most PCs you will notice the virtual Neo running faster than a real one (Audio related operations may be one of the exceptions).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Rough status for each of the components that need emulation, following the outline of [[:Category:Neo1973 Hardware | Neo1973 Hardware]] page.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|S3C2410A Processor&lt;br /&gt;
|-&lt;br /&gt;
|ARM920T core || Works || Already in mainline QEMU.&lt;br /&gt;
|-&lt;br /&gt;
|Basic guts || Work || This includes GPIO interface, DMA, Interrupt Controller, Timers, NAND controller, MMC/SD host, [[I2C]] and IIS interfaces, Memory &amp;amp; Clock &amp;amp; Power management controllers, RAM.&lt;br /&gt;
|-&lt;br /&gt;
|Serial ports || Works || Use the &amp;quot;-serial&amp;quot; switch (maybe be specified multiple times) to tell QEMU where serial input/output should go to. GSM module will be connected on UART0.&lt;br /&gt;
|-&lt;br /&gt;
|RTC || Works || On start QEMU will load it with current time/date - the Neo1973 [[kernel]] doesn't use it for time/date source currently.&lt;br /&gt;
|-&lt;br /&gt;
|SPI || Works || The guest kernel can drive it using either the SPI interface or raw GPIO bitbanging.&lt;br /&gt;
|-&lt;br /&gt;
|LCD || Works || The virtual LCD will display contents in QEMU window unless &amp;quot;-nographic&amp;quot; is specified on command line.&lt;br /&gt;
|-&lt;br /&gt;
|ADC || Works || Mouse events in QEMU window generate what would be touchscreen events on a Neo1973 and are passed to the guest OS through the on-chip ADC.&lt;br /&gt;
|-&lt;br /&gt;
|OHCI USB || Works || This part is in mainline QEMU. Use the &amp;quot;-usb&amp;quot; switch to enable the controller and &amp;quot;usb_add&amp;quot; in QEMU monitor to attach new virtual or physical USB devices.&lt;br /&gt;
|-&lt;br /&gt;
|Slave USB || Works || Linux's dummy HCD in conjunction with gadget filesystem API is used to make the virtual Neo appear as a real one connected to the host computer. See [[#Setting up USB connection|Setting up USB connection]] below. (Experimental)&lt;br /&gt;
|-&lt;br /&gt;
|Watchdog || Works || This is one of the less important on-chip peripherals in S3C2410. It is however used by Linux for rebooting the board.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|[[I2C]] bus peripherals&lt;br /&gt;
|-&lt;br /&gt;
|[[PCF50606]] || Works || (Aka PMU) Fakes the battery charge level (set at 88%), POWER button, etc. Also contains an RTC, also unused by Linux.&lt;br /&gt;
|-&lt;br /&gt;
|[[LM4857]] || Works&lt;br /&gt;
|-&lt;br /&gt;
|[[WM8753L]] || Works || The CODEC is also connect to the CPU's IIS port. Basic [[Neo1973 Audio Subsystem|audio functionality]] is supported - see QEMU documentation on getting audio input/output from the emulator. Volume control has no effects.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|Other peripherals&lt;br /&gt;
|-&lt;br /&gt;
|NAND Flash || Works || However, some pieces are not confirmed to be completely compatible with the real hardware because of lack thereof. Use &amp;quot;-mtdblock flashimagefilenamehere&amp;quot; switch to point QEMU to your flash image. The file should be at least 69206016 bytes big.&lt;br /&gt;
|-&lt;br /&gt;
|JBT6K74-AS(PI) || Works || (Aka LCM) Wired to the SPI channel 1&lt;br /&gt;
|-&lt;br /&gt;
|Buttons || Work || Enter is the AUX button, Space is the POWER button. Wired to on-chip GPIO and PCF50606.&lt;br /&gt;
|-&lt;br /&gt;
|SD card || Works || This part is already in mainline QEMU. Use the &amp;quot;-sd cardimagegoeshere&amp;quot; switch to point QEMU to the card image. The regular QEMU monitor commands for removable media can also be used. The card works, however the on-chip host controller gave block length errors on heavy I/O despite working as described in specification. I suspect the kernel driver. DMA operation is not tested.&lt;br /&gt;
|-&lt;br /&gt;
|Bluetooth&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Works&lt;br /&gt;
|A generic Bluetooth HCI (just like the BlueCore4 chip) is connected to internal USB hub (just like the Delta DBFM dongle). Currently qemu emulates no other bluetooth devices, so the dongle behaves as if there was no BT-enabled slaves around, being the only device on the piconet, i.e. is not really useful. Likely a Bluetooth keyboard will be emulated. A physical Bluetooth dongle can also be attached to the emulator (see USB documentation in QEMU).&lt;br /&gt;
|-&lt;br /&gt;
|[[GSM]] || Works || A fake modem is connected to UART0 understanding a (currently quite limited) subset of AT commands. Ultimately it should support as much functionality as possible (basic AT command set, fake GPRS connections, dialing and SMS send/receive). This way all parts of the phone subsystem (CALYPSO, TWL3014, TRF6151) will not have to be emulated. There is a possibility to wire a real GSM modem to QEMU's serial port, or the [http://doc.trolltech.com/qtopia-4.3-snapshot/fd-ModemSimulator.html phonesim] modem simulator from the ''Qtopia'' project (use the --enable-phonesim switch to ./configure) as well as the [http://doc.trolltech.com/qtopia-4.3-snapshot/modem-emulator.html atinterface] modem emulator, also from Qtopia.&lt;br /&gt;
|-&lt;br /&gt;
|[[Hardware:AGPS|AGPS]]&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|There are obvious difficulties emulating the chip, but hopefully it can be made to present the guest OS with some fixed coordinates later when more is known about the chip. Again a real chip could be connected to QEMU's serial port.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Current development is aiming for [[:Category:Neo1973_Hardware#GTA01Bv4 | GTA01Bv4]] compatibility; [[:Category:Neo1973_Hardware#GTA01Bv3 | earlier revisions]] can also be emulated if needed. The differences between the hardware revisions currently only manifest themselves in GPIO wiring. Hardware emulation is implemented in a clean-room manner using official specifications where possible.&lt;br /&gt;
&lt;br /&gt;
== Neo FreeRunner emulation ==&lt;br /&gt;
&lt;br /&gt;
The second line of Openmoko phones, the Neo FreeRunner (GTA02) saw various hardware changes and improvements since Neo1973 (GTA01).  QEMU has fullest support for the GTA01 (the first model), but partial GTA02 emulation is also planned.  This will only include the hardware components which were added in GTA02 and were not present in GTA01 (see [[Neo 1973 vs Neo FreeRunner]] for complete hardware difference list):&lt;br /&gt;
&lt;br /&gt;
* The u-blox GPS chip (i.e. raw NMEA protocol).&lt;br /&gt;
* The Atheros AR6001 WLAN / WiFi chip (and SDIO bus).&lt;br /&gt;
* The two LIS accelerometers.&lt;br /&gt;
* 128MiB, 1.8V NAND chip instead of 64MiB.&lt;br /&gt;
&lt;br /&gt;
What that means is that the emulated machine will internally not be exactly like Neo FreeRunner, but will be functionally the same.  That in turn means that it needs a custom kernel because it's neither a GTA01 nor GTA02 internally.  This kernel source will be provided as part of qemu.  The bootloader used will be the GTA01 build of u-boot.&lt;br /&gt;
&lt;br /&gt;
This approach is called paravirtualisation and is often used as an emulation solution for mobile platforms.  For a userspace programmer (Application developers) the machine will be visible as a genuine GTA02.  For a kernel hacker it will be a custom board.&lt;br /&gt;
&lt;br /&gt;
If there's an initiative among the users, to emulate GTA02 hardware to a bigger extent than explained here, patches / improvements will be always welcome because the QEMU project seeks to emulate the real hardware and stay always as close as possible to physical hardware (in other words, full emulation is preferred over paravirtualisation in the QEMU upstream).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Below is a rough status information for each of the components.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA01 hardware&lt;br /&gt;
|-&lt;br /&gt;
|Processor, on-chip and external peripherals || Work || See the GTA01 supported hardware chart above.  This hardware is at the base of the Neo FreeRunner emulator.  The same usage notes apply.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA02 components&lt;br /&gt;
|-&lt;br /&gt;
|GPS || Works || A virtual GPS chip is connected to the second serial port of the virtual machine, exactly like on the Neo FreeRunner.&lt;br /&gt;
|-&lt;br /&gt;
|WLAN&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Partial support&lt;br /&gt;
|The Atheros AR6001 (second firmware revision) is emulated to an extent that it gets detected by the kernel SDIO stack and registered as a network interface by the Atheros driver.  It doesn't allow for actual network communication yet.  The basic SDIO bus emulation is complete.&lt;br /&gt;
|-&lt;br /&gt;
|Accelerometers || Work || Two dummy accelerometers are connected to the virtual machine's I2C bus.  They provide a constant 1G reading at the moment.  One improvement idea to be implemented when there's some software available for testing, is to pass Qemu's SDL window movements as input to the virtual accelerometers, i.e. dragging the X window around would generate motion sensor events.  These events would be two-dimensional but should be enough for Application developers to test their programs' interactions with the movements.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How to get it running ==&lt;br /&gt;
&lt;br /&gt;
These instructions talk about the GTA01 emulator (default).&lt;br /&gt;
&lt;br /&gt;
=== Using MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
This is arguably the easiest way of building qemu-neo1973 since you won't need to deal with the compiling and flashing processes yourself. See [[Using_QEMU_with_MokoMakefile|MokoMakefile]] for details.&lt;br /&gt;
&lt;br /&gt;
If you *just* build QEMU and use the official images by typing &amp;quot;make qemu&amp;quot; only (as opposed to setting up monotone and openembedded and building an entire new image for yourself with MokoMakefile), then the build takes less time than the manual instructions below (since it's all done automatically).&lt;br /&gt;
&lt;br /&gt;
=== Manual setup ===&lt;br /&gt;
&lt;br /&gt;
To obtain the latest source code for the emulator, you will want to do something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ svn checkout https://svn.openmoko.org/trunk/src/host/qemu-neo1973&lt;br /&gt;
$ cd qemu-neo1973&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, we're going to configure and build the emulator (Note [[#Requirements|Requirements]] below):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --target-list=arm-softmmu  # GCC 3.x will be required, see --cc=&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you dont want gcc-3.x then you can apply patch from here&lt;br /&gt;
https://bugs.gentoo.org/show_bug.cgi?id=160627&lt;br /&gt;
like so&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ patch -p2 &amp;lt; qemu-gcc4.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See other available options for the configure script by appending &amp;quot;--help&amp;quot;.&lt;br /&gt;
Now you should have a working emulator under the name &amp;quot;arm-softmmu/qemu-system-arm&amp;quot;. To run Openmoko you will also need to somehow install Openmoko on your virtual phone, which is totally clean of any software at this moment. There are several block devices to choose from, the best option is probably to do exactly what the Neo1973 manufacturer does before it ships the device to the final user. This process is described in [[Bootloader]], [[Kernel]], [[NAND bad blocks]] and [[Devirginator]] but you don't need to know all the details. Two scripts are provided to generate a firmware for your phone, as realistic as possible. First run&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/download.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which will look up the list of latest available Openmoko snapshot builds from buildhost.openmoko.org and choose the most recent [[u-boot]], Kernel, and root filesystem images, and download the images (unless they are already found in the openmoko/ directory).&lt;br /&gt;
'''Note''' openmoko/env might be broken. It seems to fix it to change it to this instead.&lt;br /&gt;
&amp;lt;pre&amp;gt;#The scripts will include this on startup to setup variables&lt;br /&gt;
&lt;br /&gt;
src_dir=&amp;quot;`pwd`&amp;quot;&lt;br /&gt;
script_dir_relative=openmoko&lt;br /&gt;
script_dir=&amp;quot;$src_dir/$script_dir_relative&amp;quot;&lt;br /&gt;
uboot_symlink=&amp;quot;$src_dir/u-boot.bin&amp;quot;&lt;br /&gt;
qemu_relative=&amp;quot;arm-softmmu/qemu-system-arm -M gta02fake -m 130&amp;quot;&lt;br /&gt;
qemu=&amp;quot;$src_dir/$qemu_relative&amp;quot;&lt;br /&gt;
flash_base=openmoko-flash.base&lt;br /&gt;
flash_image=openmoko-flash.image&lt;br /&gt;
make=make&lt;br /&gt;
which gmake &amp;amp;&amp;amp; make=gmake&lt;br /&gt;
echo=echo&lt;br /&gt;
which gecho &amp;amp;&amp;amp; echo=gecho&lt;br /&gt;
export make echo&lt;br /&gt;
dump_dir=&amp;quot;$script_dir/vvfat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
qemu_monitor=&amp;quot;$HOME/.qemu_monitor&amp;quot;&lt;br /&gt;
qemu_cmd () { $script_dir/qemu-cmd.pl &amp;quot;$qemu_monitor&amp;quot; &amp;quot;$*&amp;quot;; }&lt;br /&gt;
&lt;br /&gt;
kernel_addr=0x30100000&lt;br /&gt;
splash_addr=0x36000000&lt;br /&gt;
splash_size=0x5000&lt;br /&gt;
&lt;br /&gt;
# We don't want the &amp;quot;-latest&amp;quot; symlinks to match&lt;br /&gt;
kernel_wildcard=&amp;quot;testing-om-gta01-*.uImage.bin&amp;quot;&lt;br /&gt;
rootfs_wildcard=&amp;quot;openmoko-testing-om-gta01.rootfs.jffs2&amp;quot;&lt;br /&gt;
uboot_wildcard=&amp;quot;gta01bv4-u-boot.bin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
download_dir=&amp;quot;http://downloads.openmoko.org/distro/testing/&amp;quot;&lt;br /&gt;
dev_download_dir=&amp;quot;$download_dir&amp;quot;&lt;br /&gt;
backup_download_dir=&amp;quot;http://buildhost.automated.it/OM2007.2/&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These binaries will be used by the flash.sh script. First make sure you have the netpbm package installed for some graphics conversion utilities. On Ubuntu this can be done by:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install netpbm&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/flash.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which runs the emulator, loads u-boot into it and then uses u-boot's capability to program the Flash memory to install all the necessary parts of the system into the virtual Flash. It will also set up all the bootloading process including a boot menu (ENTER is [AUX] and SPACE is [POWER]), splash, u-boot environment and some default kernel parameters. If everything goes OK, the script should print a command which you can use to start using the emulator.&lt;br /&gt;
&lt;br /&gt;
QEMU has '''*tons*''' of commandline switches and things that can be configured. You can look them up in [http://bellard.org/qemu/user-doc.html QEMU user docs]. You will probably want to use the &amp;quot;-snapshot&amp;quot; switch, among other ones. Saving and restoring emulation state at any point (unrelated to &amp;quot;-snapshot&amp;quot;) should work as per QEMU user docs too. In addition the monitor commands &amp;quot;help&amp;quot; and &amp;quot;info&amp;quot; are of great help. The monitor usually sits in second virtual console, thus ctrl-alt-2 and ctrl-alt-1 switch to monitor and back.&lt;br /&gt;
&lt;br /&gt;
=== Pre-built binaries ===&lt;br /&gt;
&lt;br /&gt;
Debian ubuntu package is available at : http://www.newlc.com/en/openmoko-deb-packages-and-fosdem-debian-video&lt;br /&gt;
&lt;br /&gt;
Win32 binaries shipped with firmware were also released ([https://admin-trac.openmoko.org/trac/ticket/624 openmoko-emulator-bin-20070625.rar or openmoko-emulator-win32-bin-20070625.zip]) (Tested on Wine, MS Windows XP and Vista Business).&lt;br /&gt;
&lt;br /&gt;
=== Neo FreeRunner (GTA02) ===&lt;br /&gt;
&lt;br /&gt;
The instructions for running the emulator are the same for FreeRunner, but the final command line to invoke qemu changes.  Instead of &amp;quot;-M gta01&amp;quot; as the machine name &amp;quot;-M gta02fake&amp;quot; has to be used.&lt;br /&gt;
&lt;br /&gt;
The kernel supporting GTA02 emulator is obtained by applying the ''openmoko/linux-gta02-pseudo.patch'' patch found in qemu-neo1973 sources, to the 2.6.24 openmoko kernel (vanilla linux-2.6.24 + the openmoko patchset from http://svn.openmoko.org/branches/src/target/kernel/2.6.24.x/patches/).  Since the GTA02 kernel support is still under heavy development, please refer to the openmoko/README file contained in qemu-neo1973 sources for the latest instructions on building the kernel.&lt;br /&gt;
&lt;br /&gt;
If a normal Openmoko kernel is used under Neo FreeRunner emulator, it will simply run as if the machine was a GTA01 and not detect any of the new peripherals.&lt;br /&gt;
&lt;br /&gt;
== Convenient Scripts ==&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-auto.sh&lt;br /&gt;
&lt;br /&gt;
launches qemu and opens a unix socket for communication. All additional parameters are passed to qemu. (e.g. openmoko/qemu-auto.sh -nographic launches the virtual machine with no graphics etc.).&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-upload.sh &amp;lt;filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces a SD card image with one partition with the given file(s) on it (you can pass a list of files) and inserts it into the phone. The Openmoko kernel should detect the event and the automounter should mount the partition. openmoko/qemu-auto.sh must be running already. If you pass no parameters, it ejects the media (the OM kernel is too dumb to detect this unfortunately). This will only work with gta01 emulation because gta02 has no SD.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-quit.sh&lt;br /&gt;
&lt;br /&gt;
powers the VM down cleanly.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-gadget.sh&lt;br /&gt;
&lt;br /&gt;
attempts to connect target's S3C USB slave to host's dummy HCD (if present and gadgetfs is mounted).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This QEMU tree has only been tested on GNU/Linux. To get graphical (not counting VNC) and/or audio output from the emulator you will need either SDL or Cocoa installed on your computer. To enable audio, see the available switches to the ./configure script.&lt;br /&gt;
&lt;br /&gt;
The scripts that sit in openmoko/ require lynx, wget, python, netpbm and most GNU base utilities installed in standard locations. The netpbm package contains tools necessary for bootsplash image conversion.&lt;br /&gt;
&lt;br /&gt;
All of the build-time and run-time requirements listed in [http://bellard.org/qemu/user-doc.html QEMU documentation] apply. This includes zlib, etc. On distributions that use binary packages, remember that you need the packages ending in '''-dev''' or '''-devel'''.&lt;br /&gt;
&lt;br /&gt;
== QEMU and GNU debugger ==&lt;br /&gt;
&lt;br /&gt;
QEMU lets you debug operating system kernels and bootloaders like you debug all other programs. To do this you will need a debugger that speaks the GDB remote debugging protocol - [http://sourceware.org/gdb/ GDB] is the obvious choice. Some cross toolchains come with GDB already set up. Otherwise building cross-GDB yourself is quick and easy (compared to building binutils and cross-gcc).&lt;br /&gt;
&lt;br /&gt;
To debug u-boot, load the file &amp;quot;u-boot&amp;quot; into gdb (not &amp;quot;u-boot.bin&amp;quot;) that is produced by &amp;quot;make&amp;quot; when building u-boot. To debug a Linux kernel, load the file &amp;quot;vmlinux&amp;quot; from the main source directory into gdb. These files are in ELF format and contain all the symbol information and are not stripped of debugging data until you run &amp;quot;strip&amp;quot; on them, unlike &amp;quot;u-boot.bin&amp;quot; and &amp;quot;Image&amp;quot;/&amp;quot;zImage&amp;quot;/&amp;quot;uImage&amp;quot;. Next, tell QEMU to enable the gdbserver by appending the &amp;quot;-s&amp;quot; switch or issuing &amp;quot;gdbserver&amp;quot; in the monitor. Use the command &amp;lt;pre&amp;gt;(gdb) target remote localhost:1234&amp;lt;/pre&amp;gt; to make a connection to the emulator. From there you should be able to use all the usual GDB commands, including stepping instructions, setting breakpoints, watchpoints, inspecting stack, variables, registers and more. If gdb is running in the same directory from which it grabbed the ELF executable, the &amp;quot;edit&amp;quot; command should work so you can jump right to the source line which is executing.&lt;br /&gt;
&lt;br /&gt;
== Simple network connection with pppd ==&lt;br /&gt;
&lt;br /&gt;
One simple way to get a network connection from the emulated Neo is via an emulated serial port and [[pppd]]. Add ''-serial vc -serial pty'' to the [[QEMU command line]], and QEMU prints a device name on a line like &amp;quot;char device redirected to /dev/pts/12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the Neo side, open a terminal and run the command &amp;quot;pppd nodetach debug /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the host computer side, open a root terminal and run the command &amp;quot;pppd nodetach debug 192.168.68.1:192.168.68.2 noauth /dev/pts/12&amp;quot;, substituting the actual device name from above.&lt;br /&gt;
&lt;br /&gt;
Now on the host computer side, you should be able to &amp;quot;ping 192.168.68.2&amp;quot; and &amp;quot;ssh root@192.168.68.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
NB : If you see in pppd trace something like this &amp;quot;Received bad configure-rej:  12 06 00 00 00 00&amp;quot; again and again, you will ping but no application will work. It is probably the compression protocol (ccp) negotiation which fail. Add &amp;quot;noccp&amp;quot; to the two pppd commands like &amp;quot;pppd nodetach debug noccp /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Setting up Internet connection for your qemu neo ==&lt;br /&gt;
Before you start, you have to have a working pppd or USB connection, ([[#Simple_network_connection_with_pppd|see the previous chapter]] and [[#Setting up USB connection|the next chapter]])&lt;br /&gt;
&lt;br /&gt;
(I assume that your local ip-adress is 192.168.0.100 and your router is 192.168.0.1)&lt;br /&gt;
&lt;br /&gt;
In qemu terminal (or via ssh) type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ifdown usb0&lt;br /&gt;
$ route add default gw 192.168.68.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolv.conf:&lt;br /&gt;
nameserver 192.168.0.1&lt;br /&gt;
This will be your host-computer DNS server.&lt;br /&gt;
&lt;br /&gt;
On the host-computer type(as root , use sudo -i on ubuntu):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;
&lt;br /&gt;
modprobe ip_tables&lt;br /&gt;
modprobe iptable_nat&lt;br /&gt;
modprobe ipt_MASQUERADE&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -F&lt;br /&gt;
iptables -t nat    -F&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -P INPUT       ACCEPT&lt;br /&gt;
iptables -t filter -P FORWARD     ACCEPT&lt;br /&gt;
iptables -t filter -P OUTPUT      ACCEPT&lt;br /&gt;
iptables -t nat    -P PREROUTING  ACCEPT&lt;br /&gt;
iptables -t nat    -P POSTROUTING ACCEPT&lt;br /&gt;
&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.68.0/24 -j MASQUERADE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Where eth0 is your network interface connected to the router)&lt;br /&gt;
&lt;br /&gt;
Thats it - now you can enjoy internet in qemu.&lt;br /&gt;
&lt;br /&gt;
== Setting up USB connection ==&lt;br /&gt;
&lt;br /&gt;
It is possible (although not very straight forward, probably about the complexity of tun-tap networking) to connect the virtual, emulated Neo1973 to the Linux PC on which the emulator is running, and work with it as if a real Neo1973 was plugged into the computer's USB port, but no twiddling with cables is needed. If you're testing your applications on the Neo, it may be worth setting up this kind of connection because it lets you enable normal [[USB_Networking|networking between the PC and the phone and ssh into it]] (which is much more comfortable than typing commands into the Openmoko's terminal emulator via on-screen keyboard). Here's what you will need in order to get this working:&lt;br /&gt;
&lt;br /&gt;
A Linux host with a 2.6 series kernel. The following drivers compiled-in or in modules: dummy_hcd, gadgetfs, usbnet, cdc_ether. [[Building Gadget USB Module|A detailed guide to building the necessary modules is available (primarily Ubuntu focused).]] Generic instructions follow.&lt;br /&gt;
&lt;br /&gt;
Note that you need root access to perform most actions described here. Here's how to enable the drivers in menuconfig.&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Support for USB Gadgets'''&lt;br /&gt;
&lt;br /&gt;
Find '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''USB Peripheral Controller''' and set it to '''Dummy HCD (DEVELOPMENT)'''&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Gadget Filesystem (EXPERIMENTAL)''' (this one is good to have as a module)&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''')&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)''')&lt;br /&gt;
&lt;br /&gt;
These last two drivers are the same [[Getting Started with your Neo1973#By using Ethernet emulation over a USB cable|drivers that you need to work with a real Neo over USB network]]. After you've built the drivers, make sure that the copy of kernel headers in /usr/include/linux is up to date. In particular the file /usr/include/linux/usb_gadgetfs.h needs to be present and if your distribution came with headers older than 2.6.18 or so, then you need tell the package manager to update them, or you can do that manually with&lt;br /&gt;
&amp;lt;pre&amp;gt; # cp -a /usr/src/linux/include/linux/* /usr/include/linux/&amp;lt;/pre&amp;gt;&lt;br /&gt;
(assuming that your kernel sources are in /usr/src/linux). It is important that this is done before building qemu because the build system checks if these headers are functional and in case they aren't found it will disable the USB Slave functionality.  Run &amp;quot;grep CONFIG_GADGETFS config-host.h&amp;quot; in qemu build directory to make sure that the detection succeeded.  If it didn't, correct your linux headers and reconfigure qemu.&lt;br /&gt;
&lt;br /&gt;
After building qemu and before running it, make sure that the modules are loaded into the kernel. I found it useful to load gadgetfs with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt; # modprobe gadgetfs default_uid=1000  # assuming my User ID is 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
and added the following line to my /etc/fstab:&lt;br /&gt;
&amp;lt;pre&amp;gt;gadget         /dev/gadget    gadgetfs   noauto,user,group         0   0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure that the mountpoint /dev/gadget exists:&lt;br /&gt;
&amp;lt;pre&amp;gt; # mkdir -p /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that the rest of the procedure can be performed from your regular user account. Mounting gadgetfs is done with:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ mount /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;quot;default_uid&amp;quot; parameter changes the ownership on all files under /dev/gadget to your own and since the files there are created and destroyed dynamically, there's no easy way to have that performed by ''udev''. Now running qemu as you usually do but appending &amp;quot;-usb -usbgadget&amp;quot; (in the current version of the [[MokoMakefile]] this is not included) should enable the USB Slave functionality. The qemu monitor commands &amp;quot;info usbslave&amp;quot; and &amp;quot;usb_add gadget&amp;quot; will be useful. The former instruction asks the OS running under the emulator (Openmoko) to describe its slave features (that's what ''lsusb'' does after a Neo1973 is connected to a PC). You can see the available USB configurations in this command's output. Since gadgetfs allows only one configuration, we will need to choose the desired configuration - most device have only one such configuration, in which case you can use just &amp;quot;usb_add gadget&amp;quot; to connect to host; CDC ethernet devices however usually include a second configuration for RNDIS networking (i.e. Ms Windows compatibility) and so does Openmoko when using the g_ether driver. Hence, to get this right, wait for Openmoko to fully boot up and execute the following in QEMU monitor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QEMU 0.9.0 monitor - type 'help' for more information&lt;br /&gt;
(qemu) info usbslave &lt;br /&gt;
USB2.2 device 1457:5122:&lt;br /&gt;
Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
Product: RNDIS/Ethernet Gadget&lt;br /&gt;
Configuration 0: RNDIS&lt;br /&gt;
Configuration 1: CDC Ethernet&lt;br /&gt;
(qemu) &lt;br /&gt;
(qemu) usb_add gadget:1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If qemu gives &amp;quot;couldn't add device gadget:1&amp;quot;, double-check that it was built against gadgetfs - the file config-host.h must contain the line &amp;quot;#define CONFIG_GADGETFS 1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;1&amp;quot; in &amp;quot;usb_add gadget:N&amp;quot; is the number of the USB configuration that we want to use. If everything went correctly - you can check that in dmesg - you should now have a new network interface called ''usb0'' on the PC, through which you can talk to the Openmoko running in QEMU:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ dmesg | tail&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: bound to dummy_udc driver&lt;br /&gt;
&amp;lt;7&amp;gt;hub 3-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: new high speed USB device using dummy_hcd and address 3&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: connected&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: default language 0x0409&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: new device strings: Mfr=1, Product=2, SerialNumber=0&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Product: RNDIS/Ethernet Gadget&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: configuration #1 chosen from 1 choice&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.0 (config #1, interface 0)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.0: uevent&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: usb_probe_interface - got id&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: status ep3in, 16 bytes period 14&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.1 (config #1, interface 1)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.1: uevent&lt;br /&gt;
 $ su -&lt;br /&gt;
Password:&lt;br /&gt;
 # tail /var/log/everything/current&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: connected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: disconnected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: configuration #1&lt;br /&gt;
May  8 19:25:32 [kernel] usb0: register 'cdc_ether' at usb-dummy_hcd-1, CDC Ethernet Device, 52:e7:eb:76:0a:d0&lt;br /&gt;
 # lsusb -vvv&lt;br /&gt;
Bus 003 Device 003: ID 1457:5122  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5122 &lt;br /&gt;
  bcdDevice            2.12&lt;br /&gt;
  iManufacturer           1 Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
  iProduct                2 RNDIS/Ethernet Gadget&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           80&lt;br /&gt;
    bNumInterfaces          2&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          7 CDC Ethernet&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      6 Ethernet Networking&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 CDC Communications Control&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               1.10&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      CDC Ethernet:&lt;br /&gt;
        iMacAddress                      3 52E7EB760AD0&lt;br /&gt;
        bmEthernetStatistics    0x00000000&lt;br /&gt;
        wMaxSegmentSize               1514&lt;br /&gt;
        wNumberMCFilters            0x0000&lt;br /&gt;
        bNumberPowerFilters              0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval              14&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       1&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              4 Ethernet Data&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
Device Qualifier (for other device speed):&lt;br /&gt;
  bLength                10&lt;br /&gt;
  bDescriptorType         6&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 inet 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # exit&lt;br /&gt;
 $ ssh root@192.168.0.202&lt;br /&gt;
The authenticity of host '192.168.0.202 (192.168.0.202)' can't be established.&lt;br /&gt;
RSA key fingerprint is de:21:87:93:52:1c:6b:c7:69:29:6c:af:66:50:02:02.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '192.168.0.202' (RSA) to the list of known hosts.&lt;br /&gt;
root@192.168.0.202's password: &lt;br /&gt;
root@fic-gta01:~$ uname -a&lt;br /&gt;
Linux fic-gta01 2.6.20.7-moko8 #1 PREEMPT Wed Apr 25 11:13:52 UTC 2007 armv4tl unknown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting to the serial port/Communicating with u-boot  ==&lt;br /&gt;
If you add the option ''-serial telnet:localhost:1200,server'' to QEMU will create a telnet server on port 1200 that you can connect to as the serial port.&amp;lt;br&amp;gt;&lt;br /&gt;
This will allow you to experiment with u-boot configuration without risking to brick the real device.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Please note that QEMU will wait for you to connect to the telnet server at port 1200 before starting the emulation.&amp;lt;br&amp;gt;&lt;br /&gt;
(use the command ''telnet localhost 1200'' to establish the connection)&lt;br /&gt;
&lt;br /&gt;
== Instant boot ==&lt;br /&gt;
Actually it not instant but a lot faster that actually booting.&lt;br /&gt;
&lt;br /&gt;
The boot speed is achieved by saving the virtual machine.&lt;br /&gt;
&lt;br /&gt;
Here are the steps required:&lt;br /&gt;
* Boot Qemu as you usually do &lt;br /&gt;
* Wait till the emulated Neo has finished starting up.  &lt;br /&gt;
* Go to the ''virtual console 2'' (press ''ctrl+alt+2'')&lt;br /&gt;
* Save the virtual machine state using '''savevm''' ''tagName''&lt;br /&gt;
Next time you want to boot you can either:&lt;br /&gt;
# Start the emulator and go to the 2. console and ''loadvm tagName''&lt;br /&gt;
# Add '''-loadvm tagName'''&lt;br /&gt;
After a short delay the emulator is just like you left it when you saved the state.&lt;br /&gt;
&lt;br /&gt;
I created a script that launches qemu using the -loadvm option, result: Instant Moko&amp;amp;trade;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Building Gadget USB Module]] - Helpful guide&lt;br /&gt;
*[[Xephyr]] - Openmoko on i386&lt;br /&gt;
*[[Xoo]] - Openmoko on i386&lt;br /&gt;
&lt;br /&gt;
{{Languages|Openmoko_under_QEMU}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Emulation]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_under_QEMU</id>
		<title>Openmoko under QEMU</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_under_QEMU"/>
				<updated>2009-03-03T09:18:16Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Pre-built binaries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Openmoko under QEMU}}&lt;br /&gt;
[http://en.wikipedia.org/wiki/Qemu QEMU] can be used in at least three ways to run Openmoko. Depending on the purpose that you are going to use the emulator for, you should decide on the target platform.&lt;br /&gt;
&lt;br /&gt;
*''PC'' - Openmoko can be built to run on regular i386 hardware, 32- or 64-bit and this is probably the fastest way to get Openmoko running if you want to get an impression of how it looks.  In this scenario QEMU would only serve for isolating your Openmoko installation from your normal system, or, if you're not on a UNIX system, QEMU provides a non-intrusive way to get Linux up quickly. More information can be found in the [[FAQ]] and [[Getting Openmoko working on host with Xoo|here]].&lt;br /&gt;
&lt;br /&gt;
*''Integrator/CP'' - this is the default ARM-based machine that QEMU knows about. This target is used with MACHINE=&amp;quot;qemuarm&amp;quot; and it is sufficient to run the original Openmoko rootfs image, although it doesn't emulate any of the [[:Category:Neo1973 Hardware | Neo1973 Hardware]] except the very CPU core. Read more in the [[FAQ#Q:_Is_there_an_emulator_available_for_Openmoko.3F|FAQ]].&lt;br /&gt;
&lt;br /&gt;
*''Neo1973'' - the QEMU tree available from Openmoko repositories is also capable of emulating most of the actual [[Neo1973]] (GTA01) hardware, although not all of it. Additionally, Neo FreeRunner emulation is a work-in-progress. When all of the emulator parts are more mature our code is going to be submitted and merged to the main QEMU development tree.&lt;br /&gt;
&lt;br /&gt;
== Neo1973 emulation ==&lt;br /&gt;
&lt;br /&gt;
This target will (obviously) run original Openmoko rootfs images, but then it should also be able to run the original u-boot and kernel images, the same ones that a real Neo1973 (GTA01) uses. Among other differences you will notice between this approach and the Integrator/CP target is you also get correct screen resolution, some (fake) battery readings, and other goodness. Currently missing parts of the GTA01 emulator are: [[Hardware:AGPS|AGPS]] and [[Bluetooth]] - these things will still be worked on, as well as general usability. Even with these things missing, QEMU should provide substantial help in debugging kernel and u-boot issues to developers.&lt;br /&gt;
&lt;br /&gt;
What QEMU can '''*not*''' be used for, and probably no other emulator can, is speed measures and getting the general feel of Openmoko performance. Code running in qemu runs with the maximum speed your host computer can provide with an overhead of translating target code to host code, and this overhead is not uniform across different instructions. This means that even if your virtual Neo reports near 100 BogoMIPS (which is the speed of a real Neo), different actions performed in the emulator will not run with the same speed. On most PCs you will notice the virtual Neo running faster than a real one (Audio related operations may be one of the exceptions).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Rough status for each of the components that need emulation, following the outline of [[:Category:Neo1973 Hardware | Neo1973 Hardware]] page.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|S3C2410A Processor&lt;br /&gt;
|-&lt;br /&gt;
|ARM920T core || Works || Already in mainline QEMU.&lt;br /&gt;
|-&lt;br /&gt;
|Basic guts || Work || This includes GPIO interface, DMA, Interrupt Controller, Timers, NAND controller, MMC/SD host, [[I2C]] and IIS interfaces, Memory &amp;amp; Clock &amp;amp; Power management controllers, RAM.&lt;br /&gt;
|-&lt;br /&gt;
|Serial ports || Works || Use the &amp;quot;-serial&amp;quot; switch (maybe be specified multiple times) to tell QEMU where serial input/output should go to. GSM module will be connected on UART0.&lt;br /&gt;
|-&lt;br /&gt;
|RTC || Works || On start QEMU will load it with current time/date - the Neo1973 [[kernel]] doesn't use it for time/date source currently.&lt;br /&gt;
|-&lt;br /&gt;
|SPI || Works || The guest kernel can drive it using either the SPI interface or raw GPIO bitbanging.&lt;br /&gt;
|-&lt;br /&gt;
|LCD || Works || The virtual LCD will display contents in QEMU window unless &amp;quot;-nographic&amp;quot; is specified on command line.&lt;br /&gt;
|-&lt;br /&gt;
|ADC || Works || Mouse events in QEMU window generate what would be touchscreen events on a Neo1973 and are passed to the guest OS through the on-chip ADC.&lt;br /&gt;
|-&lt;br /&gt;
|OHCI USB || Works || This part is in mainline QEMU. Use the &amp;quot;-usb&amp;quot; switch to enable the controller and &amp;quot;usb_add&amp;quot; in QEMU monitor to attach new virtual or physical USB devices.&lt;br /&gt;
|-&lt;br /&gt;
|Slave USB || Works || Linux's dummy HCD in conjunction with gadget filesystem API is used to make the virtual Neo appear as a real one connected to the host computer. See [[#Setting up USB connection|Setting up USB connection]] below. (Experimental)&lt;br /&gt;
|-&lt;br /&gt;
|Watchdog || Works || This is one of the less important on-chip peripherals in S3C2410. It is however used by Linux for rebooting the board.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|[[I2C]] bus peripherals&lt;br /&gt;
|-&lt;br /&gt;
|[[PCF50606]] || Works || (Aka PMU) Fakes the battery charge level (set at 88%), POWER button, etc. Also contains an RTC, also unused by Linux.&lt;br /&gt;
|-&lt;br /&gt;
|[[LM4857]] || Works&lt;br /&gt;
|-&lt;br /&gt;
|[[WM8753L]] || Works || The CODEC is also connect to the CPU's IIS port. Basic [[Neo1973 Audio Subsystem|audio functionality]] is supported - see QEMU documentation on getting audio input/output from the emulator. Volume control has no effects.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|Other peripherals&lt;br /&gt;
|-&lt;br /&gt;
|NAND Flash || Works || However, some pieces are not confirmed to be completely compatible with the real hardware because of lack thereof. Use &amp;quot;-mtdblock flashimagefilenamehere&amp;quot; switch to point QEMU to your flash image. The file should be at least 69206016 bytes big.&lt;br /&gt;
|-&lt;br /&gt;
|JBT6K74-AS(PI) || Works || (Aka LCM) Wired to the SPI channel 1&lt;br /&gt;
|-&lt;br /&gt;
|Buttons || Work || Enter is the AUX button, Space is the POWER button. Wired to on-chip GPIO and PCF50606.&lt;br /&gt;
|-&lt;br /&gt;
|SD card || Works || This part is already in mainline QEMU. Use the &amp;quot;-sd cardimagegoeshere&amp;quot; switch to point QEMU to the card image. The regular QEMU monitor commands for removable media can also be used. The card works, however the on-chip host controller gave block length errors on heavy I/O despite working as described in specification. I suspect the kernel driver. DMA operation is not tested.&lt;br /&gt;
|-&lt;br /&gt;
|Bluetooth&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Works&lt;br /&gt;
|A generic Bluetooth HCI (just like the BlueCore4 chip) is connected to internal USB hub (just like the Delta DBFM dongle). Currently qemu emulates no other bluetooth devices, so the dongle behaves as if there was no BT-enabled slaves around, being the only device on the piconet, i.e. is not really useful. Likely a Bluetooth keyboard will be emulated. A physical Bluetooth dongle can also be attached to the emulator (see USB documentation in QEMU).&lt;br /&gt;
|-&lt;br /&gt;
|[[GSM]] || Works || A fake modem is connected to UART0 understanding a (currently quite limited) subset of AT commands. Ultimately it should support as much functionality as possible (basic AT command set, fake GPRS connections, dialing and SMS send/receive). This way all parts of the phone subsystem (CALYPSO, TWL3014, TRF6151) will not have to be emulated. There is a possibility to wire a real GSM modem to QEMU's serial port, or the [http://doc.trolltech.com/qtopia-4.3-snapshot/fd-ModemSimulator.html phonesim] modem simulator from the ''Qtopia'' project (use the --enable-phonesim switch to ./configure) as well as the [http://doc.trolltech.com/qtopia-4.3-snapshot/modem-emulator.html atinterface] modem emulator, also from Qtopia.&lt;br /&gt;
|-&lt;br /&gt;
|[[Hardware:AGPS|AGPS]]&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|There are obvious difficulties emulating the chip, but hopefully it can be made to present the guest OS with some fixed coordinates later when more is known about the chip. Again a real chip could be connected to QEMU's serial port.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Current development is aiming for [[:Category:Neo1973_Hardware#GTA01Bv4 | GTA01Bv4]] compatibility; [[:Category:Neo1973_Hardware#GTA01Bv3 | earlier revisions]] can also be emulated if needed. The differences between the hardware revisions currently only manifest themselves in GPIO wiring. Hardware emulation is implemented in a clean-room manner using official specifications where possible.&lt;br /&gt;
&lt;br /&gt;
== Neo FreeRunner emulation ==&lt;br /&gt;
&lt;br /&gt;
The second line of Openmoko phones, the Neo FreeRunner (GTA02) saw various hardware changes and improvements since Neo1973 (GTA01).  QEMU has fullest support for the GTA01 (the first model), but partial GTA02 emulation is also planned.  This will only include the hardware components which were added in GTA02 and were not present in GTA01 (see [[Neo 1973 vs Neo FreeRunner]] for complete hardware difference list):&lt;br /&gt;
&lt;br /&gt;
* The u-blox GPS chip (i.e. raw NMEA protocol).&lt;br /&gt;
* The Atheros AR6001 WLAN / WiFi chip (and SDIO bus).&lt;br /&gt;
* The two LIS accelerometers.&lt;br /&gt;
* 128MiB, 1.8V NAND chip instead of 64MiB.&lt;br /&gt;
&lt;br /&gt;
What that means is that the emulated machine will internally not be exactly like Neo FreeRunner, but will be functionally the same.  That in turn means that it needs a custom kernel because it's neither a GTA01 nor GTA02 internally.  This kernel source will be provided as part of qemu.  The bootloader used will be the GTA01 build of u-boot.&lt;br /&gt;
&lt;br /&gt;
This approach is called paravirtualisation and is often used as an emulation solution for mobile platforms.  For a userspace programmer (Application developers) the machine will be visible as a genuine GTA02.  For a kernel hacker it will be a custom board.&lt;br /&gt;
&lt;br /&gt;
If there's an initiative among the users, to emulate GTA02 hardware to a bigger extent than explained here, patches / improvements will be always welcome because the QEMU project seeks to emulate the real hardware and stay always as close as possible to physical hardware (in other words, full emulation is preferred over paravirtualisation in the QEMU upstream).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Below is a rough status information for each of the components.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA01 hardware&lt;br /&gt;
|-&lt;br /&gt;
|Processor, on-chip and external peripherals || Work || See the GTA01 supported hardware chart above.  This hardware is at the base of the Neo FreeRunner emulator.  The same usage notes apply.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA02 components&lt;br /&gt;
|-&lt;br /&gt;
|GPS || Works || A virtual GPS chip is connected to the second serial port of the virtual machine, exactly like on the Neo FreeRunner.&lt;br /&gt;
|-&lt;br /&gt;
|WLAN&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Partial support&lt;br /&gt;
|The Atheros AR6001 (second firmware revision) is emulated to an extent that it gets detected by the kernel SDIO stack and registered as a network interface by the Atheros driver.  It doesn't allow for actual network communication yet.  The basic SDIO bus emulation is complete.&lt;br /&gt;
|-&lt;br /&gt;
|Accelerometers || Work || Two dummy accelerometers are connected to the virtual machine's I2C bus.  They provide a constant 1G reading at the moment.  One improvement idea to be implemented when there's some software available for testing, is to pass Qemu's SDL window movements as input to the virtual accelerometers, i.e. dragging the X window around would generate motion sensor events.  These events would be two-dimensional but should be enough for Application developers to test their programs' interactions with the movements.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How to get it running ==&lt;br /&gt;
&lt;br /&gt;
These instructions talk about the GTA01 emulator (default).&lt;br /&gt;
&lt;br /&gt;
=== Using MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
This is arguably the easiest way of building qemu-neo1973 since you won't need to deal with the compiling and flashing processes yourself. See [[Using_QEMU_with_MokoMakefile|MokoMakefile]] for details.&lt;br /&gt;
&lt;br /&gt;
If you *just* build QEMU and use the official images by typing &amp;quot;make qemu&amp;quot; only (as opposed to setting up monotone and openembedded and building an entire new image for yourself with MokoMakefile), then the build takes less time than the manual instructions below (since it's all done automatically).&lt;br /&gt;
&lt;br /&gt;
=== Manual setup ===&lt;br /&gt;
&lt;br /&gt;
To obtain the latest source code for the emulator, you will want to do something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ svn checkout https://svn.openmoko.org/trunk/src/host/qemu-neo1973&lt;br /&gt;
$ cd qemu-neo1973&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, we're going to configure and build the emulator (Note [[#Requirements|Requirements]] below):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --target-list=arm-softmmu  # GCC 3.x will be required, see --cc=&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you dont want gcc-3.x then you can apply patch from here&lt;br /&gt;
https://bugs.gentoo.org/show_bug.cgi?id=160627&lt;br /&gt;
like so&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ patch -p2 &amp;lt; qemu-gcc4.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See other available options for the configure script by appending &amp;quot;--help&amp;quot;.&lt;br /&gt;
Now you should have a working emulator under the name &amp;quot;arm-softmmu/qemu-system-arm&amp;quot;. To run Openmoko you will also need to somehow install Openmoko on your virtual phone, which is totally clean of any software at this moment. There are several block devices to choose from, the best option is probably to do exactly what the Neo1973 manufacturer does before it ships the device to the final user. This process is described in [[Bootloader]], [[Kernel]], [[NAND bad blocks]] and [[Devirginator]] but you don't need to know all the details. Two scripts are provided to generate a firmware for your phone, as realistic as possible. First run&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/download.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which will look up the list of latest available Openmoko snapshot builds from buildhost.openmoko.org and choose the most recent [[u-boot]], Kernel, and root filesystem images, and download the images (unless they are already found in the openmoko/ directory).&lt;br /&gt;
'''Note''' openmoko/env might be broken. It seems to fix it to change it to this instead.&lt;br /&gt;
&amp;lt;pre&amp;gt;#The scripts will include this on startup to setup variables&lt;br /&gt;
&lt;br /&gt;
src_dir=&amp;quot;`pwd`&amp;quot;&lt;br /&gt;
script_dir_relative=openmoko&lt;br /&gt;
script_dir=&amp;quot;$src_dir/$script_dir_relative&amp;quot;&lt;br /&gt;
uboot_symlink=&amp;quot;$src_dir/u-boot.bin&amp;quot;&lt;br /&gt;
qemu_relative=&amp;quot;arm-softmmu/qemu-system-arm -M gta02fake -m 130&amp;quot;&lt;br /&gt;
qemu=&amp;quot;$src_dir/$qemu_relative&amp;quot;&lt;br /&gt;
flash_base=openmoko-flash.base&lt;br /&gt;
flash_image=openmoko-flash.image&lt;br /&gt;
make=make&lt;br /&gt;
which gmake &amp;amp;&amp;amp; make=gmake&lt;br /&gt;
echo=echo&lt;br /&gt;
which gecho &amp;amp;&amp;amp; echo=gecho&lt;br /&gt;
export make echo&lt;br /&gt;
dump_dir=&amp;quot;$script_dir/vvfat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
qemu_monitor=&amp;quot;$HOME/.qemu_monitor&amp;quot;&lt;br /&gt;
qemu_cmd () { $script_dir/qemu-cmd.pl &amp;quot;$qemu_monitor&amp;quot; &amp;quot;$*&amp;quot;; }&lt;br /&gt;
&lt;br /&gt;
kernel_addr=0x30100000&lt;br /&gt;
splash_addr=0x36000000&lt;br /&gt;
splash_size=0x5000&lt;br /&gt;
&lt;br /&gt;
# We don't want the &amp;quot;-latest&amp;quot; symlinks to match&lt;br /&gt;
kernel_wildcard=&amp;quot;testing-om-gta01-*.uImage.bin&amp;quot;&lt;br /&gt;
rootfs_wildcard=&amp;quot;openmoko-testing-om-gta01.rootfs.jffs2&amp;quot;&lt;br /&gt;
uboot_wildcard=&amp;quot;gta01bv4-u-boot.bin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
download_dir=&amp;quot;http://downloads.openmoko.org/distro/testing/&amp;quot;&lt;br /&gt;
dev_download_dir=&amp;quot;$download_dir&amp;quot;&lt;br /&gt;
backup_download_dir=&amp;quot;http://buildhost.automated.it/OM2007.2/&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These binaries will be used by the flash.sh script. First make sure you have the netpbm package installed for some graphics conversion utilities. On Ubuntu this can be done by:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install netpbm&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/flash.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which runs the emulator, loads u-boot into it and then uses u-boot's capability to program the Flash memory to install all the necessary parts of the system into the virtual Flash. It will also set up all the bootloading process including a boot menu (ENTER is [AUX] and SPACE is [POWER]), splash, u-boot environment and some default kernel parameters. If everything goes OK, the script should print a command which you can use to start using the emulator.&lt;br /&gt;
&lt;br /&gt;
QEMU has '''*tons*''' of commandline switches and things that can be configured. You can look them up in [http://bellard.org/qemu/user-doc.html QEMU user docs]. You will probably want to use the &amp;quot;-snapshot&amp;quot; switch, among other ones. Saving and restoring emulation state at any point (unrelated to &amp;quot;-snapshot&amp;quot;) should work as per QEMU user docs too. In addition the monitor commands &amp;quot;help&amp;quot; and &amp;quot;info&amp;quot; are of great help. The monitor usually sits in second virtual console, thus ctrl-alt-2 and ctrl-alt-1 switch to monitor and back.&lt;br /&gt;
&lt;br /&gt;
=== Pre-built binaries ===&lt;br /&gt;
&lt;br /&gt;
Debian ubuntu package is available at : http://www.newlc.com/en/openmoko-deb-packages-and-fosdem-debian-video&lt;br /&gt;
&lt;br /&gt;
Win32 binaries shipped with firmware were also released ([https://admin-trac.openmoko.org/trac/ticket/624openmoko-emulator-bin-20070625.rar or openmoko-emulator-win32-bin-20070625.zip]) (Tested on Wine, MS Windows XP and Vista Business).&lt;br /&gt;
&lt;br /&gt;
=== Neo FreeRunner (GTA02) ===&lt;br /&gt;
&lt;br /&gt;
The instructions for running the emulator are the same for FreeRunner, but the final command line to invoke qemu changes.  Instead of &amp;quot;-M gta01&amp;quot; as the machine name &amp;quot;-M gta02fake&amp;quot; has to be used.&lt;br /&gt;
&lt;br /&gt;
The kernel supporting GTA02 emulator is obtained by applying the ''openmoko/linux-gta02-pseudo.patch'' patch found in qemu-neo1973 sources, to the 2.6.24 openmoko kernel (vanilla linux-2.6.24 + the openmoko patchset from http://svn.openmoko.org/branches/src/target/kernel/2.6.24.x/patches/).  Since the GTA02 kernel support is still under heavy development, please refer to the openmoko/README file contained in qemu-neo1973 sources for the latest instructions on building the kernel.&lt;br /&gt;
&lt;br /&gt;
If a normal Openmoko kernel is used under Neo FreeRunner emulator, it will simply run as if the machine was a GTA01 and not detect any of the new peripherals.&lt;br /&gt;
&lt;br /&gt;
== Convenient Scripts ==&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-auto.sh&lt;br /&gt;
&lt;br /&gt;
launches qemu and opens a unix socket for communication. All additional parameters are passed to qemu. (e.g. openmoko/qemu-auto.sh -nographic launches the virtual machine with no graphics etc.).&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-upload.sh &amp;lt;filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces a SD card image with one partition with the given file(s) on it (you can pass a list of files) and inserts it into the phone. The Openmoko kernel should detect the event and the automounter should mount the partition. openmoko/qemu-auto.sh must be running already. If you pass no parameters, it ejects the media (the OM kernel is too dumb to detect this unfortunately). This will only work with gta01 emulation because gta02 has no SD.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-quit.sh&lt;br /&gt;
&lt;br /&gt;
powers the VM down cleanly.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-gadget.sh&lt;br /&gt;
&lt;br /&gt;
attempts to connect target's S3C USB slave to host's dummy HCD (if present and gadgetfs is mounted).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This QEMU tree has only been tested on GNU/Linux. To get graphical (not counting VNC) and/or audio output from the emulator you will need either SDL or Cocoa installed on your computer. To enable audio, see the available switches to the ./configure script.&lt;br /&gt;
&lt;br /&gt;
The scripts that sit in openmoko/ require lynx, wget, python, netpbm and most GNU base utilities installed in standard locations. The netpbm package contains tools necessary for bootsplash image conversion.&lt;br /&gt;
&lt;br /&gt;
All of the build-time and run-time requirements listed in [http://bellard.org/qemu/user-doc.html QEMU documentation] apply. This includes zlib, etc. On distributions that use binary packages, remember that you need the packages ending in '''-dev''' or '''-devel'''.&lt;br /&gt;
&lt;br /&gt;
== QEMU and GNU debugger ==&lt;br /&gt;
&lt;br /&gt;
QEMU lets you debug operating system kernels and bootloaders like you debug all other programs. To do this you will need a debugger that speaks the GDB remote debugging protocol - [http://sourceware.org/gdb/ GDB] is the obvious choice. Some cross toolchains come with GDB already set up. Otherwise building cross-GDB yourself is quick and easy (compared to building binutils and cross-gcc).&lt;br /&gt;
&lt;br /&gt;
To debug u-boot, load the file &amp;quot;u-boot&amp;quot; into gdb (not &amp;quot;u-boot.bin&amp;quot;) that is produced by &amp;quot;make&amp;quot; when building u-boot. To debug a Linux kernel, load the file &amp;quot;vmlinux&amp;quot; from the main source directory into gdb. These files are in ELF format and contain all the symbol information and are not stripped of debugging data until you run &amp;quot;strip&amp;quot; on them, unlike &amp;quot;u-boot.bin&amp;quot; and &amp;quot;Image&amp;quot;/&amp;quot;zImage&amp;quot;/&amp;quot;uImage&amp;quot;. Next, tell QEMU to enable the gdbserver by appending the &amp;quot;-s&amp;quot; switch or issuing &amp;quot;gdbserver&amp;quot; in the monitor. Use the command &amp;lt;pre&amp;gt;(gdb) target remote localhost:1234&amp;lt;/pre&amp;gt; to make a connection to the emulator. From there you should be able to use all the usual GDB commands, including stepping instructions, setting breakpoints, watchpoints, inspecting stack, variables, registers and more. If gdb is running in the same directory from which it grabbed the ELF executable, the &amp;quot;edit&amp;quot; command should work so you can jump right to the source line which is executing.&lt;br /&gt;
&lt;br /&gt;
== Simple network connection with pppd ==&lt;br /&gt;
&lt;br /&gt;
One simple way to get a network connection from the emulated Neo is via an emulated serial port and [[pppd]]. Add ''-serial vc -serial pty'' to the [[QEMU command line]], and QEMU prints a device name on a line like &amp;quot;char device redirected to /dev/pts/12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the Neo side, open a terminal and run the command &amp;quot;pppd nodetach debug /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the host computer side, open a root terminal and run the command &amp;quot;pppd nodetach debug 192.168.68.1:192.168.68.2 noauth /dev/pts/12&amp;quot;, substituting the actual device name from above.&lt;br /&gt;
&lt;br /&gt;
Now on the host computer side, you should be able to &amp;quot;ping 192.168.68.2&amp;quot; and &amp;quot;ssh root@192.168.68.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
NB : If you see in pppd trace something like this &amp;quot;Received bad configure-rej:  12 06 00 00 00 00&amp;quot; again and again, you will ping but no application will work. It is probably the compression protocol (ccp) negotiation which fail. Add &amp;quot;noccp&amp;quot; to the two pppd commands like &amp;quot;pppd nodetach debug noccp /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Setting up Internet connection for your qemu neo ==&lt;br /&gt;
Before you start, you have to have a working pppd or USB connection, ([[#Simple_network_connection_with_pppd|see the previous chapter]] and [[#Setting up USB connection|the next chapter]])&lt;br /&gt;
&lt;br /&gt;
(I assume that your local ip-adress is 192.168.0.100 and your router is 192.168.0.1)&lt;br /&gt;
&lt;br /&gt;
In qemu terminal (or via ssh) type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ifdown usb0&lt;br /&gt;
$ route add default gw 192.168.68.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolv.conf:&lt;br /&gt;
nameserver 192.168.0.1&lt;br /&gt;
This will be your host-computer DNS server.&lt;br /&gt;
&lt;br /&gt;
On the host-computer type(as root , use sudo -i on ubuntu):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;
&lt;br /&gt;
modprobe ip_tables&lt;br /&gt;
modprobe iptable_nat&lt;br /&gt;
modprobe ipt_MASQUERADE&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -F&lt;br /&gt;
iptables -t nat    -F&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -P INPUT       ACCEPT&lt;br /&gt;
iptables -t filter -P FORWARD     ACCEPT&lt;br /&gt;
iptables -t filter -P OUTPUT      ACCEPT&lt;br /&gt;
iptables -t nat    -P PREROUTING  ACCEPT&lt;br /&gt;
iptables -t nat    -P POSTROUTING ACCEPT&lt;br /&gt;
&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.68.0/24 -j MASQUERADE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Where eth0 is your network interface connected to the router)&lt;br /&gt;
&lt;br /&gt;
Thats it - now you can enjoy internet in qemu.&lt;br /&gt;
&lt;br /&gt;
== Setting up USB connection ==&lt;br /&gt;
&lt;br /&gt;
It is possible (although not very straight forward, probably about the complexity of tun-tap networking) to connect the virtual, emulated Neo1973 to the Linux PC on which the emulator is running, and work with it as if a real Neo1973 was plugged into the computer's USB port, but no twiddling with cables is needed. If you're testing your applications on the Neo, it may be worth setting up this kind of connection because it lets you enable normal [[USB_Networking|networking between the PC and the phone and ssh into it]] (which is much more comfortable than typing commands into the Openmoko's terminal emulator via on-screen keyboard). Here's what you will need in order to get this working:&lt;br /&gt;
&lt;br /&gt;
A Linux host with a 2.6 series kernel. The following drivers compiled-in or in modules: dummy_hcd, gadgetfs, usbnet, cdc_ether. [[Building Gadget USB Module|A detailed guide to building the necessary modules is available (primarily Ubuntu focused).]] Generic instructions follow.&lt;br /&gt;
&lt;br /&gt;
Note that you need root access to perform most actions described here. Here's how to enable the drivers in menuconfig.&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Support for USB Gadgets'''&lt;br /&gt;
&lt;br /&gt;
Find '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''USB Peripheral Controller''' and set it to '''Dummy HCD (DEVELOPMENT)'''&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Gadget Filesystem (EXPERIMENTAL)''' (this one is good to have as a module)&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''')&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)''')&lt;br /&gt;
&lt;br /&gt;
These last two drivers are the same [[Getting Started with your Neo1973#By using Ethernet emulation over a USB cable|drivers that you need to work with a real Neo over USB network]]. After you've built the drivers, make sure that the copy of kernel headers in /usr/include/linux is up to date. In particular the file /usr/include/linux/usb_gadgetfs.h needs to be present and if your distribution came with headers older than 2.6.18 or so, then you need tell the package manager to update them, or you can do that manually with&lt;br /&gt;
&amp;lt;pre&amp;gt; # cp -a /usr/src/linux/include/linux/* /usr/include/linux/&amp;lt;/pre&amp;gt;&lt;br /&gt;
(assuming that your kernel sources are in /usr/src/linux). It is important that this is done before building qemu because the build system checks if these headers are functional and in case they aren't found it will disable the USB Slave functionality.  Run &amp;quot;grep CONFIG_GADGETFS config-host.h&amp;quot; in qemu build directory to make sure that the detection succeeded.  If it didn't, correct your linux headers and reconfigure qemu.&lt;br /&gt;
&lt;br /&gt;
After building qemu and before running it, make sure that the modules are loaded into the kernel. I found it useful to load gadgetfs with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt; # modprobe gadgetfs default_uid=1000  # assuming my User ID is 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
and added the following line to my /etc/fstab:&lt;br /&gt;
&amp;lt;pre&amp;gt;gadget         /dev/gadget    gadgetfs   noauto,user,group         0   0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure that the mountpoint /dev/gadget exists:&lt;br /&gt;
&amp;lt;pre&amp;gt; # mkdir -p /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that the rest of the procedure can be performed from your regular user account. Mounting gadgetfs is done with:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ mount /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;quot;default_uid&amp;quot; parameter changes the ownership on all files under /dev/gadget to your own and since the files there are created and destroyed dynamically, there's no easy way to have that performed by ''udev''. Now running qemu as you usually do but appending &amp;quot;-usb -usbgadget&amp;quot; (in the current version of the [[MokoMakefile]] this is not included) should enable the USB Slave functionality. The qemu monitor commands &amp;quot;info usbslave&amp;quot; and &amp;quot;usb_add gadget&amp;quot; will be useful. The former instruction asks the OS running under the emulator (Openmoko) to describe its slave features (that's what ''lsusb'' does after a Neo1973 is connected to a PC). You can see the available USB configurations in this command's output. Since gadgetfs allows only one configuration, we will need to choose the desired configuration - most device have only one such configuration, in which case you can use just &amp;quot;usb_add gadget&amp;quot; to connect to host; CDC ethernet devices however usually include a second configuration for RNDIS networking (i.e. Ms Windows compatibility) and so does Openmoko when using the g_ether driver. Hence, to get this right, wait for Openmoko to fully boot up and execute the following in QEMU monitor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QEMU 0.9.0 monitor - type 'help' for more information&lt;br /&gt;
(qemu) info usbslave &lt;br /&gt;
USB2.2 device 1457:5122:&lt;br /&gt;
Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
Product: RNDIS/Ethernet Gadget&lt;br /&gt;
Configuration 0: RNDIS&lt;br /&gt;
Configuration 1: CDC Ethernet&lt;br /&gt;
(qemu) &lt;br /&gt;
(qemu) usb_add gadget:1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If qemu gives &amp;quot;couldn't add device gadget:1&amp;quot;, double-check that it was built against gadgetfs - the file config-host.h must contain the line &amp;quot;#define CONFIG_GADGETFS 1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;1&amp;quot; in &amp;quot;usb_add gadget:N&amp;quot; is the number of the USB configuration that we want to use. If everything went correctly - you can check that in dmesg - you should now have a new network interface called ''usb0'' on the PC, through which you can talk to the Openmoko running in QEMU:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ dmesg | tail&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: bound to dummy_udc driver&lt;br /&gt;
&amp;lt;7&amp;gt;hub 3-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: new high speed USB device using dummy_hcd and address 3&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: connected&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: default language 0x0409&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: new device strings: Mfr=1, Product=2, SerialNumber=0&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Product: RNDIS/Ethernet Gadget&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: configuration #1 chosen from 1 choice&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.0 (config #1, interface 0)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.0: uevent&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: usb_probe_interface - got id&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: status ep3in, 16 bytes period 14&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.1 (config #1, interface 1)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.1: uevent&lt;br /&gt;
 $ su -&lt;br /&gt;
Password:&lt;br /&gt;
 # tail /var/log/everything/current&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: connected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: disconnected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: configuration #1&lt;br /&gt;
May  8 19:25:32 [kernel] usb0: register 'cdc_ether' at usb-dummy_hcd-1, CDC Ethernet Device, 52:e7:eb:76:0a:d0&lt;br /&gt;
 # lsusb -vvv&lt;br /&gt;
Bus 003 Device 003: ID 1457:5122  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5122 &lt;br /&gt;
  bcdDevice            2.12&lt;br /&gt;
  iManufacturer           1 Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
  iProduct                2 RNDIS/Ethernet Gadget&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           80&lt;br /&gt;
    bNumInterfaces          2&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          7 CDC Ethernet&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      6 Ethernet Networking&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 CDC Communications Control&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               1.10&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      CDC Ethernet:&lt;br /&gt;
        iMacAddress                      3 52E7EB760AD0&lt;br /&gt;
        bmEthernetStatistics    0x00000000&lt;br /&gt;
        wMaxSegmentSize               1514&lt;br /&gt;
        wNumberMCFilters            0x0000&lt;br /&gt;
        bNumberPowerFilters              0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval              14&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       1&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              4 Ethernet Data&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
Device Qualifier (for other device speed):&lt;br /&gt;
  bLength                10&lt;br /&gt;
  bDescriptorType         6&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 inet 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # exit&lt;br /&gt;
 $ ssh root@192.168.0.202&lt;br /&gt;
The authenticity of host '192.168.0.202 (192.168.0.202)' can't be established.&lt;br /&gt;
RSA key fingerprint is de:21:87:93:52:1c:6b:c7:69:29:6c:af:66:50:02:02.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '192.168.0.202' (RSA) to the list of known hosts.&lt;br /&gt;
root@192.168.0.202's password: &lt;br /&gt;
root@fic-gta01:~$ uname -a&lt;br /&gt;
Linux fic-gta01 2.6.20.7-moko8 #1 PREEMPT Wed Apr 25 11:13:52 UTC 2007 armv4tl unknown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting to the serial port/Communicating with u-boot  ==&lt;br /&gt;
If you add the option ''-serial telnet:localhost:1200,server'' to QEMU will create a telnet server on port 1200 that you can connect to as the serial port.&amp;lt;br&amp;gt;&lt;br /&gt;
This will allow you to experiment with u-boot configuration without risking to brick the real device.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Please note that QEMU will wait for you to connect to the telnet server at port 1200 before starting the emulation.&amp;lt;br&amp;gt;&lt;br /&gt;
(use the command ''telnet localhost 1200'' to establish the connection)&lt;br /&gt;
&lt;br /&gt;
== Instant boot ==&lt;br /&gt;
Actually it not instant but a lot faster that actually booting.&lt;br /&gt;
&lt;br /&gt;
The boot speed is achieved by saving the virtual machine.&lt;br /&gt;
&lt;br /&gt;
Here are the steps required:&lt;br /&gt;
* Boot Qemu as you usually do &lt;br /&gt;
* Wait till the emulated Neo has finished starting up.  &lt;br /&gt;
* Go to the ''virtual console 2'' (press ''ctrl+alt+2'')&lt;br /&gt;
* Save the virtual machine state using '''savevm''' ''tagName''&lt;br /&gt;
Next time you want to boot you can either:&lt;br /&gt;
# Start the emulator and go to the 2. console and ''loadvm tagName''&lt;br /&gt;
# Add '''-loadvm tagName'''&lt;br /&gt;
After a short delay the emulator is just like you left it when you saved the state.&lt;br /&gt;
&lt;br /&gt;
I created a script that launches qemu using the -loadvm option, result: Instant Moko&amp;amp;trade;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Building Gadget USB Module]] - Helpful guide&lt;br /&gt;
*[[Xephyr]] - Openmoko on i386&lt;br /&gt;
*[[Xoo]] - Openmoko on i386&lt;br /&gt;
&lt;br /&gt;
{{Languages|Openmoko_under_QEMU}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Emulation]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_under_QEMU</id>
		<title>Openmoko under QEMU</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_under_QEMU"/>
				<updated>2009-03-03T09:16:49Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Pre-built binaries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Openmoko under QEMU}}&lt;br /&gt;
[http://en.wikipedia.org/wiki/Qemu QEMU] can be used in at least three ways to run Openmoko. Depending on the purpose that you are going to use the emulator for, you should decide on the target platform.&lt;br /&gt;
&lt;br /&gt;
*''PC'' - Openmoko can be built to run on regular i386 hardware, 32- or 64-bit and this is probably the fastest way to get Openmoko running if you want to get an impression of how it looks.  In this scenario QEMU would only serve for isolating your Openmoko installation from your normal system, or, if you're not on a UNIX system, QEMU provides a non-intrusive way to get Linux up quickly. More information can be found in the [[FAQ]] and [[Getting Openmoko working on host with Xoo|here]].&lt;br /&gt;
&lt;br /&gt;
*''Integrator/CP'' - this is the default ARM-based machine that QEMU knows about. This target is used with MACHINE=&amp;quot;qemuarm&amp;quot; and it is sufficient to run the original Openmoko rootfs image, although it doesn't emulate any of the [[:Category:Neo1973 Hardware | Neo1973 Hardware]] except the very CPU core. Read more in the [[FAQ#Q:_Is_there_an_emulator_available_for_Openmoko.3F|FAQ]].&lt;br /&gt;
&lt;br /&gt;
*''Neo1973'' - the QEMU tree available from Openmoko repositories is also capable of emulating most of the actual [[Neo1973]] (GTA01) hardware, although not all of it. Additionally, Neo FreeRunner emulation is a work-in-progress. When all of the emulator parts are more mature our code is going to be submitted and merged to the main QEMU development tree.&lt;br /&gt;
&lt;br /&gt;
== Neo1973 emulation ==&lt;br /&gt;
&lt;br /&gt;
This target will (obviously) run original Openmoko rootfs images, but then it should also be able to run the original u-boot and kernel images, the same ones that a real Neo1973 (GTA01) uses. Among other differences you will notice between this approach and the Integrator/CP target is you also get correct screen resolution, some (fake) battery readings, and other goodness. Currently missing parts of the GTA01 emulator are: [[Hardware:AGPS|AGPS]] and [[Bluetooth]] - these things will still be worked on, as well as general usability. Even with these things missing, QEMU should provide substantial help in debugging kernel and u-boot issues to developers.&lt;br /&gt;
&lt;br /&gt;
What QEMU can '''*not*''' be used for, and probably no other emulator can, is speed measures and getting the general feel of Openmoko performance. Code running in qemu runs with the maximum speed your host computer can provide with an overhead of translating target code to host code, and this overhead is not uniform across different instructions. This means that even if your virtual Neo reports near 100 BogoMIPS (which is the speed of a real Neo), different actions performed in the emulator will not run with the same speed. On most PCs you will notice the virtual Neo running faster than a real one (Audio related operations may be one of the exceptions).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Rough status for each of the components that need emulation, following the outline of [[:Category:Neo1973 Hardware | Neo1973 Hardware]] page.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|S3C2410A Processor&lt;br /&gt;
|-&lt;br /&gt;
|ARM920T core || Works || Already in mainline QEMU.&lt;br /&gt;
|-&lt;br /&gt;
|Basic guts || Work || This includes GPIO interface, DMA, Interrupt Controller, Timers, NAND controller, MMC/SD host, [[I2C]] and IIS interfaces, Memory &amp;amp; Clock &amp;amp; Power management controllers, RAM.&lt;br /&gt;
|-&lt;br /&gt;
|Serial ports || Works || Use the &amp;quot;-serial&amp;quot; switch (maybe be specified multiple times) to tell QEMU where serial input/output should go to. GSM module will be connected on UART0.&lt;br /&gt;
|-&lt;br /&gt;
|RTC || Works || On start QEMU will load it with current time/date - the Neo1973 [[kernel]] doesn't use it for time/date source currently.&lt;br /&gt;
|-&lt;br /&gt;
|SPI || Works || The guest kernel can drive it using either the SPI interface or raw GPIO bitbanging.&lt;br /&gt;
|-&lt;br /&gt;
|LCD || Works || The virtual LCD will display contents in QEMU window unless &amp;quot;-nographic&amp;quot; is specified on command line.&lt;br /&gt;
|-&lt;br /&gt;
|ADC || Works || Mouse events in QEMU window generate what would be touchscreen events on a Neo1973 and are passed to the guest OS through the on-chip ADC.&lt;br /&gt;
|-&lt;br /&gt;
|OHCI USB || Works || This part is in mainline QEMU. Use the &amp;quot;-usb&amp;quot; switch to enable the controller and &amp;quot;usb_add&amp;quot; in QEMU monitor to attach new virtual or physical USB devices.&lt;br /&gt;
|-&lt;br /&gt;
|Slave USB || Works || Linux's dummy HCD in conjunction with gadget filesystem API is used to make the virtual Neo appear as a real one connected to the host computer. See [[#Setting up USB connection|Setting up USB connection]] below. (Experimental)&lt;br /&gt;
|-&lt;br /&gt;
|Watchdog || Works || This is one of the less important on-chip peripherals in S3C2410. It is however used by Linux for rebooting the board.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|[[I2C]] bus peripherals&lt;br /&gt;
|-&lt;br /&gt;
|[[PCF50606]] || Works || (Aka PMU) Fakes the battery charge level (set at 88%), POWER button, etc. Also contains an RTC, also unused by Linux.&lt;br /&gt;
|-&lt;br /&gt;
|[[LM4857]] || Works&lt;br /&gt;
|-&lt;br /&gt;
|[[WM8753L]] || Works || The CODEC is also connect to the CPU's IIS port. Basic [[Neo1973 Audio Subsystem|audio functionality]] is supported - see QEMU documentation on getting audio input/output from the emulator. Volume control has no effects.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|Other peripherals&lt;br /&gt;
|-&lt;br /&gt;
|NAND Flash || Works || However, some pieces are not confirmed to be completely compatible with the real hardware because of lack thereof. Use &amp;quot;-mtdblock flashimagefilenamehere&amp;quot; switch to point QEMU to your flash image. The file should be at least 69206016 bytes big.&lt;br /&gt;
|-&lt;br /&gt;
|JBT6K74-AS(PI) || Works || (Aka LCM) Wired to the SPI channel 1&lt;br /&gt;
|-&lt;br /&gt;
|Buttons || Work || Enter is the AUX button, Space is the POWER button. Wired to on-chip GPIO and PCF50606.&lt;br /&gt;
|-&lt;br /&gt;
|SD card || Works || This part is already in mainline QEMU. Use the &amp;quot;-sd cardimagegoeshere&amp;quot; switch to point QEMU to the card image. The regular QEMU monitor commands for removable media can also be used. The card works, however the on-chip host controller gave block length errors on heavy I/O despite working as described in specification. I suspect the kernel driver. DMA operation is not tested.&lt;br /&gt;
|-&lt;br /&gt;
|Bluetooth&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Works&lt;br /&gt;
|A generic Bluetooth HCI (just like the BlueCore4 chip) is connected to internal USB hub (just like the Delta DBFM dongle). Currently qemu emulates no other bluetooth devices, so the dongle behaves as if there was no BT-enabled slaves around, being the only device on the piconet, i.e. is not really useful. Likely a Bluetooth keyboard will be emulated. A physical Bluetooth dongle can also be attached to the emulator (see USB documentation in QEMU).&lt;br /&gt;
|-&lt;br /&gt;
|[[GSM]] || Works || A fake modem is connected to UART0 understanding a (currently quite limited) subset of AT commands. Ultimately it should support as much functionality as possible (basic AT command set, fake GPRS connections, dialing and SMS send/receive). This way all parts of the phone subsystem (CALYPSO, TWL3014, TRF6151) will not have to be emulated. There is a possibility to wire a real GSM modem to QEMU's serial port, or the [http://doc.trolltech.com/qtopia-4.3-snapshot/fd-ModemSimulator.html phonesim] modem simulator from the ''Qtopia'' project (use the --enable-phonesim switch to ./configure) as well as the [http://doc.trolltech.com/qtopia-4.3-snapshot/modem-emulator.html atinterface] modem emulator, also from Qtopia.&lt;br /&gt;
|-&lt;br /&gt;
|[[Hardware:AGPS|AGPS]]&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|There are obvious difficulties emulating the chip, but hopefully it can be made to present the guest OS with some fixed coordinates later when more is known about the chip. Again a real chip could be connected to QEMU's serial port.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Current development is aiming for [[:Category:Neo1973_Hardware#GTA01Bv4 | GTA01Bv4]] compatibility; [[:Category:Neo1973_Hardware#GTA01Bv3 | earlier revisions]] can also be emulated if needed. The differences between the hardware revisions currently only manifest themselves in GPIO wiring. Hardware emulation is implemented in a clean-room manner using official specifications where possible.&lt;br /&gt;
&lt;br /&gt;
== Neo FreeRunner emulation ==&lt;br /&gt;
&lt;br /&gt;
The second line of Openmoko phones, the Neo FreeRunner (GTA02) saw various hardware changes and improvements since Neo1973 (GTA01).  QEMU has fullest support for the GTA01 (the first model), but partial GTA02 emulation is also planned.  This will only include the hardware components which were added in GTA02 and were not present in GTA01 (see [[Neo 1973 vs Neo FreeRunner]] for complete hardware difference list):&lt;br /&gt;
&lt;br /&gt;
* The u-blox GPS chip (i.e. raw NMEA protocol).&lt;br /&gt;
* The Atheros AR6001 WLAN / WiFi chip (and SDIO bus).&lt;br /&gt;
* The two LIS accelerometers.&lt;br /&gt;
* 128MiB, 1.8V NAND chip instead of 64MiB.&lt;br /&gt;
&lt;br /&gt;
What that means is that the emulated machine will internally not be exactly like Neo FreeRunner, but will be functionally the same.  That in turn means that it needs a custom kernel because it's neither a GTA01 nor GTA02 internally.  This kernel source will be provided as part of qemu.  The bootloader used will be the GTA01 build of u-boot.&lt;br /&gt;
&lt;br /&gt;
This approach is called paravirtualisation and is often used as an emulation solution for mobile platforms.  For a userspace programmer (Application developers) the machine will be visible as a genuine GTA02.  For a kernel hacker it will be a custom board.&lt;br /&gt;
&lt;br /&gt;
If there's an initiative among the users, to emulate GTA02 hardware to a bigger extent than explained here, patches / improvements will be always welcome because the QEMU project seeks to emulate the real hardware and stay always as close as possible to physical hardware (in other words, full emulation is preferred over paravirtualisation in the QEMU upstream).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Below is a rough status information for each of the components.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA01 hardware&lt;br /&gt;
|-&lt;br /&gt;
|Processor, on-chip and external peripherals || Work || See the GTA01 supported hardware chart above.  This hardware is at the base of the Neo FreeRunner emulator.  The same usage notes apply.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA02 components&lt;br /&gt;
|-&lt;br /&gt;
|GPS || Works || A virtual GPS chip is connected to the second serial port of the virtual machine, exactly like on the Neo FreeRunner.&lt;br /&gt;
|-&lt;br /&gt;
|WLAN&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Partial support&lt;br /&gt;
|The Atheros AR6001 (second firmware revision) is emulated to an extent that it gets detected by the kernel SDIO stack and registered as a network interface by the Atheros driver.  It doesn't allow for actual network communication yet.  The basic SDIO bus emulation is complete.&lt;br /&gt;
|-&lt;br /&gt;
|Accelerometers || Work || Two dummy accelerometers are connected to the virtual machine's I2C bus.  They provide a constant 1G reading at the moment.  One improvement idea to be implemented when there's some software available for testing, is to pass Qemu's SDL window movements as input to the virtual accelerometers, i.e. dragging the X window around would generate motion sensor events.  These events would be two-dimensional but should be enough for Application developers to test their programs' interactions with the movements.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How to get it running ==&lt;br /&gt;
&lt;br /&gt;
These instructions talk about the GTA01 emulator (default).&lt;br /&gt;
&lt;br /&gt;
=== Using MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
This is arguably the easiest way of building qemu-neo1973 since you won't need to deal with the compiling and flashing processes yourself. See [[Using_QEMU_with_MokoMakefile|MokoMakefile]] for details.&lt;br /&gt;
&lt;br /&gt;
If you *just* build QEMU and use the official images by typing &amp;quot;make qemu&amp;quot; only (as opposed to setting up monotone and openembedded and building an entire new image for yourself with MokoMakefile), then the build takes less time than the manual instructions below (since it's all done automatically).&lt;br /&gt;
&lt;br /&gt;
=== Manual setup ===&lt;br /&gt;
&lt;br /&gt;
To obtain the latest source code for the emulator, you will want to do something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ svn checkout https://svn.openmoko.org/trunk/src/host/qemu-neo1973&lt;br /&gt;
$ cd qemu-neo1973&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, we're going to configure and build the emulator (Note [[#Requirements|Requirements]] below):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --target-list=arm-softmmu  # GCC 3.x will be required, see --cc=&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you dont want gcc-3.x then you can apply patch from here&lt;br /&gt;
https://bugs.gentoo.org/show_bug.cgi?id=160627&lt;br /&gt;
like so&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ patch -p2 &amp;lt; qemu-gcc4.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See other available options for the configure script by appending &amp;quot;--help&amp;quot;.&lt;br /&gt;
Now you should have a working emulator under the name &amp;quot;arm-softmmu/qemu-system-arm&amp;quot;. To run Openmoko you will also need to somehow install Openmoko on your virtual phone, which is totally clean of any software at this moment. There are several block devices to choose from, the best option is probably to do exactly what the Neo1973 manufacturer does before it ships the device to the final user. This process is described in [[Bootloader]], [[Kernel]], [[NAND bad blocks]] and [[Devirginator]] but you don't need to know all the details. Two scripts are provided to generate a firmware for your phone, as realistic as possible. First run&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/download.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which will look up the list of latest available Openmoko snapshot builds from buildhost.openmoko.org and choose the most recent [[u-boot]], Kernel, and root filesystem images, and download the images (unless they are already found in the openmoko/ directory).&lt;br /&gt;
'''Note''' openmoko/env might be broken. It seems to fix it to change it to this instead.&lt;br /&gt;
&amp;lt;pre&amp;gt;#The scripts will include this on startup to setup variables&lt;br /&gt;
&lt;br /&gt;
src_dir=&amp;quot;`pwd`&amp;quot;&lt;br /&gt;
script_dir_relative=openmoko&lt;br /&gt;
script_dir=&amp;quot;$src_dir/$script_dir_relative&amp;quot;&lt;br /&gt;
uboot_symlink=&amp;quot;$src_dir/u-boot.bin&amp;quot;&lt;br /&gt;
qemu_relative=&amp;quot;arm-softmmu/qemu-system-arm -M gta02fake -m 130&amp;quot;&lt;br /&gt;
qemu=&amp;quot;$src_dir/$qemu_relative&amp;quot;&lt;br /&gt;
flash_base=openmoko-flash.base&lt;br /&gt;
flash_image=openmoko-flash.image&lt;br /&gt;
make=make&lt;br /&gt;
which gmake &amp;amp;&amp;amp; make=gmake&lt;br /&gt;
echo=echo&lt;br /&gt;
which gecho &amp;amp;&amp;amp; echo=gecho&lt;br /&gt;
export make echo&lt;br /&gt;
dump_dir=&amp;quot;$script_dir/vvfat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
qemu_monitor=&amp;quot;$HOME/.qemu_monitor&amp;quot;&lt;br /&gt;
qemu_cmd () { $script_dir/qemu-cmd.pl &amp;quot;$qemu_monitor&amp;quot; &amp;quot;$*&amp;quot;; }&lt;br /&gt;
&lt;br /&gt;
kernel_addr=0x30100000&lt;br /&gt;
splash_addr=0x36000000&lt;br /&gt;
splash_size=0x5000&lt;br /&gt;
&lt;br /&gt;
# We don't want the &amp;quot;-latest&amp;quot; symlinks to match&lt;br /&gt;
kernel_wildcard=&amp;quot;testing-om-gta01-*.uImage.bin&amp;quot;&lt;br /&gt;
rootfs_wildcard=&amp;quot;openmoko-testing-om-gta01.rootfs.jffs2&amp;quot;&lt;br /&gt;
uboot_wildcard=&amp;quot;gta01bv4-u-boot.bin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
download_dir=&amp;quot;http://downloads.openmoko.org/distro/testing/&amp;quot;&lt;br /&gt;
dev_download_dir=&amp;quot;$download_dir&amp;quot;&lt;br /&gt;
backup_download_dir=&amp;quot;http://buildhost.automated.it/OM2007.2/&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These binaries will be used by the flash.sh script. First make sure you have the netpbm package installed for some graphics conversion utilities. On Ubuntu this can be done by:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install netpbm&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/flash.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which runs the emulator, loads u-boot into it and then uses u-boot's capability to program the Flash memory to install all the necessary parts of the system into the virtual Flash. It will also set up all the bootloading process including a boot menu (ENTER is [AUX] and SPACE is [POWER]), splash, u-boot environment and some default kernel parameters. If everything goes OK, the script should print a command which you can use to start using the emulator.&lt;br /&gt;
&lt;br /&gt;
QEMU has '''*tons*''' of commandline switches and things that can be configured. You can look them up in [http://bellard.org/qemu/user-doc.html QEMU user docs]. You will probably want to use the &amp;quot;-snapshot&amp;quot; switch, among other ones. Saving and restoring emulation state at any point (unrelated to &amp;quot;-snapshot&amp;quot;) should work as per QEMU user docs too. In addition the monitor commands &amp;quot;help&amp;quot; and &amp;quot;info&amp;quot; are of great help. The monitor usually sits in second virtual console, thus ctrl-alt-2 and ctrl-alt-1 switch to monitor and back.&lt;br /&gt;
&lt;br /&gt;
=== Pre-built binaries ===&lt;br /&gt;
&lt;br /&gt;
Debian ubuntu package is available at : http://www.newlc.com/en/openmoko-deb-packages-and-fosdem-debian-video&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;a href=&amp;quot;https://admin-trac.openmoko.org/trac/ticket/624&amp;quot;&amp;gt;Win32 binaries shipped with firmware where also released but hard to get (openmoko-emulator-bin-20070625.rar or openmoko-emulator-win32-bin-20070625.zip)&amp;lt;/a&amp;gt; (Tested on Wine, MS Windows XP and Vista Business).&lt;br /&gt;
&lt;br /&gt;
=== Neo FreeRunner (GTA02) ===&lt;br /&gt;
&lt;br /&gt;
The instructions for running the emulator are the same for FreeRunner, but the final command line to invoke qemu changes.  Instead of &amp;quot;-M gta01&amp;quot; as the machine name &amp;quot;-M gta02fake&amp;quot; has to be used.&lt;br /&gt;
&lt;br /&gt;
The kernel supporting GTA02 emulator is obtained by applying the ''openmoko/linux-gta02-pseudo.patch'' patch found in qemu-neo1973 sources, to the 2.6.24 openmoko kernel (vanilla linux-2.6.24 + the openmoko patchset from http://svn.openmoko.org/branches/src/target/kernel/2.6.24.x/patches/).  Since the GTA02 kernel support is still under heavy development, please refer to the openmoko/README file contained in qemu-neo1973 sources for the latest instructions on building the kernel.&lt;br /&gt;
&lt;br /&gt;
If a normal Openmoko kernel is used under Neo FreeRunner emulator, it will simply run as if the machine was a GTA01 and not detect any of the new peripherals.&lt;br /&gt;
&lt;br /&gt;
== Convenient Scripts ==&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-auto.sh&lt;br /&gt;
&lt;br /&gt;
launches qemu and opens a unix socket for communication. All additional parameters are passed to qemu. (e.g. openmoko/qemu-auto.sh -nographic launches the virtual machine with no graphics etc.).&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-upload.sh &amp;lt;filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces a SD card image with one partition with the given file(s) on it (you can pass a list of files) and inserts it into the phone. The Openmoko kernel should detect the event and the automounter should mount the partition. openmoko/qemu-auto.sh must be running already. If you pass no parameters, it ejects the media (the OM kernel is too dumb to detect this unfortunately). This will only work with gta01 emulation because gta02 has no SD.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-quit.sh&lt;br /&gt;
&lt;br /&gt;
powers the VM down cleanly.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-gadget.sh&lt;br /&gt;
&lt;br /&gt;
attempts to connect target's S3C USB slave to host's dummy HCD (if present and gadgetfs is mounted).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This QEMU tree has only been tested on GNU/Linux. To get graphical (not counting VNC) and/or audio output from the emulator you will need either SDL or Cocoa installed on your computer. To enable audio, see the available switches to the ./configure script.&lt;br /&gt;
&lt;br /&gt;
The scripts that sit in openmoko/ require lynx, wget, python, netpbm and most GNU base utilities installed in standard locations. The netpbm package contains tools necessary for bootsplash image conversion.&lt;br /&gt;
&lt;br /&gt;
All of the build-time and run-time requirements listed in [http://bellard.org/qemu/user-doc.html QEMU documentation] apply. This includes zlib, etc. On distributions that use binary packages, remember that you need the packages ending in '''-dev''' or '''-devel'''.&lt;br /&gt;
&lt;br /&gt;
== QEMU and GNU debugger ==&lt;br /&gt;
&lt;br /&gt;
QEMU lets you debug operating system kernels and bootloaders like you debug all other programs. To do this you will need a debugger that speaks the GDB remote debugging protocol - [http://sourceware.org/gdb/ GDB] is the obvious choice. Some cross toolchains come with GDB already set up. Otherwise building cross-GDB yourself is quick and easy (compared to building binutils and cross-gcc).&lt;br /&gt;
&lt;br /&gt;
To debug u-boot, load the file &amp;quot;u-boot&amp;quot; into gdb (not &amp;quot;u-boot.bin&amp;quot;) that is produced by &amp;quot;make&amp;quot; when building u-boot. To debug a Linux kernel, load the file &amp;quot;vmlinux&amp;quot; from the main source directory into gdb. These files are in ELF format and contain all the symbol information and are not stripped of debugging data until you run &amp;quot;strip&amp;quot; on them, unlike &amp;quot;u-boot.bin&amp;quot; and &amp;quot;Image&amp;quot;/&amp;quot;zImage&amp;quot;/&amp;quot;uImage&amp;quot;. Next, tell QEMU to enable the gdbserver by appending the &amp;quot;-s&amp;quot; switch or issuing &amp;quot;gdbserver&amp;quot; in the monitor. Use the command &amp;lt;pre&amp;gt;(gdb) target remote localhost:1234&amp;lt;/pre&amp;gt; to make a connection to the emulator. From there you should be able to use all the usual GDB commands, including stepping instructions, setting breakpoints, watchpoints, inspecting stack, variables, registers and more. If gdb is running in the same directory from which it grabbed the ELF executable, the &amp;quot;edit&amp;quot; command should work so you can jump right to the source line which is executing.&lt;br /&gt;
&lt;br /&gt;
== Simple network connection with pppd ==&lt;br /&gt;
&lt;br /&gt;
One simple way to get a network connection from the emulated Neo is via an emulated serial port and [[pppd]]. Add ''-serial vc -serial pty'' to the [[QEMU command line]], and QEMU prints a device name on a line like &amp;quot;char device redirected to /dev/pts/12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the Neo side, open a terminal and run the command &amp;quot;pppd nodetach debug /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the host computer side, open a root terminal and run the command &amp;quot;pppd nodetach debug 192.168.68.1:192.168.68.2 noauth /dev/pts/12&amp;quot;, substituting the actual device name from above.&lt;br /&gt;
&lt;br /&gt;
Now on the host computer side, you should be able to &amp;quot;ping 192.168.68.2&amp;quot; and &amp;quot;ssh root@192.168.68.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
NB : If you see in pppd trace something like this &amp;quot;Received bad configure-rej:  12 06 00 00 00 00&amp;quot; again and again, you will ping but no application will work. It is probably the compression protocol (ccp) negotiation which fail. Add &amp;quot;noccp&amp;quot; to the two pppd commands like &amp;quot;pppd nodetach debug noccp /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Setting up Internet connection for your qemu neo ==&lt;br /&gt;
Before you start, you have to have a working pppd or USB connection, ([[#Simple_network_connection_with_pppd|see the previous chapter]] and [[#Setting up USB connection|the next chapter]])&lt;br /&gt;
&lt;br /&gt;
(I assume that your local ip-adress is 192.168.0.100 and your router is 192.168.0.1)&lt;br /&gt;
&lt;br /&gt;
In qemu terminal (or via ssh) type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ifdown usb0&lt;br /&gt;
$ route add default gw 192.168.68.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolv.conf:&lt;br /&gt;
nameserver 192.168.0.1&lt;br /&gt;
This will be your host-computer DNS server.&lt;br /&gt;
&lt;br /&gt;
On the host-computer type(as root , use sudo -i on ubuntu):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;
&lt;br /&gt;
modprobe ip_tables&lt;br /&gt;
modprobe iptable_nat&lt;br /&gt;
modprobe ipt_MASQUERADE&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -F&lt;br /&gt;
iptables -t nat    -F&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -P INPUT       ACCEPT&lt;br /&gt;
iptables -t filter -P FORWARD     ACCEPT&lt;br /&gt;
iptables -t filter -P OUTPUT      ACCEPT&lt;br /&gt;
iptables -t nat    -P PREROUTING  ACCEPT&lt;br /&gt;
iptables -t nat    -P POSTROUTING ACCEPT&lt;br /&gt;
&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.68.0/24 -j MASQUERADE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Where eth0 is your network interface connected to the router)&lt;br /&gt;
&lt;br /&gt;
Thats it - now you can enjoy internet in qemu.&lt;br /&gt;
&lt;br /&gt;
== Setting up USB connection ==&lt;br /&gt;
&lt;br /&gt;
It is possible (although not very straight forward, probably about the complexity of tun-tap networking) to connect the virtual, emulated Neo1973 to the Linux PC on which the emulator is running, and work with it as if a real Neo1973 was plugged into the computer's USB port, but no twiddling with cables is needed. If you're testing your applications on the Neo, it may be worth setting up this kind of connection because it lets you enable normal [[USB_Networking|networking between the PC and the phone and ssh into it]] (which is much more comfortable than typing commands into the Openmoko's terminal emulator via on-screen keyboard). Here's what you will need in order to get this working:&lt;br /&gt;
&lt;br /&gt;
A Linux host with a 2.6 series kernel. The following drivers compiled-in or in modules: dummy_hcd, gadgetfs, usbnet, cdc_ether. [[Building Gadget USB Module|A detailed guide to building the necessary modules is available (primarily Ubuntu focused).]] Generic instructions follow.&lt;br /&gt;
&lt;br /&gt;
Note that you need root access to perform most actions described here. Here's how to enable the drivers in menuconfig.&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Support for USB Gadgets'''&lt;br /&gt;
&lt;br /&gt;
Find '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''USB Peripheral Controller''' and set it to '''Dummy HCD (DEVELOPMENT)'''&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Gadget Filesystem (EXPERIMENTAL)''' (this one is good to have as a module)&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''')&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)''')&lt;br /&gt;
&lt;br /&gt;
These last two drivers are the same [[Getting Started with your Neo1973#By using Ethernet emulation over a USB cable|drivers that you need to work with a real Neo over USB network]]. After you've built the drivers, make sure that the copy of kernel headers in /usr/include/linux is up to date. In particular the file /usr/include/linux/usb_gadgetfs.h needs to be present and if your distribution came with headers older than 2.6.18 or so, then you need tell the package manager to update them, or you can do that manually with&lt;br /&gt;
&amp;lt;pre&amp;gt; # cp -a /usr/src/linux/include/linux/* /usr/include/linux/&amp;lt;/pre&amp;gt;&lt;br /&gt;
(assuming that your kernel sources are in /usr/src/linux). It is important that this is done before building qemu because the build system checks if these headers are functional and in case they aren't found it will disable the USB Slave functionality.  Run &amp;quot;grep CONFIG_GADGETFS config-host.h&amp;quot; in qemu build directory to make sure that the detection succeeded.  If it didn't, correct your linux headers and reconfigure qemu.&lt;br /&gt;
&lt;br /&gt;
After building qemu and before running it, make sure that the modules are loaded into the kernel. I found it useful to load gadgetfs with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt; # modprobe gadgetfs default_uid=1000  # assuming my User ID is 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
and added the following line to my /etc/fstab:&lt;br /&gt;
&amp;lt;pre&amp;gt;gadget         /dev/gadget    gadgetfs   noauto,user,group         0   0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure that the mountpoint /dev/gadget exists:&lt;br /&gt;
&amp;lt;pre&amp;gt; # mkdir -p /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that the rest of the procedure can be performed from your regular user account. Mounting gadgetfs is done with:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ mount /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;quot;default_uid&amp;quot; parameter changes the ownership on all files under /dev/gadget to your own and since the files there are created and destroyed dynamically, there's no easy way to have that performed by ''udev''. Now running qemu as you usually do but appending &amp;quot;-usb -usbgadget&amp;quot; (in the current version of the [[MokoMakefile]] this is not included) should enable the USB Slave functionality. The qemu monitor commands &amp;quot;info usbslave&amp;quot; and &amp;quot;usb_add gadget&amp;quot; will be useful. The former instruction asks the OS running under the emulator (Openmoko) to describe its slave features (that's what ''lsusb'' does after a Neo1973 is connected to a PC). You can see the available USB configurations in this command's output. Since gadgetfs allows only one configuration, we will need to choose the desired configuration - most device have only one such configuration, in which case you can use just &amp;quot;usb_add gadget&amp;quot; to connect to host; CDC ethernet devices however usually include a second configuration for RNDIS networking (i.e. Ms Windows compatibility) and so does Openmoko when using the g_ether driver. Hence, to get this right, wait for Openmoko to fully boot up and execute the following in QEMU monitor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QEMU 0.9.0 monitor - type 'help' for more information&lt;br /&gt;
(qemu) info usbslave &lt;br /&gt;
USB2.2 device 1457:5122:&lt;br /&gt;
Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
Product: RNDIS/Ethernet Gadget&lt;br /&gt;
Configuration 0: RNDIS&lt;br /&gt;
Configuration 1: CDC Ethernet&lt;br /&gt;
(qemu) &lt;br /&gt;
(qemu) usb_add gadget:1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If qemu gives &amp;quot;couldn't add device gadget:1&amp;quot;, double-check that it was built against gadgetfs - the file config-host.h must contain the line &amp;quot;#define CONFIG_GADGETFS 1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;1&amp;quot; in &amp;quot;usb_add gadget:N&amp;quot; is the number of the USB configuration that we want to use. If everything went correctly - you can check that in dmesg - you should now have a new network interface called ''usb0'' on the PC, through which you can talk to the Openmoko running in QEMU:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ dmesg | tail&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: bound to dummy_udc driver&lt;br /&gt;
&amp;lt;7&amp;gt;hub 3-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: new high speed USB device using dummy_hcd and address 3&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: connected&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: default language 0x0409&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: new device strings: Mfr=1, Product=2, SerialNumber=0&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Product: RNDIS/Ethernet Gadget&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: configuration #1 chosen from 1 choice&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.0 (config #1, interface 0)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.0: uevent&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: usb_probe_interface - got id&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: status ep3in, 16 bytes period 14&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.1 (config #1, interface 1)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.1: uevent&lt;br /&gt;
 $ su -&lt;br /&gt;
Password:&lt;br /&gt;
 # tail /var/log/everything/current&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: connected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: disconnected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: configuration #1&lt;br /&gt;
May  8 19:25:32 [kernel] usb0: register 'cdc_ether' at usb-dummy_hcd-1, CDC Ethernet Device, 52:e7:eb:76:0a:d0&lt;br /&gt;
 # lsusb -vvv&lt;br /&gt;
Bus 003 Device 003: ID 1457:5122  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5122 &lt;br /&gt;
  bcdDevice            2.12&lt;br /&gt;
  iManufacturer           1 Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
  iProduct                2 RNDIS/Ethernet Gadget&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           80&lt;br /&gt;
    bNumInterfaces          2&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          7 CDC Ethernet&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      6 Ethernet Networking&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 CDC Communications Control&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               1.10&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      CDC Ethernet:&lt;br /&gt;
        iMacAddress                      3 52E7EB760AD0&lt;br /&gt;
        bmEthernetStatistics    0x00000000&lt;br /&gt;
        wMaxSegmentSize               1514&lt;br /&gt;
        wNumberMCFilters            0x0000&lt;br /&gt;
        bNumberPowerFilters              0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval              14&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       1&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              4 Ethernet Data&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
Device Qualifier (for other device speed):&lt;br /&gt;
  bLength                10&lt;br /&gt;
  bDescriptorType         6&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 inet 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # exit&lt;br /&gt;
 $ ssh root@192.168.0.202&lt;br /&gt;
The authenticity of host '192.168.0.202 (192.168.0.202)' can't be established.&lt;br /&gt;
RSA key fingerprint is de:21:87:93:52:1c:6b:c7:69:29:6c:af:66:50:02:02.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '192.168.0.202' (RSA) to the list of known hosts.&lt;br /&gt;
root@192.168.0.202's password: &lt;br /&gt;
root@fic-gta01:~$ uname -a&lt;br /&gt;
Linux fic-gta01 2.6.20.7-moko8 #1 PREEMPT Wed Apr 25 11:13:52 UTC 2007 armv4tl unknown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting to the serial port/Communicating with u-boot  ==&lt;br /&gt;
If you add the option ''-serial telnet:localhost:1200,server'' to QEMU will create a telnet server on port 1200 that you can connect to as the serial port.&amp;lt;br&amp;gt;&lt;br /&gt;
This will allow you to experiment with u-boot configuration without risking to brick the real device.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Please note that QEMU will wait for you to connect to the telnet server at port 1200 before starting the emulation.&amp;lt;br&amp;gt;&lt;br /&gt;
(use the command ''telnet localhost 1200'' to establish the connection)&lt;br /&gt;
&lt;br /&gt;
== Instant boot ==&lt;br /&gt;
Actually it not instant but a lot faster that actually booting.&lt;br /&gt;
&lt;br /&gt;
The boot speed is achieved by saving the virtual machine.&lt;br /&gt;
&lt;br /&gt;
Here are the steps required:&lt;br /&gt;
* Boot Qemu as you usually do &lt;br /&gt;
* Wait till the emulated Neo has finished starting up.  &lt;br /&gt;
* Go to the ''virtual console 2'' (press ''ctrl+alt+2'')&lt;br /&gt;
* Save the virtual machine state using '''savevm''' ''tagName''&lt;br /&gt;
Next time you want to boot you can either:&lt;br /&gt;
# Start the emulator and go to the 2. console and ''loadvm tagName''&lt;br /&gt;
# Add '''-loadvm tagName'''&lt;br /&gt;
After a short delay the emulator is just like you left it when you saved the state.&lt;br /&gt;
&lt;br /&gt;
I created a script that launches qemu using the -loadvm option, result: Instant Moko&amp;amp;trade;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Building Gadget USB Module]] - Helpful guide&lt;br /&gt;
*[[Xephyr]] - Openmoko on i386&lt;br /&gt;
*[[Xoo]] - Openmoko on i386&lt;br /&gt;
&lt;br /&gt;
{{Languages|Openmoko_under_QEMU}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Emulation]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_under_QEMU</id>
		<title>Openmoko under QEMU</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_under_QEMU"/>
				<updated>2009-02-18T18:14:10Z</updated>
		
		<summary type="html">&lt;p&gt;RzR: /* Pre-built binaries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Openmoko under QEMU}}&lt;br /&gt;
[http://en.wikipedia.org/wiki/Qemu QEMU] can be used in at least three ways to run Openmoko. Depending on the purpose that you are going to use the emulator for, you should decide on the target platform.&lt;br /&gt;
&lt;br /&gt;
*''PC'' - Openmoko can be built to run on regular i386 hardware, 32- or 64-bit and this is probably the fastest way to get Openmoko running if you want to get an impression of how it looks.  In this scenario QEMU would only serve for isolating your Openmoko installation from your normal system, or, if you're not on a UNIX system, QEMU provides a non-intrusive way to get Linux up quickly. More information can be found in the [[FAQ]] and [[Getting Openmoko working on host with Xoo|here]].&lt;br /&gt;
&lt;br /&gt;
*''Integrator/CP'' - this is the default ARM-based machine that QEMU knows about. This target is used with MACHINE=&amp;quot;qemuarm&amp;quot; and it is sufficient to run the original Openmoko rootfs image, although it doesn't emulate any of the [[:Category:Neo1973 Hardware | Neo1973 Hardware]] except the very CPU core. Read more in the [[FAQ#Q:_Is_there_an_emulator_available_for_Openmoko.3F|FAQ]].&lt;br /&gt;
&lt;br /&gt;
*''Neo1973'' - the QEMU tree available from Openmoko repositories is also capable of emulating most of the actual [[Neo1973]] (GTA01) hardware, although not all of it. Additionally, Neo FreeRunner emulation is a work-in-progress. When all of the emulator parts are more mature our code is going to be submitted and merged to the main QEMU development tree.&lt;br /&gt;
&lt;br /&gt;
== Neo1973 emulation ==&lt;br /&gt;
&lt;br /&gt;
This target will (obviously) run original Openmoko rootfs images, but then it should also be able to run the original u-boot and kernel images, the same ones that a real Neo1973 (GTA01) uses. Among other differences you will notice between this approach and the Integrator/CP target is you also get correct screen resolution, some (fake) battery readings, and other goodness. Currently missing parts of the GTA01 emulator are: [[Hardware:AGPS|AGPS]] and [[Bluetooth]] - these things will still be worked on, as well as general usability. Even with these things missing, QEMU should provide substantial help in debugging kernel and u-boot issues to developers.&lt;br /&gt;
&lt;br /&gt;
What QEMU can '''*not*''' be used for, and probably no other emulator can, is speed measures and getting the general feel of Openmoko performance. Code running in qemu runs with the maximum speed your host computer can provide with an overhead of translating target code to host code, and this overhead is not uniform across different instructions. This means that even if your virtual Neo reports near 100 BogoMIPS (which is the speed of a real Neo), different actions performed in the emulator will not run with the same speed. On most PCs you will notice the virtual Neo running faster than a real one (Audio related operations may be one of the exceptions).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Rough status for each of the components that need emulation, following the outline of [[:Category:Neo1973 Hardware | Neo1973 Hardware]] page.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|S3C2410A Processor&lt;br /&gt;
|-&lt;br /&gt;
|ARM920T core || Works || Already in mainline QEMU.&lt;br /&gt;
|-&lt;br /&gt;
|Basic guts || Work || This includes GPIO interface, DMA, Interrupt Controller, Timers, NAND controller, MMC/SD host, [[I2C]] and IIS interfaces, Memory &amp;amp; Clock &amp;amp; Power management controllers, RAM.&lt;br /&gt;
|-&lt;br /&gt;
|Serial ports || Works || Use the &amp;quot;-serial&amp;quot; switch (maybe be specified multiple times) to tell QEMU where serial input/output should go to. GSM module will be connected on UART0.&lt;br /&gt;
|-&lt;br /&gt;
|RTC || Works || On start QEMU will load it with current time/date - the Neo1973 [[kernel]] doesn't use it for time/date source currently.&lt;br /&gt;
|-&lt;br /&gt;
|SPI || Works || The guest kernel can drive it using either the SPI interface or raw GPIO bitbanging.&lt;br /&gt;
|-&lt;br /&gt;
|LCD || Works || The virtual LCD will display contents in QEMU window unless &amp;quot;-nographic&amp;quot; is specified on command line.&lt;br /&gt;
|-&lt;br /&gt;
|ADC || Works || Mouse events in QEMU window generate what would be touchscreen events on a Neo1973 and are passed to the guest OS through the on-chip ADC.&lt;br /&gt;
|-&lt;br /&gt;
|OHCI USB || Works || This part is in mainline QEMU. Use the &amp;quot;-usb&amp;quot; switch to enable the controller and &amp;quot;usb_add&amp;quot; in QEMU monitor to attach new virtual or physical USB devices.&lt;br /&gt;
|-&lt;br /&gt;
|Slave USB || Works || Linux's dummy HCD in conjunction with gadget filesystem API is used to make the virtual Neo appear as a real one connected to the host computer. See [[#Setting up USB connection|Setting up USB connection]] below. (Experimental)&lt;br /&gt;
|-&lt;br /&gt;
|Watchdog || Works || This is one of the less important on-chip peripherals in S3C2410. It is however used by Linux for rebooting the board.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|[[I2C]] bus peripherals&lt;br /&gt;
|-&lt;br /&gt;
|[[PCF50606]] || Works || (Aka PMU) Fakes the battery charge level (set at 88%), POWER button, etc. Also contains an RTC, also unused by Linux.&lt;br /&gt;
|-&lt;br /&gt;
|[[LM4857]] || Works&lt;br /&gt;
|-&lt;br /&gt;
|[[WM8753L]] || Works || The CODEC is also connect to the CPU's IIS port. Basic [[Neo1973 Audio Subsystem|audio functionality]] is supported - see QEMU documentation on getting audio input/output from the emulator. Volume control has no effects.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|Other peripherals&lt;br /&gt;
|-&lt;br /&gt;
|NAND Flash || Works || However, some pieces are not confirmed to be completely compatible with the real hardware because of lack thereof. Use &amp;quot;-mtdblock flashimagefilenamehere&amp;quot; switch to point QEMU to your flash image. The file should be at least 69206016 bytes big.&lt;br /&gt;
|-&lt;br /&gt;
|JBT6K74-AS(PI) || Works || (Aka LCM) Wired to the SPI channel 1&lt;br /&gt;
|-&lt;br /&gt;
|Buttons || Work || Enter is the AUX button, Space is the POWER button. Wired to on-chip GPIO and PCF50606.&lt;br /&gt;
|-&lt;br /&gt;
|SD card || Works || This part is already in mainline QEMU. Use the &amp;quot;-sd cardimagegoeshere&amp;quot; switch to point QEMU to the card image. The regular QEMU monitor commands for removable media can also be used. The card works, however the on-chip host controller gave block length errors on heavy I/O despite working as described in specification. I suspect the kernel driver. DMA operation is not tested.&lt;br /&gt;
|-&lt;br /&gt;
|Bluetooth&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Works&lt;br /&gt;
|A generic Bluetooth HCI (just like the BlueCore4 chip) is connected to internal USB hub (just like the Delta DBFM dongle). Currently qemu emulates no other bluetooth devices, so the dongle behaves as if there was no BT-enabled slaves around, being the only device on the piconet, i.e. is not really useful. Likely a Bluetooth keyboard will be emulated. A physical Bluetooth dongle can also be attached to the emulator (see USB documentation in QEMU).&lt;br /&gt;
|-&lt;br /&gt;
|[[GSM]] || Works || A fake modem is connected to UART0 understanding a (currently quite limited) subset of AT commands. Ultimately it should support as much functionality as possible (basic AT command set, fake GPRS connections, dialing and SMS send/receive). This way all parts of the phone subsystem (CALYPSO, TWL3014, TRF6151) will not have to be emulated. There is a possibility to wire a real GSM modem to QEMU's serial port, or the [http://doc.trolltech.com/qtopia-4.3-snapshot/fd-ModemSimulator.html phonesim] modem simulator from the ''Qtopia'' project (use the --enable-phonesim switch to ./configure) as well as the [http://doc.trolltech.com/qtopia-4.3-snapshot/modem-emulator.html atinterface] modem emulator, also from Qtopia.&lt;br /&gt;
|-&lt;br /&gt;
|[[Hardware:AGPS|AGPS]]&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|There are obvious difficulties emulating the chip, but hopefully it can be made to present the guest OS with some fixed coordinates later when more is known about the chip. Again a real chip could be connected to QEMU's serial port.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Current development is aiming for [[:Category:Neo1973_Hardware#GTA01Bv4 | GTA01Bv4]] compatibility; [[:Category:Neo1973_Hardware#GTA01Bv3 | earlier revisions]] can also be emulated if needed. The differences between the hardware revisions currently only manifest themselves in GPIO wiring. Hardware emulation is implemented in a clean-room manner using official specifications where possible.&lt;br /&gt;
&lt;br /&gt;
== Neo FreeRunner emulation ==&lt;br /&gt;
&lt;br /&gt;
The second line of Openmoko phones, the Neo FreeRunner (GTA02) saw various hardware changes and improvements since Neo1973 (GTA01).  QEMU has fullest support for the GTA01 (the first model), but partial GTA02 emulation is also planned.  This will only include the hardware components which were added in GTA02 and were not present in GTA01 (see [[Neo 1973 vs Neo FreeRunner]] for complete hardware difference list):&lt;br /&gt;
&lt;br /&gt;
* The u-blox GPS chip (i.e. raw NMEA protocol).&lt;br /&gt;
* The Atheros AR6001 WLAN / WiFi chip (and SDIO bus).&lt;br /&gt;
* The two LIS accelerometers.&lt;br /&gt;
* 128MiB, 1.8V NAND chip instead of 64MiB.&lt;br /&gt;
&lt;br /&gt;
What that means is that the emulated machine will internally not be exactly like Neo FreeRunner, but will be functionally the same.  That in turn means that it needs a custom kernel because it's neither a GTA01 nor GTA02 internally.  This kernel source will be provided as part of qemu.  The bootloader used will be the GTA01 build of u-boot.&lt;br /&gt;
&lt;br /&gt;
This approach is called paravirtualisation and is often used as an emulation solution for mobile platforms.  For a userspace programmer (Application developers) the machine will be visible as a genuine GTA02.  For a kernel hacker it will be a custom board.&lt;br /&gt;
&lt;br /&gt;
If there's an initiative among the users, to emulate GTA02 hardware to a bigger extent than explained here, patches / improvements will be always welcome because the QEMU project seeks to emulate the real hardware and stay always as close as possible to physical hardware (in other words, full emulation is preferred over paravirtualisation in the QEMU upstream).&lt;br /&gt;
&lt;br /&gt;
=== What hardware is supported ===&lt;br /&gt;
&lt;br /&gt;
Below is a rough status information for each of the components.&lt;br /&gt;
{|&lt;br /&gt;
! Hardware !! Status !! Usage notes&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA01 hardware&lt;br /&gt;
|-&lt;br /&gt;
|Processor, on-chip and external peripherals || Work || See the GTA01 supported hardware chart above.  This hardware is at the base of the Neo FreeRunner emulator.  The same usage notes apply.&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeedd;&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot;|GTA02 components&lt;br /&gt;
|-&lt;br /&gt;
|GPS || Works || A virtual GPS chip is connected to the second serial port of the virtual machine, exactly like on the Neo FreeRunner.&lt;br /&gt;
|-&lt;br /&gt;
|WLAN&lt;br /&gt;
|style=&amp;quot;background-color:#ffffcc;&amp;quot;|Partial support&lt;br /&gt;
|The Atheros AR6001 (second firmware revision) is emulated to an extent that it gets detected by the kernel SDIO stack and registered as a network interface by the Atheros driver.  It doesn't allow for actual network communication yet.  The basic SDIO bus emulation is complete.&lt;br /&gt;
|-&lt;br /&gt;
|Accelerometers || Work || Two dummy accelerometers are connected to the virtual machine's I2C bus.  They provide a constant 1G reading at the moment.  One improvement idea to be implemented when there's some software available for testing, is to pass Qemu's SDL window movements as input to the virtual accelerometers, i.e. dragging the X window around would generate motion sensor events.  These events would be two-dimensional but should be enough for Application developers to test their programs' interactions with the movements.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How to get it running ==&lt;br /&gt;
&lt;br /&gt;
These instructions talk about the GTA01 emulator (default).&lt;br /&gt;
&lt;br /&gt;
=== Using MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
This is arguably the easiest way of building qemu-neo1973 since you won't need to deal with the compiling and flashing processes yourself. See [[Using_QEMU_with_MokoMakefile|MokoMakefile]] for details.&lt;br /&gt;
&lt;br /&gt;
If you *just* build QEMU and use the official images by typing &amp;quot;make qemu&amp;quot; only (as opposed to setting up monotone and openembedded and building an entire new image for yourself with MokoMakefile), then the build takes less time than the manual instructions below (since it's all done automatically).&lt;br /&gt;
&lt;br /&gt;
=== Manual setup ===&lt;br /&gt;
&lt;br /&gt;
To obtain the latest source code for the emulator, you will want to do something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ svn checkout https://svn.openmoko.org/trunk/src/host/qemu-neo1973&lt;br /&gt;
$ cd qemu-neo1973&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, we're going to configure and build the emulator (Note [[#Requirements|Requirements]] below):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --target-list=arm-softmmu  # GCC 3.x will be required, see --cc=&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you dont want gcc-3.x then you can apply patch from here&lt;br /&gt;
https://bugs.gentoo.org/show_bug.cgi?id=160627&lt;br /&gt;
like so&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ patch -p2 &amp;lt; qemu-gcc4.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See other available options for the configure script by appending &amp;quot;--help&amp;quot;.&lt;br /&gt;
Now you should have a working emulator under the name &amp;quot;arm-softmmu/qemu-system-arm&amp;quot;. To run Openmoko you will also need to somehow install Openmoko on your virtual phone, which is totally clean of any software at this moment. There are several block devices to choose from, the best option is probably to do exactly what the Neo1973 manufacturer does before it ships the device to the final user. This process is described in [[Bootloader]], [[Kernel]], [[NAND bad blocks]] and [[Devirginator]] but you don't need to know all the details. Two scripts are provided to generate a firmware for your phone, as realistic as possible. First run&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/download.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which will look up the list of latest available Openmoko snapshot builds from buildhost.openmoko.org and choose the most recent [[u-boot]], Kernel, and root filesystem images, and download the images (unless they are already found in the openmoko/ directory).&lt;br /&gt;
'''Note''' openmoko/env might be broken. It seems to fix it to change it to this instead.&lt;br /&gt;
&amp;lt;pre&amp;gt;# The scripts will include this on startup to setup variables&lt;br /&gt;
&lt;br /&gt;
src_dir=&amp;quot;`pwd`&amp;quot;&lt;br /&gt;
script_dir_relative=openmoko&lt;br /&gt;
script_dir=&amp;quot;$src_dir/$script_dir_relative&amp;quot;&lt;br /&gt;
uboot_symlink=&amp;quot;$src_dir/u-boot.bin&amp;quot;&lt;br /&gt;
qemu_relative=&amp;quot;arm-softmmu/qemu-system-arm -M gta02fake -m 130&amp;quot;&lt;br /&gt;
qemu=&amp;quot;$src_dir/$qemu_relative&amp;quot;&lt;br /&gt;
flash_base=openmoko-flash.base&lt;br /&gt;
flash_image=openmoko-flash.image&lt;br /&gt;
make=make&lt;br /&gt;
which gmake &amp;amp;&amp;amp; make=gmake&lt;br /&gt;
echo=echo&lt;br /&gt;
which gecho &amp;amp;&amp;amp; echo=gecho&lt;br /&gt;
export make echo&lt;br /&gt;
dump_dir=&amp;quot;$script_dir/vvfat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
qemu_monitor=&amp;quot;$HOME/.qemu_monitor&amp;quot;&lt;br /&gt;
qemu_cmd () { $script_dir/qemu-cmd.pl &amp;quot;$qemu_monitor&amp;quot; &amp;quot;$*&amp;quot;; }&lt;br /&gt;
&lt;br /&gt;
kernel_addr=0x30100000&lt;br /&gt;
splash_addr=0x36000000&lt;br /&gt;
splash_size=0x5000&lt;br /&gt;
&lt;br /&gt;
# We don't want the &amp;quot;-latest&amp;quot; symlinks to match&lt;br /&gt;
kernel_wildcard=&amp;quot;testing-om-gta01-*.uImage.bin&amp;quot;&lt;br /&gt;
rootfs_wildcard=&amp;quot;openmoko-testing-om-gta01.rootfs.jffs2&amp;quot;&lt;br /&gt;
uboot_wildcard=&amp;quot;gta01bv4-u-boot.bin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
download_dir=&amp;quot;http://downloads.openmoko.org/daily/testing/&amp;quot;&lt;br /&gt;
dev_download_dir=&amp;quot;$download_dir&amp;quot;&lt;br /&gt;
backup_download_dir=&amp;quot;http://buildhost.automated.it/OM2007.2/&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These binaries will be used by the flash.sh script. First make sure you have the netpbm package installed for some graphics conversion utilities. On Ubuntu this can be done by:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install netpbm&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ openmoko/flash.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
which runs the emulator, loads u-boot into it and then uses u-boot's capability to program the Flash memory to install all the necessary parts of the system into the virtual Flash. It will also set up all the bootloading process including a boot menu (ENTER is [AUX] and SPACE is [POWER]), splash, u-boot environment and some default kernel parameters. If everything goes OK, the script should print a command which you can use to start using the emulator.&lt;br /&gt;
&lt;br /&gt;
QEMU has '''*tons*''' of commandline switches and things that can be configured. You can look them up in [http://bellard.org/qemu/user-doc.html QEMU user docs]. You will probably want to use the &amp;quot;-snapshot&amp;quot; switch, among other ones. Saving and restoring emulation state at any point (unrelated to &amp;quot;-snapshot&amp;quot;) should work as per QEMU user docs too. In addition the monitor commands &amp;quot;help&amp;quot; and &amp;quot;info&amp;quot; are of great help. The monitor usually sits in second virtual console, thus ctrl-alt-2 and ctrl-alt-1 switch to monitor and back.&lt;br /&gt;
&lt;br /&gt;
=== Pre-built binaries ===&lt;br /&gt;
&lt;br /&gt;
Debian ubuntu package is available at : http://www.newlc.com/en/openmoko-deb-packages-and-fosdem-debian-video&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Win32 binaries shipped with firmware can be downloaded from [http://yorick.keymeulen.com/openmoko-emulator-bin-20070625.rar openmoko-emulator-win32-bin-20070625.zip]. Tested on MS Windows XP and Vista Business.&lt;br /&gt;
Note the file openmoko-emulator-bin-20070625.rar is offline, you can look for it in p2p network if it helps...&lt;br /&gt;
&lt;br /&gt;
=== Neo FreeRunner (GTA02) ===&lt;br /&gt;
&lt;br /&gt;
The instructions for running the emulator are the same for FreeRunner, but the final command line to invoke qemu changes.  Instead of &amp;quot;-M gta01&amp;quot; as the machine name &amp;quot;-M gta02fake&amp;quot; has to be used.&lt;br /&gt;
&lt;br /&gt;
The kernel supporting GTA02 emulator is obtained by applying the ''openmoko/linux-gta02-pseudo.patch'' patch found in qemu-neo1973 sources, to the 2.6.24 openmoko kernel (vanilla linux-2.6.24 + the openmoko patchset from http://svn.openmoko.org/branches/src/target/kernel/2.6.24.x/patches/).  Since the GTA02 kernel support is still under heavy development, please refer to the openmoko/README file contained in qemu-neo1973 sources for the latest instructions on building the kernel.&lt;br /&gt;
&lt;br /&gt;
If a normal Openmoko kernel is used under Neo FreeRunner emulator, it will simply run as if the machine was a GTA01 and not detect any of the new peripherals.&lt;br /&gt;
&lt;br /&gt;
== Convenient Scripts ==&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-auto.sh&lt;br /&gt;
&lt;br /&gt;
launches qemu and opens a unix socket for communication. All additional parameters are passed to qemu. (e.g. openmoko/qemu-auto.sh -nographic launches the virtual machine with no graphics etc.).&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-upload.sh &amp;lt;filename&amp;gt;&lt;br /&gt;
&lt;br /&gt;
produces a SD card image with one partition with the given file(s) on it (you can pass a list of files) and inserts it into the phone. The Openmoko kernel should detect the event and the automounter should mount the partition. openmoko/qemu-auto.sh must be running already. If you pass no parameters, it ejects the media (the OM kernel is too dumb to detect this unfortunately). This will only work with gta01 emulation because gta02 has no SD.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-quit.sh&lt;br /&gt;
&lt;br /&gt;
powers the VM down cleanly.&lt;br /&gt;
&lt;br /&gt;
* openmoko/qemu-gadget.sh&lt;br /&gt;
&lt;br /&gt;
attempts to connect target's S3C USB slave to host's dummy HCD (if present and gadgetfs is mounted).&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
This QEMU tree has only been tested on GNU/Linux. To get graphical (not counting VNC) and/or audio output from the emulator you will need either SDL or Cocoa installed on your computer. To enable audio, see the available switches to the ./configure script.&lt;br /&gt;
&lt;br /&gt;
The scripts that sit in openmoko/ require lynx, wget, python, netpbm and most GNU base utilities installed in standard locations. The netpbm package contains tools necessary for bootsplash image conversion.&lt;br /&gt;
&lt;br /&gt;
All of the build-time and run-time requirements listed in [http://bellard.org/qemu/user-doc.html QEMU documentation] apply. This includes zlib, etc. On distributions that use binary packages, remember that you need the packages ending in '''-dev''' or '''-devel'''.&lt;br /&gt;
&lt;br /&gt;
== QEMU and GNU debugger ==&lt;br /&gt;
&lt;br /&gt;
QEMU lets you debug operating system kernels and bootloaders like you debug all other programs. To do this you will need a debugger that speaks the GDB remote debugging protocol - [http://sourceware.org/gdb/ GDB] is the obvious choice. Some cross toolchains come with GDB already set up. Otherwise building cross-GDB yourself is quick and easy (compared to building binutils and cross-gcc).&lt;br /&gt;
&lt;br /&gt;
To debug u-boot, load the file &amp;quot;u-boot&amp;quot; into gdb (not &amp;quot;u-boot.bin&amp;quot;) that is produced by &amp;quot;make&amp;quot; when building u-boot. To debug a Linux kernel, load the file &amp;quot;vmlinux&amp;quot; from the main source directory into gdb. These files are in ELF format and contain all the symbol information and are not stripped of debugging data until you run &amp;quot;strip&amp;quot; on them, unlike &amp;quot;u-boot.bin&amp;quot; and &amp;quot;Image&amp;quot;/&amp;quot;zImage&amp;quot;/&amp;quot;uImage&amp;quot;. Next, tell QEMU to enable the gdbserver by appending the &amp;quot;-s&amp;quot; switch or issuing &amp;quot;gdbserver&amp;quot; in the monitor. Use the command &amp;lt;pre&amp;gt;(gdb) target remote localhost:1234&amp;lt;/pre&amp;gt; to make a connection to the emulator. From there you should be able to use all the usual GDB commands, including stepping instructions, setting breakpoints, watchpoints, inspecting stack, variables, registers and more. If gdb is running in the same directory from which it grabbed the ELF executable, the &amp;quot;edit&amp;quot; command should work so you can jump right to the source line which is executing.&lt;br /&gt;
&lt;br /&gt;
== Simple network connection with pppd ==&lt;br /&gt;
&lt;br /&gt;
One simple way to get a network connection from the emulated Neo is via an emulated serial port and [[pppd]]. Add ''-serial vc -serial pty'' to the [[QEMU command line]], and QEMU prints a device name on a line like &amp;quot;char device redirected to /dev/pts/12&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the Neo side, open a terminal and run the command &amp;quot;pppd nodetach debug /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On the host computer side, open a root terminal and run the command &amp;quot;pppd nodetach debug 192.168.68.1:192.168.68.2 noauth /dev/pts/12&amp;quot;, substituting the actual device name from above.&lt;br /&gt;
&lt;br /&gt;
Now on the host computer side, you should be able to &amp;quot;ping 192.168.68.2&amp;quot; and &amp;quot;ssh root@192.168.68.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
NB : If you see in pppd trace something like this &amp;quot;Received bad configure-rej:  12 06 00 00 00 00&amp;quot; again and again, you will ping but no application will work. It is probably the compression protocol (ccp) negotiation which fail. Add &amp;quot;noccp&amp;quot; to the two pppd commands like &amp;quot;pppd nodetach debug noccp /dev/ttySAC1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Setting up Internet connection for your qemu neo ==&lt;br /&gt;
Before you start, you have to have a working pppd or USB connection, ([[#Simple_network_connection_with_pppd|see the previous chapter]] and [[#Setting up USB connection|the next chapter]])&lt;br /&gt;
&lt;br /&gt;
(I assume that your local ip-adress is 192.168.0.100 and your router is 192.168.0.1)&lt;br /&gt;
&lt;br /&gt;
In qemu terminal (or via ssh) type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ifdown usb0&lt;br /&gt;
$ route add default gw 192.168.68.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit /etc/resolv.conf:&lt;br /&gt;
nameserver 192.168.0.1&lt;br /&gt;
This will be your host-computer DNS server.&lt;br /&gt;
&lt;br /&gt;
On the host-computer type(as root , use sudo -i on ubuntu):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
echo 1 &amp;gt;&amp;gt; /proc/sys/net/ipv4/ip_dynaddr&lt;br /&gt;
&lt;br /&gt;
modprobe ip_tables&lt;br /&gt;
modprobe iptable_nat&lt;br /&gt;
modprobe ipt_MASQUERADE&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -F&lt;br /&gt;
iptables -t nat    -F&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -P INPUT       ACCEPT&lt;br /&gt;
iptables -t filter -P FORWARD     ACCEPT&lt;br /&gt;
iptables -t filter -P OUTPUT      ACCEPT&lt;br /&gt;
iptables -t nat    -P PREROUTING  ACCEPT&lt;br /&gt;
iptables -t nat    -P POSTROUTING ACCEPT&lt;br /&gt;
&lt;br /&gt;
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.68.0/24 -j MASQUERADE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Where eth0 is your network interface connected to the router)&lt;br /&gt;
&lt;br /&gt;
Thats it - now you can enjoy internet in qemu.&lt;br /&gt;
&lt;br /&gt;
== Setting up USB connection ==&lt;br /&gt;
&lt;br /&gt;
It is possible (although not very straight forward, probably about the complexity of tun-tap networking) to connect the virtual, emulated Neo1973 to the Linux PC on which the emulator is running, and work with it as if a real Neo1973 was plugged into the computer's USB port, but no twiddling with cables is needed. If you're testing your applications on the Neo, it may be worth setting up this kind of connection because it lets you enable normal [[USB_Networking|networking between the PC and the phone and ssh into it]] (which is much more comfortable than typing commands into the Openmoko's terminal emulator via on-screen keyboard). Here's what you will need in order to get this working:&lt;br /&gt;
&lt;br /&gt;
A Linux host with a 2.6 series kernel. The following drivers compiled-in or in modules: dummy_hcd, gadgetfs, usbnet, cdc_ether. [[Building Gadget USB Module|A detailed guide to building the necessary modules is available (primarily Ubuntu focused).]] Generic instructions follow.&lt;br /&gt;
&lt;br /&gt;
Note that you need root access to perform most actions described here. Here's how to enable the drivers in menuconfig.&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Support for USB Gadgets'''&lt;br /&gt;
&lt;br /&gt;
Find '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''USB Peripheral Controller''' and set it to '''Dummy HCD (DEVELOPMENT)'''&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Gadget Support''' -&amp;gt; '''Gadget Filesystem (EXPERIMENTAL)''' (this one is good to have as a module)&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''')&lt;br /&gt;
&lt;br /&gt;
Find and enable '''Device Drivers''' -&amp;gt; '''USB support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)'''&lt;br /&gt;
&lt;br /&gt;
(in 2.6.25 (from ???) '''Device Drivers''' -&amp;gt; '''Network device support''' -&amp;gt; '''USB Network Adapters''' -&amp;gt; '''Multi-purpose USB Networking Framework''' -&amp;gt; '''CDC Ethernet support (smart devices such as cable modems)''')&lt;br /&gt;
&lt;br /&gt;
These last two drivers are the same [[Getting Started with your Neo1973#By using Ethernet emulation over a USB cable|drivers that you need to work with a real Neo over USB network]]. After you've built the drivers, make sure that the copy of kernel headers in /usr/include/linux is up to date. In particular the file /usr/include/linux/usb_gadgetfs.h needs to be present and if your distribution came with headers older than 2.6.18 or so, then you need tell the package manager to update them, or you can do that manually with&lt;br /&gt;
&amp;lt;pre&amp;gt; # cp -a /usr/src/linux/include/linux/* /usr/include/linux/&amp;lt;/pre&amp;gt;&lt;br /&gt;
(assuming that your kernel sources are in /usr/src/linux). It is important that this is done before building qemu because the build system checks if these headers are functional and in case they aren't found it will disable the USB Slave functionality.  Run &amp;quot;grep CONFIG_GADGETFS config-host.h&amp;quot; in qemu build directory to make sure that the detection succeeded.  If it didn't, correct your linux headers and reconfigure qemu.&lt;br /&gt;
&lt;br /&gt;
After building qemu and before running it, make sure that the modules are loaded into the kernel. I found it useful to load gadgetfs with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt; # modprobe gadgetfs default_uid=1000  # assuming my User ID is 1000&amp;lt;/pre&amp;gt;&lt;br /&gt;
and added the following line to my /etc/fstab:&lt;br /&gt;
&amp;lt;pre&amp;gt;gadget         /dev/gadget    gadgetfs   noauto,user,group         0   0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure that the mountpoint /dev/gadget exists:&lt;br /&gt;
&amp;lt;pre&amp;gt; # mkdir -p /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that the rest of the procedure can be performed from your regular user account. Mounting gadgetfs is done with:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ mount /dev/gadget&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;quot;default_uid&amp;quot; parameter changes the ownership on all files under /dev/gadget to your own and since the files there are created and destroyed dynamically, there's no easy way to have that performed by ''udev''. Now running qemu as you usually do but appending &amp;quot;-usb -usbgadget&amp;quot; (in the current version of the [[MokoMakefile]] this is not included) should enable the USB Slave functionality. The qemu monitor commands &amp;quot;info usbslave&amp;quot; and &amp;quot;usb_add gadget&amp;quot; will be useful. The former instruction asks the OS running under the emulator (Openmoko) to describe its slave features (that's what ''lsusb'' does after a Neo1973 is connected to a PC). You can see the available USB configurations in this command's output. Since gadgetfs allows only one configuration, we will need to choose the desired configuration - most device have only one such configuration, in which case you can use just &amp;quot;usb_add gadget&amp;quot; to connect to host; CDC ethernet devices however usually include a second configuration for RNDIS networking (i.e. Ms Windows compatibility) and so does Openmoko when using the g_ether driver. Hence, to get this right, wait for Openmoko to fully boot up and execute the following in QEMU monitor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QEMU 0.9.0 monitor - type 'help' for more information&lt;br /&gt;
(qemu) info usbslave &lt;br /&gt;
USB2.2 device 1457:5122:&lt;br /&gt;
Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
Product: RNDIS/Ethernet Gadget&lt;br /&gt;
Configuration 0: RNDIS&lt;br /&gt;
Configuration 1: CDC Ethernet&lt;br /&gt;
(qemu) &lt;br /&gt;
(qemu) usb_add gadget:1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If qemu gives &amp;quot;couldn't add device gadget:1&amp;quot;, double-check that it was built against gadgetfs - the file config-host.h must contain the line &amp;quot;#define CONFIG_GADGETFS 1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;1&amp;quot; in &amp;quot;usb_add gadget:N&amp;quot; is the number of the USB configuration that we want to use. If everything went correctly - you can check that in dmesg - you should now have a new network interface called ''usb0'' on the PC, through which you can talk to the Openmoko running in QEMU:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ dmesg | tail&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: bound to dummy_udc driver&lt;br /&gt;
&amp;lt;7&amp;gt;hub 3-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: new high speed USB device using dummy_hcd and address 3&lt;br /&gt;
&amp;lt;6&amp;gt;gadgetfs: connected&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: default language 0x0409&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: new device strings: Mfr=1, Product=2, SerialNumber=0&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Product: RNDIS/Ethernet Gadget&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: Manufacturer: Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
&amp;lt;6&amp;gt;usb 3-1: configuration #1 chosen from 1 choice&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.0 (config #1, interface 0)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.0: uevent&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: usb_probe_interface - got id&lt;br /&gt;
&amp;lt;7&amp;gt;cdc_ether 3-1:1.0: status ep3in, 16 bytes period 14&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1: adding 3-1:1.1 (config #1, interface 1)&lt;br /&gt;
&amp;lt;7&amp;gt;usb 3-1:1.1: uevent&lt;br /&gt;
 $ su -&lt;br /&gt;
Password:&lt;br /&gt;
 # tail /var/log/everything/current&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: connected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: disconnected&lt;br /&gt;
May  8 19:25:32 [kernel] gadgetfs: configuration #1&lt;br /&gt;
May  8 19:25:32 [kernel] usb0: register 'cdc_ether' at usb-dummy_hcd-1, CDC Ethernet Device, 52:e7:eb:76:0a:d0&lt;br /&gt;
 # lsusb -vvv&lt;br /&gt;
Bus 003 Device 003: ID 1457:5122  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5122 &lt;br /&gt;
  bcdDevice            2.12&lt;br /&gt;
  iManufacturer           1 Linux 2.6.20.7-moko8/s3c2410_udc&lt;br /&gt;
  iProduct                2 RNDIS/Ethernet Gadget&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           80&lt;br /&gt;
    bNumInterfaces          2&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          7 CDC Ethernet&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      6 Ethernet Networking&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 CDC Communications Control&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               1.10&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      CDC Ethernet:&lt;br /&gt;
        iMacAddress                      3 52E7EB760AD0&lt;br /&gt;
        bmEthernetStatistics    0x00000000&lt;br /&gt;
        wMaxSegmentSize               1514&lt;br /&gt;
        wNumberMCFilters            0x0000&lt;br /&gt;
        bNumberPowerFilters              0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval              14&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       1&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              4 Ethernet Data&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               0&lt;br /&gt;
Device Qualifier (for other device speed):&lt;br /&gt;
  bLength                10&lt;br /&gt;
  bDescriptorType         6&lt;br /&gt;
  bcdUSB               2.00&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
&lt;br /&gt;
 # ifconfig usb0 inet 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 # exit&lt;br /&gt;
 $ ssh root@192.168.0.202&lt;br /&gt;
The authenticity of host '192.168.0.202 (192.168.0.202)' can't be established.&lt;br /&gt;
RSA key fingerprint is de:21:87:93:52:1c:6b:c7:69:29:6c:af:66:50:02:02.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '192.168.0.202' (RSA) to the list of known hosts.&lt;br /&gt;
root@192.168.0.202's password: &lt;br /&gt;
root@fic-gta01:~$ uname -a&lt;br /&gt;
Linux fic-gta01 2.6.20.7-moko8 #1 PREEMPT Wed Apr 25 11:13:52 UTC 2007 armv4tl unknown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting to the serial port/Communicating with u-boot  ==&lt;br /&gt;
If you add the option ''-serial telnet:localhost:1200,server'' to QEMU will create a telnet server on port 1200 that you can connect to as the serial port.&amp;lt;br&amp;gt;&lt;br /&gt;
This will allow you to experiment with u-boot configuration without risking to brick the real device.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Please note that QEMU will wait for you to connect to the telnet server at port 1200 before starting the emulation.&amp;lt;br&amp;gt;&lt;br /&gt;
(use the command ''telnet localhost 1200'' to establish the connection)&lt;br /&gt;
&lt;br /&gt;
== Instant boot ==&lt;br /&gt;
Actually it not instant but a lot faster that actually booting.&lt;br /&gt;
&lt;br /&gt;
The boot speed is achieved by saving the virtual machine.&lt;br /&gt;
&lt;br /&gt;
Here are the steps required:&lt;br /&gt;
* Boot Qemu as you usually do &lt;br /&gt;
* Wait till the emulated Neo has finished starting up.  &lt;br /&gt;
* Go to the ''virtual console 2'' (press ''ctrl+alt+2'')&lt;br /&gt;
* Save the virtual machine state using '''savevm''' ''tagName''&lt;br /&gt;
Next time you want to boot you can either:&lt;br /&gt;
# Start the emulator and go to the 2. console and ''loadvm tagName''&lt;br /&gt;
# Add '''-loadvm tagName'''&lt;br /&gt;
After a short delay the emulator is just like you left it when you saved the state.&lt;br /&gt;
&lt;br /&gt;
I created a script that launches qemu using the -loadvm option, result: Instant Moko&amp;amp;trade;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[Building Gadget USB Module]] - Helpful guide&lt;br /&gt;
*[[Xephyr]] - Openmoko on i386&lt;br /&gt;
*[[Xoo]] - Openmoko on i386&lt;br /&gt;
&lt;br /&gt;
{{Languages|Openmoko_under_QEMU}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Emulation]]&lt;/div&gt;</summary>
		<author><name>RzR</name></author>	</entry>

	</feed>