<?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=Miohtama&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=Miohtama&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Special:Contributions/Miohtama"/>
		<updated>2013-06-20T06:38:18Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.6</generator>

	<entry>
		<id>http://wiki.openmoko.org/wiki/USB_Networking</id>
		<title>USB Networking</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/USB_Networking"/>
				<updated>2008-11-19T09:05:17Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: fixed formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Openmoko Networking Setup =&lt;br /&gt;
&lt;br /&gt;
In order to communicate via TCP/IP to your FreeRunner, a basic understanding of the networking expectations is required.  Each end of the USB connection forms a LAN (local area network) segment, with the FreeRunner's USB networking device at one end (default 192.168.0.202) and your laptop or desktop at the other end (192.168.0.200 in this guide).&lt;br /&gt;
&lt;br /&gt;
Normally, your desktop machine will know how to reach the Internet, having had its gateway (the IP address of the machine or device which knows how to send packets to machines beyond your subnet) configured via DHCP or statically (probably via a router).  For the FreeRunner to reach the Internet, your desktop will have to be configured to route and masquerade (NAT) packets from it.&lt;br /&gt;
&lt;br /&gt;
Normally, none of this is an issue, but problems can arise when the subnet between the FreeRunner and your desktop overlap with the desktop to the router (which forms a second LAN), since your desktop might not know how to route traffic properly.&lt;br /&gt;
&lt;br /&gt;
In other words: if your existing router and desktop have addresses 192.168.0.(something) changing them to e.g. 192.168.1.(something) might save you a lot of troubleshooting later. A discussion of this is [http://lists.openmoko.org/pipermail/support/2008-August/thread.html#1277 here].&lt;br /&gt;
&lt;br /&gt;
= Simple Manual Linux Configuration =&lt;br /&gt;
&lt;br /&gt;
Try this first (as root on your desktop, with FreeRunner attached via USB cable and booted properly, not at the Boot Menu).  If it works, then you can add permanent configuration or use more sophisticated setups below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
ip addr add 192.168.0.200/24 dev usb0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Internet connection is also in the range 192.168.0.x then instead you might want to use only:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ip addr add 192.168.0.200/28 dev usb0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(This will just map the net from 192.168.0.192 to 192.168.0.207 onto usb0. If you get the error 'Cannot find device &amp;quot;usb0&amp;quot;', double-check that your FreeRunner is turned on and connected by USB. If that doesn't work, try unplugging and replugging the USB cable.)&lt;br /&gt;
&lt;br /&gt;
And in this case you should enable ARP proxy on internet facing interface INSTEAD of using iptables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl net.ipv4.conf.eth2.proxy_arp=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This assuming that eth2 is connected to ISP.&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig usb0 up&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then (ideally, not as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ssh root@192.168.0.202&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default password is blank.&lt;br /&gt;
&lt;br /&gt;
Due to the fact that in most cases your Neo will use the same dns servers as your computer uses, you can automate the process of writing dns servers to your phone:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
/sbin/route add -host 192.168.0.202/32 dev usb0&lt;br /&gt;
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
iptables -P FORWARD ACCEPT&lt;br /&gt;
sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
su `whoami` -c &amp;quot;scp /etc/resolv.conf root@192.168.0.202:/etc/resolv.conf&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again if your net already is 192.168.0.0, replace the POSTROUTING statement with&lt;br /&gt;
&amp;lt;pre&amp;gt;iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/28&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple script will set up routing for your Freerunner and than copy resolv.conf with dns addresses straight to the phone.&lt;br /&gt;
All you have to do is connect phone to the computer, run the script and enjoy internet connection from your phone.&lt;br /&gt;
&lt;br /&gt;
= Linux Kernel Support =&lt;br /&gt;
&lt;br /&gt;
Your Linux desktop/laptop needs to have suitable support, in particular, you will need to have enabled full masquerading in the kernel and USB networking options enabled.  For default kernels in many Linux distributions, this will already be the case.  If not, you will need to enable:&lt;br /&gt;
&lt;br /&gt;
* CONFIG_USB_USBNET&lt;br /&gt;
* CONFIG_USB_NET_CDCETHER&lt;br /&gt;
&lt;br /&gt;
Both USB networking options are available in the&lt;br /&gt;
&lt;br /&gt;
''Device Drivers -&amp;gt; USB support -&amp;gt; USB Network Adapters''&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
''Device Drivers -&amp;gt; Network Device Support -&amp;gt; USB Network Adapters -&amp;gt; Multipurpose USB Networking Framework''.&lt;br /&gt;
&lt;br /&gt;
For more info see the [http://www.linux-usb.org/usbnet/ usbnet driver homepage].&lt;br /&gt;
&lt;br /&gt;
Masquerading options (tested on Linux 2.6.26.3) are found in:&lt;br /&gt;
&lt;br /&gt;
''Networking ---&amp;gt;&lt;br /&gt;
Networking options ---&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
To see the other options, enable&lt;br /&gt;
&lt;br /&gt;
* CONFIG_NETFILTER (''Network packet filtering framework (Netfilter)'')&lt;br /&gt;
&lt;br /&gt;
Then, from&lt;br /&gt;
&lt;br /&gt;
''Networking ---&amp;gt;&lt;br /&gt;
Networking options ---&amp;gt;&lt;br /&gt;
[*] Network packet filtering framework (Netfilter) ---&amp;gt;&lt;br /&gt;
Core Netfilter Configuration ---&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
You need at least following options enabled as modules:&lt;br /&gt;
&lt;br /&gt;
* CONFIG_NF_CONNTRACK (''Netfilter connection tracking support'')&lt;br /&gt;
* CONFIG_NF_CONNTRACK_FTP (''FTP protocol support'')&lt;br /&gt;
* CONFIG_NETFILTER_XTABLES (''Netfilter Xtables support'')&lt;br /&gt;
&lt;br /&gt;
Rest of the needed options are found from&lt;br /&gt;
&lt;br /&gt;
''Networking ---&amp;gt;&lt;br /&gt;
Networking options ---&amp;gt;&lt;br /&gt;
[*] Network packet filtering framework (Netfilter) ---&amp;gt;&lt;br /&gt;
IP: Netfilter Configuration ---&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
You need to enable (again, as modules is fine):&lt;br /&gt;
&lt;br /&gt;
* CONFIG_NF_CONNTRACK_IPV4 (''IPv4 connection tracking support (required for NAT)'')&lt;br /&gt;
* CONFIG_IP_NF_IPTABLES (''IP tables support (required for filtering/masq/NAT)'')&lt;br /&gt;
* CONFIG_NF_NAT (''Full NAT'')&lt;br /&gt;
* CONFIG_IP_NF_TARGET_MASQUERADE (''MASQUERADE target support'')&lt;br /&gt;
&lt;br /&gt;
= Firewall Issues =&lt;br /&gt;
&lt;br /&gt;
On some systems, you may have firewall rules which prevent this working - such as added by the iptables service on Fedora.  You may care to stop these, and/or review any rules or policies you think might cause issues.&lt;br /&gt;
&lt;br /&gt;
The most relevant table is the nat table, which controls translation of addresses:&lt;br /&gt;
&lt;br /&gt;
iptables -L -t nat -v -n&lt;br /&gt;
&lt;br /&gt;
Unless you have a special setup, you'll want to see only the MASQUERADE rule that you apply below, and ACCEPT as the default policy.  Also look at the filter table:&lt;br /&gt;
&lt;br /&gt;
iptables -L -t filter -v -n&lt;br /&gt;
&lt;br /&gt;
If this contains anything in the FORWARD chain, then this may prevent passing packets.  It can be flushed with:&lt;br /&gt;
&lt;br /&gt;
iptables -t filter -F FORWARD&lt;br /&gt;
&lt;br /&gt;
= DNS =&lt;br /&gt;
&lt;br /&gt;
In addition to routing issues, to be practical, DNS will need to work.  In some cases, you might already be running a DNS server on your desktop such as dnsmasq or bind9, which is the default assumption the FreeRunner makes.  In other cases, you'll need to configure DNS to that of your router, or a DNS server further out on the internet such as that provided by your ISP.&lt;br /&gt;
&lt;br /&gt;
== Configure Default Neo DNS ==&lt;br /&gt;
&lt;br /&gt;
DNS is configured in /etc/resolv.conf on your FreeRunner.&lt;br /&gt;
&lt;br /&gt;
You should add the IP address of the DNS servers as provided by your ISP. Check your router's or PC's network status for the nameserver IP addresses.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;echo nameserver xxx.xxx.xxx.xxx &amp;gt; /etc/resolv.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also add the public DNS server called openDNS:&lt;br /&gt;
&amp;lt;pre&amp;gt;echo nameserver 208.67.222.222 &amp;gt; /etc/resolv.conf&lt;br /&gt;
echo nameserver 208.67.220.220 &amp;gt;&amp;gt; /etc/resolv.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These settings will be lost on reboot. You can set the DNS for the next connect, by adding the following to the end of the usb0 setting in /etc/network/interfaces, right above the bluetooth networking section:&lt;br /&gt;
&amp;lt;pre&amp;gt;up echo nameserver 208.67.222.222 &amp;gt; /etc/resolv.conf&lt;br /&gt;
up echo nameserver 208.67.220.220 &amp;gt;&amp;gt; /etc/resolv.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proxying DNS from Desktop/Laptop ==&lt;br /&gt;
&lt;br /&gt;
If you move about, making assumptions about the network may not be convenient, and it is possible to proxy DNS requests via your host laptop (which you are also taking with you), without running or installing a DNS server.  There are a number of ways to do this:&lt;br /&gt;
&lt;br /&gt;
=== Proxying with dnrd ===&lt;br /&gt;
&lt;br /&gt;
The script is designed to use [http://dnrd.sourceforge.net/ dnrd] as the DNS proxy. The [http://buildhost.automated.it/gta01 script] and a copy of [http://buildhost.automated.it/dnrd-2.20.3.tar.gz dnrd] are available. The script also performs the initial setup of the connection as per the [[USB_Networking#Manual_method]] above.&lt;br /&gt;
&lt;br /&gt;
=== Proxying with a UDP forwarder ===&lt;br /&gt;
&lt;br /&gt;
Another easy setup is using a UDP forwarder like the one from http://www.tapor.com/udpf/ - use it with the command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;udpf-elf -p=53-f=`awk '$1 == &amp;quot;nameserver&amp;quot;{print $2; exit(0);}' /etc/resolv.conf`:53&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Proxying with iptables ===&lt;br /&gt;
&lt;br /&gt;
It is possible to forward DNS requests with iptables using the DNAT target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iptables -t nat -A PREROUTING -p tcp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
iptables -t nat -A PREROUTING -p udp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;tt&amp;gt;192.168.0.1&amp;lt;/tt&amp;gt; is the IP of your router.&lt;br /&gt;
&lt;br /&gt;
Test if it works:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping www.google.com&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If so, then this is sufficient for most internet access. But manual changes to resolv.conf are usually lost later if for example one uses DHCP, especially for WiFi, and so may not be convenient to configure manually.&lt;br /&gt;
&lt;br /&gt;
= Testing Your Connection =&lt;br /&gt;
You should be able to connect to your Neo! Make sure you can ping your Neo to be sure.&lt;br /&gt;
ping 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Then log into your Neo using ssh:&lt;br /&gt;
ssh root@192.168.0.202&lt;br /&gt;
The default password is blank (press enter).&lt;br /&gt;
&lt;br /&gt;
You can also [[scp]] files back and forth. You can telnet, SSH, SMB or do whatever you want if you install software that enables you to set up TCP/IP network over your USB connection.&lt;br /&gt;
&lt;br /&gt;
Now, make sure you can ping back to your desktop&lt;br /&gt;
ping 192.168.0.200&lt;br /&gt;
(Note that some systems like Vista, don't respond to ICMP ping by default)&lt;br /&gt;
&lt;br /&gt;
Try pinging the outside world (a Google IP address)&lt;br /&gt;
ping 74.125.19.147&lt;br /&gt;
This demonstrates that masquerading is working - your desktop is sending/receiving packets to the wider internet.&lt;br /&gt;
&lt;br /&gt;
Lastly, verify that DNS is correctly configured between the Neo &amp;amp; Network:&lt;br /&gt;
ping www.google.com&lt;br /&gt;
&lt;br /&gt;
= OS or Distro Specific &amp;amp; Automatic Configuration =&lt;br /&gt;
&lt;br /&gt;
Based on [http://blog.haerwu.biz/2007/03/22/hotpluging-usbnet/ Hotplugging usbnet] by Marcin 'Hrw' Juszkiewicz.&lt;br /&gt;
These instructions should keep you from having to run the Simple Manual Linux Configuration every time you plug in and want to connect to an Openmoko device.  One run and then you're done!&lt;br /&gt;
&lt;br /&gt;
If the Simple Manual Linux Configuration does not work for your OS or Distro (MacOS X, MS Windows, etc) there may be instructions here that work for you.&lt;br /&gt;
&lt;br /&gt;
== MacOS X ==&lt;br /&gt;
See [[MacOS_X#USB_Networking|MacOS X USB Networking]].&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
See [[Neo1973_and_Windows#USB_Ethernet_emulation|Windows USB Ethernet emulation for Neo1973]].&lt;br /&gt;
&lt;br /&gt;
== FreeBSD ==&lt;br /&gt;
You need to load the cdce kernel module (if it is not already linked into your kernel). As root do:&lt;br /&gt;
&lt;br /&gt;
# kldload cdce&lt;br /&gt;
&lt;br /&gt;
The Neo should then show up as cdce0 interface and you can handle the cdce0 interface just like the usb0 device under Linux. For more information see the cdce manpage. An easy way to assign the IP address to the cdce0 interface is using the devd(8) daemon. Create the following two files,&lt;br /&gt;
&lt;br /&gt;
/usr/local/etc/devd/cdce.conf as:&lt;br /&gt;
&lt;br /&gt;
notify 1 {&lt;br /&gt;
match &amp;quot;system&amp;quot;          &amp;quot;IFNET&amp;quot;;&lt;br /&gt;
match &amp;quot;subsystem&amp;quot;       &amp;quot;cdce0&amp;quot;;&lt;br /&gt;
match &amp;quot;type&amp;quot;            &amp;quot;ATTACH&amp;quot;;&lt;br /&gt;
action &amp;quot;/usr/local/etc/devd/cdce.sh $subsystem $type&amp;quot;;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
and /usr/local/etc/devd/cdce.sh as:&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
case $2 in&lt;br /&gt;
'ATTACH')&lt;br /&gt;
ifconfig cdce0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
exit 0 ;&lt;br /&gt;
;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
Then restart the devd(8) daemon with:&lt;br /&gt;
&lt;br /&gt;
# /etc/rc.d/devd restart&lt;br /&gt;
&lt;br /&gt;
If you now plugin the FreeRunner into the USB port the cdce0 interface gets created and the IP addr will be assigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Debian, Ubuntu and others ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/network/interfaces and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# freerunner&lt;br /&gt;
allow-hotplug usb0&lt;br /&gt;
iface usb0 inet static&lt;br /&gt;
address 192.168.0.200&lt;br /&gt;
netmask 255.255.255.0&lt;br /&gt;
network 192.168.0.0&lt;br /&gt;
up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 &amp;amp;&lt;br /&gt;
up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward &amp;amp;&lt;br /&gt;
up iptables -P FORWARD ACCEPT &amp;amp;&lt;br /&gt;
down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is more sophisticated than the manual setup.  The 'auto usb' stanza ties into the Linux hotplug system so that when the device appears and vanishes, as happens when the FreeRunner is connected via USB, this is run.&lt;br /&gt;
&lt;br /&gt;
In addition, the desktop-side netmask is limited to a much smaller range, so that overlapping subnets are less of a problem - Linux will use more specific routes first when deciding where to send packets.&lt;br /&gt;
&lt;br /&gt;
Another possible configuration that adds DNS forward and removes&lt;br /&gt;
the iptables changes after unplugging:&lt;br /&gt;
&lt;br /&gt;
in /etc/network/interfaces add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# freerunner&lt;br /&gt;
allow-hotplug usb0&lt;br /&gt;
iface usb0 inet static&lt;br /&gt;
address 192.168.0.200&lt;br /&gt;
netmask 255.255.255.192&lt;br /&gt;
post-up /etc/network/freerunner start&lt;br /&gt;
pre-down /etc/network/freerunner stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create file /etc/network/freerunner&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# configures the freerunner for internet&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
DEVICE=usb0&lt;br /&gt;
IPADDR=192.168.0.200&lt;br /&gt;
REMOTE_IPADDR=192.168.0.202&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# get first ip for dns&lt;br /&gt;
DNSIP=$(awk '$1 == &amp;quot;nameserver&amp;quot;{print $2; exit(0);}' /etc/resolv.conf)&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
start)&lt;br /&gt;
iptables -A POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
iptables -A PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
iptables -A PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$(cat /proc/sys/net/ipv4/ip_forward)&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
echo &amp;quot;temoprarely allow ip_forward for openmoko&amp;quot; &amp;gt; /var/run/openmoko.ip_forward&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
fi&lt;br /&gt;
;;&lt;br /&gt;
stop)&lt;br /&gt;
iptables -D POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
iptables -D PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
iptables -D PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d  $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
&lt;br /&gt;
if [ -f /var/run/openmoko.ip_forward ]; then&lt;br /&gt;
rm /var/run/openmoko.ip_forward&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
fi&lt;br /&gt;
;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make /etc/network/freerunner executable with&lt;br /&gt;
chmod +x /etc/network/freerunner&lt;br /&gt;
&lt;br /&gt;
It is possible to use network-manager to automatically connect to the Freerunner using udev. The process uses udev to run a script when the Frerunner is plugged in.  The script uses the ip command to set the mac address of the usb network interface. To begin, create /etc/udev/rules.d/80-freerunner.rules :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This file causes programs to be run on device insertion.&lt;br /&gt;
# See udev(7) for syntax.&lt;br /&gt;
&lt;br /&gt;
# rule to assign a fixed mac address specified in /&lt;br /&gt;
KERNEL==&amp;quot;usb[0-9]*&amp;quot;, DRIVERS==&amp;quot;cdc_ether&amp;quot;, ACTION==&amp;quot;add&amp;quot;, RUN+=&amp;quot;/usr/local/sbin/freerunner-usb-add.sh %k&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, create the /usr/local/sbin/freerunner-usb-add.sh :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
(&lt;br /&gt;
busNum=$( printf %.2d $( expr match &amp;quot;$1&amp;quot; &amp;quot;usb\([0-9]*\)&amp;quot;) )&lt;br /&gt;
&lt;br /&gt;
ip link set &amp;quot;$1&amp;quot; address 00:00:22:55:bb:$busNum &amp;amp;&amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
) &amp;amp;&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally run &amp;quot;chmod +x /usr/local/sbin/freerunner-usb-add.sh&amp;quot; to make it executable. Now you can use network-manager with mac-address specific settings and get it to automatically connect.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Issues ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 8.10 doesn't work as expected if you used /etc/network/interfaces to automate the connection. Network manager likes to latch onto the network device and add a default route through 192.168.0.202, breaking your network connection. Network manager also says you can't edit or remove this connection from its list. I'm going back to making the connection manually.&lt;br /&gt;
&lt;br /&gt;
Ubuntu Feisty, Gutsy and Hardy reportedly have a bug where ifdown is not run when the interface is unplugged, meaning this only works once after the system is booted.  This is mentioned at https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/130437&lt;br /&gt;
&lt;br /&gt;
One can patch /etc/udev/rules.d/85-ifupdown.rules. Moving the DRIVERS==&amp;quot;*?&amp;quot; out of the top GOTO, to ACTION==&amp;quot;add&amp;quot; line fixes the problem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;net&amp;quot;, GOTO=&amp;quot;net_start&amp;quot;&lt;br /&gt;
GOTO=&amp;quot;net_end&amp;quot;&lt;br /&gt;
&lt;br /&gt;
LABEL=&amp;quot;net_start&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Bring devices up and down only if they're marked auto.&lt;br /&gt;
# Use start-stop-daemon so we don't wait on dhcp&lt;br /&gt;
ACTION==&amp;quot;add&amp;quot;, DRIVERS==&amp;quot;?*&amp;quot;,       RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ACTION==&amp;quot;remove&amp;quot;,       RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
LABEL=&amp;quot;net_end&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The bug is that the DRIVERS variable isn't set at all when the device is unplugged.&lt;br /&gt;
&lt;br /&gt;
This appears to be fixed in Ubuntu 8.04 [[User:Mattt|Mattt]] 11:38, 30 July 2008 (UTC)&lt;br /&gt;
:Actually it appears that it's not fixed, but patching that file and disconnecting and reconnecting the phone works perfectly. --[[User:Johndoesacc|Johndoesacc]] 18:37, 20 August 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Mandriva ==&lt;br /&gt;
&lt;br /&gt;
This first file configures the network system for the usb0 interface. Any time you plug in the FreeRunner the interface will be configured.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/sysconfig/network-scripts/ifcfg-usb0&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
DEVICE=usb0&lt;br /&gt;
BOOTPROTO=static&lt;br /&gt;
IPADDR=192.168.0.200&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
NETWORK=192.168.0.0&lt;br /&gt;
BROADCAST=192.168.0.255&lt;br /&gt;
ONBOOT=yes&lt;br /&gt;
METRIC=10&lt;br /&gt;
MII_NOT_SUPPORTED=no&lt;br /&gt;
USERCTL=yes&lt;br /&gt;
&lt;br /&gt;
This next file configures the static routes that we need to communicate to the subnet. Since it has &amp;quot;usb0&amp;quot; in the name, the system will automatically apply these static routes any time that the usb0 interface is configured. (i.e. when you connect the FreeRunner)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/sysconfig/network-scripts/usb0-routes&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
ADDRESS0=192.168.0.200&lt;br /&gt;
NETMASK0=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
Now we need to restart the network system to pick up the changes.&lt;br /&gt;
&lt;br /&gt;
service network restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This didn't work for me (Mandriva 2008.1), giving errors from Shorewall. However, simply using MCC, Network-&amp;gt;Sharing Internet Access worked fine. You need to connect Neo when starting it. --[[User:Alih|Alih]] 18:50, 22 September 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== SuSE ==&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
# USB configuration for PDAs (openmoko)&lt;br /&gt;
IPADDR=192.168.0.200&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
STARTMODE=onboot&lt;br /&gt;
&lt;br /&gt;
For more information on getting USB networking up using YaST, see [[USB Networking with openSUSE]].&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
=== Option A - Tested with FC8 &amp;amp; FC5 ===&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
# USB configuration for PDAs (openmoko)&lt;br /&gt;
# from http://www.handhelds.org/moin/moin.cgi/UsbNet&lt;br /&gt;
DEVICE=usb0&lt;br /&gt;
BOOTPROTO=none&lt;br /&gt;
IPADDR=192.168.0.200&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
ONBOOT=yes&lt;br /&gt;
&lt;br /&gt;
=== Option B ===&lt;br /&gt;
&lt;br /&gt;
This setup is probably over-complex:&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
DEVICE=usb0&lt;br /&gt;
IPADDR=192.168.0.200&lt;br /&gt;
NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifup-usb:&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
. /etc/init.d/functions&lt;br /&gt;
&lt;br /&gt;
cd /etc/sysconfig/network-scripts&lt;br /&gt;
. ./network-functions&lt;br /&gt;
&lt;br /&gt;
[ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
&lt;br /&gt;
CONFIG=${1}&lt;br /&gt;
&lt;br /&gt;
need_config ${CONFIG}&lt;br /&gt;
&lt;br /&gt;
source_config&lt;br /&gt;
&lt;br /&gt;
NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
&lt;br /&gt;
/sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
/sbin/ip link set dev ${DEVICE} up&lt;br /&gt;
/sbin/ip addr add dev ${DEVICE} ${IPADDR}/${NETBITS}&lt;br /&gt;
&lt;br /&gt;
/sbin/iptables -I POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
/sbin/sysctl net.ipv4.ip_forward=1&lt;br /&gt;
/sbin/iptables -I FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
/sbin/iptables -I FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Set /etc/sysconfig/network-scripts/ifdown-usb:&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
. /etc/init.d/functions&lt;br /&gt;
&lt;br /&gt;
cd /etc/sysconfig/network-scripts&lt;br /&gt;
. ./network-functions&lt;br /&gt;
&lt;br /&gt;
[ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
&lt;br /&gt;
CONFIG=${1}&lt;br /&gt;
&lt;br /&gt;
need_config ${CONFIG}&lt;br /&gt;
&lt;br /&gt;
source_config&lt;br /&gt;
&lt;br /&gt;
NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
&lt;br /&gt;
/sbin/iptables -D FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
/sbin/iptables -D FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
/sbin/sysctl net.ipv4.ip_forward=0&lt;br /&gt;
/sbin/iptables -D POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
&lt;br /&gt;
/sbin/ip link set dev ${DEVICE} down&lt;br /&gt;
/sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
If you are using NetworkManager, restart it and enable the usb device from its menu, otherwise it will disable your connection shortly after you enable it.&lt;br /&gt;
&lt;br /&gt;
/sbin/service NetworkManager restart&lt;br /&gt;
=== Option C - tested on F9 ===&lt;br /&gt;
(seemed to work on FC8 also)&lt;br /&gt;
&lt;br /&gt;
Plug in the usb cable. NetworkManager should detect the phone automatically but you should ignore it.&lt;br /&gt;
Open Network Configuration tool (System -&amp;gt; Administration -&amp;gt; Network) and perform following steps:&lt;br /&gt;
# Click '''New''' button on top bar&lt;br /&gt;
# Click '''Forward'''&lt;br /&gt;
# Select OpenMoko from device list&lt;br /&gt;
# Click '''Forward'''&lt;br /&gt;
# Select 'Statically set IP address:' and enter address: 192.168.0.200, netmask 255.255.255.0 (or use 255.255.255.240 if you want only route ip range 192.168.0.192-192.168.0.207). Leave gateway empty.&lt;br /&gt;
# Click '''Forward'''&lt;br /&gt;
# Click '''Apply''' to close add dialog&lt;br /&gt;
# Select newly added usb0 device from the device list.&lt;br /&gt;
# Click '''Edit''' button on top bar&lt;br /&gt;
# You might want to remove a tick from 'Activate device when computer starts' check box.&lt;br /&gt;
# Click '''Ok''' to close window  dialog.&lt;br /&gt;
Save settings and close the window.&lt;br /&gt;
&lt;br /&gt;
Open Firewall Configuration (System -&amp;gt; Administration -&amp;gt; Firewall) and enable masquerading:&lt;br /&gt;
# Select '''Masquerading''' from left panel&lt;br /&gt;
# Check device(s) which you'd like to share internet connection. Typically eth0 or wlan0.&lt;br /&gt;
# Click '''Apply''' and close application&lt;br /&gt;
&lt;br /&gt;
Open terminal and perform (as root user):&lt;br /&gt;
# ifdown usb0&lt;br /&gt;
# ifup usb0&lt;br /&gt;
The first command will remove any existing settings given by the NetworkManager and second command brings the device up with appropriate settings.&lt;br /&gt;
&lt;br /&gt;
Now you should be able to ping e.g. 74.125.39.99 [www.google.com] from OpenMoko. Configure /etc/resolv.conf and you should have full a internet access.&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting ====&lt;br /&gt;
If Network Configuration tool cannot see the the usb0 try to unplug the usb cable for a few seconds and wait until the NetworkManager finds it again.&lt;br /&gt;
&lt;br /&gt;
NetworkManager will assign a new ip address for the OpenMoko if link goes down for a while. You can fix this by issuing '''ifup usb0''' again.&lt;br /&gt;
&lt;br /&gt;
== Red Hat or Similar (tested with Workstation 5) ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/sysconfig/network-scripts/net.hotplug:&lt;br /&gt;
&lt;br /&gt;
After this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case $INTERFACE in&lt;br /&gt;
# interfaces that are registered after being &amp;quot;up&amp;quot; (?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usb0)&lt;br /&gt;
ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
route add 192.168.0.202 usb0&lt;br /&gt;
iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
exit 0&lt;br /&gt;
;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
&lt;br /&gt;
Open /etc/conf.d/net and add:&lt;br /&gt;
&lt;br /&gt;
# Neo&lt;br /&gt;
config_usb0=( &amp;quot;192.168.0.200 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
routes_usb0=( &amp;quot;192.168.0.202/32 via 192.168.0.200&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Create a new init script:&lt;br /&gt;
&lt;br /&gt;
cd /etc/init.d&lt;br /&gt;
ln -s net.lo net.usb0&lt;br /&gt;
&lt;br /&gt;
=== Manual Configuration ===&lt;br /&gt;
&lt;br /&gt;
Put iptables into use:&lt;br /&gt;
&lt;br /&gt;
iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
Store them:&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/iptables save&lt;br /&gt;
&lt;br /&gt;
If you want the routing by default:&lt;br /&gt;
&lt;br /&gt;
rc-update add iptables default&lt;br /&gt;
&lt;br /&gt;
You must also inform the kernel, to start forwarding.&lt;br /&gt;
&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
=== Automatic Configuration ===&lt;br /&gt;
One way to automate all this is to create /etc/conf.d/net.usb0 as follows. It sets IP forwarding and the iptables rules all in one go. It removes the iptables rules and disables ip forwarding when the FreeRunner is unplugged.&lt;br /&gt;
&lt;br /&gt;
preup() {&lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
postdown() {&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
iptables -D INPUT -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
iptables -D OUTPUT -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== Slackware (tested with 12.1) ==&lt;br /&gt;
&lt;br /&gt;
Following is based on [http://www.enricozini.org/2008/tips/autodock-freerunner.html Enrico Zini's solution].&lt;br /&gt;
&lt;br /&gt;
Create a new udev rules file &amp;lt;tt&amp;gt;/etc/udev/rules.d/91-openmoko.rules&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;add&amp;quot;, ATTRS{idVendor}==&amp;quot;1457&amp;quot;, ATTRS{idProduct}==&amp;quot;5122&amp;quot;, RUN+=&amp;quot;/sbin/om-usb $env{INTERFACE} start&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;net&amp;quot;, ACTION==&amp;quot;remove&amp;quot;, ENV{INTERFACE}==&amp;quot;usb[0-9]&amp;quot;, RUN+=&amp;quot;/sbin/om-usb $env{INTERFACE} stop&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create the script &amp;lt;tt&amp;gt;/sbin/om-usb&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
INTERFACE=$1&lt;br /&gt;
ACTION=$2&lt;br /&gt;
&lt;br /&gt;
# udev fails silently when the script fails, e.g. due to commands not&lt;br /&gt;
# being found&lt;br /&gt;
PATH=/usr/sbin:/sbin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
case $ACTION in&lt;br /&gt;
'start')&lt;br /&gt;
# Put all your setup here&lt;br /&gt;
;;&lt;br /&gt;
'stop')&lt;br /&gt;
# Put all your tear down here&lt;br /&gt;
;;&lt;br /&gt;
*)&lt;br /&gt;
echo &amp;quot;Usage: $0 {start|stop}&amp;quot;&lt;br /&gt;
exit 1&lt;br /&gt;
;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;INTERFACE&amp;lt;/tt&amp;gt; will be &amp;lt;tt&amp;gt;usb0&amp;lt;/tt&amp;gt; in most cases.&lt;br /&gt;
&lt;br /&gt;
== Archlinux ==&lt;br /&gt;
Following is based on [http://xenos.altervista.org/blogs/index.php?blog=3&amp;amp;title=openmoko-usb-networking-su-archlinux furester's solution].&lt;br /&gt;
&lt;br /&gt;
Install package [http://aur.archlinux.org/packages.php?ID=20220 openmoko-usb-networking] from AUR:&lt;br /&gt;
&lt;br /&gt;
$ yaourt -S openmoko-usb-networking&lt;br /&gt;
&lt;br /&gt;
= SSH Extras =&lt;br /&gt;
&lt;br /&gt;
Reportedly, the ssh daemon (dropbear 0.49) on the FreeRunner appears to have a bug when sending the exit status back to the client. From time to time you receive an exit status of 255.&lt;br /&gt;
&lt;br /&gt;
To avoid ssh adding a new line for every ssh host-key to your known_hosts you can add the following to the phone section in ~/.ssh/config (or see the snippet at : [[USB Networking#Changing_host_keys]] bellow)&lt;br /&gt;
&lt;br /&gt;
UserKnownHostsFile /dev/null&lt;br /&gt;
&lt;br /&gt;
You might want to use keys to bypass the login prompt too.&lt;br /&gt;
&lt;br /&gt;
== SSH Keys ==&lt;br /&gt;
&lt;br /&gt;
== From desktop to FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
To generate ssh keys for use as a login mechanism type:&lt;br /&gt;
&lt;br /&gt;
user@host$ ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
When prompted for a password either hit enter for no password (''not really a good idea'') or enter a password for this key. ssh into the phone and create ~/.ssh:&lt;br /&gt;
&lt;br /&gt;
root@phone# mkdir ~/.ssh&lt;br /&gt;
&lt;br /&gt;
Then from your desktop copy the '''.pub''' file to the phone.&lt;br /&gt;
&lt;br /&gt;
user@host$ scp ~/.ssh/id_rsa.pub root@phone:~/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
You should now be able to ssh directly into the phone without a password prompt using a command like 'ssh root@phone' from the account user@host because the public key in the file user@host:~/.ssh/id_rsa.pub is contained in the list of keys which have access in the file root@phone:~/.ssh/authorized_keys (since scp is used, only one key exists, but you can grant access to the phone from more than one account, for example user@host, user@laptop).&lt;br /&gt;
&lt;br /&gt;
To make ssh login as root by default, add the following lines to ~/.ssh/config:&lt;br /&gt;
&lt;br /&gt;
Host phone&lt;br /&gt;
User root&lt;br /&gt;
&lt;br /&gt;
Replace ''phone'' with the hostname or ip of your phone. You should now be able to ssh into the phone without having to type ''root@'' every time.&lt;br /&gt;
&lt;br /&gt;
To disable password logins ('''after setting up key access''') edit /etc/init.d/dropbear and change the following line:&lt;br /&gt;
&lt;br /&gt;
DROPBEAR_EXTRA_ARGS=&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
DROPBEAR_EXTRA_ARGS=&amp;quot;-s&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You will need to restart dropbear for this to take effect.&lt;br /&gt;
&lt;br /&gt;
=== From FreeRunner to Desktop ===&lt;br /&gt;
&lt;br /&gt;
Generate the key:&lt;br /&gt;
&lt;br /&gt;
dropbearkey -t rsa -f id_rsa&lt;br /&gt;
&lt;br /&gt;
The output will look something like this:&lt;br /&gt;
&lt;br /&gt;
Will output 1024 bit rsa secret key to 'id_rsa'&lt;br /&gt;
Generating key, this may take a while...&lt;br /&gt;
Public key portion is:&lt;br /&gt;
ssh-rsa AAAAB3Nza[...]&lt;br /&gt;
Fingerprint: md5 ca:e8:f0:b7:f6:7b:c2:b6:b9:71:e4:45:86:a9:ff:b8&lt;br /&gt;
&lt;br /&gt;
Copy and paste the one line (in this example, starting with 'ssh-rsa' onto the end of the host's authorized_keys file (often in ~/.ssh/).&lt;br /&gt;
&lt;br /&gt;
From the phone, ssh with -i:&lt;br /&gt;
&lt;br /&gt;
ssh -i id_rsa user@host&lt;br /&gt;
&lt;br /&gt;
=== Changing host keys ===&lt;br /&gt;
&lt;br /&gt;
If you reflash, your hosts keys will change.  Try this ~/.ssh/config snippet:&lt;br /&gt;
&lt;br /&gt;
Host moko&lt;br /&gt;
HostName 192.168.0.202&lt;br /&gt;
StrictHostKeyChecking no&lt;br /&gt;
UserKnownHostsFile /dev/null&lt;br /&gt;
User root&lt;br /&gt;
&lt;br /&gt;
This is suggested because ssh on your desktop may complain if the key matching a certain IP changes (stored in .ssh/known_hosts). Now you have set this, you can issue the following command to connect to your moko :&lt;br /&gt;
&lt;br /&gt;
ssh root@moko&lt;br /&gt;
&lt;br /&gt;
== GUI on desktop through SSH ==&lt;br /&gt;
&lt;br /&gt;
To get the GUI on the FreeRunner onto the desktop via USB, you can use ssh as follows:&lt;br /&gt;
&lt;br /&gt;
ssh -l root -X -v 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Using this, run openmoko-finger-demo for example, and it will open up on the desktop. To get landscape view, just resize the GUI window on the desktop.&lt;br /&gt;
&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to&lt;br /&gt;
autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in.&lt;br /&gt;
you need to set the DBUS_SESSION_BUS_ADDRESS environment variable to the value on the FreeRunner before launching the process from your desktop.  You can find the value of this variable by using a command such as&lt;br /&gt;
ps auxwwwwe | grep -m 1 DBUS_SESSION_BUS_ADDRESS&lt;br /&gt;
Note that you must run that command on the FreeRunner.  Back on your desktop, run the process you want with the ''env'' command like this:&lt;br /&gt;
env DBUS_SESSION_BUS_ADDRESS=''dbus_address'' ''process'' #(isn't the &amp;quot;env&amp;quot; redundant here?)&lt;br /&gt;
&lt;br /&gt;
==Display Remote Applications on FreeRunner==&lt;br /&gt;
&lt;br /&gt;
To get desktop apps to show up on your FreeRunner, first log in:&lt;br /&gt;
&lt;br /&gt;
ssh -l root 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
DISPLAY=:0 xhost +192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After this you can close the ssh session. Back on the desktop computer, run:&lt;br /&gt;
&lt;br /&gt;
DISPLAY=openmoko:0 xclock&lt;br /&gt;
&lt;br /&gt;
Note that the xhost command will allow remote applications on 192.168.0.200 to access the X server. It will allow anyone on the desktop machine to access the X server of the neo, including snooping anything you type on it. To disallow remote applications again, run this in the neo:&lt;br /&gt;
&lt;br /&gt;
DISPLAY=:0 xhost -192.168.0.200&lt;br /&gt;
&lt;br /&gt;
==Automated setup network and mounting partitions==&lt;br /&gt;
&lt;br /&gt;
See [https://bugs.launchpad.net/ubuntu/+bug/289548 Ubuntu bug report in launchpad].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{Languages|USB Networking}}&lt;br /&gt;
&lt;br /&gt;
[[Category:USB]]&lt;br /&gt;
[[Category:Implemented]]&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/FDOM_-_a_Fat_and_Dirty_OM_based_distribution</id>
		<title>FDOM - a Fat and Dirty OM based distribution</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/FDOM_-_a_Fat_and_Dirty_OM_based_distribution"/>
				<updated>2008-11-06T15:51:35Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|FDOM_-_a_Fat_and_Dirty_OM_based_distribution}}&lt;br /&gt;
{{Distributions|FDOM}}&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
A combination of apps(a lot of) and fixes to demonstrate the capabilities of the Freerunner and to have a functional phone (sort of). This all while retaining the ability to update through the official feeds.&lt;br /&gt;
&lt;br /&gt;
Until now, flashing the phone was the only way to update to the last release of FDOM but since 20081023 version there is a script called FDOMizer able to update to the lastest version of FDOM any older version of FDOM and is able to transform a brand new flashed OM2008.X  on the phone to a full bloated FDOM&lt;br /&gt;
&lt;br /&gt;
Any questions can be sent to david at tuxbrain dot com&lt;br /&gt;
&lt;br /&gt;
or at community list or local-openmoko-spain list&lt;br /&gt;
&lt;br /&gt;
See [[Development_resources#Mailing_Lists|mailing lists]]&lt;br /&gt;
&lt;br /&gt;
David-Reyes Samblas Martinez&lt;br /&gt;
&lt;br /&gt;
Co Admins&lt;br /&gt;
&lt;br /&gt;
Armin ranjbar aka [http://zoup.org Zoup]&lt;br /&gt;
&lt;br /&gt;
Nacho Seijo aka himero&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
Download from  http://www.tuxbrain.com/fdom_en.html.&lt;br /&gt;
* Notes:&lt;br /&gt;
**If you have updated your kernel, re-flash back to the default [http://downloads.openmoko.org/releases/Om2008.9/Om2008.9.uImage.bin| Om2008.9 kernel] so that your kernels and modules are the same version.  Otherwise none of the device drivers load and you have no usb0 or other essential stuff.&lt;br /&gt;
* Mirrors:&lt;br /&gt;
** old home server&lt;br /&gt;
***http://compartida.net/openmoko/FDOM&lt;br /&gt;
** TDobson:&lt;br /&gt;
*** http://files.tdobson.net/openmoko/freerunner/fdom/&lt;br /&gt;
**** Mirror admin contact: www.tdobson.net/contact&lt;br /&gt;
** TrueBox:&lt;br /&gt;
*** http://openmoko.truebox.co.uk/mirror/compartida.net/&lt;br /&gt;
** Universidade de Vigo:&lt;br /&gt;
*** http://ftp.uvigo.es/mirror/openmoko/&lt;br /&gt;
*** http://ftp.uvigo.es/pub/linux/distribuciones/openmoko&lt;br /&gt;
&lt;br /&gt;
=== Development ===&lt;br /&gt;
If you want to come to the script kidding party :) join us at&lt;br /&gt;
&lt;br /&gt;
http://projects.openmoko.org/projects/fdom/&lt;br /&gt;
&lt;br /&gt;
Serious developers are welcome too :) but remember  &amp;quot;if it's cool, it works(in some way),doesn't annoying(too much) rest of things and fits on the nand it's in&amp;quot; :) we will let scalability, stability, resource saving and so on to the OM guys :)&lt;br /&gt;
&lt;br /&gt;
The devel list is:&lt;br /&gt;
http://lists.projects.openmoko.org/mailman/listinfo/fdom-development&lt;br /&gt;
&lt;br /&gt;
Thanks to armin, we have also a svn server svn://zoup.org/Fdom with the FDOMizer script and auxiliary files ,waiting for you to make it better ;)&lt;br /&gt;
&lt;br /&gt;
=== Warnings ===&lt;br /&gt;
Please any warning tip a trick post it in the devel list :)&lt;br /&gt;
http://lists.projects.openmoko.org/mailman/listinfo/fdom-development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Changelog ===&lt;br /&gt;
You can use both the script it self and the svn log to visualice those changes&lt;br /&gt;
&lt;br /&gt;
=== Roadmap ===&lt;br /&gt;
* Try to make it more like lastest Raster Image like&lt;br /&gt;
* Fix all bugs arised and make it more stable&lt;br /&gt;
* Make it even more community driven&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
Some people talking about us ;) thanks a lot&lt;br /&gt;
&lt;br /&gt;
http://openmoko-fr.org/blog/index.php?post/2008/09/16/Test-de-FDOM (FR)&lt;br /&gt;
&lt;br /&gt;
http://www.bunix.de/key/personal-blog/blog_id/533.htm (DE)&lt;br /&gt;
&lt;br /&gt;
http://community.livejournal.com/ru_openmoko/6577.html (RU)&lt;br /&gt;
&lt;br /&gt;
http://www.linuxphone.ru/2008/09/fdom-distributive-for-openmoko-freerunner/ (RU)&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributions]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Om2008.8</id>
		<title>Om2008.8</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Om2008.8"/>
				<updated>2008-08-06T00:42:18Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: Added download link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages|Openmoko2008.8}}&lt;br /&gt;
{{Om 2008.8}}&lt;br /&gt;
&lt;br /&gt;
{{Distributions|Openmoko2008.8}}&lt;br /&gt;
&lt;br /&gt;
'''Openmoko2008.8''' or '''Om2008.8''' is the successor to [[Openmoko2007.2]] and had '''ASU''' as a codename. It launched on August 08, 2008. Om2008.8 uses EFL for the launcher, custom UI applications and [[QtopiaOnX11|Qtopia on X11]] for telephony.&lt;br /&gt;
It is the first step from [[GTK+]] on x11 to using multiple toolkits in combination. Om2008.8 now supports [http://www.enlightenment.org/ EFL], [http://trolltech.com/products/qtopia Qtopia] and [[GTK+]] applications.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellspacing=&amp;quot;2&amp;quot; cellpadding=&amp;quot;2&amp;quot; style=&amp;quot;padding: 0%; margin:0em 0em 1em 0em; border:1px solid #c0c0c0; background:#eeeeee; width:100%;floating=&amp;quot;center&amp;quot;; &amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |  &lt;br /&gt;
[[Image:Om2008 uboot.png|200px|center]]&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |&lt;br /&gt;
[[Image:Om2008 home.png|200px|center]]&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |&lt;br /&gt;
[[Image:Installer4.png|200px|center]]&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |&lt;br /&gt;
[[Image:Om2008 installer1.png|200px|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |  &lt;br /&gt;
[[Image:Main.png|200px|center]]&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |&lt;br /&gt;
[[Image:Edit1.png|200px|center]]&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |&lt;br /&gt;
[[Image:Om locations4.png|200px|center]]&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc;border-left:1px solid #9999cc;border-right:1px ; border-top:2px solid 75d806; border:1px solid #222222; width:25% &amp;quot; |&lt;br /&gt;
[[Image:List.png|200px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== What's New ==&lt;br /&gt;
Om2008.8 was designed to be as empty as possible, for the very purpose of showcasing your ideas.&lt;br /&gt;
&lt;br /&gt;
Think of our products as museums. We're building the environment. Each one different from the next. You'll get all the free art supplies you could imagine because we want you to add your own meaning. You choose: consume, create, or both.&lt;br /&gt;
&lt;br /&gt;
Either way you create your own meaning. It's about you. &lt;br /&gt;
&lt;br /&gt;
=== Customize ===&lt;br /&gt;
Om2008.8 allows you to customize your Neo in many aspects.&lt;br /&gt;
&lt;br /&gt;
*  '''Use the Installer''' to find apps and modifications for your Neo.&lt;br /&gt;
*  '''Re-design themes''' by customizing your own [[Edje]] files.&lt;br /&gt;
*  '''Source Codes''' are publicly available, allowing for customization all the way down to low level sytems.&lt;br /&gt;
&lt;br /&gt;
=== Share ===&lt;br /&gt;
* share your locations  ([[Om2008.8_Locations|Locations]])&lt;br /&gt;
:you can use splinter to save your location and even send it to friends via sms.  how cool is that?!&lt;br /&gt;
* share your applications ([[Om2008.8_Installer|Installer]])&lt;br /&gt;
:share your ideas with the world by adding packages to the [http://downloads.openmoko.org/community-repository/ Openmoko Repository].  It is a great database for all things openmoko and can easily be accessed by any user through the [[Om2008.8 Installer|Installer]].&lt;br /&gt;
&lt;br /&gt;
== Feature Plan ==&lt;br /&gt;
&lt;br /&gt;
You can see a list of available and planned features at [[Openmoko2008.8 Feature Plan]].&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
[http://buildhost.openmoko.org/daily/freerunner/200808/ Download images]&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
For instructions on how to flash your device, please refer to [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Openmoko]]&lt;br /&gt;
[[Category:Distributions]]&lt;br /&gt;
[[Category:Openmoko2008.8]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Users_Repositories</id>
		<title>Users Repositories</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Users_Repositories"/>
				<updated>2008-08-06T00:10:50Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: Highlighted the importance of Amstrong&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here you can find prebuilt kernels and root file systems.&lt;br /&gt;
&lt;br /&gt;
=Official downloads=&lt;br /&gt;
&lt;br /&gt;
==Recent/latest builds==&lt;br /&gt;
* Framework Testing Images (FSO)&lt;br /&gt;
:http://downloads.openmoko.org/framework/&lt;br /&gt;
* OM2007.2 &lt;br /&gt;
:http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/neo1973/?C=M;O=D&lt;br /&gt;
* OM2007.1 (Obsolete)&lt;br /&gt;
:http://buildhost.openmoko.org/OM2007.1/tmp/deploy/images/?C=M;O=D&lt;br /&gt;
&lt;br /&gt;
==Snapshots [http://downloads.openmoko.org/snapshots/]==&lt;br /&gt;
* 2007.11 - the latest (2nd Dec) snapshot ([http://lists.openmoko.org/pipermail/community/2007-December/011980.html from Mickey])&lt;br /&gt;
:http://downloads.openmoko.org/snapshots/2007.11/images/&lt;br /&gt;
* 2007.08 snapshot, as announced by Sean on August 19&lt;br /&gt;
:http://downloads.openmoko.org/snapshots/2007.08/images/&lt;br /&gt;
&lt;br /&gt;
==Daily==&lt;br /&gt;
* Unstable Daily-builds&lt;br /&gt;
:http://buildhost.openmoko.org/daily/&lt;br /&gt;
&lt;br /&gt;
==[[CommunityRepository|Community repository]]==&lt;br /&gt;
:http://downloads.openmoko.org/community-repository/&lt;br /&gt;
&lt;br /&gt;
=Unofficial builds=&lt;br /&gt;
&lt;br /&gt;
== Angstrom Repository ==&lt;br /&gt;
&lt;br /&gt;
Angstrong is the base distribution of OpenMoko Linux distribution. It contains the basic set of Linux applications and they should be compatible with OpenMoko. [http://www.angstrom-distribution.org/repo/ The repository package listing].&lt;br /&gt;
&lt;br /&gt;
To add the unstable Angstrom feed, update your ''/etc/ipkg/base-feeds.conf'' to include a line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
src/gz base http://www.angstrom-distribution.org/feeds/2007/ipk/glibc/armv4t/base/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[User:ChooseOpen|ChooseOpen]]==&lt;br /&gt;
:http://chooseopen.com/openmoko/build/2007.2/?M=D (2007.2)&lt;br /&gt;
:http://chooseopen.com/openmoko/build/qtopia/?M=D (Qtopia)&lt;br /&gt;
&lt;br /&gt;
==[[User:Kevin_Dean|Kevin_Dean]]==&lt;br /&gt;
:http://downloads.openmoko.org/recommended/ (only gta01)&lt;br /&gt;
:Latest recommended [[Snapshot review|snapshot review]]&lt;br /&gt;
&lt;br /&gt;
==[[User:ScaredyCat|ScaredyCat]]==&lt;br /&gt;
:http://buildhost.automated.it/OM2007.2/?M=D&lt;br /&gt;
&lt;br /&gt;
ScaredyCat also has a ipkg repository for 2007.2 where e.g. gpe-filemanager and a lot more (e.g. ntpd) can be installed from. On the Neo do:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/opkg&lt;br /&gt;
 wget http://buildhost.automated.it/scaredycat.conf &lt;br /&gt;
 opkg update&lt;br /&gt;
 opkg install gpe-filemanager&lt;br /&gt;
 opkg install gpe-timesheet&lt;br /&gt;
 opkg install gpe-todo&lt;br /&gt;
 opkg install mysql&lt;br /&gt;
 opkg install mtpaint&lt;br /&gt;
 opkg install sqlite&lt;br /&gt;
 opkg install ntp&lt;br /&gt;
 #(you get the idea)&lt;br /&gt;
 /etc/init.d/xserver-nodm restart    # to make the new applications appear in the menu&lt;br /&gt;
&lt;br /&gt;
=='''mwester''' unofficial builds==&lt;br /&gt;
:http://moko.mwester.net/&lt;br /&gt;
&lt;br /&gt;
==celtune==&lt;br /&gt;
:http://rabenfrost.net/celtune/?C=M;O=D&lt;br /&gt;
:http://rabenfrost.net/celtune/ipk/&lt;br /&gt;
&lt;br /&gt;
Celtune offers Standard-Builds (.jffs2, .tar.gz, .bin, .ipk) and several special-images with additional packages (e.g. monster-images,navigation-images,...)&lt;br /&gt;
For more info take a look at http://rabenfrost.net/celtune/1-NEWS-WARNING-INFO &lt;br /&gt;
You can find images, kernels and packages for other devices too on http://rabenfrost.net/celtune/ (e.g. HTC-Blueangel, Asus730W ...)&lt;br /&gt;
A huge number of packages is located at http://rabenfrost.net/celtune/ipk/  &lt;br /&gt;
Use the following line to add celtune's feed to your neo: &lt;br /&gt;
 cd /etc/opkg &amp;amp;&amp;amp; wget http://rabenfrost.net/celtune/celtune-rabenfrost.conf&lt;br /&gt;
&lt;br /&gt;
If you want to add a link, it would be nice to enforce a standard format of these feeds so that they can be browsed automatically.&lt;br /&gt;
&lt;br /&gt;
[[Category:Openmoko]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/USB_Networking</id>
		<title>USB Networking</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/USB_Networking"/>
				<updated>2008-08-05T23:16:26Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Linux Kernel Support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OpenMoko Networking Setup =&lt;br /&gt;
&lt;br /&gt;
In order to communicate via TCP/IP to your FreeRunner, a basic understanding of the networking expectations is required.  Each end of the USB connection forms a LAN (local area network) segment, with the FreeRunner's USB networking device at one end (default 192.168.0.202) and your laptop or desktop at the other end (192.168.0.200 in this guide).&lt;br /&gt;
&lt;br /&gt;
Normally, your desktop machine will know how to reach the Internet, having had its gateway (the IP address of the machine or device which knows how to send packets to machines beyond your subnet) configured via DHCP or statically (probably via a router).  For the FreeRunner to reach the Internet, your desktop will have to be configured to route and masquerade (NAT) packets from it.  &lt;br /&gt;
&lt;br /&gt;
Normally, none of this is an issue, but problems can arise when the subnet between the FreeRunner and your desktop overlap with the desktop to the router (which forms a second LAN), since your desktop might not know how to route traffic properly.&lt;br /&gt;
&lt;br /&gt;
= Simple Manual Linux Configuration =&lt;br /&gt;
&lt;br /&gt;
Try this first.  If it works, then you can add permanent configuration or use more sophisticated setups below:&lt;br /&gt;
&lt;br /&gt;
(as root on your desktop):&lt;br /&gt;
&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
 sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
 ifconfig usb0 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
If your Internet connection is also in the range 192.168.0.x then instead you might want to use:&lt;br /&gt;
&lt;br /&gt;
 ifconfig usb0 192.168.0.200 netmask 255.255.255.248&lt;br /&gt;
&lt;br /&gt;
Then (ideally, not as root):&lt;br /&gt;
&lt;br /&gt;
 ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
The default password is blank.&lt;br /&gt;
&lt;br /&gt;
= Linux Kernel Support =&lt;br /&gt;
&lt;br /&gt;
Recent Linux distributions (Ubuntu 8.04 Hardy Heron) support USB Networking out of the box.&lt;br /&gt;
&lt;br /&gt;
Your Linux desktop/laptop needs to have suitable support, in particular, you will need to have enabled full masquerading in the kernel and USB networking options:&lt;br /&gt;
&lt;br /&gt;
* CONFIG_USB_USBNET&lt;br /&gt;
* CONFIG_USB_NET_CDCETHER&lt;br /&gt;
&lt;br /&gt;
Both USB networking options are available in the ''Device Drivers -&amp;gt; USB support -&amp;gt; USB Network Adapters'' or ''Device Drivers -&amp;gt; Network Device Support -&amp;gt; USB Network Adapters -&amp;gt; Multipurpose USB Networking Framework''. For more info see the [http://www.linux-usb.org/usbnet/ usbnet driver homepage].&lt;br /&gt;
&lt;br /&gt;
It can be complex to set all the correct options for masquerading in the kernel if they are not turned on.  This could be detailed further.&lt;br /&gt;
&lt;br /&gt;
= Firewall Issues =&lt;br /&gt;
&lt;br /&gt;
On some systems, you may have firewall rules which prevent this working - such as added by the iptables service on Fedora.  You may care to stop these, and/or review any rules or policies you think might cause issues.&lt;br /&gt;
&lt;br /&gt;
The most relevant table is the nat table, which controls translation of addresses:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t nat -v -n&lt;br /&gt;
&lt;br /&gt;
Unless you have a special setup, you'll want to see only the MASQUERADE rule that you apply below, and ACCEPT as the default policy.  Also look at the filter table:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t filter -v -n&lt;br /&gt;
&lt;br /&gt;
If this contains anything in the FORWARD chain, then this may prevent passing packets.  It can be flushed with:&lt;br /&gt;
&lt;br /&gt;
 iptables -t filter -F FORWARD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DNS =&lt;br /&gt;
&lt;br /&gt;
In addition to routing issues, to be practical, DNS will need to work.  In some cases, you might already be running a DNS server on your desktop such as dnsmasq or bind9, which is the default assumption the FreeRunner makes.  In other cases, you'll need to configure DNS to that of your router, or a DNS server further out on the internet such as that provided by your ISP.&lt;br /&gt;
&lt;br /&gt;
== Configure DNS ==&lt;br /&gt;
&lt;br /&gt;
DNS is configured in /etc/resolv.conf on your FreeRunner.  It should contain:&lt;br /&gt;
&lt;br /&gt;
 nameserver 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
Which means that by default it expects your desktop to have a DNS server.  On some Linux and Windows systems this is true, especially those configured as servers, but in general it is not.  You can install packages such as ''bind9'' or ''dnsmasq''.   See the section below on [[USB Networking#More on DNS|More on DNS]] for other solutions.    &lt;br /&gt;
&lt;br /&gt;
Test if it works:&lt;br /&gt;
&lt;br /&gt;
 ping www.google.com&lt;br /&gt;
&lt;br /&gt;
If so, then this is sufficient for most internet access. But manual changes to resolv.conf are usually lost later if for example one uses DHCP, especially for WiFi, and so may not be convenient to configure manually.&lt;br /&gt;
&lt;br /&gt;
= Testing Your Connection =&lt;br /&gt;
&lt;br /&gt;
Log in with a blank password (press enter).  Now, make sure you can ping back to your desktop:&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
This tests the basic network connection.&lt;br /&gt;
&lt;br /&gt;
(Note that some systems like Vista, don't respond to ICMP ping by default) &lt;br /&gt;
&lt;br /&gt;
Or your router, for example (your IP will probably be different):&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.1.99&lt;br /&gt;
&lt;br /&gt;
Or to a Google IP:&lt;br /&gt;
&lt;br /&gt;
 ping 74.125.19.147&lt;br /&gt;
&lt;br /&gt;
This demonstrates that masquerading is working - your desktop is sending/receiving packets to the wider internet.&lt;br /&gt;
&lt;br /&gt;
= Make it Permanent =&lt;br /&gt;
&lt;br /&gt;
Based on [http://blog.haerwu.biz/2007/03/22/hotpluging-usbnet/ Hotplugging usbnet] by Marcin 'Hrw' Juszkiewicz.&lt;br /&gt;
&lt;br /&gt;
== Debian, Ubuntu and others ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/network/interfaces and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
        post-up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        post-up iptables -P FORWARD ACCEPT&lt;br /&gt;
        pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is more sophisticated than the manual setup.  The allow-hotplug stanza ties into Linux hotplug system so that when the device appears and vanishes, as happens when the FreeRunner's is connected via USB, this is run.  &lt;br /&gt;
&lt;br /&gt;
In addition, the desktop-side netmask is limited to a much smaller range, so that overlapping subnets are less of a problem - Linux will use more specific routes first when deciding where to send packets.&lt;br /&gt;
&lt;br /&gt;
An other possible configuration that adds DNS forward and removes&lt;br /&gt;
the iptable changes after the unplugg.&lt;br /&gt;
&lt;br /&gt;
in /etc/network/interfaces add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # freerunner&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up /etc/network/freerunner start&lt;br /&gt;
        pre-down /etc/network/freerunner stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create file /etc/network/freerunner&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # configures the freerunner for internet&lt;br /&gt;
 # &lt;br /&gt;
 # &lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 REMOTE_IPADDR=192.168.0.202&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
 # get first ip for dns&lt;br /&gt;
 DNSIP=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | head -n 1 )&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -A PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -A PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        &lt;br /&gt;
        if [ &amp;quot;$(cat /proc/sys/net/ipv4/ip_forward)&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
                echo &amp;quot;temoprarely allow ip_forward for openmoko&amp;quot; &amp;gt; /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  stop)&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -D PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -D PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d  $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
&lt;br /&gt;
        if [ -f /var/run/openmoko.ip_forward ]; then&lt;br /&gt;
                rm /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
 esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Issues ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu Feisty, Gutsy and Hardy reportedly have a bug where ifdown is not run when the interface is unplugged, meaning this only works once after the system is booted.  This is mentioned at https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/130437 &lt;br /&gt;
&lt;br /&gt;
One can patch /etc/udev/rules.d/85-ifupdown.rules, editing the two lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, DRIVERS==&amp;quot;?*&amp;quot;, GOTO=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 GOTO=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Bring devices up and down only if they're marked auto.&lt;br /&gt;
 # Use start-stop-daemon so we don't wait on dhcp&lt;br /&gt;
 ACTION==&amp;quot;add&amp;quot;,          RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ACTION==&amp;quot;remove&amp;quot;,       RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The bug is that the LABEL=&amp;quot;net_end&amp;quot; is at the wrong position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  This appears to be fixed in Ubuntu 8.04 [[User:Mattt|Mattt]] 11:38, 30 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Mandriva ==&lt;br /&gt;
&lt;br /&gt;
Tested with Mandriva 2008.1. The idea here is that we will carve out a small (8 hosts) subnet from the main subnet. So our netmask will be 255.255.255.252&lt;br /&gt;
&lt;br /&gt;
This first file configures the network system for the usb0 interface. Any time you plug in the FreeRunner the interface will be configured. &lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=static&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.252&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
 METRIC=10&lt;br /&gt;
 MII_NOT_SUPPORTED=no&lt;br /&gt;
 USERCTL=yes&lt;br /&gt;
&lt;br /&gt;
This next file configures the static routes that we need to communicate to the subnet. Since it has &amp;quot;usb0&amp;quot; in the name, the system will automatically apply these static routes any time that the usb0 interface is configured. (i.e. when you connect the FreeRunner)&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/usb0-routes:&lt;br /&gt;
&lt;br /&gt;
 ADDRESS0=192.168.0.200&lt;br /&gt;
 NETMASK0=255.255.255.252&lt;br /&gt;
&lt;br /&gt;
Now we need to restart the network system to pick up the changes.&lt;br /&gt;
&lt;br /&gt;
 service network restart&lt;br /&gt;
&lt;br /&gt;
== SuSE ==&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 STARTMODE=onboot&lt;br /&gt;
&lt;br /&gt;
For more information on getting USB networking up using YaST, see [[USB Networking with openSUSE]].&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
=== Option A - Tested with FC8 &amp;amp; FC5 ===&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 # from http://www.handhelds.org/moin/moin.cgi/UsbNet&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=none&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
&lt;br /&gt;
=== Option B ===&lt;br /&gt;
&lt;br /&gt;
This setup is probably over-complex:&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifup-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} up&lt;br /&gt;
 /sbin/ip addr add dev ${DEVICE} ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -I POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=1&lt;br /&gt;
 /sbin/iptables -I FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -I FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Set /etc/sysconfig/network-scripts/ifdown-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -D FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -D FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=0&lt;br /&gt;
 /sbin/iptables -D POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} down&lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
If you are using NetworkManager, restart it and enable the usb device from its menu, otherwise it will disable your connection shortly after you enable it.&lt;br /&gt;
&lt;br /&gt;
 /sbin/service NetworkManager restart&lt;br /&gt;
&lt;br /&gt;
== Red Hat or Similar (tested with Workstation 5) ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/sysconfig/network-scripts/net.hotplug:&lt;br /&gt;
&lt;br /&gt;
After this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    case $INTERFACE in&lt;br /&gt;
	# interfaces that are registered after being &amp;quot;up&amp;quot; (?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	usb0)&lt;br /&gt;
		ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
		route add 192.168.0.202 usb0&lt;br /&gt;
		iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
		iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
                iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
		exit 0&lt;br /&gt;
	;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
&lt;br /&gt;
Open /etc/conf.d/net and add:&lt;br /&gt;
&lt;br /&gt;
 # Neo&lt;br /&gt;
 config_usb0=( &amp;quot;192.168.0.200 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
 routes_usb0=( &amp;quot;192.168.0.202/32 via 192.168.0.200&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Create a new init script:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ln -s net.lo net.usb0&lt;br /&gt;
&lt;br /&gt;
Put iptables into use:&lt;br /&gt;
&lt;br /&gt;
 iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
 iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
Store them:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/iptables save&lt;br /&gt;
&lt;br /&gt;
If you want the routing by default:&lt;br /&gt;
&lt;br /&gt;
 rc-update add iptables default&lt;br /&gt;
&lt;br /&gt;
You must also inform the kernel, to start forwarding.  &lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
One way to automate all this is to create /etc/conf.d/net.usb0 as follows. It sets IP forwarding and the iptables rules all in one go. It removes the iptables rules and disables ip forwarding when the FreeRunner is unplugged.&lt;br /&gt;
 &lt;br /&gt;
 preup() {&lt;br /&gt;
        echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 postdown() {&lt;br /&gt;
        echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -D INPUT -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -D OUTPUT -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== MacOS X ==&lt;br /&gt;
See the [[MacOS_X#USB_Networking|USB Networking section in the MacOS X article]].&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
See the [[Neo1973_and_Windows#USB_Ethernet_emulation|USB Ethernet emulation section in the Neo1973 and Windows]] article.&lt;br /&gt;
&lt;br /&gt;
= More on DNS =&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
Instead of using the IP address, instead enter in your desktop's /etc/hosts:&lt;br /&gt;
&lt;br /&gt;
 192.168.0.202 openmoko&lt;br /&gt;
&lt;br /&gt;
Then instead type:&lt;br /&gt;
&lt;br /&gt;
 ssh root@openmoko&lt;br /&gt;
&lt;br /&gt;
== DNS proxying ==&lt;br /&gt;
&lt;br /&gt;
If you move about, making assumptions about the network may not be convenient, and it is possible to proxy DNS requests via your host laptop (which you are also taking with you).  There are a number of ways to do this:&lt;br /&gt;
&lt;br /&gt;
=== Proxying with dnrd ===&lt;br /&gt;
&lt;br /&gt;
The script is designed to use [http://dnrd.sourceforge.net/ dnrd] as the DNS proxy. The [http://buildhost.automated.it/gta01 script] and a copy of [http://buildhost.automated.it/dnrd-2.20.3.tar.gz dnrd] are available. The script also performs the initial setup of the connection as per the [[USB_Networking#Manual_method]] above.&lt;br /&gt;
&lt;br /&gt;
=== Proxying with a UDP forwarder ===&lt;br /&gt;
&lt;br /&gt;
Another easy setup is using a UDP forwarder like the one from http://www.tapor.com/udpf/ - use it with the command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 udpf-elf -p=53-f=`cat /etc/resolv.conf|awk '$1 == &amp;quot;nameserver&amp;quot;{print $2; exit(0);}'`:53&lt;br /&gt;
&lt;br /&gt;
=== Proxying with iptables ===&lt;br /&gt;
&lt;br /&gt;
It is possible to forward DNS requests with iptables using the DNAT target:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -A PREROUTING -p tcp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
 iptables -t nat -A PREROUTING -p udp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;tt&amp;gt;192.168.0.1&amp;lt;/tt&amp;gt; is the IP of your router. &lt;br /&gt;
&lt;br /&gt;
= SSH Extras =&lt;br /&gt;
&lt;br /&gt;
Reportedly, the ssh daemon (dropbear 0.49) on the FreeRunner appears to have a bug when sending the exit status back to the client. From time to time you receive an exit status of 255.&lt;br /&gt;
&lt;br /&gt;
To avoid ssh added a new line for every ssh host-key to you known_hosts you can add the following to the phone section in ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
  UserKnownHostsFile /dev/null&lt;br /&gt;
&lt;br /&gt;
You might want to use keys to bypass the login prompt too.&lt;br /&gt;
&lt;br /&gt;
== SSH Keys ==&lt;br /&gt;
&lt;br /&gt;
== From desktop to FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
To generate ssh keys for use as a login mechanism type:&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
When prompted for a password either hit enter for no password (''not really a good idea'') or enter a password for this key. ssh into the phone and create ~/.ssh:&lt;br /&gt;
&lt;br /&gt;
 # mkdir ~/.ssh&lt;br /&gt;
&lt;br /&gt;
Then from your desktop copy the '''.pub''' file to the phone.&lt;br /&gt;
&lt;br /&gt;
 # scp ~/.ssh/id_rsa.pub phone:.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
You should now be able to ssh directly into the phone without a password prompt.&lt;br /&gt;
&lt;br /&gt;
To disable password logins ('''after setting up key access''') edit /etc/init.d/dropbear and change the following line:&lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&amp;quot;-s&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You will need to restart dropbear for this to take effect.&lt;br /&gt;
&lt;br /&gt;
=== From FreeRunner to Desktop ===&lt;br /&gt;
&lt;br /&gt;
Generate the key:&lt;br /&gt;
&lt;br /&gt;
  dropbearkey -t rsa -f id_rsa&lt;br /&gt;
&lt;br /&gt;
The output will look something like this:&lt;br /&gt;
&lt;br /&gt;
  Will output 1024 bit rsa secret key to 'id_rsa'&lt;br /&gt;
  Generating key, this may take a while...&lt;br /&gt;
  Public key portion is:&lt;br /&gt;
  ssh-rsa AAAAB3Nza[...]&lt;br /&gt;
  Fingerprint: md5 ca:e8:f0:b7:f6:7b:c2:b6:b9:71:e4:45:86:a9:ff:b8&lt;br /&gt;
&lt;br /&gt;
Copy and paste the one line (in this example, starting with 'ssh-rsa' onto the end of the host's authorized_keys file (often in ~/.ssh/).&lt;br /&gt;
&lt;br /&gt;
From the phone, ssh with -i:&lt;br /&gt;
&lt;br /&gt;
  ssh -i id_rsa user@host&lt;br /&gt;
&lt;br /&gt;
=== Changing host keys ===&lt;br /&gt;
&lt;br /&gt;
If you reflash, your hosts keys will change.  Try this ~/.ssh/config snippet:&lt;br /&gt;
&lt;br /&gt;
 Host moko&lt;br /&gt;
 HostName 192.168.0.202&lt;br /&gt;
 StrictHostKeyChecking no&lt;br /&gt;
 UserKnownHostsFile /dev/null&lt;br /&gt;
 User root&lt;br /&gt;
&lt;br /&gt;
This is suggested because ssh on your desktop may complain if the key matching a certain IP changes (stored in .ssh/known_hosts).&lt;br /&gt;
&lt;br /&gt;
== GUI on desktop through SSH ==&lt;br /&gt;
&lt;br /&gt;
To get the GUI on the FreeRunner onto the desktop via USB, you can use ssh as follows:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root -X -v 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Using this, run openmoko-finger-demo for example, and it will open up on the desktop. To get landscape view, just resize the GUI window on the desktop.&lt;br /&gt;
&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to     &lt;br /&gt;
 autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in.&lt;br /&gt;
you need to set the DBUS_SESSION_BUS_ADDRESS environment variable to the value on the Freerunner before launching the process from your desktop.  You can find the value of this variable by using a command such as&lt;br /&gt;
 ps auxwwwwe | grep -m 1 DBUS_SESSION_BUS_ADDRESS&lt;br /&gt;
Note that you must run that command on the Freerunner.  Back on your desktop, run the process you want with the ''env'' command like this:&lt;br /&gt;
 env DBUS_SESSION_BUS_ADDRESS=''dbus_address'' ''process''&lt;br /&gt;
&lt;br /&gt;
==Display Remote Applications on FreeRunner==&lt;br /&gt;
&lt;br /&gt;
To get desktop apps to show up on your FreeRunner, first log in:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost +192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After this you can close the ssh session. Back on the desktop computer, run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=openmoko:0 xclock&lt;br /&gt;
&lt;br /&gt;
Note that the xhost command will allow remote applications on 192.168.0.200 to access the X server. It will allow anyone on the desktop machine to access the X server of the neo, including snooping anything you type on it. To disallow remote applications again, run this in the neo:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost -192.168.0.200&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
{{Languages|USB Networking}}&lt;br /&gt;
&lt;br /&gt;
[[Category:USB]]&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:Implemented]]&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/USB_Networking</id>
		<title>USB Networking</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/USB_Networking"/>
				<updated>2008-08-05T23:13:54Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: Merged DNS sections to one&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OpenMoko Networking Setup =&lt;br /&gt;
&lt;br /&gt;
In order to communicate via TCP/IP to your FreeRunner, a basic understanding of the networking expectations is required.  Each end of the USB connection forms a LAN (local area network) segment, with the FreeRunner's USB networking device at one end (default 192.168.0.202) and your laptop or desktop at the other end (192.168.0.200 in this guide).&lt;br /&gt;
&lt;br /&gt;
Normally, your desktop machine will know how to reach the Internet, having had its gateway (the IP address of the machine or device which knows how to send packets to machines beyond your subnet) configured via DHCP or statically (probably via a router).  For the FreeRunner to reach the Internet, your desktop will have to be configured to route and masquerade (NAT) packets from it.  &lt;br /&gt;
&lt;br /&gt;
Normally, none of this is an issue, but problems can arise when the subnet between the FreeRunner and your desktop overlap with the desktop to the router (which forms a second LAN), since your desktop might not know how to route traffic properly.&lt;br /&gt;
&lt;br /&gt;
= Simple Manual Linux Configuration =&lt;br /&gt;
&lt;br /&gt;
Try this first.  If it works, then you can add permanent configuration or use more sophisticated setups below:&lt;br /&gt;
&lt;br /&gt;
(as root on your desktop):&lt;br /&gt;
&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
 sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
 ifconfig usb0 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
If your Internet connection is also in the range 192.168.0.x then instead you might want to use:&lt;br /&gt;
&lt;br /&gt;
 ifconfig usb0 192.168.0.200 netmask 255.255.255.248&lt;br /&gt;
&lt;br /&gt;
Then (ideally, not as root):&lt;br /&gt;
&lt;br /&gt;
 ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
The default password is blank.&lt;br /&gt;
&lt;br /&gt;
= Linux Kernel Support =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your Linux desktop/laptop needs to have suitable support, in particular, you will need to have enabled full masquerading in the kernel and USB networking options:&lt;br /&gt;
&lt;br /&gt;
* CONFIG_USB_USBNET&lt;br /&gt;
* CONFIG_USB_NET_CDCETHER&lt;br /&gt;
&lt;br /&gt;
Recent Linux distributions (Ubuntu 8.04 Hardy Heron) support USB Networking out of the box.&lt;br /&gt;
&lt;br /&gt;
Both USB networking options are available in the ''Device Drivers -&amp;gt; USB support -&amp;gt; USB Network Adapters'' or ''Device Drivers -&amp;gt; Network Device Support -&amp;gt; USB Network Adapters -&amp;gt; Multipurpose USB Networking Framework''. For more info see the [http://www.linux-usb.org/usbnet/ usbnet driver homepage].&lt;br /&gt;
&lt;br /&gt;
It can be complex to set all the correct options for masquerading in the kernel if they are not turned on.  This could be detailed further.&lt;br /&gt;
&lt;br /&gt;
= Firewall Issues =&lt;br /&gt;
&lt;br /&gt;
On some systems, you may have firewall rules which prevent this working - such as added by the iptables service on Fedora.  You may care to stop these, and/or review any rules or policies you think might cause issues.&lt;br /&gt;
&lt;br /&gt;
The most relevant table is the nat table, which controls translation of addresses:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t nat -v -n&lt;br /&gt;
&lt;br /&gt;
Unless you have a special setup, you'll want to see only the MASQUERADE rule that you apply below, and ACCEPT as the default policy.  Also look at the filter table:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t filter -v -n&lt;br /&gt;
&lt;br /&gt;
If this contains anything in the FORWARD chain, then this may prevent passing packets.  It can be flushed with:&lt;br /&gt;
&lt;br /&gt;
 iptables -t filter -F FORWARD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DNS =&lt;br /&gt;
&lt;br /&gt;
In addition to routing issues, to be practical, DNS will need to work.  In some cases, you might already be running a DNS server on your desktop such as dnsmasq or bind9, which is the default assumption the FreeRunner makes.  In other cases, you'll need to configure DNS to that of your router, or a DNS server further out on the internet such as that provided by your ISP.&lt;br /&gt;
&lt;br /&gt;
== Configure DNS ==&lt;br /&gt;
&lt;br /&gt;
DNS is configured in /etc/resolv.conf on your FreeRunner.  It should contain:&lt;br /&gt;
&lt;br /&gt;
 nameserver 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
Which means that by default it expects your desktop to have a DNS server.  On some Linux and Windows systems this is true, especially those configured as servers, but in general it is not.  You can install packages such as ''bind9'' or ''dnsmasq''.   See the section below on [[USB Networking#More on DNS|More on DNS]] for other solutions.    &lt;br /&gt;
&lt;br /&gt;
Test if it works:&lt;br /&gt;
&lt;br /&gt;
 ping www.google.com&lt;br /&gt;
&lt;br /&gt;
If so, then this is sufficient for most internet access. But manual changes to resolv.conf are usually lost later if for example one uses DHCP, especially for WiFi, and so may not be convenient to configure manually.&lt;br /&gt;
&lt;br /&gt;
= Testing Your Connection =&lt;br /&gt;
&lt;br /&gt;
Log in with a blank password (press enter).  Now, make sure you can ping back to your desktop:&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
This tests the basic network connection.&lt;br /&gt;
&lt;br /&gt;
(Note that some systems like Vista, don't respond to ICMP ping by default) &lt;br /&gt;
&lt;br /&gt;
Or your router, for example (your IP will probably be different):&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.1.99&lt;br /&gt;
&lt;br /&gt;
Or to a Google IP:&lt;br /&gt;
&lt;br /&gt;
 ping 74.125.19.147&lt;br /&gt;
&lt;br /&gt;
This demonstrates that masquerading is working - your desktop is sending/receiving packets to the wider internet.&lt;br /&gt;
&lt;br /&gt;
= Make it Permanent =&lt;br /&gt;
&lt;br /&gt;
Based on [http://blog.haerwu.biz/2007/03/22/hotpluging-usbnet/ Hotplugging usbnet] by Marcin 'Hrw' Juszkiewicz.&lt;br /&gt;
&lt;br /&gt;
== Debian, Ubuntu and others ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/network/interfaces and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
        post-up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        post-up iptables -P FORWARD ACCEPT&lt;br /&gt;
        pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is more sophisticated than the manual setup.  The allow-hotplug stanza ties into Linux hotplug system so that when the device appears and vanishes, as happens when the FreeRunner's is connected via USB, this is run.  &lt;br /&gt;
&lt;br /&gt;
In addition, the desktop-side netmask is limited to a much smaller range, so that overlapping subnets are less of a problem - Linux will use more specific routes first when deciding where to send packets.&lt;br /&gt;
&lt;br /&gt;
An other possible configuration that adds DNS forward and removes&lt;br /&gt;
the iptable changes after the unplugg.&lt;br /&gt;
&lt;br /&gt;
in /etc/network/interfaces add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # freerunner&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up /etc/network/freerunner start&lt;br /&gt;
        pre-down /etc/network/freerunner stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create file /etc/network/freerunner&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # configures the freerunner for internet&lt;br /&gt;
 # &lt;br /&gt;
 # &lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 REMOTE_IPADDR=192.168.0.202&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
 # get first ip for dns&lt;br /&gt;
 DNSIP=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | head -n 1 )&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -A PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -A PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        &lt;br /&gt;
        if [ &amp;quot;$(cat /proc/sys/net/ipv4/ip_forward)&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
                echo &amp;quot;temoprarely allow ip_forward for openmoko&amp;quot; &amp;gt; /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  stop)&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -D PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -D PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d  $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
&lt;br /&gt;
        if [ -f /var/run/openmoko.ip_forward ]; then&lt;br /&gt;
                rm /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
 esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Issues ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu Feisty, Gutsy and Hardy reportedly have a bug where ifdown is not run when the interface is unplugged, meaning this only works once after the system is booted.  This is mentioned at https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/130437 &lt;br /&gt;
&lt;br /&gt;
One can patch /etc/udev/rules.d/85-ifupdown.rules, editing the two lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, DRIVERS==&amp;quot;?*&amp;quot;, GOTO=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 GOTO=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Bring devices up and down only if they're marked auto.&lt;br /&gt;
 # Use start-stop-daemon so we don't wait on dhcp&lt;br /&gt;
 ACTION==&amp;quot;add&amp;quot;,          RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ACTION==&amp;quot;remove&amp;quot;,       RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The bug is that the LABEL=&amp;quot;net_end&amp;quot; is at the wrong position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  This appears to be fixed in Ubuntu 8.04 [[User:Mattt|Mattt]] 11:38, 30 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Mandriva ==&lt;br /&gt;
&lt;br /&gt;
Tested with Mandriva 2008.1. The idea here is that we will carve out a small (8 hosts) subnet from the main subnet. So our netmask will be 255.255.255.252&lt;br /&gt;
&lt;br /&gt;
This first file configures the network system for the usb0 interface. Any time you plug in the FreeRunner the interface will be configured. &lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=static&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.252&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
 METRIC=10&lt;br /&gt;
 MII_NOT_SUPPORTED=no&lt;br /&gt;
 USERCTL=yes&lt;br /&gt;
&lt;br /&gt;
This next file configures the static routes that we need to communicate to the subnet. Since it has &amp;quot;usb0&amp;quot; in the name, the system will automatically apply these static routes any time that the usb0 interface is configured. (i.e. when you connect the FreeRunner)&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/usb0-routes:&lt;br /&gt;
&lt;br /&gt;
 ADDRESS0=192.168.0.200&lt;br /&gt;
 NETMASK0=255.255.255.252&lt;br /&gt;
&lt;br /&gt;
Now we need to restart the network system to pick up the changes.&lt;br /&gt;
&lt;br /&gt;
 service network restart&lt;br /&gt;
&lt;br /&gt;
== SuSE ==&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 STARTMODE=onboot&lt;br /&gt;
&lt;br /&gt;
For more information on getting USB networking up using YaST, see [[USB Networking with openSUSE]].&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
=== Option A - Tested with FC8 &amp;amp; FC5 ===&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 # from http://www.handhelds.org/moin/moin.cgi/UsbNet&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=none&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
&lt;br /&gt;
=== Option B ===&lt;br /&gt;
&lt;br /&gt;
This setup is probably over-complex:&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifup-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} up&lt;br /&gt;
 /sbin/ip addr add dev ${DEVICE} ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -I POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=1&lt;br /&gt;
 /sbin/iptables -I FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -I FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Set /etc/sysconfig/network-scripts/ifdown-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -D FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -D FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=0&lt;br /&gt;
 /sbin/iptables -D POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} down&lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
If you are using NetworkManager, restart it and enable the usb device from its menu, otherwise it will disable your connection shortly after you enable it.&lt;br /&gt;
&lt;br /&gt;
 /sbin/service NetworkManager restart&lt;br /&gt;
&lt;br /&gt;
== Red Hat or Similar (tested with Workstation 5) ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/sysconfig/network-scripts/net.hotplug:&lt;br /&gt;
&lt;br /&gt;
After this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    case $INTERFACE in&lt;br /&gt;
	# interfaces that are registered after being &amp;quot;up&amp;quot; (?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	usb0)&lt;br /&gt;
		ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
		route add 192.168.0.202 usb0&lt;br /&gt;
		iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
		iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
                iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
		exit 0&lt;br /&gt;
	;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
&lt;br /&gt;
Open /etc/conf.d/net and add:&lt;br /&gt;
&lt;br /&gt;
 # Neo&lt;br /&gt;
 config_usb0=( &amp;quot;192.168.0.200 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
 routes_usb0=( &amp;quot;192.168.0.202/32 via 192.168.0.200&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Create a new init script:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ln -s net.lo net.usb0&lt;br /&gt;
&lt;br /&gt;
Put iptables into use:&lt;br /&gt;
&lt;br /&gt;
 iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
 iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
Store them:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/iptables save&lt;br /&gt;
&lt;br /&gt;
If you want the routing by default:&lt;br /&gt;
&lt;br /&gt;
 rc-update add iptables default&lt;br /&gt;
&lt;br /&gt;
You must also inform the kernel, to start forwarding.  &lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
One way to automate all this is to create /etc/conf.d/net.usb0 as follows. It sets IP forwarding and the iptables rules all in one go. It removes the iptables rules and disables ip forwarding when the FreeRunner is unplugged.&lt;br /&gt;
 &lt;br /&gt;
 preup() {&lt;br /&gt;
        echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 postdown() {&lt;br /&gt;
        echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -D INPUT -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -D OUTPUT -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== MacOS X ==&lt;br /&gt;
See the [[MacOS_X#USB_Networking|USB Networking section in the MacOS X article]].&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
See the [[Neo1973_and_Windows#USB_Ethernet_emulation|USB Ethernet emulation section in the Neo1973 and Windows]] article.&lt;br /&gt;
&lt;br /&gt;
= More on DNS =&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
Instead of using the IP address, instead enter in your desktop's /etc/hosts:&lt;br /&gt;
&lt;br /&gt;
 192.168.0.202 openmoko&lt;br /&gt;
&lt;br /&gt;
Then instead type:&lt;br /&gt;
&lt;br /&gt;
 ssh root@openmoko&lt;br /&gt;
&lt;br /&gt;
== DNS proxying ==&lt;br /&gt;
&lt;br /&gt;
If you move about, making assumptions about the network may not be convenient, and it is possible to proxy DNS requests via your host laptop (which you are also taking with you).  There are a number of ways to do this:&lt;br /&gt;
&lt;br /&gt;
=== Proxying with dnrd ===&lt;br /&gt;
&lt;br /&gt;
The script is designed to use [http://dnrd.sourceforge.net/ dnrd] as the DNS proxy. The [http://buildhost.automated.it/gta01 script] and a copy of [http://buildhost.automated.it/dnrd-2.20.3.tar.gz dnrd] are available. The script also performs the initial setup of the connection as per the [[USB_Networking#Manual_method]] above.&lt;br /&gt;
&lt;br /&gt;
=== Proxying with a UDP forwarder ===&lt;br /&gt;
&lt;br /&gt;
Another easy setup is using a UDP forwarder like the one from http://www.tapor.com/udpf/ - use it with the command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 udpf-elf -p=53-f=`cat /etc/resolv.conf|awk '$1 == &amp;quot;nameserver&amp;quot;{print $2; exit(0);}'`:53&lt;br /&gt;
&lt;br /&gt;
=== Proxying with iptables ===&lt;br /&gt;
&lt;br /&gt;
It is possible to forward DNS requests with iptables using the DNAT target:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -A PREROUTING -p tcp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
 iptables -t nat -A PREROUTING -p udp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;tt&amp;gt;192.168.0.1&amp;lt;/tt&amp;gt; is the IP of your router. &lt;br /&gt;
&lt;br /&gt;
= SSH Extras =&lt;br /&gt;
&lt;br /&gt;
Reportedly, the ssh daemon (dropbear 0.49) on the FreeRunner appears to have a bug when sending the exit status back to the client. From time to time you receive an exit status of 255.&lt;br /&gt;
&lt;br /&gt;
To avoid ssh added a new line for every ssh host-key to you known_hosts you can add the following to the phone section in ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
  UserKnownHostsFile /dev/null&lt;br /&gt;
&lt;br /&gt;
You might want to use keys to bypass the login prompt too.&lt;br /&gt;
&lt;br /&gt;
== SSH Keys ==&lt;br /&gt;
&lt;br /&gt;
== From desktop to FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
To generate ssh keys for use as a login mechanism type:&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
When prompted for a password either hit enter for no password (''not really a good idea'') or enter a password for this key. ssh into the phone and create ~/.ssh:&lt;br /&gt;
&lt;br /&gt;
 # mkdir ~/.ssh&lt;br /&gt;
&lt;br /&gt;
Then from your desktop copy the '''.pub''' file to the phone.&lt;br /&gt;
&lt;br /&gt;
 # scp ~/.ssh/id_rsa.pub phone:.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
You should now be able to ssh directly into the phone without a password prompt.&lt;br /&gt;
&lt;br /&gt;
To disable password logins ('''after setting up key access''') edit /etc/init.d/dropbear and change the following line:&lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&amp;quot;-s&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You will need to restart dropbear for this to take effect.&lt;br /&gt;
&lt;br /&gt;
=== From FreeRunner to Desktop ===&lt;br /&gt;
&lt;br /&gt;
Generate the key:&lt;br /&gt;
&lt;br /&gt;
  dropbearkey -t rsa -f id_rsa&lt;br /&gt;
&lt;br /&gt;
The output will look something like this:&lt;br /&gt;
&lt;br /&gt;
  Will output 1024 bit rsa secret key to 'id_rsa'&lt;br /&gt;
  Generating key, this may take a while...&lt;br /&gt;
  Public key portion is:&lt;br /&gt;
  ssh-rsa AAAAB3Nza[...]&lt;br /&gt;
  Fingerprint: md5 ca:e8:f0:b7:f6:7b:c2:b6:b9:71:e4:45:86:a9:ff:b8&lt;br /&gt;
&lt;br /&gt;
Copy and paste the one line (in this example, starting with 'ssh-rsa' onto the end of the host's authorized_keys file (often in ~/.ssh/).&lt;br /&gt;
&lt;br /&gt;
From the phone, ssh with -i:&lt;br /&gt;
&lt;br /&gt;
  ssh -i id_rsa user@host&lt;br /&gt;
&lt;br /&gt;
=== Changing host keys ===&lt;br /&gt;
&lt;br /&gt;
If you reflash, your hosts keys will change.  Try this ~/.ssh/config snippet:&lt;br /&gt;
&lt;br /&gt;
 Host moko&lt;br /&gt;
 HostName 192.168.0.202&lt;br /&gt;
 StrictHostKeyChecking no&lt;br /&gt;
 UserKnownHostsFile /dev/null&lt;br /&gt;
 User root&lt;br /&gt;
&lt;br /&gt;
This is suggested because ssh on your desktop may complain if the key matching a certain IP changes (stored in .ssh/known_hosts).&lt;br /&gt;
&lt;br /&gt;
== GUI on desktop through SSH ==&lt;br /&gt;
&lt;br /&gt;
To get the GUI on the FreeRunner onto the desktop via USB, you can use ssh as follows:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root -X -v 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Using this, run openmoko-finger-demo for example, and it will open up on the desktop. To get landscape view, just resize the GUI window on the desktop.&lt;br /&gt;
&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to     &lt;br /&gt;
 autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in.&lt;br /&gt;
you need to set the DBUS_SESSION_BUS_ADDRESS environment variable to the value on the Freerunner before launching the process from your desktop.  You can find the value of this variable by using a command such as&lt;br /&gt;
 ps auxwwwwe | grep -m 1 DBUS_SESSION_BUS_ADDRESS&lt;br /&gt;
Note that you must run that command on the Freerunner.  Back on your desktop, run the process you want with the ''env'' command like this:&lt;br /&gt;
 env DBUS_SESSION_BUS_ADDRESS=''dbus_address'' ''process''&lt;br /&gt;
&lt;br /&gt;
==Display Remote Applications on FreeRunner==&lt;br /&gt;
&lt;br /&gt;
To get desktop apps to show up on your FreeRunner, first log in:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost +192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After this you can close the ssh session. Back on the desktop computer, run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=openmoko:0 xclock&lt;br /&gt;
&lt;br /&gt;
Note that the xhost command will allow remote applications on 192.168.0.200 to access the X server. It will allow anyone on the desktop machine to access the X server of the neo, including snooping anything you type on it. To disallow remote applications again, run this in the neo:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost -192.168.0.200&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
{{Languages|USB Networking}}&lt;br /&gt;
&lt;br /&gt;
[[Category:USB]]&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:Implemented]]&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/USB_Networking</id>
		<title>USB Networking</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/USB_Networking"/>
				<updated>2008-08-05T23:11:10Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: Changed order of the sections for having the shortcut for the happiness&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OpenMoko Networking Setup =&lt;br /&gt;
&lt;br /&gt;
In order to communicate via TCP/IP to your FreeRunner, a basic understanding of the networking expectations is required.  Each end of the USB connection forms a LAN (local area network) segment, with the FreeRunner's USB networking device at one end (default 192.168.0.202) and your laptop or desktop at the other end (192.168.0.200 in this guide).&lt;br /&gt;
&lt;br /&gt;
Normally, your desktop machine will know how to reach the Internet, having had its gateway (the IP address of the machine or device which knows how to send packets to machines beyond your subnet) configured via DHCP or statically (probably via a router).  For the FreeRunner to reach the Internet, your desktop will have to be configured to route and masquerade (NAT) packets from it.  &lt;br /&gt;
&lt;br /&gt;
Normally, none of this is an issue, but problems can arise when the subnet between the FreeRunner and your desktop overlap with the desktop to the router (which forms a second LAN), since your desktop might not know how to route traffic properly.&lt;br /&gt;
&lt;br /&gt;
= Simple Manual Linux Configuration =&lt;br /&gt;
&lt;br /&gt;
Try this first.  If it works, then you can add permanent configuration or use more sophisticated setups below:&lt;br /&gt;
&lt;br /&gt;
(as root on your desktop):&lt;br /&gt;
&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
 sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
 ifconfig usb0 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
If your Internet connection is also in the range 192.168.0.x then instead you might want to use:&lt;br /&gt;
&lt;br /&gt;
 ifconfig usb0 192.168.0.200 netmask 255.255.255.248&lt;br /&gt;
&lt;br /&gt;
Then (ideally, not as root):&lt;br /&gt;
&lt;br /&gt;
 ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
The default password is blank.&lt;br /&gt;
&lt;br /&gt;
= Linux Kernel Support =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your Linux desktop/laptop needs to have suitable support, in particular, you will need to have enabled full masquerading in the kernel and USB networking options:&lt;br /&gt;
&lt;br /&gt;
* CONFIG_USB_USBNET&lt;br /&gt;
* CONFIG_USB_NET_CDCETHER&lt;br /&gt;
&lt;br /&gt;
Recent Linux distributions (Ubuntu 8.04 Hardy Heron) support USB Networking out of the box.&lt;br /&gt;
&lt;br /&gt;
Both USB networking options are available in the ''Device Drivers -&amp;gt; USB support -&amp;gt; USB Network Adapters'' or ''Device Drivers -&amp;gt; Network Device Support -&amp;gt; USB Network Adapters -&amp;gt; Multipurpose USB Networking Framework''. For more info see the [http://www.linux-usb.org/usbnet/ usbnet driver homepage].&lt;br /&gt;
&lt;br /&gt;
It can be complex to set all the correct options for masquerading in the kernel if they are not turned on.  This could be detailed further.&lt;br /&gt;
&lt;br /&gt;
= Firewall Issues =&lt;br /&gt;
&lt;br /&gt;
On some systems, you may have firewall rules which prevent this working - such as added by the iptables service on Fedora.  You may care to stop these, and/or review any rules or policies you think might cause issues.&lt;br /&gt;
&lt;br /&gt;
The most relevant table is the nat table, which controls translation of addresses:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t nat -v -n&lt;br /&gt;
&lt;br /&gt;
Unless you have a special setup, you'll want to see only the MASQUERADE rule that you apply below, and ACCEPT as the default policy.  Also look at the filter table:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t filter -v -n&lt;br /&gt;
&lt;br /&gt;
If this contains anything in the FORWARD chain, then this may prevent passing packets.  It can be flushed with:&lt;br /&gt;
&lt;br /&gt;
 iptables -t filter -F FORWARD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= DNS =&lt;br /&gt;
&lt;br /&gt;
In addition to routing issues, to be practical, DNS will need to work.  In some cases, you might already be running a DNS server on your desktop such as dnsmasq or bind9, which is the default assumption the FreeRunner makes.  In other cases, you'll need to configure DNS to that of your router, or a DNS server further out on the internet such as that provided by your ISP.&lt;br /&gt;
&lt;br /&gt;
== Testing Your Connection ==&lt;br /&gt;
&lt;br /&gt;
Log in with a blank password (press enter).  Now, make sure you can ping back to your desktop:&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
This tests the basic network connection.&lt;br /&gt;
&lt;br /&gt;
(Note that some systems like Vista, don't respond to ICMP ping by default) &lt;br /&gt;
&lt;br /&gt;
Or your router, for example (your IP will probably be different):&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.1.99&lt;br /&gt;
&lt;br /&gt;
Or to a Google IP:&lt;br /&gt;
&lt;br /&gt;
 ping 74.125.19.147&lt;br /&gt;
&lt;br /&gt;
This demonstrates that masquerading is working - your desktop is sending/receiving packets to the wider internet.&lt;br /&gt;
&lt;br /&gt;
== Configure DNS ==&lt;br /&gt;
&lt;br /&gt;
Note that step won't help much if you don't have connectivity above.  DNS is configured in /etc/resolv.conf on your FreeRunner.  It should contain:&lt;br /&gt;
&lt;br /&gt;
 nameserver 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
Which means that by default it expects your desktop to have a DNS server.  On some Linux and Windows systems this is true, especially those configured as servers, but in general it is not.  You can install packages such as ''bind9'' or ''dnsmasq''.   See the section below on [[USB Networking#More on DNS|More on DNS]] for other solutions.    &lt;br /&gt;
&lt;br /&gt;
Test if it works:&lt;br /&gt;
&lt;br /&gt;
 ping www.google.com&lt;br /&gt;
&lt;br /&gt;
If so, then this is sufficient for most internet access. But manual changes to resolv.conf are usually lost later if for example one uses DHCP, especially for WiFi, and so may not be convenient to configure manually.&lt;br /&gt;
&lt;br /&gt;
= Make it Permanent =&lt;br /&gt;
&lt;br /&gt;
Based on [http://blog.haerwu.biz/2007/03/22/hotpluging-usbnet/ Hotplugging usbnet] by Marcin 'Hrw' Juszkiewicz.&lt;br /&gt;
&lt;br /&gt;
== Debian, Ubuntu and others ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/network/interfaces and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
        post-up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        post-up iptables -P FORWARD ACCEPT&lt;br /&gt;
        pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is more sophisticated than the manual setup.  The allow-hotplug stanza ties into Linux hotplug system so that when the device appears and vanishes, as happens when the FreeRunner's is connected via USB, this is run.  &lt;br /&gt;
&lt;br /&gt;
In addition, the desktop-side netmask is limited to a much smaller range, so that overlapping subnets are less of a problem - Linux will use more specific routes first when deciding where to send packets.&lt;br /&gt;
&lt;br /&gt;
An other possible configuration that adds DNS forward and removes&lt;br /&gt;
the iptable changes after the unplugg.&lt;br /&gt;
&lt;br /&gt;
in /etc/network/interfaces add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # freerunner&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up /etc/network/freerunner start&lt;br /&gt;
        pre-down /etc/network/freerunner stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create file /etc/network/freerunner&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # configures the freerunner for internet&lt;br /&gt;
 # &lt;br /&gt;
 # &lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 REMOTE_IPADDR=192.168.0.202&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
 # get first ip for dns&lt;br /&gt;
 DNSIP=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | head -n 1 )&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -A PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -A PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        &lt;br /&gt;
        if [ &amp;quot;$(cat /proc/sys/net/ipv4/ip_forward)&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
                echo &amp;quot;temoprarely allow ip_forward for openmoko&amp;quot; &amp;gt; /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  stop)&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -D PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -D PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d  $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
&lt;br /&gt;
        if [ -f /var/run/openmoko.ip_forward ]; then&lt;br /&gt;
                rm /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
 esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Issues ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu Feisty, Gutsy and Hardy reportedly have a bug where ifdown is not run when the interface is unplugged, meaning this only works once after the system is booted.  This is mentioned at https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/130437 &lt;br /&gt;
&lt;br /&gt;
One can patch /etc/udev/rules.d/85-ifupdown.rules, editing the two lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, DRIVERS==&amp;quot;?*&amp;quot;, GOTO=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 GOTO=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Bring devices up and down only if they're marked auto.&lt;br /&gt;
 # Use start-stop-daemon so we don't wait on dhcp&lt;br /&gt;
 ACTION==&amp;quot;add&amp;quot;,          RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ACTION==&amp;quot;remove&amp;quot;,       RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The bug is that the LABEL=&amp;quot;net_end&amp;quot; is at the wrong position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  This appears to be fixed in Ubuntu 8.04 [[User:Mattt|Mattt]] 11:38, 30 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Mandriva ==&lt;br /&gt;
&lt;br /&gt;
Tested with Mandriva 2008.1. The idea here is that we will carve out a small (8 hosts) subnet from the main subnet. So our netmask will be 255.255.255.252&lt;br /&gt;
&lt;br /&gt;
This first file configures the network system for the usb0 interface. Any time you plug in the FreeRunner the interface will be configured. &lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=static&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.252&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
 METRIC=10&lt;br /&gt;
 MII_NOT_SUPPORTED=no&lt;br /&gt;
 USERCTL=yes&lt;br /&gt;
&lt;br /&gt;
This next file configures the static routes that we need to communicate to the subnet. Since it has &amp;quot;usb0&amp;quot; in the name, the system will automatically apply these static routes any time that the usb0 interface is configured. (i.e. when you connect the FreeRunner)&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/usb0-routes:&lt;br /&gt;
&lt;br /&gt;
 ADDRESS0=192.168.0.200&lt;br /&gt;
 NETMASK0=255.255.255.252&lt;br /&gt;
&lt;br /&gt;
Now we need to restart the network system to pick up the changes.&lt;br /&gt;
&lt;br /&gt;
 service network restart&lt;br /&gt;
&lt;br /&gt;
== SuSE ==&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 STARTMODE=onboot&lt;br /&gt;
&lt;br /&gt;
For more information on getting USB networking up using YaST, see [[USB Networking with openSUSE]].&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
=== Option A - Tested with FC8 &amp;amp; FC5 ===&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 # from http://www.handhelds.org/moin/moin.cgi/UsbNet&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=none&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
&lt;br /&gt;
=== Option B ===&lt;br /&gt;
&lt;br /&gt;
This setup is probably over-complex:&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifup-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} up&lt;br /&gt;
 /sbin/ip addr add dev ${DEVICE} ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -I POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=1&lt;br /&gt;
 /sbin/iptables -I FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -I FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Set /etc/sysconfig/network-scripts/ifdown-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -D FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -D FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=0&lt;br /&gt;
 /sbin/iptables -D POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} down&lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
If you are using NetworkManager, restart it and enable the usb device from its menu, otherwise it will disable your connection shortly after you enable it.&lt;br /&gt;
&lt;br /&gt;
 /sbin/service NetworkManager restart&lt;br /&gt;
&lt;br /&gt;
== Red Hat or Similar (tested with Workstation 5) ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/sysconfig/network-scripts/net.hotplug:&lt;br /&gt;
&lt;br /&gt;
After this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    case $INTERFACE in&lt;br /&gt;
	# interfaces that are registered after being &amp;quot;up&amp;quot; (?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	usb0)&lt;br /&gt;
		ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
		route add 192.168.0.202 usb0&lt;br /&gt;
		iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
		iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
                iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
		exit 0&lt;br /&gt;
	;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
&lt;br /&gt;
Open /etc/conf.d/net and add:&lt;br /&gt;
&lt;br /&gt;
 # Neo&lt;br /&gt;
 config_usb0=( &amp;quot;192.168.0.200 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
 routes_usb0=( &amp;quot;192.168.0.202/32 via 192.168.0.200&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Create a new init script:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ln -s net.lo net.usb0&lt;br /&gt;
&lt;br /&gt;
Put iptables into use:&lt;br /&gt;
&lt;br /&gt;
 iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
 iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
Store them:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/iptables save&lt;br /&gt;
&lt;br /&gt;
If you want the routing by default:&lt;br /&gt;
&lt;br /&gt;
 rc-update add iptables default&lt;br /&gt;
&lt;br /&gt;
You must also inform the kernel, to start forwarding.  &lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
One way to automate all this is to create /etc/conf.d/net.usb0 as follows. It sets IP forwarding and the iptables rules all in one go. It removes the iptables rules and disables ip forwarding when the FreeRunner is unplugged.&lt;br /&gt;
 &lt;br /&gt;
 preup() {&lt;br /&gt;
        echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 postdown() {&lt;br /&gt;
        echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -D INPUT -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -D OUTPUT -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== MacOS X ==&lt;br /&gt;
See the [[MacOS_X#USB_Networking|USB Networking section in the MacOS X article]].&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
See the [[Neo1973_and_Windows#USB_Ethernet_emulation|USB Ethernet emulation section in the Neo1973 and Windows]] article.&lt;br /&gt;
&lt;br /&gt;
= More on DNS =&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
Instead of using the IP address, instead enter in your desktop's /etc/hosts:&lt;br /&gt;
&lt;br /&gt;
 192.168.0.202 openmoko&lt;br /&gt;
&lt;br /&gt;
Then instead type:&lt;br /&gt;
&lt;br /&gt;
 ssh root@openmoko&lt;br /&gt;
&lt;br /&gt;
== DNS proxying ==&lt;br /&gt;
&lt;br /&gt;
If you move about, making assumptions about the network may not be convenient, and it is possible to proxy DNS requests via your host laptop (which you are also taking with you).  There are a number of ways to do this:&lt;br /&gt;
&lt;br /&gt;
=== Proxying with dnrd ===&lt;br /&gt;
&lt;br /&gt;
The script is designed to use [http://dnrd.sourceforge.net/ dnrd] as the DNS proxy. The [http://buildhost.automated.it/gta01 script] and a copy of [http://buildhost.automated.it/dnrd-2.20.3.tar.gz dnrd] are available. The script also performs the initial setup of the connection as per the [[USB_Networking#Manual_method]] above.&lt;br /&gt;
&lt;br /&gt;
=== Proxying with a UDP forwarder ===&lt;br /&gt;
&lt;br /&gt;
Another easy setup is using a UDP forwarder like the one from http://www.tapor.com/udpf/ - use it with the command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 udpf-elf -p=53-f=`cat /etc/resolv.conf|awk '$1 == &amp;quot;nameserver&amp;quot;{print $2; exit(0);}'`:53&lt;br /&gt;
&lt;br /&gt;
=== Proxying with iptables ===&lt;br /&gt;
&lt;br /&gt;
It is possible to forward DNS requests with iptables using the DNAT target:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -A PREROUTING -p tcp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
 iptables -t nat -A PREROUTING -p udp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;tt&amp;gt;192.168.0.1&amp;lt;/tt&amp;gt; is the IP of your router. &lt;br /&gt;
&lt;br /&gt;
= SSH Extras =&lt;br /&gt;
&lt;br /&gt;
Reportedly, the ssh daemon (dropbear 0.49) on the FreeRunner appears to have a bug when sending the exit status back to the client. From time to time you receive an exit status of 255.&lt;br /&gt;
&lt;br /&gt;
To avoid ssh added a new line for every ssh host-key to you known_hosts you can add the following to the phone section in ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
  UserKnownHostsFile /dev/null&lt;br /&gt;
&lt;br /&gt;
You might want to use keys to bypass the login prompt too.&lt;br /&gt;
&lt;br /&gt;
== SSH Keys ==&lt;br /&gt;
&lt;br /&gt;
== From desktop to FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
To generate ssh keys for use as a login mechanism type:&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
When prompted for a password either hit enter for no password (''not really a good idea'') or enter a password for this key. ssh into the phone and create ~/.ssh:&lt;br /&gt;
&lt;br /&gt;
 # mkdir ~/.ssh&lt;br /&gt;
&lt;br /&gt;
Then from your desktop copy the '''.pub''' file to the phone.&lt;br /&gt;
&lt;br /&gt;
 # scp ~/.ssh/id_rsa.pub phone:.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
You should now be able to ssh directly into the phone without a password prompt.&lt;br /&gt;
&lt;br /&gt;
To disable password logins ('''after setting up key access''') edit /etc/init.d/dropbear and change the following line:&lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&amp;quot;-s&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You will need to restart dropbear for this to take effect.&lt;br /&gt;
&lt;br /&gt;
=== From FreeRunner to Desktop ===&lt;br /&gt;
&lt;br /&gt;
Generate the key:&lt;br /&gt;
&lt;br /&gt;
  dropbearkey -t rsa -f id_rsa&lt;br /&gt;
&lt;br /&gt;
The output will look something like this:&lt;br /&gt;
&lt;br /&gt;
  Will output 1024 bit rsa secret key to 'id_rsa'&lt;br /&gt;
  Generating key, this may take a while...&lt;br /&gt;
  Public key portion is:&lt;br /&gt;
  ssh-rsa AAAAB3Nza[...]&lt;br /&gt;
  Fingerprint: md5 ca:e8:f0:b7:f6:7b:c2:b6:b9:71:e4:45:86:a9:ff:b8&lt;br /&gt;
&lt;br /&gt;
Copy and paste the one line (in this example, starting with 'ssh-rsa' onto the end of the host's authorized_keys file (often in ~/.ssh/).&lt;br /&gt;
&lt;br /&gt;
From the phone, ssh with -i:&lt;br /&gt;
&lt;br /&gt;
  ssh -i id_rsa user@host&lt;br /&gt;
&lt;br /&gt;
=== Changing host keys ===&lt;br /&gt;
&lt;br /&gt;
If you reflash, your hosts keys will change.  Try this ~/.ssh/config snippet:&lt;br /&gt;
&lt;br /&gt;
 Host moko&lt;br /&gt;
 HostName 192.168.0.202&lt;br /&gt;
 StrictHostKeyChecking no&lt;br /&gt;
 UserKnownHostsFile /dev/null&lt;br /&gt;
 User root&lt;br /&gt;
&lt;br /&gt;
This is suggested because ssh on your desktop may complain if the key matching a certain IP changes (stored in .ssh/known_hosts).&lt;br /&gt;
&lt;br /&gt;
== GUI on desktop through SSH ==&lt;br /&gt;
&lt;br /&gt;
To get the GUI on the FreeRunner onto the desktop via USB, you can use ssh as follows:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root -X -v 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Using this, run openmoko-finger-demo for example, and it will open up on the desktop. To get landscape view, just resize the GUI window on the desktop.&lt;br /&gt;
&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to     &lt;br /&gt;
 autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in.&lt;br /&gt;
you need to set the DBUS_SESSION_BUS_ADDRESS environment variable to the value on the Freerunner before launching the process from your desktop.  You can find the value of this variable by using a command such as&lt;br /&gt;
 ps auxwwwwe | grep -m 1 DBUS_SESSION_BUS_ADDRESS&lt;br /&gt;
Note that you must run that command on the Freerunner.  Back on your desktop, run the process you want with the ''env'' command like this:&lt;br /&gt;
 env DBUS_SESSION_BUS_ADDRESS=''dbus_address'' ''process''&lt;br /&gt;
&lt;br /&gt;
==Display Remote Applications on FreeRunner==&lt;br /&gt;
&lt;br /&gt;
To get desktop apps to show up on your FreeRunner, first log in:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost +192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After this you can close the ssh session. Back on the desktop computer, run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=openmoko:0 xclock&lt;br /&gt;
&lt;br /&gt;
Note that the xhost command will allow remote applications on 192.168.0.200 to access the X server. It will allow anyone on the desktop machine to access the X server of the neo, including snooping anything you type on it. To disallow remote applications again, run this in the neo:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost -192.168.0.200&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
{{Languages|USB Networking}}&lt;br /&gt;
&lt;br /&gt;
[[Category:USB]]&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:Implemented]]&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/USB_Networking</id>
		<title>USB Networking</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/USB_Networking"/>
				<updated>2008-08-05T23:07:28Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Linux Kernel Support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OpenMoko Networking Setup =&lt;br /&gt;
&lt;br /&gt;
In order to communicate via TCP/IP to your FreeRunner, a basic understanding of the networking expectations is required.  Each end of the USB connection forms a LAN (local area network) segment, with the FreeRunner's USB networking device at one end (default 192.168.0.202) and your laptop or desktop at the other end (192.168.0.200 in this guide).&lt;br /&gt;
&lt;br /&gt;
Normally, your desktop machine will know how to reach the Internet, having had its gateway (the IP address of the machine or device which knows how to send packets to machines beyond your subnet) configured via DHCP or statically (probably via a router).  For the FreeRunner to reach the Internet, your desktop will have to be configured to route and masquerade (NAT) packets from it.  &lt;br /&gt;
&lt;br /&gt;
Normally, none of this is an issue, but problems can arise when the subnet between the FreeRunner and your desktop overlap with the desktop to the router (which forms a second LAN), since your desktop might not know how to route traffic properly.&lt;br /&gt;
&lt;br /&gt;
= DNS =&lt;br /&gt;
&lt;br /&gt;
In addition to routing issues, to be practical, DNS will need to work.  In some cases, you might already be running a DNS server on your desktop such as dnsmasq or bind9, which is the default assumption the FreeRunner makes.  In other cases, you'll need to configure DNS to that of your router, or a DNS server further out on the internet such as that provided by your ISP.&lt;br /&gt;
&lt;br /&gt;
= Linux Kernel Support =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your Linux desktop/laptop needs to have suitable support, in particular, you will need to have enabled full masquerading in the kernel and USB networking options:&lt;br /&gt;
&lt;br /&gt;
* CONFIG_USB_USBNET&lt;br /&gt;
* CONFIG_USB_NET_CDCETHER&lt;br /&gt;
&lt;br /&gt;
Recent Linux distributions (Ubuntu 8.04 Hardy Heron) support USB Networking out of the box.&lt;br /&gt;
&lt;br /&gt;
Both USB networking options are available in the ''Device Drivers -&amp;gt; USB support -&amp;gt; USB Network Adapters'' or ''Device Drivers -&amp;gt; Network Device Support -&amp;gt; USB Network Adapters -&amp;gt; Multipurpose USB Networking Framework''. For more info see the [http://www.linux-usb.org/usbnet/ usbnet driver homepage].&lt;br /&gt;
&lt;br /&gt;
It can be complex to set all the correct options for masquerading in the kernel if they are not turned on.  This could be detailed further.&lt;br /&gt;
&lt;br /&gt;
= Firewall Issues =&lt;br /&gt;
&lt;br /&gt;
On some systems, you may have firewall rules which prevent this working - such as added by the iptables service on Fedora.  You may care to stop these, and/or review any rules or policies you think might cause issues.&lt;br /&gt;
&lt;br /&gt;
The most relevant table is the nat table, which controls translation of addresses:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t nat -v -n&lt;br /&gt;
&lt;br /&gt;
Unless you have a special setup, you'll want to see only the MASQUERADE rule that you apply below, and ACCEPT as the default policy.  Also look at the filter table:&lt;br /&gt;
&lt;br /&gt;
 iptables -L -t filter -v -n&lt;br /&gt;
&lt;br /&gt;
If this contains anything in the FORWARD chain, then this may prevent passing packets.  It can be flushed with:&lt;br /&gt;
&lt;br /&gt;
 iptables -t filter -F FORWARD&lt;br /&gt;
&lt;br /&gt;
= Simple Manual Linux Configuration =&lt;br /&gt;
&lt;br /&gt;
Try this first.  If it works, then you can add permanent configuration or use more sophisticated setups below:&lt;br /&gt;
&lt;br /&gt;
(as root on your desktop):&lt;br /&gt;
&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
 sysctl -w net.ipv4.ip_forward=1&lt;br /&gt;
 ifconfig usb0 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
If your Internet connection is also in the range 192.168.0.x then instead you might want to use:&lt;br /&gt;
&lt;br /&gt;
 ifconfig usb0 192.168.0.200 netmask 255.255.255.248&lt;br /&gt;
&lt;br /&gt;
Then (ideally, not as root):&lt;br /&gt;
&lt;br /&gt;
 ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
== Testing Your Connection ==&lt;br /&gt;
&lt;br /&gt;
Log in with a blank password (press enter).  Now, make sure you can ping back to your desktop:&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
This tests the basic network connection.&lt;br /&gt;
&lt;br /&gt;
(Note that some systems like Vista, don't respond to ICMP ping by default) &lt;br /&gt;
&lt;br /&gt;
Or your router, for example (your IP will probably be different):&lt;br /&gt;
&lt;br /&gt;
 ping 192.168.1.99&lt;br /&gt;
&lt;br /&gt;
Or to a Google IP:&lt;br /&gt;
&lt;br /&gt;
 ping 74.125.19.147&lt;br /&gt;
&lt;br /&gt;
This demonstrates that masquerading is working - your desktop is sending/receiving packets to the wider internet.&lt;br /&gt;
&lt;br /&gt;
== Configure DNS ==&lt;br /&gt;
&lt;br /&gt;
Note that step won't help much if you don't have connectivity above.  DNS is configured in /etc/resolv.conf on your FreeRunner.  It should contain:&lt;br /&gt;
&lt;br /&gt;
 nameserver 192.168.0.200&lt;br /&gt;
&lt;br /&gt;
Which means that by default it expects your desktop to have a DNS server.  On some Linux and Windows systems this is true, especially those configured as servers, but in general it is not.  You can install packages such as ''bind9'' or ''dnsmasq''.   See the section below on [[USB Networking#More on DNS|More on DNS]] for other solutions.    &lt;br /&gt;
&lt;br /&gt;
Test if it works:&lt;br /&gt;
&lt;br /&gt;
 ping www.google.com&lt;br /&gt;
&lt;br /&gt;
If so, then this is sufficient for most internet access. But manual changes to resolv.conf are usually lost later if for example one uses DHCP, especially for WiFi, and so may not be convenient to configure manually.&lt;br /&gt;
&lt;br /&gt;
= Make it Permanent =&lt;br /&gt;
&lt;br /&gt;
Based on [http://blog.haerwu.biz/2007/03/22/hotpluging-usbnet/ Hotplugging usbnet] by Marcin 'Hrw' Juszkiewicz.&lt;br /&gt;
&lt;br /&gt;
== Debian, Ubuntu and others ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/network/interfaces and add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
        post-up echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        post-up iptables -P FORWARD ACCEPT&lt;br /&gt;
        pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.192/26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is more sophisticated than the manual setup.  The allow-hotplug stanza ties into Linux hotplug system so that when the device appears and vanishes, as happens when the FreeRunner's is connected via USB, this is run.  &lt;br /&gt;
&lt;br /&gt;
In addition, the desktop-side netmask is limited to a much smaller range, so that overlapping subnets are less of a problem - Linux will use more specific routes first when deciding where to send packets.&lt;br /&gt;
&lt;br /&gt;
An other possible configuration that adds DNS forward and removes&lt;br /&gt;
the iptable changes after the unplugg.&lt;br /&gt;
&lt;br /&gt;
in /etc/network/interfaces add&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # freerunner&lt;br /&gt;
 allow-hotplug usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
        address 192.168.0.200&lt;br /&gt;
        netmask 255.255.255.192&lt;br /&gt;
        post-up /etc/network/freerunner start&lt;br /&gt;
        pre-down /etc/network/freerunner stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create file /etc/network/freerunner&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # configures the freerunner for internet&lt;br /&gt;
 # &lt;br /&gt;
 # &lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 REMOTE_IPADDR=192.168.0.202&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
 # get first ip for dns&lt;br /&gt;
 DNSIP=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | head -n 1 )&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  start)&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -A PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -A PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        &lt;br /&gt;
        if [ &amp;quot;$(cat /proc/sys/net/ipv4/ip_forward)&amp;quot; = &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
                echo &amp;quot;temoprarely allow ip_forward for openmoko&amp;quot; &amp;gt; /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  stop)&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s $REMOTE_IPADDR&lt;br /&gt;
        iptables -D PREROUTING -t nat -p tcp -s $REMOTE_IPADDR -d $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
        iptables -D PREROUTING -t nat -p udp -s $REMOTE_IPADDR -d  $IPADDR --dport domain -j DNAT --to-destination $DNSIP&lt;br /&gt;
&lt;br /&gt;
        if [ -f /var/run/openmoko.ip_forward ]; then&lt;br /&gt;
                rm /var/run/openmoko.ip_forward&lt;br /&gt;
                echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
 esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Issues ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu Feisty, Gutsy and Hardy reportedly have a bug where ifdown is not run when the interface is unplugged, meaning this only works once after the system is booted.  This is mentioned at https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/130437 &lt;br /&gt;
&lt;br /&gt;
One can patch /etc/udev/rules.d/85-ifupdown.rules, editing the two lines at the end of the file:&lt;br /&gt;
&lt;br /&gt;
 SUBSYSTEM==&amp;quot;net&amp;quot;, DRIVERS==&amp;quot;?*&amp;quot;, GOTO=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 GOTO=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_start&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Bring devices up and down only if they're marked auto.&lt;br /&gt;
 # Use start-stop-daemon so we don't wait on dhcp&lt;br /&gt;
 ACTION==&amp;quot;add&amp;quot;,          RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifup -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 LABEL=&amp;quot;net_end&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ACTION==&amp;quot;remove&amp;quot;,       RUN+=&amp;quot;/sbin/start-stop-daemon --start --background --pidfile /var/run/network/bogus --startas /sbin/ifdown -- --allow auto $env{INTERFACE}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The bug is that the LABEL=&amp;quot;net_end&amp;quot; is at the wrong position&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  This appears to be fixed in Ubuntu 8.04 [[User:Mattt|Mattt]] 11:38, 30 July 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Mandriva ==&lt;br /&gt;
&lt;br /&gt;
Tested with Mandriva 2008.1. The idea here is that we will carve out a small (8 hosts) subnet from the main subnet. So our netmask will be 255.255.255.252&lt;br /&gt;
&lt;br /&gt;
This first file configures the network system for the usb0 interface. Any time you plug in the FreeRunner the interface will be configured. &lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=static&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.252&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
 METRIC=10&lt;br /&gt;
 MII_NOT_SUPPORTED=no&lt;br /&gt;
 USERCTL=yes&lt;br /&gt;
&lt;br /&gt;
This next file configures the static routes that we need to communicate to the subnet. Since it has &amp;quot;usb0&amp;quot; in the name, the system will automatically apply these static routes any time that the usb0 interface is configured. (i.e. when you connect the FreeRunner)&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/usb0-routes:&lt;br /&gt;
&lt;br /&gt;
 ADDRESS0=192.168.0.200&lt;br /&gt;
 NETMASK0=255.255.255.252&lt;br /&gt;
&lt;br /&gt;
Now we need to restart the network system to pick up the changes.&lt;br /&gt;
&lt;br /&gt;
 service network restart&lt;br /&gt;
&lt;br /&gt;
== SuSE ==&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 STARTMODE=onboot&lt;br /&gt;
&lt;br /&gt;
For more information on getting USB networking up using YaST, see [[USB Networking with openSUSE]].&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
&lt;br /&gt;
=== Option A - Tested with FC8 &amp;amp; FC5 ===&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 # USB configuration for PDAs (openmoko)&lt;br /&gt;
 # from http://www.handhelds.org/moin/moin.cgi/UsbNet&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 BOOTPROTO=none&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
 ONBOOT=yes&lt;br /&gt;
&lt;br /&gt;
=== Option B ===&lt;br /&gt;
&lt;br /&gt;
This setup is probably over-complex:&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-usb0:&lt;br /&gt;
&lt;br /&gt;
 DEVICE=usb0&lt;br /&gt;
 IPADDR=192.168.0.200&lt;br /&gt;
 NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
/etc/sysconfig/network-scripts/ifup-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} up&lt;br /&gt;
 /sbin/ip addr add dev ${DEVICE} ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -I POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=1&lt;br /&gt;
 /sbin/iptables -I FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -I FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Set /etc/sysconfig/network-scripts/ifdown-usb:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 . /etc/init.d/functions&lt;br /&gt;
 &lt;br /&gt;
 cd /etc/sysconfig/network-scripts&lt;br /&gt;
 . ./network-functions&lt;br /&gt;
 &lt;br /&gt;
 [ -f ../network ] &amp;amp;&amp;amp; . ../network&lt;br /&gt;
 &lt;br /&gt;
 CONFIG=${1}&lt;br /&gt;
 &lt;br /&gt;
 need_config ${CONFIG}&lt;br /&gt;
 &lt;br /&gt;
 source_config&lt;br /&gt;
 &lt;br /&gt;
 NETBITS=`ipcalc -p ${IPADDR} ${NETMASK} | awk -F'=' '{print $2;}'`&lt;br /&gt;
 &lt;br /&gt;
 /sbin/iptables -D FORWARD -d ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/iptables -D FORWARD -s ${IPADDR}/${NETBITS} -j ACCEPT&lt;br /&gt;
 /sbin/sysctl net.ipv4.ip_forward=0&lt;br /&gt;
 /sbin/iptables -D POSTROUTING -t nat -j MASQUERADE -s ${IPADDR}/${NETBITS}&lt;br /&gt;
 &lt;br /&gt;
 /sbin/ip link set dev ${DEVICE} down&lt;br /&gt;
 /sbin/ip addr flush dev ${DEVICE} 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
If you are using NetworkManager, restart it and enable the usb device from its menu, otherwise it will disable your connection shortly after you enable it.&lt;br /&gt;
&lt;br /&gt;
 /sbin/service NetworkManager restart&lt;br /&gt;
&lt;br /&gt;
== Red Hat or Similar (tested with Workstation 5) ==&lt;br /&gt;
&lt;br /&gt;
Edit /etc/sysconfig/network-scripts/net.hotplug:&lt;br /&gt;
&lt;br /&gt;
After this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    case $INTERFACE in&lt;br /&gt;
	# interfaces that are registered after being &amp;quot;up&amp;quot; (?)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	usb0)&lt;br /&gt;
		ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
		route add 192.168.0.202 usb0&lt;br /&gt;
		iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
		iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
                iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
                echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
		exit 0&lt;br /&gt;
	;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gentoo ==&lt;br /&gt;
&lt;br /&gt;
Open /etc/conf.d/net and add:&lt;br /&gt;
&lt;br /&gt;
 # Neo&lt;br /&gt;
 config_usb0=( &amp;quot;192.168.0.200 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
 routes_usb0=( &amp;quot;192.168.0.202/32 via 192.168.0.200&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Create a new init script:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/init.d&lt;br /&gt;
 ln -s net.lo net.usb0&lt;br /&gt;
&lt;br /&gt;
Put iptables into use:&lt;br /&gt;
&lt;br /&gt;
 iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
 iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
 iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
&lt;br /&gt;
Store them:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/iptables save&lt;br /&gt;
&lt;br /&gt;
If you want the routing by default:&lt;br /&gt;
&lt;br /&gt;
 rc-update add iptables default&lt;br /&gt;
&lt;br /&gt;
You must also inform the kernel, to start forwarding.  &lt;br /&gt;
&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
One way to automate all this is to create /etc/conf.d/net.usb0 as follows. It sets IP forwarding and the iptables rules all in one go. It removes the iptables rules and disables ip forwarding when the FreeRunner is unplugged.&lt;br /&gt;
 &lt;br /&gt;
 preup() {&lt;br /&gt;
        echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -I INPUT 1 -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -I OUTPUT 1 -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 postdown() {&lt;br /&gt;
        echo 0 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
        iptables -D INPUT -s 192.168.0.202 -j ACCEPT&lt;br /&gt;
        iptables -D OUTPUT -s 192.168.0.200 -j ACCEPT&lt;br /&gt;
        iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24&lt;br /&gt;
        return 0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== MacOS X ==&lt;br /&gt;
See the [[MacOS_X#USB_Networking|USB Networking section in the MacOS X article]].&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
See the [[Neo1973_and_Windows#USB_Ethernet_emulation|USB Ethernet emulation section in the Neo1973 and Windows]] article.&lt;br /&gt;
&lt;br /&gt;
= More on DNS =&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
Instead of using the IP address, instead enter in your desktop's /etc/hosts:&lt;br /&gt;
&lt;br /&gt;
 192.168.0.202 openmoko&lt;br /&gt;
&lt;br /&gt;
Then instead type:&lt;br /&gt;
&lt;br /&gt;
 ssh root@openmoko&lt;br /&gt;
&lt;br /&gt;
== DNS proxying ==&lt;br /&gt;
&lt;br /&gt;
If you move about, making assumptions about the network may not be convenient, and it is possible to proxy DNS requests via your host laptop (which you are also taking with you).  There are a number of ways to do this:&lt;br /&gt;
&lt;br /&gt;
=== Proxying with dnrd ===&lt;br /&gt;
&lt;br /&gt;
The script is designed to use [http://dnrd.sourceforge.net/ dnrd] as the DNS proxy. The [http://buildhost.automated.it/gta01 script] and a copy of [http://buildhost.automated.it/dnrd-2.20.3.tar.gz dnrd] are available. The script also performs the initial setup of the connection as per the [[USB_Networking#Manual_method]] above.&lt;br /&gt;
&lt;br /&gt;
=== Proxying with a UDP forwarder ===&lt;br /&gt;
&lt;br /&gt;
Another easy setup is using a UDP forwarder like the one from http://www.tapor.com/udpf/ - use it with the command&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 udpf-elf -p=53-f=`cat /etc/resolv.conf|awk '$1 == &amp;quot;nameserver&amp;quot;{print $2; exit(0);}'`:53&lt;br /&gt;
&lt;br /&gt;
=== Proxying with iptables ===&lt;br /&gt;
&lt;br /&gt;
It is possible to forward DNS requests with iptables using the DNAT target:&lt;br /&gt;
&lt;br /&gt;
 iptables -t nat -A PREROUTING -p tcp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
 iptables -t nat -A PREROUTING -p udp -s 192.168.0.202 -d 192.168.0.200 --dport domain -j DNAT --to-destination 192.168.0.1&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;tt&amp;gt;192.168.0.1&amp;lt;/tt&amp;gt; is the IP of your router. &lt;br /&gt;
&lt;br /&gt;
= SSH Extras =&lt;br /&gt;
&lt;br /&gt;
Reportedly, the ssh daemon (dropbear 0.49) on the FreeRunner appears to have a bug when sending the exit status back to the client. From time to time you receive an exit status of 255.&lt;br /&gt;
&lt;br /&gt;
To avoid ssh added a new line for every ssh host-key to you known_hosts you can add the following to the phone section in ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
  UserKnownHostsFile /dev/null&lt;br /&gt;
&lt;br /&gt;
You might want to use keys to bypass the login prompt too.&lt;br /&gt;
&lt;br /&gt;
== SSH Keys ==&lt;br /&gt;
&lt;br /&gt;
== From desktop to FreeRunner ==&lt;br /&gt;
&lt;br /&gt;
To generate ssh keys for use as a login mechanism type:&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
When prompted for a password either hit enter for no password (''not really a good idea'') or enter a password for this key. ssh into the phone and create ~/.ssh:&lt;br /&gt;
&lt;br /&gt;
 # mkdir ~/.ssh&lt;br /&gt;
&lt;br /&gt;
Then from your desktop copy the '''.pub''' file to the phone.&lt;br /&gt;
&lt;br /&gt;
 # scp ~/.ssh/id_rsa.pub phone:.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
You should now be able to ssh directly into the phone without a password prompt.&lt;br /&gt;
&lt;br /&gt;
To disable password logins ('''after setting up key access''') edit /etc/init.d/dropbear and change the following line:&lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 DROPBEAR_EXTRA_ARGS=&amp;quot;-s&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You will need to restart dropbear for this to take effect.&lt;br /&gt;
&lt;br /&gt;
=== From FreeRunner to Desktop ===&lt;br /&gt;
&lt;br /&gt;
Generate the key:&lt;br /&gt;
&lt;br /&gt;
  dropbearkey -t rsa -f id_rsa&lt;br /&gt;
&lt;br /&gt;
The output will look something like this:&lt;br /&gt;
&lt;br /&gt;
  Will output 1024 bit rsa secret key to 'id_rsa'&lt;br /&gt;
  Generating key, this may take a while...&lt;br /&gt;
  Public key portion is:&lt;br /&gt;
  ssh-rsa AAAAB3Nza[...]&lt;br /&gt;
  Fingerprint: md5 ca:e8:f0:b7:f6:7b:c2:b6:b9:71:e4:45:86:a9:ff:b8&lt;br /&gt;
&lt;br /&gt;
Copy and paste the one line (in this example, starting with 'ssh-rsa' onto the end of the host's authorized_keys file (often in ~/.ssh/).&lt;br /&gt;
&lt;br /&gt;
From the phone, ssh with -i:&lt;br /&gt;
&lt;br /&gt;
  ssh -i id_rsa user@host&lt;br /&gt;
&lt;br /&gt;
=== Changing host keys ===&lt;br /&gt;
&lt;br /&gt;
If you reflash, your hosts keys will change.  Try this ~/.ssh/config snippet:&lt;br /&gt;
&lt;br /&gt;
 Host moko&lt;br /&gt;
 HostName 192.168.0.202&lt;br /&gt;
 StrictHostKeyChecking no&lt;br /&gt;
 UserKnownHostsFile /dev/null&lt;br /&gt;
 User root&lt;br /&gt;
&lt;br /&gt;
This is suggested because ssh on your desktop may complain if the key matching a certain IP changes (stored in .ssh/known_hosts).&lt;br /&gt;
&lt;br /&gt;
== GUI on desktop through SSH ==&lt;br /&gt;
&lt;br /&gt;
To get the GUI on the FreeRunner onto the desktop via USB, you can use ssh as follows:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root -X -v 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Using this, run openmoko-finger-demo for example, and it will open up on the desktop. To get landscape view, just resize the GUI window on the desktop.&lt;br /&gt;
&lt;br /&gt;
If you get an error like this:&lt;br /&gt;
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to     &lt;br /&gt;
 autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in.&lt;br /&gt;
you need to set the DBUS_SESSION_BUS_ADDRESS environment variable to the value on the Freerunner before launching the process from your desktop.  You can find the value of this variable by using a command such as&lt;br /&gt;
 ps auxwwwwe | grep -m 1 DBUS_SESSION_BUS_ADDRESS&lt;br /&gt;
Note that you must run that command on the Freerunner.  Back on your desktop, run the process you want with the ''env'' command like this:&lt;br /&gt;
 env DBUS_SESSION_BUS_ADDRESS=''dbus_address'' ''process''&lt;br /&gt;
&lt;br /&gt;
==Display Remote Applications on FreeRunner==&lt;br /&gt;
&lt;br /&gt;
To get desktop apps to show up on your FreeRunner, first log in:&lt;br /&gt;
&lt;br /&gt;
  ssh -l root 192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost +192.168.0.200&lt;br /&gt;
&lt;br /&gt;
After this you can close the ssh session. Back on the desktop computer, run:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=openmoko:0 xclock&lt;br /&gt;
&lt;br /&gt;
Note that the xhost command will allow remote applications on 192.168.0.200 to access the X server. It will allow anyone on the desktop machine to access the X server of the neo, including snooping anything you type on it. To disallow remote applications again, run this in the neo:&lt;br /&gt;
&lt;br /&gt;
  DISPLAY=:0 xhost -192.168.0.200&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &lt;br /&gt;
{{Languages|USB Networking}}&lt;br /&gt;
&lt;br /&gt;
[[Category:USB]]&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[Category:Implemented]]&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_Started_with_your_Neo_FreeRunner</id>
		<title>Getting Started with your Neo FreeRunner</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_Started_with_your_Neo_FreeRunner"/>
				<updated>2008-08-05T23:06:17Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: Clarified the section so that it explains why this is needed (prerequisitement for SSH'ing into the phone)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Getting Started with your Neo FreeRunner}}&lt;br /&gt;
{{Gta02menu}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellspacing=&amp;quot;2&amp;quot; cellpadding=&amp;quot;2&amp;quot; style=&amp;quot;padding: 0%; margin:0em 0em 1em 0em; background:#eeeeee; width:100%;floating=&amp;quot;center&amp;quot;; &amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc; width:75% &amp;quot; |  &lt;br /&gt;
 &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
Thank you for purchasing this Developer release of Neo FreeRunner. The [[Neo FreeRunner]] phone is the second hardware platform to take advantage of [[Openmoko]]. This guide will help you get to know your Neo FreeRunner and how to start using your Neo FreeRunner.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
Some Frequently Asked Questions for new owners are featured in the [[Getting Started FAQ]].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;background:#fcfcfc; width:25% &amp;quot; |&lt;br /&gt;
[[Image:Freerunner box.png|200px|thumb|Neo FreeRunner Package]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Package Contents ==&lt;br /&gt;
&lt;br /&gt;
[[Image:GTA02ALL.png|left|400px|thumb|Inside the package]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
: [[Image:Circle２.gif|10px]]  Neo FreeRunner&lt;br /&gt;
: [[Image:Circle２.gif|10px]]  Stylus&lt;br /&gt;
: [[Image:Circle２.gif|10px]]  Battery&lt;br /&gt;
: [[Image:Circle２.gif|10px]]  Charger&lt;br /&gt;
: [[Image:Circle２.gif|10px]]  USB Cable (A -&amp;gt; Mini-B 5-pole)&lt;br /&gt;
: [[Image:Circle２.gif|10px]]  microSD Card 512MB &amp;amp; SD adapter&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;
== Setting up the hardware, getting to know the Neo FreeRunner physically ==&lt;br /&gt;
&lt;br /&gt;
===Installing the Micro-SD card, the SIM card, and the Battery ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align-center&amp;gt;&lt;br /&gt;
&amp;lt;table width=&amp;quot;80%&amp;quot; style=&amp;quot;clear: both; border: 1px solid #ffffff; border-collapse: collapse; padding: 0.2em; margin: 0; font-size: 100%; margin: 0 1px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr valign=&amp;quot;top&amp;quot; style=&amp;quot;background: #ffffff&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width: 50%; white-space: nowrap; padding: 4px 1em 0 0.5em; border-right: 1px solid #ffffff;&amp;quot;&amp;gt;[[Image:menu13.jpg|233px|thumb|Open the case like this.|center]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;padding: 1px 1em 0; background: #ffffff;&amp;quot;&amp;gt;[[Image:menu14.jpg|250px|thumb|Opening !|center]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr valign=&amp;quot;top&amp;quot; style=&amp;quot;background: #ffffff&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;padding: 1px 1em 0; background: #ffffff;&amp;quot;&amp;gt;[[Image:menu11.jpg|260px|thumb|Put the SIM card and SD card here.|center]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width: 50%; white-space: nowrap; padding: 4px 1em 0 0.5em; border-right: 1px solid #ffffff;&amp;quot;&amp;gt;[[Image:menu12.jpg|233px|thumb|Finally, put in the battery.|center]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Remove the rear cover of the Neo FreeRunner by first holding the Neo FreeRunner on the side and then use your fingernail to prise off the rear cover at the slot on top of the device.&lt;br /&gt;
# Now you should be able to locate the combined SIM and Micro-SD card holder at the bottom of the battery compartment.&lt;br /&gt;
# Unlock the SIM card holder by sliding the metal clip down, towards the USB socket, with your fingernail. Use caution, as these parts are delicate and could be damaged by forcing them in the wrong direction.&lt;br /&gt;
# Lift up on the SIM card holder.&lt;br /&gt;
# The Micro-SD card holder is held in place by a latch on either side.  It is easiest to open the Micro-SD card holder by releasing these latches one at a time rather than by lifting from the middle, as lifting from the middle tends to increase the latching pressure.  A small screwdriver or knife can be used for this.&lt;br /&gt;
# Insert the Micro-SD card into the Micro-SD card holder. Note that on the inside of metal part of the holder there are little holding tabs for the card. Slide the card in these holders (on the metal part) before closing the card holder. Note that the electrical contacts should face down and towards the edge of the Neo Freerunner.&lt;br /&gt;
# Close the Micro-SD card holder, making sure that both latches of the holder are securely fastened.&lt;br /&gt;
# Insert the SIM card into the SIM card holder, taking care to slide inside the two metal tabs in the cover. Note that the electrical contacts should face down and that the cut corner should be closest to the external GPS Antenna Socket.&lt;br /&gt;
# Close the SIM card holder and lock it by sliding the metal clip towards the external GPS Antenna Socket on the FreeRunner.&lt;br /&gt;
# Insert the battery into the battery compartment, aligning the electrical contacts on the battery with the electrical contacts in the battery compartment.  Insert the side with the electrical contacts first.&lt;br /&gt;
# Replace the rear cover on the FreeRunner.&lt;br /&gt;
&lt;br /&gt;
[[Image:FR_SIM_SD_open.jpg|457px|thumb|SIM and SD holders open, with cards in place|center]]&lt;br /&gt;
&lt;br /&gt;
[[http://video.google.de/videoplay?docid=-8343770443102960945 A short video]] is also available. It was shot using the previous version of the Neo, but the installation procedures remains the same.&lt;br /&gt;
&lt;br /&gt;
===Charging the Neo FreeRunner===&lt;br /&gt;
&lt;br /&gt;
When using the Neo FreeRunner for the first time, you should charge the battery completely. The battery can be charged using the provided charger (at 1000mA) or from a powered USB port capable of providing 500mA worth of current.  Most computers will be able to charge the FreeRunner without any problems.&lt;br /&gt;
&lt;br /&gt;
Charging an empty battery at 100mA takes 12~15 hours, at 500mA takes 2,5~3,5 hours, and at 1000mA takes 1.5~2.5 hours. (90%~100%) [to be confirmed]&lt;br /&gt;
&lt;br /&gt;
Make sure that the battery never discharges completely. This is an issue because the internal charging circuitry can not be turned on until the FreeRunner has booted, and booting through USB power alone does not work. Should the battery become completely discharged, your options are:&lt;br /&gt;
- Use external stand-alone charger (compatible with the Nokia BL-5C battery)&lt;br /&gt;
- Boot the FreeRunner with an 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;
&lt;br /&gt;
[[Neo_FreeRunner_(GTA02)_Battery]]&lt;br /&gt;
&lt;br /&gt;
===Buttons and connectors===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;80%&amp;quot; style=&amp;quot;clear: both; border-collapse: collapse&amp;quot;  valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width: 25px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width: 370px&amp;quot;&amp;gt;[[Image:menu9.jpg|370px|thumb|Power Button, USB and external GPS Antenna (left to right)|center]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width: 25px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width: 370px&amp;quot;&amp;gt;[[Image:menu8.jpg|370px|thumb|AUX Button and phone jack (left to right)|center]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;'''Power'''&lt;br /&gt;
Tapping the power button exits the current application.&lt;br /&gt;
&lt;br /&gt;
Holding the power button brings up a menu allowing you to:&lt;br /&gt;
* Power on and off the GPS, wifi, GSM, and bluetooth antennae&lt;br /&gt;
* Change power management mode to:&lt;br /&gt;
** Dim first then lock&lt;br /&gt;
** Dim only, don't lock&lt;br /&gt;
** Disabled&lt;br /&gt;
* Lock the screen&lt;br /&gt;
* Shutdown the device.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;'''Aux'''&lt;br /&gt;
Tapping the Aux button hides or shows the currently running application.&lt;br /&gt;
&lt;br /&gt;
Holding the Aux button brings up a menu allowing you to:&lt;br /&gt;
&lt;br /&gt;
* Hide and show the title bar (Fullscreen toggle)&lt;br /&gt;
* Alternate wide or tall display modes (Swap Orientation)&lt;br /&gt;
* Save the content of the screen as an image file (Screenshot)&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Booting time is 2 about minutes overall, so patience is in order. The longest step comes after the Linux boot messages in very small fonts have scrolled by, at the graphical &amp;quot;openmoko&amp;quot; sunrise page.&lt;br /&gt;
&lt;br /&gt;
The phone jack is a 2.5mm connector with four contacts: stereo + MIC. It is compatible with the headsets used by Motorola smartphones (A780,A1200, ...) and the V-360.&lt;br /&gt;
&lt;br /&gt;
To plug regular (i.e. without microphone) headphones commonly used to listen to music, a compatible 2.5mm 4 rings jack to 3.5mm stereo jack adapter is needed. It has been reported that Nokia's 2.5mm -&amp;gt; 3.5mm adapters do not work, but that a 3.5mm Stereo Audio Adapter for Motorola MPx200/E398 works well. You will also want to switch from speaker output to headset, by restoring the appropriate alsa.state-file (usually the mediaplayer should do this for you) or via alsamixer (see below), to enable stereo output in there.&lt;br /&gt;
&lt;br /&gt;
===Unlocking the screen===&lt;br /&gt;
&lt;br /&gt;
When the screen is locked, you should see a Matrix-style green graphic with the Openmoko symbol in the middle of the bottom of the screen along with lock and unlock symbols.  If you drag the Openmoko symbol to the unlock symbol at the top then the screen will become unlocked.&lt;br /&gt;
&lt;br /&gt;
== Navigating menus and applications ==&lt;br /&gt;
&lt;br /&gt;
''Note:'' this section describes the interface used by the &amp;quot;2007.2&amp;quot; image, which is the current default image for Openmoko.&lt;br /&gt;
&lt;br /&gt;
====Today Page====&lt;br /&gt;
&lt;br /&gt;
[[Image:Todaypage_reduced_true.png|200px|right]] Openmoko starts by displaying the &amp;quot;Today&amp;quot; page, which is your home page. Icons in the top row indicate the status of the phone.  The bottom row consists of three tabs. The tab with a home on the left lead to the &amp;quot;Today&amp;quot; page you're viewing now. The central tab lead to the &amp;quot;Launch Task&amp;quot; page, which is the main menu used to start applications. The tab with gears on the right lead to the &amp;quot;Running Tasks&amp;quot; page, which is used to deal with currently open windows and applications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Todaypage_reduced_false.png|right|200px|]] The &amp;quot;Today&amp;quot; page is empty, as shown above, when you first start Openmoko. We explain below how to turn on the &amp;quot;full view&amp;quot;, displayed to the right. In the full view, a second row of icons give quick links to commonly-used applications such as the dialer, the adressbook, mailbox and calendar. The main body of the screen displays a clock and other useful information.&lt;br /&gt;
&lt;br /&gt;
See [[Today/2007.2]] for more information about the Today page and customization. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Launch Task Page====&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
[[Image:LaunchTasks.png|right|200px]] This page displays a menu of available applications.  You may choose a category of applications to display to simplify the screen, or choose to display them all.&lt;br /&gt;
&lt;br /&gt;
Current categories are [[PIM Suite]], [[Applications]], [[Games]], [[Utilities]], and All.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Running Tasks Page====&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
[[Image:RunningTasks.png|right|200px]] This page displays currently-running tasks.  Any individual task may be terminated by selecting it and then clicking on the garbage-can icon to close it.  All tasks may be terminated by clicking on any one of them and then clicking on the &amp;quot;folder&amp;quot; icon in the upper right (expect this to change in future releases).  Any task may be rejoined by selecting it and then selecting the &amp;quot;return&amp;quot; icon at the middle top.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Exiting from and switching to an Application====&lt;br /&gt;
&lt;br /&gt;
Any time an application is running, you can simply click the device's power button and the application will exit, returning you to the Today page.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can cycle through active applications using the AUX button&lt;br /&gt;
&lt;br /&gt;
Clicking the top-left of the screen displays the drop down ''task menu''. This menu lists all active applications and allows to switch directly to any one. ''Note:'' If the task menu is not shown, click and hold the [[#Aux|Aux]] button to bring up the Aux menu, and select &amp;quot;Toggle Fullscreen&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Using the terminal ==&lt;br /&gt;
&lt;br /&gt;
To start a console from &amp;quot;Today&amp;quot; page, click the middle tab at the bottom of the screen to display the &amp;quot;Launch applications&amp;quot; page, then select Terminal in the &amp;quot;Applications&amp;quot; submenu. The multitaps keyboard slides up (and down) from the bottom of the screen automatically when you touch the screen.&lt;br /&gt;
&lt;br /&gt;
===Setting date and time===&lt;br /&gt;
&lt;br /&gt;
From the terminal, type the following, but replace ''MM'' with the month (01-12); ''DD'' with the day (01-31); ''hhmm'' with the time (0000-2359); ''YYYY'' with the  year (optional); and ''.ss'' with the seconds (optional).&lt;br /&gt;
&lt;br /&gt;
 date -s ''MMDDhhmmYYYY.ss''&lt;br /&gt;
&lt;br /&gt;
To make the change persist between reboots, sync the hardware clock with the updated system time.&lt;br /&gt;
&lt;br /&gt;
 hwclock --systohc&lt;br /&gt;
&lt;br /&gt;
See [[Setting Date and Time]] for more discussion, including synchronizing with an NTP server.&lt;br /&gt;
&lt;br /&gt;
===Adjusting the Volume===&lt;br /&gt;
&lt;br /&gt;
As of this writing, there is no way to adjust the volume from the screen.&lt;br /&gt;
&lt;br /&gt;
For now, run the terminal application or [[USB_Networking|log in via usb]], and run the [[Neo alsamixer]] application (to see all the options, including Mic2, you will need to run ''alsamixer -V all'').  The mixer is simpler than it looks.  Just use the left and right arrow keys to select &amp;quot;headphone&amp;quot; or &amp;quot;PCM&amp;quot; and use the up and down arrow keys to adjust the volume.  You can also adjust your microphone volume with the &amp;quot;mic2&amp;quot; adjustment.  Press ESC when finished.  Then exit the terminal application or log out of the USB login.&lt;br /&gt;
&lt;br /&gt;
You may need to update configuration files in /usr/share/openmoko/scenarios/ to make the microphone setting permanent.  Use&lt;br /&gt;
 alsactl -f ''path-to-statefile'' store&lt;br /&gt;
to do this.&lt;br /&gt;
&lt;br /&gt;
The default files are as follows (in /usr/share/openmoko/scenarios/): &lt;br /&gt;
:gsmhandset.state&lt;br /&gt;
:gsmheadset.state&lt;br /&gt;
:gsmspeakerout.state&lt;br /&gt;
:headset.state&lt;br /&gt;
:stereoout.state&lt;br /&gt;
&lt;br /&gt;
These correspond to the various Sound Profiles accessible in the Debug Tool under Applications.&lt;br /&gt;
&lt;br /&gt;
To manually restore one of the state files,&lt;br /&gt;
 alsactl -f ''path-to-statefile'' restore&lt;br /&gt;
&lt;br /&gt;
One way to increase the volume of the microphone is to do the following:&lt;br /&gt;
# ssh into your Freerunner&lt;br /&gt;
# vi /usr/share/openmoko/scenarios/gsmhandset.state&lt;br /&gt;
# search for &amp;quot;Mic2&amp;quot;&lt;br /&gt;
# change to &amp;quot;value 3&amp;quot;&lt;br /&gt;
If people report not being able to hear you when you call, then setting the Mic2 value to 2 or 3 should fix that.&lt;br /&gt;
&lt;br /&gt;
'''Question: I am using headphones but only the right speaker work the left don't work how can I fix this ?'''&lt;br /&gt;
&lt;br /&gt;
R: This should be set correctly by restoring gsmheadset.state.&lt;br /&gt;
Pull and replug the headset jack to make sure the correct state-file is restored.&lt;br /&gt;
To manually control the switch between Speaker and headset:&lt;br /&gt;
Start alsamixer, scroll along to the right until you find &amp;quot;Amp Spk&amp;quot; and mute it (m), the sound will then come out from both channels of the &lt;br /&gt;
headphones and not out of the speaker.&lt;br /&gt;
&lt;br /&gt;
[[Freerunner_Hardware_Issues]]&lt;br /&gt;
&lt;br /&gt;
=== Accessing the microSD card ===&lt;br /&gt;
&lt;br /&gt;
Mounted at /media/card by default.&lt;br /&gt;
&lt;br /&gt;
If you have multiple partitions on the card, the first (/dev/mmcblk0p1) will be mounted at /media/card, the second at /media/mmcblk0p2, the third at /media/mmcblk0p3 etc.&lt;br /&gt;
&lt;br /&gt;
== Set up USB-based networking, SSH and update ==&lt;br /&gt;
&lt;br /&gt;
OpenMoko allows TCP/IP-over-USB networking for your phone. The main advantages of this are&lt;br /&gt;
* You don't need to set-up GPRS or WLAN network connection for the phone software to reach the Internet&lt;br /&gt;
* You can SSH from your computer into the phone shell and comfortably do low-level tasks using your computer's terminal software and real keyboard instead of the tiny screen and touchscreen keyboard&lt;br /&gt;
&lt;br /&gt;
Naturally, the phone must be connected to your computer with USB cable.&lt;br /&gt;
&lt;br /&gt;
===Connect with the Neo FreeRunner===&lt;br /&gt;
&lt;br /&gt;
This is discussed in the [[USB_Networking|USB Networking]] section. &lt;br /&gt;
&lt;br /&gt;
===Update with the package manager===&lt;br /&gt;
&lt;br /&gt;
In order to keep the FreeRunner up-to-date with the latest features and bug-fixes, it is advisable update the software at regular intervals. &lt;br /&gt;
&lt;br /&gt;
There are two main methods of doing this: &lt;br /&gt;
* upgrading with the package manager '''opkg'''&lt;br /&gt;
* or manually flashing the device (see [[Flashing the Neo FreeRunner]]).&lt;br /&gt;
&lt;br /&gt;
There are three layers to the software on the FreeRunner:&lt;br /&gt;
&lt;br /&gt;
* [[uboot|uBoot]]: Think of u-boot as a combination of the BIOS and Grub on a PC.&lt;br /&gt;
* Kernel: The Linux kernel&lt;br /&gt;
* Root Filesystem: The rest of the system&lt;br /&gt;
&lt;br /&gt;
Note that ''uboot'', the ''kernel'' and the ''root filesystem'' may all be flashed to update them. For uboot, this is the only possibility (see [[Flashing_the_Neo_FreeRunner#Flashing_the_boot_loader]]). The advantage of flashing the kernel manually rather than using opkg seems to be speed. The disadvantage of flashing the root file system is that it wipes out all local modifications, including /home. If /home is moved to the SD disk, this is no longer a problem.&lt;br /&gt;
&lt;br /&gt;
Warning: UPGRADING TO DAILY KERNELS FROM THE DEVELOPMENT BRANCH MAY BREAK THINGS. That said, assuming that your FreeRunner can access the internet (see above), the kernel and other packages can be updated with&lt;br /&gt;
&lt;br /&gt;
 # opkg update&lt;br /&gt;
 # opkg -test upgrade&lt;br /&gt;
 # opkg upgrade&lt;br /&gt;
&lt;br /&gt;
The first updates the repository information, telling opkg what packages are available. The second allows you to see what the package manager wants to do. The third upgrades all packages for which a newer version is available. '''At the moment, some signature files are missing (404 errors), which opkg complains about, but this is cosmetic.'''  The repositories will still update with the missing signature files.&lt;br /&gt;
&lt;br /&gt;
Note that running opkg upgrade on a factory-fresh phone will upgrade dropbear (the ssh software) and various xserver packages, and neither upgrades elegantly while in use.  Xserver must be updated over ssh to complete succesfully.  Dropbear can be updated over ssh with the proper command:&lt;br /&gt;
 # nohup opkg upgrade dropbear &amp;amp; &lt;br /&gt;
Or upgrade it directly in the FreeRunner terminal.&lt;br /&gt;
 # opkg upgrade dropbear&lt;br /&gt;
&lt;br /&gt;
When updating over ssh, the session will be interrupted, but the command should complete successfully(check nohup.out on your device to verify), and you should be able to reconnect within a few seconds.&lt;br /&gt;
&lt;br /&gt;
Another (better) option is to start a screen session before the upgrade with:&lt;br /&gt;
&lt;br /&gt;
  # screen&lt;br /&gt;
&lt;br /&gt;
After loosing the ssh connection and login in again via ssh reconnect to the running screen session with:&lt;br /&gt;
&lt;br /&gt;
  # screen -x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then connect to the FreeRunner via ssh and type:&lt;br /&gt;
 # opkg upgrade&lt;br /&gt;
&lt;br /&gt;
Recent changes to the usb ethernet support require that you install these two modules, '''before''' you reboot, after updating.&lt;br /&gt;
 # opkg install kernel-module-g-ether kernel-module-cdc-ether&lt;br /&gt;
&lt;br /&gt;
And run this command :&lt;br /&gt;
 # depmod&lt;br /&gt;
&lt;br /&gt;
{{Note|http://lists.openmoko.org/pipermail/support/2008-August/thread.html#900}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively you can upgrade the xserver packages via ssh and then upgrade the rest from the FreeRunner's terminal.  &lt;br /&gt;
&lt;br /&gt;
If you do your first upgrade in two installments like this, it will go more smoothly.&lt;br /&gt;
&lt;br /&gt;
It will be possible in the future to update uboot with opkg, but this has not yet been implemented.&lt;br /&gt;
&lt;br /&gt;
=== Installing multimedia, web browsing and other applications ===&lt;br /&gt;
&lt;br /&gt;
There are many applications you can install - check out the [[Repositories]] for a list of packages, an example of how to add a repository using scaredy cat as an example can also be found here. A list of pre-installed and available packages with descriptions can be found here - [[Available Packages]].&lt;br /&gt;
&lt;br /&gt;
The calendar can be installed with&lt;br /&gt;
&lt;br /&gt;
 opkg install openmoko-dates2&lt;br /&gt;
&lt;br /&gt;
For a Media Player:&lt;br /&gt;
&lt;br /&gt;
 opkg install openmoko-mediaplayer2&lt;br /&gt;
 wget http://abraxa.dyndns.org:81/random/openmoko-mediaplayer-theme.tar.bz2&lt;br /&gt;
 tar xjf openmoko-mediaplayer-theme.tar.bz2 -C /usr/share/themes/Moko/gtk-2.0&lt;br /&gt;
 rm openmoko-mediaplayer-theme.tar.bz2&lt;br /&gt;
&lt;br /&gt;
If you want a basic image viewer, have a look at the one from the gpe suite:&lt;br /&gt;
&lt;br /&gt;
 opkg install gpe-icons &lt;br /&gt;
 opkg install gpe-gallery&lt;br /&gt;
&lt;br /&gt;
To obtain the standard web browser, use:&lt;br /&gt;
&lt;br /&gt;
 opkg install openmoko-browser2&lt;br /&gt;
&lt;br /&gt;
An alternative browser, minimo, offers many more features.  &lt;br /&gt;
First download and unpack it on your GNU/Linux host:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ginguppin.de/files/minimo.tar.bz2&lt;br /&gt;
 tar jvxf minimo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Copy it over to the FreeRunner:&lt;br /&gt;
 scp minimo_* root@192.168.0.202:/tmp&lt;br /&gt;
&lt;br /&gt;
Then on the FreeRunner:&lt;br /&gt;
 opkg install /tmp/minimo_0.02\+cvs20070626-r0_armv4t.ipk&lt;br /&gt;
&lt;br /&gt;
You'll probably also want to [[Switching Keyboards|change the keyboard]] including the [[Switching Keyboards#How_to_add_a_keyboard_toggle_button|keyboard toggle applet]]&lt;br /&gt;
&lt;br /&gt;
=== Importing contacts ===&lt;br /&gt;
&lt;br /&gt;
If you can export your contacts to VCard format, either multiple files or single file containing all of them, you may use the script on [[Import Vcf Contacts]] page to bring them to Neo.&lt;br /&gt;
&lt;br /&gt;
==The next steps==&lt;br /&gt;
&lt;br /&gt;
Congratulations for setting up your Neo FreeRunner. There are many more ressources to help free your phone: &lt;br /&gt;
&lt;br /&gt;
===Customize the interface===&lt;br /&gt;
home screen clock, keyboard&lt;br /&gt;
&lt;br /&gt;
The stock [[Openmoko2007.2]] image flashed onto the Neo FreeRunner is really just the bare bones. For example, you don't have the clock and the quick-launch icons showing. Here's how you can change that:&lt;br /&gt;
&lt;br /&gt;
 # dbus-launch gconftool-2 -t boolean -s /desktop/poky/interface/reduced false&lt;br /&gt;
 # /etc/init.d/xserver-nodm restart&lt;br /&gt;
&lt;br /&gt;
If you rather have a regular clock instead of the digital one, do this instead:&lt;br /&gt;
&lt;br /&gt;
 # dbus-launch gconftool-2 -t boolean -s /desktop/poky/interface/reduced false&lt;br /&gt;
 # dbus-launch gconftool-2 -t boolean -s /desktop/poky/interface/digital_clock false&lt;br /&gt;
 # /etc/init.d/xserver-nodm restart&lt;br /&gt;
&lt;br /&gt;
REMOVE CLICK SOUND VIA /etc/pulse/session&lt;br /&gt;
&lt;br /&gt;
More information about today screen customization at [[Today/2007.2]].&lt;br /&gt;
&lt;br /&gt;
Also, if you prefer having a full keyboard, using matchbox's qwerty keybord, see [[Switching_Keyboards#Matchbox_keyboard|these instructions]]. Then you may also see [http://lists.openmoko.org/pipermail/community/2008-July/021296.html these], which describe a way to add an applet allowing the showing/hiding of that keyboard.&lt;br /&gt;
&lt;br /&gt;
===Use the GPS===&lt;br /&gt;
&lt;br /&gt;
Simple guide to get going with '''GPS''':&lt;br /&gt;
&lt;br /&gt;
 # opkg install gpsd&lt;br /&gt;
 # echo &amp;quot;GPS_DEV=\&amp;quot;/dev/ttySAC1\&amp;quot;&amp;quot; &amp;gt; /etc/default/gpsd&lt;br /&gt;
&lt;br /&gt;
and restart gpsd, the gps daemon, with&lt;br /&gt;
&lt;br /&gt;
 # /etc/init.d/gpsd restart&lt;br /&gt;
&lt;br /&gt;
To test GPS, you can use agpsui:&lt;br /&gt;
&lt;br /&gt;
 # opkg install openmoko-agpsui&lt;br /&gt;
&lt;br /&gt;
For a nice map, try tangoGPS:&lt;br /&gt;
&lt;br /&gt;
 # opkg install http://www.tangogps.org/downloads/tangogps_0.9.2-r1_armv4t.ipk&lt;br /&gt;
&lt;br /&gt;
There were critical [[GPS Problems]] earlier that are largely fixed in newest kernels, see the instructions above to install the updates. More information is on the [[GPS]] page.&lt;br /&gt;
&lt;br /&gt;
===Play with WLAN, GPRS and Bluetooth===&lt;br /&gt;
&lt;br /&gt;
There are plenty of development opportunities to integrate these functions in the OpenMoko software.&lt;br /&gt;
&lt;br /&gt;
'''WLAN''': See [[Wireless Networking]]&lt;br /&gt;
&lt;br /&gt;
'''GPRS''': See [[Manually using GPRS]]&lt;br /&gt;
&lt;br /&gt;
'''Bluetooth''': See [[Manually using Bluetooth]]&lt;br /&gt;
&lt;br /&gt;
=== Welcome to the community ===&lt;br /&gt;
&lt;br /&gt;
The release of the Freerunner in the summer 2008 has led the community into a new period of rapid growth. The resources available are summarized on the [[Openmoko:Community_Portal]]. These are always exciting and interesting times to live in when the balance between Chaos and Order tilts towards change.&lt;br /&gt;
&lt;br /&gt;
As an entry point, the [[http://lists.openmoko.org/pipermail/community/ openmoko community mailing list]] is perhaps the most active. As of July 2008, its volume amounts to dozens of messages per day. Openmoko people are there too. You may ask for help on the [[https://lists.openmoko.org/mailman/listinfo/support support mailing list]].&lt;br /&gt;
&lt;br /&gt;
Or if you use IRC, there is always a good group in the channel #openmoko on FreeNode.&lt;br /&gt;
&lt;br /&gt;
The links on the top-right of this page lead to the sister sites in the Openmoko community:&lt;br /&gt;
* Home and Wiki lead to the same Main Page on the wiki. It needs cleaning, we know...&lt;br /&gt;
* Doc leads to the bug ''Trac''king system.&lt;br /&gt;
* Planet goes to the collection of Openmoko-relatd blogs.&lt;br /&gt;
* Projects is the GForge, free hosting for application developers.&lt;br /&gt;
* Lists is the listing of all the public mailing lists on lists.openmoko.org.&lt;br /&gt;
&lt;br /&gt;
== Annotated references ==&lt;br /&gt;
&lt;br /&gt;
* The [http://quickstart.openmoko.org/ Quickstart guide]. Largely used as a basis for this page.&lt;br /&gt;
* [[Neo FreeRunner]]. The top-level view of the specifications.&lt;br /&gt;
* [[Neo FreeRunner GTA02 Hardware]]. The detailed specifications.&lt;br /&gt;
* [[GTA02 Openness]]. Ultimate chip-level specifications, data sheets and hardware documentation.&lt;br /&gt;
* [[Distributions]]. Strengths and weaknesses of the various distributions available for the Neo.&lt;br /&gt;
* [[Getting Started FAQ]]. Answers.&lt;br /&gt;
* [[GTA02_FAQ]]. More answers&lt;br /&gt;
&lt;br /&gt;
To search this wiki with Google, use the following search term:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;search term&amp;gt; site:http://wiki.openmoko.org/wiki/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:GTA02 Hardware]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-10T11:08:42Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
* [http://bec-systems.com/web/content/view/59/9/ Instructions for including new OpenEmbedded packages to your project]&lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default OpenMoko distribution lacks ''/etc/resolf.conf'' file which is used to configure system DNS look-up. Without this file, failing  domain name look-up prevents web browsing. The easiest way to fix is to copy the host system resolv.conf to the rootfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko$ cp /etc/resolv.conf rootfs/etc/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== In chroot'ed environment ==&lt;br /&gt;
&lt;br /&gt;
Following instructions in [[Getting OpenMoko working on host with Xephyr]] to get yourself chroot'ed into OpenMoko environment. &lt;br /&gt;
&lt;br /&gt;
Start Xephyr. You don't need to start OpenMoko session, minimo can run as is. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ $ minimo  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-10T11:07:06Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
* [http://bec-systems.com/web/content/view/59/9/ Instructions for including new OpenEmbedded packages to your project]&lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
 DISTRO_EXTRA_RDEPENDS = &amp;quot;minimo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default OpenMoko distribution lacks /etc/resolf.conf file which is used to configure system DNS look-up. Without this file, failing domain name look-up prevents web browsing. The easiest way to fix is to copy the host system resolv.conf to the rootfs.&lt;br /&gt;
&lt;br /&gt;
moo@hacker:~/workspace/moko$ cp /etc/resolv.conf rootfs/etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
[edit]&lt;br /&gt;
In chroot'ed environment&lt;br /&gt;
&lt;br /&gt;
Following instructions in Getting OpenMoko working on host with Xephyr to get yourself chroot'ed into OpenMoko environment.&lt;br /&gt;
&lt;br /&gt;
Start Xephyr. You don't need to start OpenMoko session, minimo can run as is.&lt;br /&gt;
&lt;br /&gt;
/ $ minimo  &lt;br /&gt;
&lt;br /&gt;
Retrieved from &amp;quot;http://wiki.openmoko.org/wiki/Minimo&amp;quot;&lt;br /&gt;
Views&lt;br /&gt;
&lt;br /&gt;
    * Article&lt;br /&gt;
    * Discussion&lt;br /&gt;
    * Edi&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default OpenMoko distribution lacks ''/etc/resolf.conf'' file which is used to configure system DNS look-up. Without this file, failing  domain name look-up prevents web browsing. The easiest way to fix is to copy the host system resolv.conf to the rootfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko$ cp /etc/resolv.conf rootfs/etc/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== In chroot'ed environment ==&lt;br /&gt;
&lt;br /&gt;
Following instructions in [[Getting OpenMoko working on host with Xephyr]] to get yourself chroot'ed into OpenMoko environment. &lt;br /&gt;
&lt;br /&gt;
Start Xephyr. You don't need to start OpenMoko session, minimo can run as is. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ $ minimo  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-10T11:05:34Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
* [http://bec-systems.com/web/content/view/59/9/ Instructions for including new OpenEmbedded packages to your project]&lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;Minimo&lt;br /&gt;
From OpenMoko&lt;br /&gt;
Jump to: navigation, search&lt;br /&gt;
[edit]&lt;br /&gt;
Installing Minimo web browser&lt;br /&gt;
&lt;br /&gt;
Minimo is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too.&lt;br /&gt;
&lt;br /&gt;
    * Instructions for including new OpenEmbedded packages to your project &lt;br /&gt;
&lt;br /&gt;
[edit]&lt;br /&gt;
Setup build environment&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;python minimo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default OpenMoko distribution lacks /etc/resolf.conf file which is used to configure system DNS look-up. Without this file, failing domain name look-up prevents web browsing. The easiest way to fix is to copy the host system resolv.conf to the rootfs.&lt;br /&gt;
&lt;br /&gt;
moo@hacker:~/workspace/moko$ cp /etc/resolv.conf rootfs/etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
[edit]&lt;br /&gt;
In chroot'ed environment&lt;br /&gt;
&lt;br /&gt;
Following instructions in Getting OpenMoko working on host with Xephyr to get yourself chroot'ed into OpenMoko environment.&lt;br /&gt;
&lt;br /&gt;
Start Xephyr. You don't need to start OpenMoko session, minimo can run as is.&lt;br /&gt;
&lt;br /&gt;
/ $ minimo  &lt;br /&gt;
&lt;br /&gt;
Retrieved from &amp;quot;http://wiki.openmoko.org/wiki/Minimo&amp;quot;&lt;br /&gt;
Views&lt;br /&gt;
&lt;br /&gt;
    * Article&lt;br /&gt;
    * Discussion&lt;br /&gt;
    * Edi&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default OpenMoko distribution lacks ''/etc/resolf.conf'' file which is used to configure system DNS look-up. Without this file, failing  domain name look-up prevents web browsing. The easiest way to fix is to copy the host system resolv.conf to the rootfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko$ cp /etc/resolv.conf rootfs/etc/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== In chroot'ed environment ==&lt;br /&gt;
&lt;br /&gt;
Following instructions in [[Getting OpenMoko working on host with Xephyr]] to get yourself chroot'ed into OpenMoko environment. &lt;br /&gt;
&lt;br /&gt;
Start Xephyr. You don't need to start OpenMoko session, minimo can run as is. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ $ minimo  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr</id>
		<title>Host-based development with Xoo and Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr"/>
				<updated>2007-05-08T20:41:47Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One of good ways to get started developing is getting rootfs working on host machine, since most of us doesn't have real hardware.&lt;br /&gt;
&lt;br /&gt;
Xoo is a graphical wrapper around Xnest, the nested X server. You can make Xnest look like a particular device's display and set up buttons on that device. This is useful for embedded developers who want to simulate a target device on their desktop machine.&lt;br /&gt;
&lt;br /&gt;
Please see [[Getting OpenMoko working on host with Xephyr]] which might contain more up-to-date information.&lt;br /&gt;
&lt;br /&gt;
== Getting rootfs ==&lt;br /&gt;
Use the [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to get rootfs, just before make openmoko-devel-image run &lt;br /&gt;
 # sed -i 's/fic-gta01/x86/' build/conf/local.conf&lt;br /&gt;
than just run make openmoko-devel-image. After a while(half of day) you should have in build/tmp/image/ file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz mine is here [http://www.ms.mff.cuni.cz/~kupem6am/openmoko-devel-image-x86-20070227064250.rootfs.tar.gz].&lt;br /&gt;
&lt;br /&gt;
=== Build issues ===&lt;br /&gt;
&lt;br /&gt;
[http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=264 Please see this bug tracker issues] if you have problems getting libelf compiled (do_stage fails).&lt;br /&gt;
&lt;br /&gt;
== Install Xoo on your host ==&lt;br /&gt;
For gentoo users run just&lt;br /&gt;
 # emerge xoo&lt;br /&gt;
Debian/Ubuntu&lt;br /&gt;
 # sudo apt-get install xoo xnest&lt;br /&gt;
For Fedora (package has been submitted to Fedora for approval, see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236297):&lt;br /&gt;
 # ftp://ftp.xelerance.com/xoo/&lt;br /&gt;
&lt;br /&gt;
for any other find a way how to do it in your distro.&lt;br /&gt;
&lt;br /&gt;
== Making X cooperate ==&lt;br /&gt;
* Make sure your iptables do not prevent you from connecting to port 6000(x11) on localhost&lt;br /&gt;
&lt;br /&gt;
* Make sure your X is listening on port 6000(X11) on localhost (netstat is friend)&lt;br /&gt;
&lt;br /&gt;
* Enable conection from localhost&lt;br /&gt;
 # xhost localhost&lt;br /&gt;
== Preparing rootfs ==&lt;br /&gt;
* Unpack rootfs file in any directory and cd to that dir.&lt;br /&gt;
&lt;br /&gt;
* Get dev files in rootfs&lt;br /&gt;
 # sudo mount --bind /dev/ rootfs/dev/&lt;br /&gt;
&lt;br /&gt;
* Chroot to rootfs&lt;br /&gt;
 # sudo chroot rootfs /bin/sh&lt;br /&gt;
== Getting it up ==&lt;br /&gt;
In another term start xoo, good idea is to download [http://www.datenfreihafen.org/~stefan/OpenMoko/neo1973-xoo-device.tar.bz2] and run&lt;br /&gt;
 # xoo --device neo1973.xml&lt;br /&gt;
In chrooted enviroment export display to connect to started xoo&lt;br /&gt;
 # export DISPLAY=localhost:1.0&lt;br /&gt;
and start window manager.&lt;br /&gt;
 # x-window-manager&lt;br /&gt;
By this time you should have matchbox running in Xoo window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-08T20:40:03Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Setup the image filesystem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
Please see the included help script at the bottom of this article. It should make your life much easier.&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
Now, back in chroo'ted environment, start X client:&lt;br /&gt;
&lt;br /&gt;
 eval $(dbus-launch)&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
[[Image:Xephyr.png]]&lt;br /&gt;
&lt;br /&gt;
== A sample script ==&lt;br /&gt;
&lt;br /&gt;
The following script sets up the most of root fs environment automatically&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# Set-up x86 OpenMoko root jail. This script must be run as root.&lt;br /&gt;
#&lt;br /&gt;
# Root jail is an environment, where the file system root has been&lt;br /&gt;
# changed to the OpenMoko root file system folder. Please don't&lt;br /&gt;
# use the build/rootfs, but make a copy of it, since build/rootfs&lt;br /&gt;
# gets overwritten each time you build openmoko-devel-image&lt;br /&gt;
#&lt;br /&gt;
# You need to set-up another X server (nested preferably) to &lt;br /&gt;
# act as a OpenMoko screen. Otherwise chrooted applications are executed&lt;br /&gt;
# as is on the host hardware and the kernel.&lt;br /&gt;
#&lt;br /&gt;
# See: &lt;br /&gt;
#&lt;br /&gt;
# http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr&lt;br /&gt;
# &lt;br /&gt;
#&lt;br /&gt;
# 2007 Mikko Ohtamaa - Red Innovation Ltd.&lt;br /&gt;
# &amp;lt;mikko@redinnovation.com&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Do anything you wish with this script&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Setup required environment variables&lt;br /&gt;
&lt;br /&gt;
# Xephyr must listen to this DISPLAY&lt;br /&gt;
DISPLAY=:1&lt;br /&gt;
&lt;br /&gt;
# If we don't have locale, applications refuse to launch&lt;br /&gt;
LANG=C&lt;br /&gt;
&lt;br /&gt;
# We are running as root in our chrooted environment&lt;br /&gt;
&lt;br /&gt;
HOME=/home/root&lt;br /&gt;
export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
# Update pango modules&lt;br /&gt;
pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
# Update icon images&lt;br /&gt;
gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
# Mount /dev and /proc file systems&lt;br /&gt;
mount --bind /dev ./dev&lt;br /&gt;
mount -t proc none ./proc&lt;br /&gt;
&lt;br /&gt;
# Remove touch screen calibration start up app&lt;br /&gt;
# It doesn't launch on x86 and prevents X booting&lt;br /&gt;
if [ -e /etc/X11/Xsession.d/30xTs_Calibrate ] ; then&lt;br /&gt;
        rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Use host name server information so that&lt;br /&gt;
# web browsing works&lt;br /&gt;
cp /etc/resolv.conf etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
# Enter into chroot jail&lt;br /&gt;
chroot . /bin/sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-08T20:39:31Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Starting the nested X server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
Now, back in chroo'ted environment, start X client:&lt;br /&gt;
&lt;br /&gt;
 eval $(dbus-launch)&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
[[Image:Xephyr.png]]&lt;br /&gt;
&lt;br /&gt;
== A sample script ==&lt;br /&gt;
&lt;br /&gt;
The following script sets up the most of root fs environment automatically&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# Set-up x86 OpenMoko root jail. This script must be run as root.&lt;br /&gt;
#&lt;br /&gt;
# Root jail is an environment, where the file system root has been&lt;br /&gt;
# changed to the OpenMoko root file system folder. Please don't&lt;br /&gt;
# use the build/rootfs, but make a copy of it, since build/rootfs&lt;br /&gt;
# gets overwritten each time you build openmoko-devel-image&lt;br /&gt;
#&lt;br /&gt;
# You need to set-up another X server (nested preferably) to &lt;br /&gt;
# act as a OpenMoko screen. Otherwise chrooted applications are executed&lt;br /&gt;
# as is on the host hardware and the kernel.&lt;br /&gt;
#&lt;br /&gt;
# See: &lt;br /&gt;
#&lt;br /&gt;
# http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr&lt;br /&gt;
# &lt;br /&gt;
#&lt;br /&gt;
# 2007 Mikko Ohtamaa - Red Innovation Ltd.&lt;br /&gt;
# &amp;lt;mikko@redinnovation.com&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Do anything you wish with this script&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Setup required environment variables&lt;br /&gt;
&lt;br /&gt;
# Xephyr must listen to this DISPLAY&lt;br /&gt;
DISPLAY=:1&lt;br /&gt;
&lt;br /&gt;
# If we don't have locale, applications refuse to launch&lt;br /&gt;
LANG=C&lt;br /&gt;
&lt;br /&gt;
# We are running as root in our chrooted environment&lt;br /&gt;
&lt;br /&gt;
HOME=/home/root&lt;br /&gt;
export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
# Update pango modules&lt;br /&gt;
pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
# Update icon images&lt;br /&gt;
gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
# Mount /dev and /proc file systems&lt;br /&gt;
mount --bind /dev ./dev&lt;br /&gt;
mount -t proc none ./proc&lt;br /&gt;
&lt;br /&gt;
# Remove touch screen calibration start up app&lt;br /&gt;
# It doesn't launch on x86 and prevents X booting&lt;br /&gt;
if [ -e /etc/X11/Xsession.d/30xTs_Calibrate ] ; then&lt;br /&gt;
        rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Use host name server information so that&lt;br /&gt;
# web browsing works&lt;br /&gt;
cp /etc/resolv.conf etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
# Enter into chroot jail&lt;br /&gt;
chroot . /bin/sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Talk:Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-08T20:34:02Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I can't get dbus working. &lt;br /&gt;
&lt;br /&gt;
After succesfully evaling dbus-launch, I start getting these errors:&lt;br /&gt;
&lt;br /&gt;
got heredbus-marshal-recursive.c(1186)&lt;br /&gt;
got heredbus-marshal-recursive.c(1186)&lt;br /&gt;
&lt;br /&gt;
and applications like web and messages don't launch&lt;br /&gt;
&lt;br /&gt;
--[[User:Miohtama|Moo]] 22:34, 8 May 2007 (CEST)&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Talk:Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-08T20:33:46Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I can't get dbus working. &lt;br /&gt;
&lt;br /&gt;
After succesfully evaling dbus-launch, I start getting these errors:&lt;br /&gt;
&lt;br /&gt;
got heredbus-marshal-recursive.c(1186)&lt;br /&gt;
got heredbus-marshal-recursive.c(1186)&lt;br /&gt;
&lt;br /&gt;
and applications like web and messages don't launch&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-08T20:31:33Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Launching Xephyr */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
Now, back in chroo'ted environment, start X client:&lt;br /&gt;
&lt;br /&gt;
 eval $(dbus-launch)&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
[[Image:Xephyr.png]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-03T00:19:18Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Installing Minimo web browser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
* [http://bec-systems.com/web/content/view/59/9/ Instructions for including new OpenEmbedded packages to your project]&lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;python minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default OpenMoko distribution lacks ''/etc/resolf.conf'' file which is used to configure system DNS look-up. Without this file, failing  domain name look-up prevents web browsing. The easiest way to fix is to copy the host system resolv.conf to the rootfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko$ cp /etc/resolv.conf rootfs/etc/resolv.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== In chroot'ed environment ==&lt;br /&gt;
&lt;br /&gt;
Following instructions in [[Getting OpenMoko working on host with Xephyr]] to get yourself chroot'ed into OpenMoko environment. &lt;br /&gt;
&lt;br /&gt;
Start Xephyr. You don't need to start OpenMoko session, minimo can run as is. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ $ minimo  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-03T00:00:36Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Setup build environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
* [http://bec-systems.com/web/content/view/59/9/ Instructions for including new OpenEmbedded packages to your project]&lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;python minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After local.conf has added new packages, one must refresh bitbake tasks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake task-base -crebuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, you should be able to rebuild root fs using MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-02T23:55:12Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Installing Minimo web browser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
* [http://bec-systems.com/web/content/view/59/9/ Instructions for including new OpenEmbedded packages to your project]&lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;python minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T23:36:02Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Launching Xephyr */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
Now, back in chroo'ted environment, start X client:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
[[Image:Xephyr.png]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T23:35:29Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* In chroot'ed environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
[[Image:Xephyr.png]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T23:30:21Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Launching Xephyr */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
Start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
[[Image:Xephyr.png]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/File:Xephyr.png</id>
		<title>File:Xephyr.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/File:Xephyr.png"/>
				<updated>2007-05-02T23:29:31Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Main_Page"/>
				<updated>2007-05-02T23:19:27Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Hands-on Guides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to the [[OpenMoko]] public Wiki'''&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;For other languages see the [[#bottom|bottom]] of this page.&amp;lt;/small&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:FIC-neo1973_small.jpg|200px|right|frontside]]&lt;br /&gt;
[[OpenMoko]] is an [http://en.wikipedia.org/wiki/Open_source Open Source] project to create the world's first free mobile phone operating system.&lt;br /&gt;
&lt;br /&gt;
The [[OpenMoko]] project is a community that anyone can join, and help to design their ideal phone.&lt;br /&gt;
&lt;br /&gt;
The [[Neo1973]] from [[FIC]] is the first of many phones that [[OpenMoko]] will run on.&lt;br /&gt;
&lt;br /&gt;
The long term goal of [[OpenMoko]] is that phone software will no longer be tied to one phone. You can buy any compatible phone, and install any software over the whole range of phones. If you upgrade your phone, you don't lose the software. Bugs fixed on one phone are fixed on all.&lt;br /&gt;
&lt;br /&gt;
Please join us in collaborating on the [[OpenMoko | OpenMoko project]] through any of the [[Development resources | project resources]] including the [[Main Page | OpenMoko wiki]]. Please see the [[Help:Contents | wiki editing help page]] for information on making contributions to this wiki.  A [[Meet the Core Team | core team of developers funded by FIC, Inc.]] leads the project.&lt;br /&gt;
&lt;br /&gt;
An [[Introduction | introduction page]] is available.  The [[Introduction | page]] has both [[Introduction#Photos|photos]] and [[Introduction#Videos|videos]] available.  Moreover, the usual [[FAQ | Frequently Asked Questions, FAQ, page]] might be helpful.  Developers may find the [[ChangeLog | daily software change log]] an important resource.&lt;br /&gt;
&lt;br /&gt;
The members of the [[OpenMoko]] community would like to thank [[FIC|FIC Inc.]] for showing leadership and initiating the [[OpenMoko]] project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[OpenMoko]] Areas of Interest ==&lt;br /&gt;
&lt;br /&gt;
* [[Basic End-user]] - Information for end users that want basic functionality and no surprises&lt;br /&gt;
* [[Advanced End-user]] - Information for advanced end-users that want advanced and experimental functionality but who are not programmers&lt;br /&gt;
* [[Development resources | Project Resources]] page provides a centralized location of all resources such as [[Development resources#Mailing_Lists|mailing lists]], [[Development resources#IRC | communication tools]], and other software development oriented resources.&lt;br /&gt;
* [[Application Developer]] - Information for application developers, including ideas and specifications for applications, and tools to build them&lt;br /&gt;
* [[System Developer]] - Information for system developers, including bootloader, kernel, and libraries&lt;br /&gt;
* [[Hardware Developer]] - Information for hardware developers, including hardware specs and debug board&lt;br /&gt;
* [[Community Events]] - Information on both [[Community Events#Past Events | past ]] and [[Community Events#Past Events#FIC / OpenMoko at Events | future]] events where FIC or [[OpenMoko]] had or will have a presence.&lt;br /&gt;
&lt;br /&gt;
== Developer's Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Hands-on Guides ===&lt;br /&gt;
* [[Getting Started with your Neo1973]]&lt;br /&gt;
* [[MokoMakefile|Building OpenMoko using the MokoMakefile]] &lt;br /&gt;
* [[Building OpenMoko from scratch]]&lt;br /&gt;
** Old [[Building OpenMoko from scratch (pre-BBT)]]&lt;br /&gt;
* [[Migration to bad block tolerant builds]]&lt;br /&gt;
* [[Running OpenMoko on PC]]&lt;br /&gt;
** [[Getting Openmoko working on host with Xoo]]&lt;br /&gt;
** [[Getting OpenMoko working on host with Xephyr]]&lt;br /&gt;
** [[How to run OpenMoko Apps on PC]]&lt;br /&gt;
** [[OpenMoko under QEMU]]&lt;br /&gt;
* [[Booting from SD]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Reference Documentation ===&lt;br /&gt;
* All [[:Category:Hardware|Hardware]] related documentation and specifications are found on the [[:Category:Hardware|Hardware page]].&lt;br /&gt;
* The [[:Category:Neo1973 Hardware|Neo1973 Hardware page]] provides an overview of the hardware components used by the [[:Category:Neo1973 Hardware|Neo1973 hardware platform]]. PCB Photographs are also included. A [[Disassembling Neo1973 | photo disassemble story]] may be an interesting starting place.&lt;br /&gt;
* [[:Category:Neo1973 Hardware Debugging | Neo1973 Hardware Debugging]] is assisted with the [[Debug Board | Neo1973 debug board]].   A page discussing [[Connecting Neo1973 with Debug Board v2 | debug board and Neo1973 configurations]] are also provided.&lt;br /&gt;
&lt;br /&gt;
=== Software Reference Documentation ===&lt;br /&gt;
* Architectural&lt;br /&gt;
** [[OpenMokoFramework]] - The OpenMoko Application Framework&lt;br /&gt;
* [[neo1973 host software]]&lt;br /&gt;
* Device Software&lt;br /&gt;
** Low-Level&lt;br /&gt;
*** [[u-boot]] - The bootloader we use, including documentation for our modifications&lt;br /&gt;
*** [[kernel]] - The Linux kernel we use, including documentation for our modifications&lt;br /&gt;
** Userspace&lt;br /&gt;
*** [[gsmd]] - the GSM daemon managing the GSM Modem&lt;br /&gt;
*** [[gpsd]] - the AGPS (Assisted GPS) daemon&lt;br /&gt;
&lt;br /&gt;
=== OpenMoko===&lt;br /&gt;
* [[OpenEmbedded]] - The distribution-building framework&lt;br /&gt;
* [[Toolchain]] - The toolchain we use for compilation&lt;br /&gt;
* [[OpenMoko]] - The OpenMoko distribution&lt;br /&gt;
** [[OpenMoko2007]] - The first intended release of it&lt;br /&gt;
** [[Userspace root image]]&lt;br /&gt;
&lt;br /&gt;
==== User Interface Related ====&lt;br /&gt;
* [[Look &amp;amp; Feel]]&lt;br /&gt;
* [[Applications]]&lt;br /&gt;
* [[Widgets]]&lt;br /&gt;
** [[Widget Inheritance Graph]]&lt;br /&gt;
&lt;br /&gt;
=== Misc. Development Related ===&lt;br /&gt;
* [[Templates]]&lt;br /&gt;
* [[PIM Storage]]&lt;br /&gt;
* [[Coding Guidelines]]&lt;br /&gt;
* [[OpenMoko#Setting_up_an_OpenMoko_SDK|How to setup the OpenMoko SDK]]&lt;br /&gt;
* [[License]] - How we license our code&lt;br /&gt;
* [[Development resources]] - Describes resources for developers (lists, svn, ...)&lt;br /&gt;
* [[Neo1973 Phase 0]] -- Information for Phase 0 device owners&lt;br /&gt;
* [[Wishlist:Neo1973 P0 Review]] -- Impressions of the Phase 0 hardware device, also the Phase 0 FAQ&lt;br /&gt;
&lt;br /&gt;
== Administrative / Organizational ==&lt;br /&gt;
&lt;br /&gt;
* [[Shipping Notes]] - Information to help FIC figure out how to ship products to you, and how much it might cost.&lt;br /&gt;
* [[My Account]] - Ideas for what sort of account-based services FIC should provide with the phone.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* [[WiFi support in OpenMoko]] - Or rather the lack thereof&lt;br /&gt;
* [[Neo1973 and Windows]] - If you want to commit that offence ;)  (does not work, help!)&lt;br /&gt;
* [[Press Coverage]] - What the press says about the OpenMoko project&lt;br /&gt;
* [[mFAQ]] - The OpenMoko Misinformation FAQ ('''mFAQ''') - What the press '''''incorrectly''''' says about the OpenMoko project&lt;br /&gt;
* [[Wish List]] - A collection of ideas and ideals we'd like to see implemented some day&lt;br /&gt;
* [[Wish List - Hardware]] - A collection of ideas we'd like to see in the next Neo release&lt;br /&gt;
* [[Wishlist:BuiltInScriptingLanguage|Wish List - Built-in Scripting Language]] - Discussion on a suitable scripting language to be included&lt;br /&gt;
* [[Media Content]] - What types of media on the device can we use (that is non-software)?&lt;br /&gt;
* [[Testimonials]] - How did you get to OpenMoko?&lt;br /&gt;
* [[Buying Interest List]] - (Not official and not a pre-order page) Have you have put money aside for Neo1973? Put your nick here.&lt;br /&gt;
* [[iPhone]] -  Comparison between Apple iPhone and FIC Neo1973&lt;br /&gt;
* [[Translation]] -  Translation of OpenMoko&lt;br /&gt;
* [[Summer of code]] - Our page with project applications for Googles Summer of Code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{Languages|Main_Page}}&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Main_Page"/>
				<updated>2007-05-02T23:19:10Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Misc. Development Related */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to the [[OpenMoko]] public Wiki'''&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;For other languages see the [[#bottom|bottom]] of this page.&amp;lt;/small&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:FIC-neo1973_small.jpg|200px|right|frontside]]&lt;br /&gt;
[[OpenMoko]] is an [http://en.wikipedia.org/wiki/Open_source Open Source] project to create the world's first free mobile phone operating system.&lt;br /&gt;
&lt;br /&gt;
The [[OpenMoko]] project is a community that anyone can join, and help to design their ideal phone.&lt;br /&gt;
&lt;br /&gt;
The [[Neo1973]] from [[FIC]] is the first of many phones that [[OpenMoko]] will run on.&lt;br /&gt;
&lt;br /&gt;
The long term goal of [[OpenMoko]] is that phone software will no longer be tied to one phone. You can buy any compatible phone, and install any software over the whole range of phones. If you upgrade your phone, you don't lose the software. Bugs fixed on one phone are fixed on all.&lt;br /&gt;
&lt;br /&gt;
Please join us in collaborating on the [[OpenMoko | OpenMoko project]] through any of the [[Development resources | project resources]] including the [[Main Page | OpenMoko wiki]]. Please see the [[Help:Contents | wiki editing help page]] for information on making contributions to this wiki.  A [[Meet the Core Team | core team of developers funded by FIC, Inc.]] leads the project.&lt;br /&gt;
&lt;br /&gt;
An [[Introduction | introduction page]] is available.  The [[Introduction | page]] has both [[Introduction#Photos|photos]] and [[Introduction#Videos|videos]] available.  Moreover, the usual [[FAQ | Frequently Asked Questions, FAQ, page]] might be helpful.  Developers may find the [[ChangeLog | daily software change log]] an important resource.&lt;br /&gt;
&lt;br /&gt;
The members of the [[OpenMoko]] community would like to thank [[FIC|FIC Inc.]] for showing leadership and initiating the [[OpenMoko]] project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[OpenMoko]] Areas of Interest ==&lt;br /&gt;
&lt;br /&gt;
* [[Basic End-user]] - Information for end users that want basic functionality and no surprises&lt;br /&gt;
* [[Advanced End-user]] - Information for advanced end-users that want advanced and experimental functionality but who are not programmers&lt;br /&gt;
* [[Development resources | Project Resources]] page provides a centralized location of all resources such as [[Development resources#Mailing_Lists|mailing lists]], [[Development resources#IRC | communication tools]], and other software development oriented resources.&lt;br /&gt;
* [[Application Developer]] - Information for application developers, including ideas and specifications for applications, and tools to build them&lt;br /&gt;
* [[System Developer]] - Information for system developers, including bootloader, kernel, and libraries&lt;br /&gt;
* [[Hardware Developer]] - Information for hardware developers, including hardware specs and debug board&lt;br /&gt;
* [[Community Events]] - Information on both [[Community Events#Past Events | past ]] and [[Community Events#Past Events#FIC / OpenMoko at Events | future]] events where FIC or [[OpenMoko]] had or will have a presence.&lt;br /&gt;
&lt;br /&gt;
== Developer's Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Hands-on Guides ===&lt;br /&gt;
* [[Getting Started with your Neo1973]]&lt;br /&gt;
* [[MokoMakefile|Building OpenMoko using the MokoMakefile]] &lt;br /&gt;
* [[Building OpenMoko from scratch]]&lt;br /&gt;
** Old [[Building OpenMoko from scratch (pre-BBT)]]&lt;br /&gt;
* [[Migration to bad block tolerant builds]]&lt;br /&gt;
* [[Running OpenMoko on PC]]&lt;br /&gt;
** [[Getting Openmoko working on host with Xoo]]&lt;br /&gt;
** [[Getting OpenMoko working on host with Xephyr]]&lt;br /&gt;
* [[Booting from SD]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Reference Documentation ===&lt;br /&gt;
* All [[:Category:Hardware|Hardware]] related documentation and specifications are found on the [[:Category:Hardware|Hardware page]].&lt;br /&gt;
* The [[:Category:Neo1973 Hardware|Neo1973 Hardware page]] provides an overview of the hardware components used by the [[:Category:Neo1973 Hardware|Neo1973 hardware platform]]. PCB Photographs are also included. A [[Disassembling Neo1973 | photo disassemble story]] may be an interesting starting place.&lt;br /&gt;
* [[:Category:Neo1973 Hardware Debugging | Neo1973 Hardware Debugging]] is assisted with the [[Debug Board | Neo1973 debug board]].   A page discussing [[Connecting Neo1973 with Debug Board v2 | debug board and Neo1973 configurations]] are also provided.&lt;br /&gt;
&lt;br /&gt;
=== Software Reference Documentation ===&lt;br /&gt;
* Architectural&lt;br /&gt;
** [[OpenMokoFramework]] - The OpenMoko Application Framework&lt;br /&gt;
* [[neo1973 host software]]&lt;br /&gt;
* Device Software&lt;br /&gt;
** Low-Level&lt;br /&gt;
*** [[u-boot]] - The bootloader we use, including documentation for our modifications&lt;br /&gt;
*** [[kernel]] - The Linux kernel we use, including documentation for our modifications&lt;br /&gt;
** Userspace&lt;br /&gt;
*** [[gsmd]] - the GSM daemon managing the GSM Modem&lt;br /&gt;
*** [[gpsd]] - the AGPS (Assisted GPS) daemon&lt;br /&gt;
&lt;br /&gt;
=== OpenMoko===&lt;br /&gt;
* [[OpenEmbedded]] - The distribution-building framework&lt;br /&gt;
* [[Toolchain]] - The toolchain we use for compilation&lt;br /&gt;
* [[OpenMoko]] - The OpenMoko distribution&lt;br /&gt;
** [[OpenMoko2007]] - The first intended release of it&lt;br /&gt;
** [[Userspace root image]]&lt;br /&gt;
&lt;br /&gt;
==== User Interface Related ====&lt;br /&gt;
* [[Look &amp;amp; Feel]]&lt;br /&gt;
* [[Applications]]&lt;br /&gt;
* [[Widgets]]&lt;br /&gt;
** [[Widget Inheritance Graph]]&lt;br /&gt;
&lt;br /&gt;
=== Misc. Development Related ===&lt;br /&gt;
* [[Templates]]&lt;br /&gt;
* [[PIM Storage]]&lt;br /&gt;
* [[Coding Guidelines]]&lt;br /&gt;
* [[OpenMoko#Setting_up_an_OpenMoko_SDK|How to setup the OpenMoko SDK]]&lt;br /&gt;
* [[License]] - How we license our code&lt;br /&gt;
* [[Development resources]] - Describes resources for developers (lists, svn, ...)&lt;br /&gt;
* [[Neo1973 Phase 0]] -- Information for Phase 0 device owners&lt;br /&gt;
* [[Wishlist:Neo1973 P0 Review]] -- Impressions of the Phase 0 hardware device, also the Phase 0 FAQ&lt;br /&gt;
&lt;br /&gt;
== Administrative / Organizational ==&lt;br /&gt;
&lt;br /&gt;
* [[Shipping Notes]] - Information to help FIC figure out how to ship products to you, and how much it might cost.&lt;br /&gt;
* [[My Account]] - Ideas for what sort of account-based services FIC should provide with the phone.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* [[WiFi support in OpenMoko]] - Or rather the lack thereof&lt;br /&gt;
* [[Neo1973 and Windows]] - If you want to commit that offence ;)  (does not work, help!)&lt;br /&gt;
* [[Press Coverage]] - What the press says about the OpenMoko project&lt;br /&gt;
* [[mFAQ]] - The OpenMoko Misinformation FAQ ('''mFAQ''') - What the press '''''incorrectly''''' says about the OpenMoko project&lt;br /&gt;
* [[Wish List]] - A collection of ideas and ideals we'd like to see implemented some day&lt;br /&gt;
* [[Wish List - Hardware]] - A collection of ideas we'd like to see in the next Neo release&lt;br /&gt;
* [[Wishlist:BuiltInScriptingLanguage|Wish List - Built-in Scripting Language]] - Discussion on a suitable scripting language to be included&lt;br /&gt;
* [[Media Content]] - What types of media on the device can we use (that is non-software)?&lt;br /&gt;
* [[Testimonials]] - How did you get to OpenMoko?&lt;br /&gt;
* [[Buying Interest List]] - (Not official and not a pre-order page) Have you have put money aside for Neo1973? Put your nick here.&lt;br /&gt;
* [[iPhone]] -  Comparison between Apple iPhone and FIC Neo1973&lt;br /&gt;
* [[Translation]] -  Translation of OpenMoko&lt;br /&gt;
* [[Summer of code]] - Our page with project applications for Googles Summer of Code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{Languages|Main_Page}}&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:Miohtama</id>
		<title>User:Miohtama</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:Miohtama"/>
				<updated>2007-05-02T23:18:50Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I am a wild guy from Oulu, Finland.&lt;br /&gt;
&lt;br /&gt;
[http://www.redinnovation.com Please check my company pages]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Running_OpenMoko_on_PC</id>
		<title>Running OpenMoko on PC</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Running_OpenMoko_on_PC"/>
				<updated>2007-05-02T23:18:21Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Running OpenMoko on PC =&lt;br /&gt;
&lt;br /&gt;
Thanks to Linux portability, OpenMoko can be run on PC easily, without the need of actual hardware.&lt;br /&gt;
&lt;br /&gt;
== Using QEmu ==&lt;br /&gt;
&lt;br /&gt;
QEmu is full scale emulator which emulates OpenMoko hardware, including ARM CPU. You will have emulator or stub devices which match the actual hardware. There is a lot of performance penalty for emulating non-native CPU like ARM on x86/x64 architecture. Also, setting up ARM tool chain might be difficult.&lt;br /&gt;
&lt;br /&gt;
* [[OpenMoko under QEMU]]&lt;br /&gt;
&lt;br /&gt;
== Running applications natively ==&lt;br /&gt;
&lt;br /&gt;
You can run OpenMoko &amp;quot;as is&amp;quot; on your X desktop. Since OpenMoko applications are GTK based, they can appear like any other application windows on your desktop. Or you might want to run them inside a nested X server, which gives you the ability to emulate OpenMoko screen resolution as well.&lt;br /&gt;
&lt;br /&gt;
This is recommended option if your applications don't need access to actual hardware, but can accept dummy input data e.g. constant power meter value. There is no performance penalty, which might be actually a bad thing, since there is a great different between PC and Neo1973 power. Also, compiling for x86 targets seems to be a bit faster.&lt;br /&gt;
&lt;br /&gt;
Currently, Xephyr documentation is most up-to-date. --[[User:Miohtama|Moo]] 01:18, 3 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
* [[Getting OpenMoko working on host with Xephyr]]&lt;br /&gt;
* [[Getting Openmoko working on host with Xoo]]&lt;br /&gt;
* [[How to run OpenMoko Apps on PC]]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Main_Page"/>
				<updated>2007-05-02T23:10:27Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Hands-on Guides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to the [[OpenMoko]] public Wiki'''&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;For other languages see the [[#bottom|bottom]] of this page.&amp;lt;/small&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:FIC-neo1973_small.jpg|200px|right|frontside]]&lt;br /&gt;
[[OpenMoko]] is an [http://en.wikipedia.org/wiki/Open_source Open Source] project to create the world's first free mobile phone operating system.&lt;br /&gt;
&lt;br /&gt;
The [[OpenMoko]] project is a community that anyone can join, and help to design their ideal phone.&lt;br /&gt;
&lt;br /&gt;
The [[Neo1973]] from [[FIC]] is the first of many phones that [[OpenMoko]] will run on.&lt;br /&gt;
&lt;br /&gt;
The long term goal of [[OpenMoko]] is that phone software will no longer be tied to one phone. You can buy any compatible phone, and install any software over the whole range of phones. If you upgrade your phone, you don't lose the software. Bugs fixed on one phone are fixed on all.&lt;br /&gt;
&lt;br /&gt;
Please join us in collaborating on the [[OpenMoko | OpenMoko project]] through any of the [[Development resources | project resources]] including the [[Main Page | OpenMoko wiki]]. Please see the [[Help:Contents | wiki editing help page]] for information on making contributions to this wiki.  A [[Meet the Core Team | core team of developers funded by FIC, Inc.]] leads the project.&lt;br /&gt;
&lt;br /&gt;
An [[Introduction | introduction page]] is available.  The [[Introduction | page]] has both [[Introduction#Photos|photos]] and [[Introduction#Videos|videos]] available.  Moreover, the usual [[FAQ | Frequently Asked Questions, FAQ, page]] might be helpful.  Developers may find the [[ChangeLog | daily software change log]] an important resource.&lt;br /&gt;
&lt;br /&gt;
The members of the [[OpenMoko]] community would like to thank [[FIC|FIC Inc.]] for showing leadership and initiating the [[OpenMoko]] project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[OpenMoko]] Areas of Interest ==&lt;br /&gt;
&lt;br /&gt;
* [[Basic End-user]] - Information for end users that want basic functionality and no surprises&lt;br /&gt;
* [[Advanced End-user]] - Information for advanced end-users that want advanced and experimental functionality but who are not programmers&lt;br /&gt;
* [[Development resources | Project Resources]] page provides a centralized location of all resources such as [[Development resources#Mailing_Lists|mailing lists]], [[Development resources#IRC | communication tools]], and other software development oriented resources.&lt;br /&gt;
* [[Application Developer]] - Information for application developers, including ideas and specifications for applications, and tools to build them&lt;br /&gt;
* [[System Developer]] - Information for system developers, including bootloader, kernel, and libraries&lt;br /&gt;
* [[Hardware Developer]] - Information for hardware developers, including hardware specs and debug board&lt;br /&gt;
* [[Community Events]] - Information on both [[Community Events#Past Events | past ]] and [[Community Events#Past Events#FIC / OpenMoko at Events | future]] events where FIC or [[OpenMoko]] had or will have a presence.&lt;br /&gt;
&lt;br /&gt;
== Developer's Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Hands-on Guides ===&lt;br /&gt;
* [[Getting Started with your Neo1973]]&lt;br /&gt;
* [[MokoMakefile|Building OpenMoko using the MokoMakefile]] &lt;br /&gt;
* [[Building OpenMoko from scratch]]&lt;br /&gt;
** Old [[Building OpenMoko from scratch (pre-BBT)]]&lt;br /&gt;
* [[Migration to bad block tolerant builds]]&lt;br /&gt;
* [[Running OpenMoko on PC]]&lt;br /&gt;
** [[Getting Openmoko working on host with Xoo]]&lt;br /&gt;
** [[Getting OpenMoko working on host with Xephyr]]&lt;br /&gt;
* [[Booting from SD]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Reference Documentation ===&lt;br /&gt;
* All [[:Category:Hardware|Hardware]] related documentation and specifications are found on the [[:Category:Hardware|Hardware page]].&lt;br /&gt;
* The [[:Category:Neo1973 Hardware|Neo1973 Hardware page]] provides an overview of the hardware components used by the [[:Category:Neo1973 Hardware|Neo1973 hardware platform]]. PCB Photographs are also included. A [[Disassembling Neo1973 | photo disassemble story]] may be an interesting starting place.&lt;br /&gt;
* [[:Category:Neo1973 Hardware Debugging | Neo1973 Hardware Debugging]] is assisted with the [[Debug Board | Neo1973 debug board]].   A page discussing [[Connecting Neo1973 with Debug Board v2 | debug board and Neo1973 configurations]] are also provided.&lt;br /&gt;
&lt;br /&gt;
=== Software Reference Documentation ===&lt;br /&gt;
* Architectural&lt;br /&gt;
** [[OpenMokoFramework]] - The OpenMoko Application Framework&lt;br /&gt;
* [[neo1973 host software]]&lt;br /&gt;
* Device Software&lt;br /&gt;
** Low-Level&lt;br /&gt;
*** [[u-boot]] - The bootloader we use, including documentation for our modifications&lt;br /&gt;
*** [[kernel]] - The Linux kernel we use, including documentation for our modifications&lt;br /&gt;
** Userspace&lt;br /&gt;
*** [[gsmd]] - the GSM daemon managing the GSM Modem&lt;br /&gt;
*** [[gpsd]] - the AGPS (Assisted GPS) daemon&lt;br /&gt;
&lt;br /&gt;
=== OpenMoko===&lt;br /&gt;
* [[OpenEmbedded]] - The distribution-building framework&lt;br /&gt;
* [[Toolchain]] - The toolchain we use for compilation&lt;br /&gt;
* [[OpenMoko]] - The OpenMoko distribution&lt;br /&gt;
** [[OpenMoko2007]] - The first intended release of it&lt;br /&gt;
** [[Userspace root image]]&lt;br /&gt;
&lt;br /&gt;
==== User Interface Related ====&lt;br /&gt;
* [[Look &amp;amp; Feel]]&lt;br /&gt;
* [[Applications]]&lt;br /&gt;
* [[Widgets]]&lt;br /&gt;
** [[Widget Inheritance Graph]]&lt;br /&gt;
&lt;br /&gt;
=== Misc. Development Related ===&lt;br /&gt;
* [[Templates]]&lt;br /&gt;
* [[PIM Storage]]&lt;br /&gt;
* [[Coding Guidelines]]&lt;br /&gt;
* [[How to run OpenMoko Apps on PC]]&lt;br /&gt;
* [[OpenMoko under QEMU]]&lt;br /&gt;
* [[OpenMoko#Setting_up_an_OpenMoko_SDK|How to setup the OpenMoko SDK]]&lt;br /&gt;
* [[License]] - How we license our code&lt;br /&gt;
* [[Development resources]] - Describes resources for developers (lists, svn, ...)&lt;br /&gt;
* [[Neo1973 Phase 0]] -- Information for Phase 0 device owners&lt;br /&gt;
* [[Wishlist:Neo1973 P0 Review]] -- Impressions of the Phase 0 hardware device, also the Phase 0 FAQ&lt;br /&gt;
&lt;br /&gt;
== Administrative / Organizational ==&lt;br /&gt;
&lt;br /&gt;
* [[Shipping Notes]] - Information to help FIC figure out how to ship products to you, and how much it might cost.&lt;br /&gt;
* [[My Account]] - Ideas for what sort of account-based services FIC should provide with the phone.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* [[WiFi support in OpenMoko]] - Or rather the lack thereof&lt;br /&gt;
* [[Neo1973 and Windows]] - If you want to commit that offence ;)  (does not work, help!)&lt;br /&gt;
* [[Press Coverage]] - What the press says about the OpenMoko project&lt;br /&gt;
* [[mFAQ]] - The OpenMoko Misinformation FAQ ('''mFAQ''') - What the press '''''incorrectly''''' says about the OpenMoko project&lt;br /&gt;
* [[Wish List]] - A collection of ideas and ideals we'd like to see implemented some day&lt;br /&gt;
* [[Wish List - Hardware]] - A collection of ideas we'd like to see in the next Neo release&lt;br /&gt;
* [[Wishlist:BuiltInScriptingLanguage|Wish List - Built-in Scripting Language]] - Discussion on a suitable scripting language to be included&lt;br /&gt;
* [[Media Content]] - What types of media on the device can we use (that is non-software)?&lt;br /&gt;
* [[Testimonials]] - How did you get to OpenMoko?&lt;br /&gt;
* [[Buying Interest List]] - (Not official and not a pre-order page) Have you have put money aside for Neo1973? Put your nick here.&lt;br /&gt;
* [[iPhone]] -  Comparison between Apple iPhone and FIC Neo1973&lt;br /&gt;
* [[Translation]] -  Translation of OpenMoko&lt;br /&gt;
* [[Summer of code]] - Our page with project applications for Googles Summer of Code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bottom&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{Languages|Main_Page}}&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Minimo</id>
		<title>Minimo</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Minimo"/>
				<updated>2007-05-02T23:06:40Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installing Minimo web browser =&lt;br /&gt;
&lt;br /&gt;
[http://www.mozilla.org/projects/minimo/develop.html Minimo] is Mozilla based web browser. It features full AJAX support and other goodies. Currently stock OpenMoko build doesn't include Minimo. Here are instructions how to run minimo in Xephyr PC environment and how to use other third party packages too. &lt;br /&gt;
&lt;br /&gt;
== Setup build environment ==&lt;br /&gt;
&lt;br /&gt;
If you have build your OpenMoko using MokoMakefile some of these steps might not be familiar to you.&lt;br /&gt;
&lt;br /&gt;
Assume your OpenMoko root is at ~/workspace/moko&lt;br /&gt;
&lt;br /&gt;
First setup build environment variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ . ../setup-env &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout minimo from OpenEmbedded repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
moo@hacker:~/workspace/moko/build$ bitbake minimo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit local.conf and add minimo to build dependencies list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS = &amp;quot;python minimo&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User_talk:Miohtama</id>
		<title>User talk:Miohtama</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User_talk:Miohtama"/>
				<updated>2007-05-02T23:00:11Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I am a wild guy from Oulu, Finland.&lt;br /&gt;
&lt;br /&gt;
[http://www.redinnovation.com Please check my company pages]&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T22:55:24Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Start nested X server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
Start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
== Starting the nested X server ==&lt;br /&gt;
&lt;br /&gt;
=== Supplying fonts ===&lt;br /&gt;
&lt;br /&gt;
You might need to install fonts supplied by OpenMoko to your host system. The easiest way to do is in Gnome is to go Preferences -&amp;gt; Font - &amp;gt; Details -&amp;gt; Go to font folder and then drag and drop TTF font files from build/tmp/rootfs/usr/share/fonts/ in Nautilus. &lt;br /&gt;
&lt;br /&gt;
=== Launching Xephyr ===&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T22:44:54Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* In chroot'ed environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
Start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
== Start nested X server ==&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T22:44:42Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Start nested X server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Start nested X server ==&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T22:44:11Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Start nested X server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Start nested X server ==&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac -2button -host-cursor -screen 480x640&lt;br /&gt;
&lt;br /&gt;
You should see the window of Xephyr now.&lt;br /&gt;
&lt;br /&gt;
Now, back in the mokobox, start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T22:41:28Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Setup the image filesystem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
=== In chroot'ed environment ===&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Create pango.modules file&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Create gdk-pixbuf.loaders file&lt;br /&gt;
&lt;br /&gt;
 gdk-pixbuf-query-loaders &amp;gt; /etc/gtk-2.0/gdk-pixbuf.loaders&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Start nested X server ==&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac&lt;br /&gt;
You should see the window of Xephyr now.&lt;br /&gt;
&lt;br /&gt;
Now, back in the mokobox, start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T22:26:05Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Setup the image filesystem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Set-up pango&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
Remove touch screen calibrator. Since touch screen hardware is not present, the touch screen calibration prevents X start-up on PC.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/Xsession.d/30xTs_Calibrate&lt;br /&gt;
&lt;br /&gt;
== Start nested X server ==&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac&lt;br /&gt;
You should see the window of Xephyr now.&lt;br /&gt;
&lt;br /&gt;
Now, back in the mokobox, start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T21:58:27Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* setup the image filesystem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The goal of this page is to show you how to run an OpenMoko development image on your host x86 development machine in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
== Build an image ==&lt;br /&gt;
&lt;br /&gt;
First, you should use [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to build an openmoko-devel-image for your host architecture (x86 in our case). Make sure you put the moko makefile in /home/moko/Makefile .&lt;br /&gt;
&lt;br /&gt;
Prior to that, edit your build/conf/local.conf to make it look like this:&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot; devshell&amp;quot;&lt;br /&gt;
 SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once you have built the image, you can start working toward running the image.&lt;br /&gt;
&lt;br /&gt;
== Setup the image filesystem ==&lt;br /&gt;
&lt;br /&gt;
The filesystem of the image can be found at /home/moko/build/tmp/rootfs . It is that image that we want to run in a chrooted environment.&lt;br /&gt;
&lt;br /&gt;
We will copy that that rootfs directory somewhere so that subsquent builds (using the MokoMakefile  for instance) don't overwrite it.&lt;br /&gt;
&lt;br /&gt;
Make sure you have root privileges:&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Copy the rootf into a directory called MokoBox. From now on, we will call the chrooted environment a MokoBox.&lt;br /&gt;
&lt;br /&gt;
 cp -r /home/moko/build/tmp/rootfs /home/moko/mokobox&lt;br /&gt;
&lt;br /&gt;
make sure /dev and /proc of the host machine are visible from within mokobox&lt;br /&gt;
&lt;br /&gt;
 mount --bind /dev /homo/moko/mokobox/dev&lt;br /&gt;
 mount -t proc none /home/moko/mokobox/proc&lt;br /&gt;
&lt;br /&gt;
start the mokobox&lt;br /&gt;
&lt;br /&gt;
 chroot /homo/moko/mokobox /bin/sh&lt;br /&gt;
&lt;br /&gt;
set environment variables&lt;br /&gt;
&lt;br /&gt;
 DISPLAY=:1&lt;br /&gt;
 LANG=C&lt;br /&gt;
 HOME=/home/root&lt;br /&gt;
 export DISPLAY LANG HOME&lt;br /&gt;
&lt;br /&gt;
Set-up pango&lt;br /&gt;
&lt;br /&gt;
 pango-querymodules &amp;gt; /etc/pango/pango.modules&lt;br /&gt;
&lt;br /&gt;
== Start nested X server ==&lt;br /&gt;
&lt;br /&gt;
In another terminal (not related to mokobox), start Xephyr&lt;br /&gt;
&lt;br /&gt;
 Xephyr :1 -ac&lt;br /&gt;
You should see the window of Xephyr now.&lt;br /&gt;
&lt;br /&gt;
Now, back in the mokobox, start an X Session:&lt;br /&gt;
&lt;br /&gt;
 /etc/X11/Xsession&lt;br /&gt;
&lt;br /&gt;
You should see OpenMoko booting in the Xephyr window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Talk:Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T19:59:45Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I get the following error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OE Build Configuration:&lt;br /&gt;
BB_VERSION     = &amp;quot;1.6.7&amp;quot;&lt;br /&gt;
OE_REVISION    = &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot;&lt;br /&gt;
TARGET_ARCH    = &amp;quot;i586&amp;quot;&lt;br /&gt;
TARGET_OS      = &amp;quot;linux&amp;quot;&lt;br /&gt;
MACHINE        = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO         = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
DISTRO_VERSION = &amp;quot;.dev-snapshot-20070502&amp;quot;&lt;br /&gt;
TARGET_FPU     = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: preferred version 2.12.3 of glib-2.0 not available&lt;br /&gt;
...&lt;br /&gt;
NOTE: package ltrace-0.4: started&lt;br /&gt;
NOTE: package ltrace-0.4-r0: task do_compile: started&lt;br /&gt;
ERROR: function do_compile failed&lt;br /&gt;
ERROR: log data follows (/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/log.do_compile.11205)&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| NOTE: make ARCH=i586 INSTALL_FILE=$(INSTALL) -p -m 0644 INSTALL_PROGRAM=$(INSTALL) -p -m 0755 INSTALL_SCRIPT=$(INSTALL) -p -m 0755 INSTALL_DIR=$(INSTALL) -p -d -m 0755 LDFLAGS=-L/media/sda3/dump/workspace/moko/build/tmp/staging/i586-linux/lib -Wl,-rpath-link,/media/sda3/dump/workspace/moko/build/tmp/staging/i586-linux/lib -Wl,-O1 LIBS=-lsupc++ -liberty -Wl,-Bstatic -lelf -Wl,-Bdynamic ARCH=i586 INSTALL_FILE=$(INSTALL) -p -m 0644 INSTALL_PROGRAM=$(INSTALL) -p -m 0755 INSTALL_SCRIPT=$(INSTALL) -p -m 0755 INSTALL_DIR=$(INSTALL) -p -d -m 0755&lt;br /&gt;
| make[1]: Entering directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4'&lt;br /&gt;
| make -C sysdeps/linux-gnu&lt;br /&gt;
| make[2]: Entering directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4/sysdeps/linux-gnu'&lt;br /&gt;
| make[2]: *** No rule to make target `i586/arch.h', needed by `sysdep.h'.  Stop.&lt;br /&gt;
| make[2]: Leaving directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4/sysdeps/linux-gnu'&lt;br /&gt;
| make[1]: *** [sysdeps/sysdep.o] Error 2&lt;br /&gt;
| make[1]: Leaving directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4'&lt;br /&gt;
| FATAL: oe_runmake failed&lt;br /&gt;
NOTE: Task failed: /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/log.do_compile.11205&lt;br /&gt;
NOTE: package ltrace-0.4-r0: task do_compile: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
NOTE: package ltrace-0.4: failed&lt;br /&gt;
ERROR: Build of openmoko-devel-image failed&lt;br /&gt;
make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Miohtama|Miohtama]] 21:50, 2 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
ltrace/sysdeps/linux-gnu had i386 folder, but no i586 folder. I created i586 symlink to i386. Let's see if it works. Ubuntu Feisty Fawn is the build host.&lt;br /&gt;
&lt;br /&gt;
--[[User:Miohtama|Miohtama]] 21:59, 2 May 2007 (CEST)&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Talk:Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T19:52:33Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I get the following error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OE Build Configuration:&lt;br /&gt;
BB_VERSION     = &amp;quot;1.6.7&amp;quot;&lt;br /&gt;
OE_REVISION    = &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot;&lt;br /&gt;
TARGET_ARCH    = &amp;quot;i586&amp;quot;&lt;br /&gt;
TARGET_OS      = &amp;quot;linux&amp;quot;&lt;br /&gt;
MACHINE        = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO         = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
DISTRO_VERSION = &amp;quot;.dev-snapshot-20070502&amp;quot;&lt;br /&gt;
TARGET_FPU     = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: preferred version 2.12.3 of glib-2.0 not available&lt;br /&gt;
...&lt;br /&gt;
NOTE: package ltrace-0.4: started&lt;br /&gt;
NOTE: package ltrace-0.4-r0: task do_compile: started&lt;br /&gt;
ERROR: function do_compile failed&lt;br /&gt;
ERROR: log data follows (/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/log.do_compile.11205)&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| NOTE: make ARCH=i586 INSTALL_FILE=$(INSTALL) -p -m 0644 INSTALL_PROGRAM=$(INSTALL) -p -m 0755 INSTALL_SCRIPT=$(INSTALL) -p -m 0755 INSTALL_DIR=$(INSTALL) -p -d -m 0755 LDFLAGS=-L/media/sda3/dump/workspace/moko/build/tmp/staging/i586-linux/lib -Wl,-rpath-link,/media/sda3/dump/workspace/moko/build/tmp/staging/i586-linux/lib -Wl,-O1 LIBS=-lsupc++ -liberty -Wl,-Bstatic -lelf -Wl,-Bdynamic ARCH=i586 INSTALL_FILE=$(INSTALL) -p -m 0644 INSTALL_PROGRAM=$(INSTALL) -p -m 0755 INSTALL_SCRIPT=$(INSTALL) -p -m 0755 INSTALL_DIR=$(INSTALL) -p -d -m 0755&lt;br /&gt;
| make[1]: Entering directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4'&lt;br /&gt;
| make -C sysdeps/linux-gnu&lt;br /&gt;
| make[2]: Entering directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4/sysdeps/linux-gnu'&lt;br /&gt;
| make[2]: *** No rule to make target `i586/arch.h', needed by `sysdep.h'.  Stop.&lt;br /&gt;
| make[2]: Leaving directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4/sysdeps/linux-gnu'&lt;br /&gt;
| make[1]: *** [sysdeps/sysdep.o] Error 2&lt;br /&gt;
| make[1]: Leaving directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4'&lt;br /&gt;
| FATAL: oe_runmake failed&lt;br /&gt;
NOTE: Task failed: /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/log.do_compile.11205&lt;br /&gt;
NOTE: package ltrace-0.4-r0: task do_compile: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
NOTE: package ltrace-0.4: failed&lt;br /&gt;
ERROR: Build of openmoko-devel-image failed&lt;br /&gt;
make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Miohtama|Miohtama]] 21:50, 2 May 2007 (CEST)&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr</id>
		<title>Talk:Getting OpenMoko working on host with Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Getting_OpenMoko_working_on_host_with_Xephyr"/>
				<updated>2007-05-02T19:50:57Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I get the following error:&lt;br /&gt;
&lt;br /&gt;
OE Build Configuration:&lt;br /&gt;
BB_VERSION     = &amp;quot;1.6.7&amp;quot;&lt;br /&gt;
OE_REVISION    = &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot;&lt;br /&gt;
TARGET_ARCH    = &amp;quot;i586&amp;quot;&lt;br /&gt;
TARGET_OS      = &amp;quot;linux&amp;quot;&lt;br /&gt;
MACHINE        = &amp;quot;qemux86&amp;quot;&lt;br /&gt;
DISTRO         = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
DISTRO_VERSION = &amp;quot;.dev-snapshot-20070502&amp;quot;&lt;br /&gt;
TARGET_FPU     = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NOTE: preferred version 2.12.3 of glib-2.0 not available&lt;br /&gt;
...&lt;br /&gt;
NOTE: package ltrace-0.4: started&lt;br /&gt;
NOTE: package ltrace-0.4-r0: task do_compile: started&lt;br /&gt;
ERROR: function do_compile failed&lt;br /&gt;
ERROR: log data follows (/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/log.do_compile.11205)&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/run.do_compile.11205: line 34: INSTALL: command not found&lt;br /&gt;
| NOTE: make ARCH=i586 INSTALL_FILE=$(INSTALL) -p -m 0644 INSTALL_PROGRAM=$(INSTALL) -p -m 0755 INSTALL_SCRIPT=$(INSTALL) -p -m 0755 INSTALL_DIR=$(INSTALL) -p -d -m 0755 LDFLAGS=-L/media/sda3/dump/workspace/moko/build/tmp/staging/i586-linux/lib -Wl,-rpath-link,/media/sda3/dump/workspace/moko/build/tmp/staging/i586-linux/lib -Wl,-O1 LIBS=-lsupc++ -liberty -Wl,-Bstatic -lelf -Wl,-Bdynamic ARCH=i586 INSTALL_FILE=$(INSTALL) -p -m 0644 INSTALL_PROGRAM=$(INSTALL) -p -m 0755 INSTALL_SCRIPT=$(INSTALL) -p -m 0755 INSTALL_DIR=$(INSTALL) -p -d -m 0755&lt;br /&gt;
| make[1]: Entering directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4'&lt;br /&gt;
| make -C sysdeps/linux-gnu&lt;br /&gt;
| make[2]: Entering directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4/sysdeps/linux-gnu'&lt;br /&gt;
| make[2]: *** No rule to make target `i586/arch.h', needed by `sysdep.h'.  Stop.&lt;br /&gt;
| make[2]: Leaving directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4/sysdeps/linux-gnu'&lt;br /&gt;
| make[1]: *** [sysdeps/sysdep.o] Error 2&lt;br /&gt;
| make[1]: Leaving directory `/media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/ltrace-0.4'&lt;br /&gt;
| FATAL: oe_runmake failed&lt;br /&gt;
NOTE: Task failed: /media/sda3/dump/workspace/moko/build/tmp/work/i586-linux/ltrace-0.4-r0/temp/log.do_compile.11205&lt;br /&gt;
NOTE: package ltrace-0.4-r0: task do_compile: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
NOTE: package ltrace-0.4: failed&lt;br /&gt;
ERROR: Build of openmoko-devel-image failed&lt;br /&gt;
make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&lt;br /&gt;
--[[User:Miohtama|Miohtama]] 21:50, 2 May 2007 (CEST)&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr</id>
		<title>Host-based development with Xoo and Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr"/>
				<updated>2007-04-28T13:00:49Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Getting rootfs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One of good ways to get started developing is getting rootfs working on host machine, since most of us doesn't have real hardware.&lt;br /&gt;
&lt;br /&gt;
Xoo is a graphical wrapper around Xnest, the nested X server. You can make Xnest look like a particular device's display and set up buttons on that device. This is useful for embedded developers who want to simulate a target device on their desktop machine.&lt;br /&gt;
&lt;br /&gt;
== Getting rootfs ==&lt;br /&gt;
Use the [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to get rootfs, just before make openmoko-devel-image run &lt;br /&gt;
 # sed -i 's/fic-gta01/x86/' build/conf/local.conf&lt;br /&gt;
than just run make openmoko-devel-image. After a while(half of day) you should have in build/tmp/image/ file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz mine is here [http://www.ms.mff.cuni.cz/~kupem6am/openmoko-devel-image-x86-20070227064250.rootfs.tar.gz].&lt;br /&gt;
&lt;br /&gt;
=== Build issues ===&lt;br /&gt;
&lt;br /&gt;
[http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=264 Please see this bug tracker issues] if you have problems getting libelf compiled (do_stage fails).&lt;br /&gt;
&lt;br /&gt;
== Install Xoo on your host ==&lt;br /&gt;
For gentoo users run just&lt;br /&gt;
 # emerge xoo&lt;br /&gt;
Debian/Ubuntu&lt;br /&gt;
 # sudo apt-get install xoo xnest&lt;br /&gt;
For Fedora (package has been submitted to Fedora for approval, see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236297):&lt;br /&gt;
 # ftp://ftp.xelerance.com/xoo/&lt;br /&gt;
&lt;br /&gt;
for any other find a way how to do it in your distro.&lt;br /&gt;
&lt;br /&gt;
== Making X cooperate ==&lt;br /&gt;
* Make sure your iptables do not prevent you from connecting to port 6000(x11) on localhost&lt;br /&gt;
&lt;br /&gt;
* Make sure your X is listening on port 6000(X11) on localhost (netstat is friend)&lt;br /&gt;
&lt;br /&gt;
* Enable conection from localhost&lt;br /&gt;
 # xhost localhost&lt;br /&gt;
== Preparing rootfs ==&lt;br /&gt;
* Unpack rootfs file in any directory and cd to that dir.&lt;br /&gt;
&lt;br /&gt;
* Get dev files in rootfs&lt;br /&gt;
 # sudo mount --bind /dev/ rootfs/dev/&lt;br /&gt;
&lt;br /&gt;
* Chroot to rootfs&lt;br /&gt;
 # sudo chroot rootfs /bin/sh&lt;br /&gt;
== Getting it up ==&lt;br /&gt;
In another term start xoo, good idea is to download [http://www.datenfreihafen.org/~stefan/OpenMoko/neo1973-xoo-device.tar.bz2] and run&lt;br /&gt;
 # xoo --device neo1973.xml&lt;br /&gt;
In chrooted enviroment export display to connect to started xoo&lt;br /&gt;
 # export DISPLAY=localhost:1.0&lt;br /&gt;
and start window manager.&lt;br /&gt;
 # x-window-manager&lt;br /&gt;
By this time you should have matchbox running in Xoo window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Higher_level_language_options</id>
		<title>Talk:Higher level language options</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Higher_level_language_options"/>
				<updated>2007-04-27T20:36:44Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The 'feature matrix' is, imho, an ill-concieved idea.  There is no way you can fit the subtleties and details of programming langauges into a matrix.  One of the huge problems is that many languages have a variety of compilers, interpreters, etc, each with its own performance traits.&lt;br /&gt;
&lt;br /&gt;
The matrix concept is salvageable - split it into multiple categories - Interpreted, Just-in-timed, and compiled.  The main reason for this is the large variance in difficulty in porting each category.  The matrix within each of these categories would be tailored to it.  For JIT and interpreted, the core executer size is important.  For JIT, the estimated startup time for complex apps is important.  Another issue is portage.  Many interpreters for major interpreted languages are written in C for this very reason - there's not so much that an interpreter must depend on.  Compilers are quite a bit harder to handle, as they must generate quite specific code.  JITs will sometimes have a subset which must be rewritten on port - for mono, this is about 5000 lines.&lt;br /&gt;
&lt;br /&gt;
[[User:Mgsloan|Mgsloan]] 09:04, 19 April 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
It seems Python is the higher level language of choice for [http://www.gnome.org/mobile/ GNOME Mobile &amp;amp; Embedded Initiative] , the [http://www.laptop.org/laptop/software/specs.shtml One Laptop per Child] project and the best supported HLL in Nokias [http://downloads.maemo.org/product/python/ Maemo] platform. So we can probably expect many mobile applications for these platforms will be written in Python, and also that Python bindings for essential libraries will have lots of community support. Things like these should perhaps also be important deciding factors, not only the specifics of the language itself.&lt;br /&gt;
&lt;br /&gt;
--[[User:Anderso|Anderso]] 09:13, 20 April 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Also, Nokia has ported Python to its Series 60 platform. It's used for rapid prototyping and some third party apps.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr</id>
		<title>Host-based development with Xoo and Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr"/>
				<updated>2007-04-27T17:27:57Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One of good ways to get started developing is getting rootfs working on host machine, since most of us doesn't have real hardware.&lt;br /&gt;
&lt;br /&gt;
Xoo is a graphical wrapper around Xnest, the nested X server. You can make Xnest look like a particular device's display and set up buttons on that device. This is useful for embedded developers who want to simulate a target device on their desktop machine.&lt;br /&gt;
&lt;br /&gt;
== Getting rootfs ==&lt;br /&gt;
Use the [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to get rootfs, just before make openmoko-devel-image run &lt;br /&gt;
 # sed -i 's/fic-gta01/x86/' build/conf/local.conf&lt;br /&gt;
than just run make openmoko-devel-image. After a while(half of day) you should have in build/tmp/image/ file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz mine is here [http://www.ms.mff.cuni.cz/~kupem6am/openmoko-devel-image-x86-20070227064250.rootfs.tar.gz].&lt;br /&gt;
&lt;br /&gt;
== Install Xoo on your host ==&lt;br /&gt;
For gentoo users run just&lt;br /&gt;
 # emerge xoo&lt;br /&gt;
Debian/Ubuntu&lt;br /&gt;
 # sudo apt-get install xoo xnest&lt;br /&gt;
For Fedora (package has been submitted to Fedora for approval, see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236297):&lt;br /&gt;
 # ftp://ftp.xelerance.com/xoo/&lt;br /&gt;
&lt;br /&gt;
for any other find a way how to do it in your distro.&lt;br /&gt;
&lt;br /&gt;
== Making X cooperate ==&lt;br /&gt;
* Make sure your iptables do not prevent you from connecting to port 6000(x11) on localhost&lt;br /&gt;
&lt;br /&gt;
* Make sure your X is listening on port 6000(X11) on localhost (netstat is friend)&lt;br /&gt;
&lt;br /&gt;
* Enable conection from localhost&lt;br /&gt;
 # xhost localhost&lt;br /&gt;
== Preparing rootfs ==&lt;br /&gt;
* Unpack rootfs file in any directory and cd to that dir.&lt;br /&gt;
&lt;br /&gt;
* Get dev files in rootfs&lt;br /&gt;
 # sudo mount --bind /dev/ rootfs/dev/&lt;br /&gt;
&lt;br /&gt;
* Chroot to rootfs&lt;br /&gt;
 # sudo chroot rootfs /bin/sh&lt;br /&gt;
== Getting it up ==&lt;br /&gt;
In another term start xoo, good idea is to download [http://www.datenfreihafen.org/~stefan/OpenMoko/neo1973-xoo-device.tar.bz2] and run&lt;br /&gt;
 # xoo --device neo1973.xml&lt;br /&gt;
In chrooted enviroment export display to connect to started xoo&lt;br /&gt;
 # export DISPLAY=localhost:1.0&lt;br /&gt;
and start window manager.&lt;br /&gt;
 # x-window-manager&lt;br /&gt;
By this time you should have matchbox running in Xoo window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr</id>
		<title>Host-based development with Xoo and Xephyr</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Host-based_development_with_Xoo_and_Xephyr"/>
				<updated>2007-04-27T17:05:48Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Install Xoo on your host */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One of good ways to get started developing is getting rootfs working on host machine, since most of us doesn't have real hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting rootfs ==&lt;br /&gt;
Use the [[MokoMakefile|Building OpenMoko using the MokoMakefile]] to get rootfs, just before make openmoko-devel-image run &lt;br /&gt;
 # sed -i 's/fic-gta01/x86/' build/conf/local.conf&lt;br /&gt;
than just run make openmoko-devel-image. After a while(half of day) you should have in build/tmp/image/ file openmoko-devel-image-x86-$(DATE).rootfs.tar.gz mine is here [http://www.ms.mff.cuni.cz/~kupem6am/openmoko-devel-image-x86-20070227064250.rootfs.tar.gz].&lt;br /&gt;
&lt;br /&gt;
== Install Xoo on your host ==&lt;br /&gt;
For gentoo users run just&lt;br /&gt;
 # emerge xoo&lt;br /&gt;
Debian/Ubuntu&lt;br /&gt;
 # sudo apt-get install xoo xnest&lt;br /&gt;
For Fedora (package has been submitted to Fedora for approval, see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236297):&lt;br /&gt;
 # ftp://ftp.xelerance.com/xoo/&lt;br /&gt;
&lt;br /&gt;
for any other find a way how to do it in your distro.&lt;br /&gt;
&lt;br /&gt;
== Making X cooperate ==&lt;br /&gt;
* Make sure your iptables do not prevent you from connecting to port 6000(x11) on localhost&lt;br /&gt;
&lt;br /&gt;
* Make sure your X is listening on port 6000(X11) on localhost (netstat is friend)&lt;br /&gt;
&lt;br /&gt;
* Enable conection from localhost&lt;br /&gt;
 # xhost localhost&lt;br /&gt;
== Preparing rootfs ==&lt;br /&gt;
* Unpack rootfs file in any directory and cd to that dir.&lt;br /&gt;
&lt;br /&gt;
* Get dev files in rootfs&lt;br /&gt;
 # sudo mount --bind /dev/ rootfs/dev/&lt;br /&gt;
&lt;br /&gt;
* Chroot to rootfs&lt;br /&gt;
 # sudo chroot rootfs /bin/sh&lt;br /&gt;
== Getting it up ==&lt;br /&gt;
In another term start xoo, good idea is to download [http://www.datenfreihafen.org/~stefan/OpenMoko/neo1973-xoo-device.tar.bz2] and run&lt;br /&gt;
 # xoo --device neo1973.xml&lt;br /&gt;
In chrooted enviroment export display to connect to started xoo&lt;br /&gt;
 # export DISPLAY=localhost:1.0&lt;br /&gt;
and start window manager.&lt;br /&gt;
 # x-window-manager&lt;br /&gt;
By this time you should have matchbox running in Xoo window.&lt;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/MokoMakefile</id>
		<title>MokoMakefile</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/MokoMakefile"/>
				<updated>2007-04-24T19:52:33Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==MokoMakefile==&lt;br /&gt;
MokoMakefile is a fully automated way of setting up an OpenMoko development environment.  It is an invaluable tool for getting new developers up and running with a build environment which is configured the same as all the other existing developers.  It brings the same repeatability to build environment creation and maintenance as that which OpenEmbedded brings to the main task of actually building embedded software distributions.&lt;br /&gt;
&lt;br /&gt;
Note that MokoMakefile does *not* replace bitbake, or svn, or monotone, or openembedded, or qmake, or anything else.  It is a wrapper around all that to make it easy to set up and maintain a development environment that fully complies with the setup instructions published by OpenMoko.  Note that you need about 7 GB of available disk space for MokoMakefile to succeed.&lt;br /&gt;
&lt;br /&gt;
MokoMakefile is developed by [[User:RodWhitby|Rod Whitby]] - it is not an official product of OpenMoko (although I would be happy for them to pick it up and use it internally).  If there is any discrepancy between the [[Building_OpenMoko_from_scratch|official OpenMoko build instructions]], and the operation of the MokoMakefile, then you should consider the official instructions to be correct.&lt;br /&gt;
&lt;br /&gt;
=== Before you begin ===&lt;br /&gt;
Check that your /bin/sh (ls -l /bin/sh) is not linked to dash rather than bash.  Using dash will cause you pain.  If you have previously built with dash as your sh shell then your perl compile is probably broken.  One symptom is that the build will error and whine about an 'Unterminated quote string' another symptom is a message that says 'You haven't done a &amp;quot;make depend&amp;quot; yet!'  If you get these then you need to:&lt;br /&gt;
 make clean-package-perl&lt;br /&gt;
 make clean-package-perl-native&lt;br /&gt;
and rebuild.&lt;br /&gt;
&lt;br /&gt;
If all else fails then just rm -rf the perl work dir and the perl stamps here's an i686 host example:&lt;br /&gt;
 rm -rf build/tmp/work/i686-linux/perl-native-5.8.7-r3 &lt;br /&gt;
 rm -f  build/tmp/stamps/i686-linux/perl*&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Here are the steps to use it:&lt;br /&gt;
&lt;br /&gt;
1 - Make sure your build host is set up according to:&lt;br /&gt;
   http://www.openembedded.org/wiki/OEandYourDistro&lt;br /&gt;
2 - Create your $OMDIR directory:&lt;br /&gt;
   mkdir /home/moko ; cd /home/moko&lt;br /&gt;
3 - Grab MokoMakefile:&lt;br /&gt;
   wget http://www.rwhitby.net/files/openmoko/Makefile&lt;br /&gt;
4 - Set up the environment:&lt;br /&gt;
   make setup&lt;br /&gt;
5 - Start building. Before starting a lenghty make process, check in Tips section about how to make Make multicore aware:&lt;br /&gt;
   make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
This will set up the recommended directory structure as described in [[Building OpenMoko from scratch]], will download all the required software (from the right places with the right versions), and will immediately start building an image.&lt;br /&gt;
&lt;br /&gt;
Once you have done this, you can choose to continue using the MokoMakefile to initiate your subsequent builds, or you can go into the build directory and run bitbake commands manually.  The choice is yours.&lt;br /&gt;
&lt;br /&gt;
===Updating the environment=== &lt;br /&gt;
For easy maintenance of your build environment the following commands are available.&lt;br /&gt;
&lt;br /&gt;
1 - To update the MokoMakefile to the latest version:&lt;br /&gt;
   make update-makefile &lt;br /&gt;
&lt;br /&gt;
2 - To update the OpenMoko repository checkout and the MokoMakefile patches to the latest version:&lt;br /&gt;
   make update&lt;br /&gt;
&lt;br /&gt;
3 - To make sure that any recent changes to the build directory structure have been applied:&lt;br /&gt;
   make setup &lt;br /&gt;
&lt;br /&gt;
A quick way to rebuild a new image with the latest updates:&lt;br /&gt;
   make update-makefile &amp;amp;&amp;amp; make update &amp;amp;&amp;amp; make setup &amp;amp;&amp;amp; make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
===Reporting Problems===&lt;br /&gt;
&lt;br /&gt;
First, make sure that the problem is reproducable after running&lt;br /&gt;
&lt;br /&gt;
 make update-makefile ; make update ; make setup&lt;br /&gt;
&lt;br /&gt;
then running&lt;br /&gt;
&lt;br /&gt;
 make clean-package-&amp;lt;foo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(where you replace &amp;lt;foo&amp;gt; with the name of the package which is failing)&lt;br /&gt;
&lt;br /&gt;
then running&lt;br /&gt;
&lt;br /&gt;
 make all&lt;br /&gt;
&lt;br /&gt;
If you can get the error to occur three times in a row after running that sequence of commands three times, then feel free to report it to rwhitby in #openmoko on [http://wiki.openmoko.org/wiki/Development_resources#IRC IRC].&lt;br /&gt;
&lt;br /&gt;
===Work-arounds===&lt;br /&gt;
&lt;br /&gt;
Work-arounds for temporary or isolated problems should be added to the [[Talk:MokoMakefile|Discussion page]] which is associated with this page.  As they are fixed, they will be removed from that page.&lt;br /&gt;
&lt;br /&gt;
===Tips=== &lt;br /&gt;
*You can reduce the amount of consumed disk space significantly by adding&lt;br /&gt;
   INHERIT += &amp;quot;rm_work&amp;quot;&lt;br /&gt;
in your local.conf (e.g. /home/moko/build/conf/local.conf). This will remove the contents of each build/tmp/work/*/&amp;lt;package&amp;gt; directory after the corresponding package builds correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*If you an encounter an error with monotone similar to the following:&lt;br /&gt;
   mtn: misuse: database /home/moko/OE.mtn is laid out according to an old schema&lt;br /&gt;
Then you need to upgrade OE.mtn  Use the following command while in /home/moko:&lt;br /&gt;
   # mtn --db OE.mtn db migrate&lt;br /&gt;
&lt;br /&gt;
*If a certain package does not build due to corrupted download or some such try to remove the sources and rebuild it.&lt;br /&gt;
 rm sources/&amp;lt;package&amp;gt;*&lt;br /&gt;
 cd build&lt;br /&gt;
 . ../setup-env&lt;br /&gt;
 bitbake -crebuild &amp;lt;package&amp;gt;&lt;br /&gt;
after that your build might just work again.&lt;br /&gt;
&lt;br /&gt;
*For people with multiple CPU's (or dual-core ones) this small patch might be useful to build things faster.&lt;br /&gt;
Edit the local.conf and add the following lines:&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 BB_NUMBER_THREADS = &amp;quot;4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the PARALLEL_MAKE and BB_NUMBER_THREADS values to something that suits better if it chokes your machine.&lt;br /&gt;
&lt;br /&gt;
*For amd64 host users you need the patch from http://bugs.openembedded.org/show_bug.cgi?id=1765 to build db3-native&lt;br /&gt;
&lt;br /&gt;
===QEMU===&lt;br /&gt;
The MokoMakefile now has support for automatically building, flashing, and running [[OpenMoko under QEMU|the new Neo1973 emulator]] (which is based on QEMU).&lt;br /&gt;
&lt;br /&gt;
“make qemu” will build qemu-neo1973, download the latest official OpenMoko images, flash the images into the virtual NAND flash, and run the emulator.&lt;br /&gt;
&lt;br /&gt;
Other targets are “make download-images” (to download the latest official images), “make flash-qemu-official” (to flash those images) and “make flash-qemu-local” (which will flash your latest locally built images), which can then be followed by “make run-qemu” or “make run-qemu-snapshot” to run the emulator with the most recently flashed images.&lt;br /&gt;
&lt;br /&gt;
Make sure you have the “lynx” and “netpbm” packages installed on your build host first.&lt;br /&gt;
&lt;br /&gt;
You're also invited to read more about how to run [[OpenMoko under QEMU]] in the article dedicated to this subject.&lt;br /&gt;
&lt;br /&gt;
===Developing with MokoMakefile===&lt;br /&gt;
&lt;br /&gt;
To make in-tree changes and have them built and used by qemu:&lt;br /&gt;
&lt;br /&gt;
  cd /home/moko/openmoko&lt;br /&gt;
  quilt new descriptive-patch-name.patch&lt;br /&gt;
  quilt add trunk/src/name-of-file-to-change&lt;br /&gt;
   (do this for every file you are about to modify)&lt;br /&gt;
  ...make the changes...&lt;br /&gt;
  quilt refresh&lt;br /&gt;
   (this creates a file in /home/moko/patches/openmoko-HEAD/ and &lt;br /&gt;
    updates the quilt series file there)&lt;br /&gt;
&lt;br /&gt;
To build the changes and have them used by qemu:&lt;br /&gt;
&lt;br /&gt;
  make build-qemu&lt;br /&gt;
  make flash-qemu-local&lt;br /&gt;
  make run-qemu&lt;br /&gt;
&lt;br /&gt;
===Testimonials=== &lt;br /&gt;
MokoMakefile is recommended by 4 out of 4 new developers on #openmoko, with testimonials such as &amp;quot;For some reason last night I couldn't get my manual install of everything to work (bb complained about my bbpath I think) ... but with your makefile, it works great!&amp;quot;, and &amp;quot;MokoMakefile rocks!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Project page:&lt;br /&gt;
http://mokomakefile.projects.openmoko.org/&lt;br /&gt;
&lt;br /&gt;
{{Languages|MokoMakefile}}&lt;/div&gt;</summary>
		<author><name>Miohtama</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>2007-04-24T15:05:30Z</updated>
		
		<summary type="html">&lt;p&gt;Miohtama: /* Building the environment manually */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;QEMU can basically be used in 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 CPU. 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]] hardware, although not all of it at this moment. It is a work-in-progress and when it's more mature it is going to be submitted for merging to the main QEMU development tree.&lt;br /&gt;
&lt;br /&gt;
== Neo1973 emulation ==&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 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 emulator are: [[GSM]] modem, [[Hardware:AGPS|AGPS]] and [[Bluetooth]], as well as the USB slave functionality - 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 || Work || 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 as in QEMU window iff &amp;quot;-nographic&amp;quot; is not specified.&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&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|Possibly Linux's dummy HCD in conjunction with gadget filesystem API can make the virtual Neo appear as a real one connected to your computer. Otherwise different host functions (usbtty, usbnet) could be emulated.&lt;br /&gt;
|-&lt;br /&gt;
|Watchdog&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|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 and 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:#ffcccc;&amp;quot;|To Do&lt;br /&gt;
|Will require implementing the Delta DBFM chip and connecting it to USB. The ROM will likely be replaced with code to translate communication directly to TCP/UDP networking (like Slirp). A real bluetooth dongle can also be attached to the emulator (see USB documentation in QEMU).&lt;br /&gt;
|-&lt;br /&gt;
|[[GSM]]&lt;br /&gt;
|style=&amp;quot;background-color:#ffcccc;&amp;quot;|In Progress&lt;br /&gt;
|A fake modem will be connected to UART0 with as much functionality as possible (basic AT commands understanding, fake GPRS connections 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.&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;
== How to get it running ==&lt;br /&gt;
&lt;br /&gt;
=== Using MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
This is the recommended way since you won't need to deal with the compiling and flashing processes yourself. See [[MokoMakefile#QEMU|MokoMakefile]] for details.&lt;br /&gt;
&lt;br /&gt;
=== Building the environment manually ===&lt;br /&gt;
Qemu building requires to have SDL or Cocoa installed. &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:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./configure --target-list=arm-softmmu --cc=/usr/bin/gcc-3.4 # GCC 3.x will be required&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;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). These binaries will be used by the next command:&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, 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://www.qemu.org/user-doc.html QEMU user docs]. You will probably want to use the &amp;quot;-snapshot&amp;quot; switch, among other ones.&lt;br /&gt;
&lt;br /&gt;
=== Pre-built binaries ===&lt;br /&gt;
&lt;br /&gt;
Win32 binaries shipped with firmware can be downloaded from [http://mdk.linux.org.tw/~jserv/openmoko/openmoko-emulator-win32-bin-20070416.zip openmoko-emulator-win32-bin-20070416.zip]. Tested on Ms Windows XP.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The QEMU tree has only been tested on GNU/Linux. To get graphical and/or audio output from the emulator you will need SDL installed on your computer. To enable audio, see the available switches to the ./configure script.&lt;br /&gt;
All of the requirements listed in [http://www.qemu.org/user-doc.html QEMU documentation] apply.&lt;br /&gt;
&lt;br /&gt;
== QEMU and GNU debugger ==&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;/div&gt;</summary>
		<author><name>Miohtama</name></author>	</entry>

	</feed>