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

	<entry>
		<id>http://wiki.openmoko.org/wiki/Qi</id>
		<title>Qi</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Qi"/>
				<updated>2009-03-14T17:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:Screenshot-Qi.png|frame|Qi Boot messages]] Qi ( [[http://zh.wikipedia.org/wiki/气| '''氣''' ]] ) is a lightweight replacement for the [[Uboot|uBoot]] bootloader with everything that doesn't assist &amp;quot;loading&amp;quot; and &amp;quot;booting&amp;quot; Linux stripped out.&lt;br /&gt;
&lt;br /&gt;
Its advantages comparing to [[Uboot|u-boot]] are:&lt;br /&gt;
* actively developed (u-boot on GTA02 is deprecated)&lt;br /&gt;
* easier configuration, more robust and predictable&lt;br /&gt;
* SD and SDHC cards supported properly with partitions of any size&lt;br /&gt;
* kernel size is detected by checking the start of the kernel image, so large (&amp;gt;2M) kernels are supported without tweaking or loading more than needed&lt;br /&gt;
* Very fast, simple boot direct to Linux&lt;br /&gt;
&lt;br /&gt;
==About Qi==&lt;br /&gt;
===Requirements===&lt;br /&gt;
There is a [[Neo1973|GTA01]] build of Qi, but using it without a debug board is not recommended because Qi itself does not support DFU, so updating or going back to U-Boot is a difficult process.&lt;br /&gt;
&lt;br /&gt;
[[Freerunner|GTA02 Hardware]] has NOR U-Boot always available to update Qi so it's safe to try it out.&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
* booting from primary SD partitions (1st, 2nd or 3rd) in /boot directory&lt;br /&gt;
* booting from NAND (compatible with U-Boot's dynparts scheme)&lt;br /&gt;
* configuration per rootfs, by files in /boot in the rootfs&lt;br /&gt;
* automatically choose correct kernel for device hardware so rootfs can be used on multiple device types&lt;br /&gt;
* automatically tell kernel correct root= for rootfs kernel image came from, simplifying update&lt;br /&gt;
* ext2/3 are supported&lt;br /&gt;
* symlinks are supported&lt;br /&gt;
* parses identity partition and appends kernel commandline with device identity information&lt;br /&gt;
* zero &amp;quot;environment&amp;quot; or private persistent state - operation is completely deterministic&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
* no DFU-Mode - USB is not initialized at all&lt;br /&gt;
* no boot menu&lt;br /&gt;
* FAT partitions are ignored&lt;br /&gt;
&lt;br /&gt;
Both the lack of DFU and the boot menu are planned to be addressed by the backup / recovery rootfs.&lt;br /&gt;
&lt;br /&gt;
FAT is not supported because it can't provide a rootfs, and Qi wants the kernel to come from the rootfs.&lt;br /&gt;
&lt;br /&gt;
===Defaults===&lt;br /&gt;
If the kernel is found on uSD, Qi assumes the rootfs to be on the same partition as the kernel. In case of boot from NAND, it assumes that rootfs is also on NAND (just as u-boot does). See [[#/boot-Partition|below]] for help with an extra /boot-partition. The default rootdelay is 1 second.&lt;br /&gt;
&lt;br /&gt;
===Files===&lt;br /&gt;
; /boot/uImage-GTA0[123].bin&lt;br /&gt;
: Kernel images, Qi will look for (can be in either uImage (u-boot image) or zImage format, file name should still be uImage-GTA0[123].bin) &lt;br /&gt;
; /boot/append-GTA0[123]&lt;br /&gt;
: Additional kernel arguments. All arguments should be on the first and the only line separated by spaces, for example: &amp;quot;&amp;lt;tt&amp;gt;loglevel=8 rootdelay=5 &amp;lt;/tt&amp;gt;&amp;quot; . Make sure you have an extra space after the last argument (space is no longer needed if the version is from 31 Jan or older)!&lt;br /&gt;
; /boot/noboot-GTA0[123]&lt;br /&gt;
: make Qi skip this partition&lt;br /&gt;
&lt;br /&gt;
===Speed up kernel resume for SHR===&lt;br /&gt;
Since SHR (and perhaps other distributions as well) ouput log messages during resume which slow down the resume process by ca. 3 seconds it make sense there to append the following settings to /boot/append-GTA0[123]:&lt;br /&gt;
: loglevel=1 quiet &lt;br /&gt;
The disadvantage of this speedup is that you won't see any lifesign of your phone until it starts the graphical user interface after adding these files, though.&lt;br /&gt;
===Boot Order===&lt;br /&gt;
[[image:Qi-drawings-bootsequence.png|frame|Qi GTA02 Booting order]]&lt;br /&gt;
# SD Partition 1&lt;br /&gt;
# SD Partition 2&lt;br /&gt;
# SD Partition 3&lt;br /&gt;
# NAND&lt;br /&gt;
# Memory Test&lt;br /&gt;
&lt;br /&gt;
Qi will try to mount each SD partition as ext2 / 3, if that succeeds it will look for the kernel as /boot/uImage-GTA02.bin.  If that is found, it'll be fetched, its CRC is checked and then it's booted into with a generated kernel commandline.&lt;br /&gt;
&lt;br /&gt;
===Kernel Commandline Generation===&lt;br /&gt;
[[image:Qi-commandline-composition.png‎|frame|Qi commandline composition]]&lt;br /&gt;
Because Qi has no private stored state, it infers and composes a suitable kernel commandline on each boot.&lt;br /&gt;
&lt;br /&gt;
One of its tasks is to scan NAND memory using the U-Boot dynparts rules to determine the start offset&lt;br /&gt;
of the NAND partitions on this device, from that it forms the mtdparts kernel parameter that sets Linux's&lt;br /&gt;
view of NAND partitioning.&lt;br /&gt;
&lt;br /&gt;
The other thing it does is mount the &amp;quot;identity&amp;quot; partition and get from there the globally unique MAC&lt;br /&gt;
address for the USB over Ethernet function instead of the random one that is otherwise used.&lt;br /&gt;
&lt;br /&gt;
===LED and Vibrator Signals===&lt;br /&gt;
* AUX LED is turned on either on:&lt;br /&gt;
** Successful partition mount&lt;br /&gt;
** Successful kernel pull&lt;br /&gt;
** Successful initramfs pull&lt;br /&gt;
* AUX LED is turned off and vibrator runs briefly either on:&lt;br /&gt;
** Fail of kernel pull&lt;br /&gt;
** Fail of initramfs pull&lt;br /&gt;
** Fail of mount partition&lt;br /&gt;
** Skipping of current boot possibility&lt;br /&gt;
* AUX LED is turned off either on:&lt;br /&gt;
** Start of the kernel&lt;br /&gt;
** Start of the mem test&lt;br /&gt;
** Start of the kernel pull&lt;br /&gt;
** Start of the initramfs pull&lt;br /&gt;
* One Blue shine every ~10 second: did not find any valid kernel to boot&lt;br /&gt;
* About four RED shines per second: kernel panic.&lt;br /&gt;
&lt;br /&gt;
===Booting===&lt;br /&gt;
A short press on the power button is enough to make Qi start booting. In a few seconds the backlight will be lit, but the kernel will not spew any console messages unless something is wrong. It may take up to 2 minutes (depends on distribution) until X is started during which there will be no visual feedback. Please be patient.&lt;br /&gt;
&lt;br /&gt;
You can force debug messages on the LCM console by holding in the power button before Linux starts.&lt;br /&gt;
&lt;br /&gt;
===Choosing a Kernel===&lt;br /&gt;
If a user presses the AUX button after successful partition mount and&lt;br /&gt;
before start of the kernel pull (that is, while the red LED is on),&lt;br /&gt;
this boot possibility is skipped (and GTA02 owners can feel&lt;br /&gt;
vibration).&lt;br /&gt;
&lt;br /&gt;
On versions newer than Jan 18 if a user holds the POWER button just before start of the kernel,&lt;br /&gt;
debugging parameters are added to the kernel command line and a lot of information is output to the screen.&lt;br /&gt;
&lt;br /&gt;
===Boot Menu===&lt;br /&gt;
Qi's concept is to leave everything possible to Linux, that includes even the video init. Therefore Qi does NOT provide a boot menu. This should rather be implemented by a minimal Kernel, initramfs and menu system. It may be more comfortable for some users and may get them to switch from uboot to Qi. This does not exist yet (it's already implemented for some Angstrom-supported devices and for Zaurus, so porting should be relatively easy).&lt;br /&gt;
&lt;br /&gt;
===Download and installation===&lt;br /&gt;
The daily download is a ''qi-s3cXXXX-andy_somenumber.udfu'' file at http://people.openmoko.org/andy/ .&lt;br /&gt;
Use the file appropriate to your device:&lt;br /&gt;
*GTA01 -&amp;gt; qi-s3c2410&lt;br /&gt;
*GTA02 -&amp;gt; qi-s3c2442&lt;br /&gt;
*GTA03 -&amp;gt; qi-s3c6410&lt;br /&gt;
&lt;br /&gt;
The installation should be flashing like (do it in DFU mode of NOR u-boot):&lt;br /&gt;
 # dfu-util -a u-boot -R -D qi-s3c6410-andy_8589b40295653557.udfu&lt;br /&gt;
&lt;br /&gt;
===Source code===&lt;br /&gt;
git://git.openmoko.org/git/qi.git , http://git.openmoko.org/?p=qi.git;a=summary .&lt;br /&gt;
One can also just use strings(1) on the .udfu file to get an idea of where Qi currently looks for files.&lt;br /&gt;
&lt;br /&gt;
===README===&lt;br /&gt;
The latest README file can be found in the git as well:http://git.openmoko.org/?p=qi.git;a=blob;f=README;hb=HEAD&lt;br /&gt;
&lt;br /&gt;
==Tips, Tricks, Tweaks==&lt;br /&gt;
===General troubleshooting===&lt;br /&gt;
Qi does not bring up the LCD backlight.  If the backlight is lit, it means you have succeeded to boot into Linux.&lt;br /&gt;
&lt;br /&gt;
If nothing else is happening or there is a panic, enable debugging messages as described below.&lt;br /&gt;
&lt;br /&gt;
===Enabling console messages===&lt;br /&gt;
&lt;br /&gt;
You can just hold in the power button, this automatically appends verbose debugging to the kernel commandline (loglevel=8).&lt;br /&gt;
&lt;br /&gt;
If you always want verbose &amp;quot;dmesg&amp;quot; type debugging messages, you can do it like this:&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/openmoko-kernel/2008-November/006812.html]&lt;br /&gt;
If it's SD Card boot, just create a text file, e.g., for a [[GTA02]] use&lt;br /&gt;
 /boot/append-GTA02&lt;br /&gt;
on the rootfs in question, put in there&lt;br /&gt;
 loglevel=8&lt;br /&gt;
and you'll see the messages on boot.  If it's NAND right now you need to edit the default commandline in Qi for gta02.&lt;br /&gt;
&lt;br /&gt;
===/boot-Partition===&lt;br /&gt;
If you have a separate partition for /boot, so that your kernel and rootfs are not in fact on the same partition, you will need to append a root= entry on the kernel commandline to override the default action of trying to use the partition where the kernel came from as the rootfs.&lt;br /&gt;
&lt;br /&gt;
Add this in /boot/append-GTA0[123]:&lt;br /&gt;
 root=/dev/mmcblk0p2&lt;br /&gt;
for a rootfs on the second partition.&lt;br /&gt;
&lt;br /&gt;
Note that a default Debian installation puts the kernel straight in the root of /dev/mmcblk0p1, not in a boot subdirectory, expecting u-boot to mount it as /boot. In order for Qi to recognise this, create a boot subdirectory with a symlink to the kernel.&lt;br /&gt;
&lt;br /&gt;
===SD Initialisation===&lt;br /&gt;
If you don't specify loglevel=8 in append-GTAXX, and booting fails with a &amp;quot;VFS: Cannot open root device &amp;quot;mmcblk0p1&amp;quot; or unknown-block(2,0)&amp;quot;, the SD card needs a little bit more time to initialise.&lt;br /&gt;
&lt;br /&gt;
Put a &amp;quot;rootdelay=5&amp;quot; in append-GTAXX like so:&lt;br /&gt;
 rootdelay=5&lt;br /&gt;
&lt;br /&gt;
== Testing speed improvements ==&lt;br /&gt;
&lt;br /&gt;
Stopwatch results on Qi (error is approx ±1/2 second):&lt;br /&gt;
&lt;br /&gt;
Booting SHR image with uBoot:&lt;br /&gt;
* 0:00 power button held down&lt;br /&gt;
* 0:07 splash screen appears&lt;br /&gt;
* 0:15 drops to console showing kernel messages scrolling by for ~1 minute&lt;br /&gt;
* 1:18 Openmoko 'please wait' splash&lt;br /&gt;
* 1:31 desktop animated splash&lt;br /&gt;
* 2:38 finished booting&lt;br /&gt;
&lt;br /&gt;
Booting identical setup with Qi flashed over uBoot:&lt;br /&gt;
* 0:00 power button held down&lt;br /&gt;
* 0:06 backlit black&lt;br /&gt;
* 0:13 please wait booting... (only this text on console for next 38 seconds)&lt;br /&gt;
* 0:51 Angstrom console message (at the end of kernel output with uBoot, but ONLY text display to appear throughout this stage with Qi)&lt;br /&gt;
* 0:54 Openmoko 'please wait' splash&lt;br /&gt;
* 1:05 desktop animated splash&lt;br /&gt;
* 1:54 finished booting&lt;br /&gt;
&lt;br /&gt;
So for this particular configuration, it reduced time-to-desktop by about 28%, about 44 seconds.  Surprisingly, the later segments of booting (desktop) were also noticeably faster than with uBoot - One would have expected just the fist stages up until init (kernel finished establishing itself) to be faster.&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Qi</id>
		<title>Qi</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Qi"/>
				<updated>2009-03-14T17:01:08Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Speed up resume */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:Screenshot-Qi.png|frame|Qi Boot messages]] Qi ( [[http://zh.wikipedia.org/wiki/气| '''氣''' ]] ) is a lightweight replacement for the [[Uboot|uBoot]] bootloader with everything that doesn't assist &amp;quot;loading&amp;quot; and &amp;quot;booting&amp;quot; Linux stripped out.&lt;br /&gt;
&lt;br /&gt;
Its advantages comparing to [[Uboot|u-boot]] are:&lt;br /&gt;
* actively developed (u-boot on GTA02 is deprecated)&lt;br /&gt;
* easier configuration, more robust and predictable&lt;br /&gt;
* SD and SDHC cards supported properly with partitions of any size&lt;br /&gt;
* kernel size is detected by checking the start of the kernel image, so large (&amp;gt;2M) kernels are supported without tweaking or loading more than needed&lt;br /&gt;
* Very fast, simple boot direct to Linux&lt;br /&gt;
&lt;br /&gt;
==About Qi==&lt;br /&gt;
===Requirements===&lt;br /&gt;
There is a [[Neo1973|GTA01]] build of Qi, but using it without a debug board is not recommended because Qi itself does not support DFU, so updating or going back to U-Boot is a difficult process.&lt;br /&gt;
&lt;br /&gt;
[[Freerunner|GTA02 Hardware]] has NOR U-Boot always available to update Qi so it's safe to try it out.&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
* booting from primary SD partitions (1st, 2nd or 3rd) in /boot directory&lt;br /&gt;
* booting from NAND (compatible with U-Boot's dynparts scheme)&lt;br /&gt;
* configuration per rootfs, by files in /boot in the rootfs&lt;br /&gt;
* automatically choose correct kernel for device hardware so rootfs can be used on multiple device types&lt;br /&gt;
* automatically tell kernel correct root= for rootfs kernel image came from, simplifying update&lt;br /&gt;
* ext2/3 are supported&lt;br /&gt;
* symlinks are supported&lt;br /&gt;
* parses identity partition and appends kernel commandline with device identity information&lt;br /&gt;
* zero &amp;quot;environment&amp;quot; or private persistent state - operation is completely deterministic&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
* no DFU-Mode - USB is not initialized at all&lt;br /&gt;
* no boot menu&lt;br /&gt;
* FAT partitions are ignored&lt;br /&gt;
&lt;br /&gt;
Both the lack of DFU and the boot menu are planned to be addressed by the backup / recovery rootfs.&lt;br /&gt;
&lt;br /&gt;
FAT is not supported because it can't provide a rootfs, and Qi wants the kernel to come from the rootfs.&lt;br /&gt;
&lt;br /&gt;
===Defaults===&lt;br /&gt;
If the kernel is found on uSD, Qi assumes the rootfs to be on the same partition as the kernel. In case of boot from NAND, it assumes that rootfs is also on NAND (just as u-boot does). See [[#/boot-Partition|below]] for help with an extra /boot-partition. The default rootdelay is 1 second.&lt;br /&gt;
&lt;br /&gt;
===Files===&lt;br /&gt;
; /boot/uImage-GTA0[123].bin&lt;br /&gt;
: Kernel images, Qi will look for (can be in either uImage (u-boot image) or zImage format, file name should still be uImage-GTA0[123].bin) &lt;br /&gt;
; /boot/append-GTA0[123]&lt;br /&gt;
: Additional kernel arguments. All arguments should be on the first and the only line separated by spaces, for example: &amp;quot;&amp;lt;tt&amp;gt;loglevel=8 rootdelay=5 &amp;lt;/tt&amp;gt;&amp;quot; . Make sure you have an extra space after the last argument (space is no longer needed if the version is from 31 Jan or older)!&lt;br /&gt;
; /boot/noboot-GTA0[123]&lt;br /&gt;
: make Qi skip this partition&lt;br /&gt;
&lt;br /&gt;
Note that setting the loglevel some low value (must be &amp;gt;=1, though!) makes resume about 3 seconds faster than it is without: Without setting this parameter the kernel produces loads of log information on resume which is output on a console with very slow scrolling. &lt;br /&gt;
===Boot Order===&lt;br /&gt;
[[image:Qi-drawings-bootsequence.png|frame|Qi GTA02 Booting order]]&lt;br /&gt;
# SD Partition 1&lt;br /&gt;
# SD Partition 2&lt;br /&gt;
# SD Partition 3&lt;br /&gt;
# NAND&lt;br /&gt;
# Memory Test&lt;br /&gt;
&lt;br /&gt;
Qi will try to mount each SD partition as ext2 / 3, if that succeeds it will look for the kernel as /boot/uImage-GTA02.bin.  If that is found, it'll be fetched, its CRC is checked and then it's booted into with a generated kernel commandline.&lt;br /&gt;
&lt;br /&gt;
===Kernel Commandline Generation===&lt;br /&gt;
[[image:Qi-commandline-composition.png‎|frame|Qi commandline composition]]&lt;br /&gt;
Because Qi has no private stored state, it infers and composes a suitable kernel commandline on each boot.&lt;br /&gt;
&lt;br /&gt;
One of its tasks is to scan NAND memory using the U-Boot dynparts rules to determine the start offset&lt;br /&gt;
of the NAND partitions on this device, from that it forms the mtdparts kernel parameter that sets Linux's&lt;br /&gt;
view of NAND partitioning.&lt;br /&gt;
&lt;br /&gt;
The other thing it does is mount the &amp;quot;identity&amp;quot; partition and get from there the globally unique MAC&lt;br /&gt;
address for the USB over Ethernet function instead of the random one that is otherwise used.&lt;br /&gt;
&lt;br /&gt;
===LED and Vibrator Signals===&lt;br /&gt;
* AUX LED is turned on either on:&lt;br /&gt;
** Successful partition mount&lt;br /&gt;
** Successful kernel pull&lt;br /&gt;
** Successful initramfs pull&lt;br /&gt;
* AUX LED is turned off and vibrator runs briefly either on:&lt;br /&gt;
** Fail of kernel pull&lt;br /&gt;
** Fail of initramfs pull&lt;br /&gt;
** Fail of mount partition&lt;br /&gt;
** Skipping of current boot possibility&lt;br /&gt;
* AUX LED is turned off either on:&lt;br /&gt;
** Start of the kernel&lt;br /&gt;
** Start of the mem test&lt;br /&gt;
** Start of the kernel pull&lt;br /&gt;
** Start of the initramfs pull&lt;br /&gt;
* One Blue shine every ~10 second: did not find any valid kernel to boot&lt;br /&gt;
* About four RED shines per second: kernel panic.&lt;br /&gt;
&lt;br /&gt;
===Booting===&lt;br /&gt;
A short press on the power button is enough to make Qi start booting. In a few seconds the backlight will be lit, but the kernel will not spew any console messages unless something is wrong. It may take up to 2 minutes (depends on distribution) until X is started during which there will be no visual feedback. Please be patient.&lt;br /&gt;
&lt;br /&gt;
You can force debug messages on the LCM console by holding in the power button before Linux starts.&lt;br /&gt;
&lt;br /&gt;
===Choosing a Kernel===&lt;br /&gt;
If a user presses the AUX button after successful partition mount and&lt;br /&gt;
before start of the kernel pull (that is, while the red LED is on),&lt;br /&gt;
this boot possibility is skipped (and GTA02 owners can feel&lt;br /&gt;
vibration).&lt;br /&gt;
&lt;br /&gt;
On versions newer than Jan 18 if a user holds the POWER button just before start of the kernel,&lt;br /&gt;
debugging parameters are added to the kernel command line and a lot of information is output to the screen.&lt;br /&gt;
&lt;br /&gt;
===Boot Menu===&lt;br /&gt;
Qi's concept is to leave everything possible to Linux, that includes even the video init. Therefore Qi does NOT provide a boot menu. This should rather be implemented by a minimal Kernel, initramfs and menu system. It may be more comfortable for some users and may get them to switch from uboot to Qi. This does not exist yet (it's already implemented for some Angstrom-supported devices and for Zaurus, so porting should be relatively easy).&lt;br /&gt;
&lt;br /&gt;
===Download and installation===&lt;br /&gt;
The daily download is a ''qi-s3cXXXX-andy_somenumber.udfu'' file at http://people.openmoko.org/andy/ .&lt;br /&gt;
Use the file appropriate to your device:&lt;br /&gt;
*GTA01 -&amp;gt; qi-s3c2410&lt;br /&gt;
*GTA02 -&amp;gt; qi-s3c2442&lt;br /&gt;
*GTA03 -&amp;gt; qi-s3c6410&lt;br /&gt;
&lt;br /&gt;
The installation should be flashing like (do it in DFU mode of NOR u-boot):&lt;br /&gt;
 # dfu-util -a u-boot -R -D qi-s3c6410-andy_8589b40295653557.udfu&lt;br /&gt;
&lt;br /&gt;
===Source code===&lt;br /&gt;
git://git.openmoko.org/git/qi.git , http://git.openmoko.org/?p=qi.git;a=summary .&lt;br /&gt;
One can also just use strings(1) on the .udfu file to get an idea of where Qi currently looks for files.&lt;br /&gt;
&lt;br /&gt;
===README===&lt;br /&gt;
The latest README file can be found in the git as well:http://git.openmoko.org/?p=qi.git;a=blob;f=README;hb=HEAD&lt;br /&gt;
&lt;br /&gt;
==Tips, Tricks, Tweaks==&lt;br /&gt;
===General troubleshooting===&lt;br /&gt;
Qi does not bring up the LCD backlight.  If the backlight is lit, it means you have succeeded to boot into Linux.&lt;br /&gt;
&lt;br /&gt;
If nothing else is happening or there is a panic, enable debugging messages as described below.&lt;br /&gt;
&lt;br /&gt;
===Enabling console messages===&lt;br /&gt;
&lt;br /&gt;
You can just hold in the power button, this automatically appends verbose debugging to the kernel commandline (loglevel=8).&lt;br /&gt;
&lt;br /&gt;
If you always want verbose &amp;quot;dmesg&amp;quot; type debugging messages, you can do it like this:&lt;br /&gt;
&lt;br /&gt;
[http://lists.openmoko.org/pipermail/openmoko-kernel/2008-November/006812.html]&lt;br /&gt;
If it's SD Card boot, just create a text file, e.g., for a [[GTA02]] use&lt;br /&gt;
 /boot/append-GTA02&lt;br /&gt;
on the rootfs in question, put in there&lt;br /&gt;
 loglevel=8&lt;br /&gt;
and you'll see the messages on boot.  If it's NAND right now you need to edit the default commandline in Qi for gta02.&lt;br /&gt;
&lt;br /&gt;
===/boot-Partition===&lt;br /&gt;
If you have a separate partition for /boot, so that your kernel and rootfs are not in fact on the same partition, you will need to append a root= entry on the kernel commandline to override the default action of trying to use the partition where the kernel came from as the rootfs.&lt;br /&gt;
&lt;br /&gt;
Add this in /boot/append-GTA0[123]:&lt;br /&gt;
 root=/dev/mmcblk0p2&lt;br /&gt;
for a rootfs on the second partition.&lt;br /&gt;
&lt;br /&gt;
Note that a default Debian installation puts the kernel straight in the root of /dev/mmcblk0p1, not in a boot subdirectory, expecting u-boot to mount it as /boot. In order for Qi to recognise this, create a boot subdirectory with a symlink to the kernel.&lt;br /&gt;
&lt;br /&gt;
===SD Initialisation===&lt;br /&gt;
If you don't specify loglevel=8 in append-GTAXX, and booting fails with a &amp;quot;VFS: Cannot open root device &amp;quot;mmcblk0p1&amp;quot; or unknown-block(2,0)&amp;quot;, the SD card needs a little bit more time to initialise.&lt;br /&gt;
&lt;br /&gt;
Put a &amp;quot;rootdelay=5&amp;quot; in append-GTAXX like so:&lt;br /&gt;
 rootdelay=5&lt;br /&gt;
&lt;br /&gt;
== Testing speed improvements ==&lt;br /&gt;
&lt;br /&gt;
Stopwatch results on Qi (error is approx ±1/2 second):&lt;br /&gt;
&lt;br /&gt;
Booting SHR image with uBoot:&lt;br /&gt;
* 0:00 power button held down&lt;br /&gt;
* 0:07 splash screen appears&lt;br /&gt;
* 0:15 drops to console showing kernel messages scrolling by for ~1 minute&lt;br /&gt;
* 1:18 Openmoko 'please wait' splash&lt;br /&gt;
* 1:31 desktop animated splash&lt;br /&gt;
* 2:38 finished booting&lt;br /&gt;
&lt;br /&gt;
Booting identical setup with Qi flashed over uBoot:&lt;br /&gt;
* 0:00 power button held down&lt;br /&gt;
* 0:06 backlit black&lt;br /&gt;
* 0:13 please wait booting... (only this text on console for next 38 seconds)&lt;br /&gt;
* 0:51 Angstrom console message (at the end of kernel output with uBoot, but ONLY text display to appear throughout this stage with Qi)&lt;br /&gt;
* 0:54 Openmoko 'please wait' splash&lt;br /&gt;
* 1:05 desktop animated splash&lt;br /&gt;
* 1:54 finished booting&lt;br /&gt;
&lt;br /&gt;
So for this particular configuration, it reduced time-to-desktop by about 28%, about 44 seconds.  Surprisingly, the later segments of booting (desktop) were also noticeably faster than with uBoot - One would have expected just the fist stages up until init (kernel finished establishing itself) to be faster.&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenMooCow</id>
		<title>OpenMooCow</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenMooCow"/>
				<updated>2009-01-19T06:07:52Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: */ New release. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ApplicationBox|&lt;br /&gt;
Name=OpenMooCow|&lt;br /&gt;
Screenshot=Moocow1.png|&lt;br /&gt;
Description=OpenMooCow reads information out of your accelerometers. Now, if you turn the phone upside down and back again, it &amp;quot;moos&amp;quot; like one of the little toys you might know...|&lt;br /&gt;
Homepage=http://www.srcf.ucam.org/~taw27/openmoko/openmoocow/|&lt;br /&gt;
TestedOn=Om 2008.8|&lt;br /&gt;
PackageName=OpenMooCow&lt;br /&gt;
}}&lt;br /&gt;
'''Source Code released:http://www.srcf.ucam.org/~taw27/openmoko/openmoocow/'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
OpenMooCow reads information out of your accelerometers. Now, if you turn the phone upside down and back again, it &amp;quot;moos&amp;quot; like one of the little toys you might know...&lt;br /&gt;
&lt;br /&gt;
Nevertheless, it's great fun to try it out!FreeRunner mooes on flip.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
Package and source download from http://www.srcf.ucam.org/~taw27/openmoko/openmoocow/&lt;br /&gt;
&lt;br /&gt;
For install:&lt;br /&gt;
 opkg install http://www.srcf.ucam.org/~taw27/openmoko/openmoocow/openmoocow_0.3_armv4t.ipk&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
http://www.youtube.com/watch?v=k6-tuZp6J3w&lt;br /&gt;
&lt;br /&gt;
[[category:Gaming]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mokoko</id>
		<title>Mokoko</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mokoko"/>
				<updated>2008-12-17T19:09:31Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Release information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mokoko is a mediaplayer program develop by OM software engineers.&lt;br /&gt;
You can download ipk from [http://om-mediaplayer.googlecode.com/files/mokoko_0.1_svnr119_r0_armv4t.opk here]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/om-mediaplayer/wiki/Mokoko Project's home wiki].&lt;br /&gt;
&lt;br /&gt;
===Release information===&lt;br /&gt;
* Date: 20081022&lt;br /&gt;
&lt;br /&gt;
* SVN revision: 119&lt;br /&gt;
&lt;br /&gt;
The release from december the 1st won't install on shr since some dependencies cannot be matched, --- but the files that mokoko needs are core gtk files and clearly there. A&lt;br /&gt;
 opkg install --force-depends http://om-mediaplayer.googlecode.com/files/mokoko_0.1_svnr127-r1_armv4t.opk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
did therefore install a working version of it.&lt;br /&gt;
&lt;br /&gt;
===Documentation===&lt;br /&gt;
We used doxygen to generate documentation from source code. You can generate it by yourself. Install doxygen first and use the script we provide.&lt;br /&gt;
&lt;br /&gt;
The script is placed in&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blahblah&amp;gt;/om-mediaplayer/mokoko/gendoc&lt;br /&gt;
&lt;br /&gt;
Or you can see it online. I put it in Here Download and Install&lt;br /&gt;
&lt;br /&gt;
* get mokoko opk file and upload it to Neo.(Get it here)&lt;br /&gt;
&lt;br /&gt;
* opkg install mokoko&lt;br /&gt;
&lt;br /&gt;
the dependency suppose be installed automatically.&lt;br /&gt;
&lt;br /&gt;
Mokoko.conf&lt;br /&gt;
&lt;br /&gt;
We didn't implement Song Select yet. please add .mokoko.conf to your home direcotory.&lt;br /&gt;
&lt;br /&gt;
$cat ~/.mokoko.conf&lt;br /&gt;
&lt;br /&gt;
# This file defines the setting of momoko&lt;br /&gt;
# Features will be stored as string sep is ';'&lt;br /&gt;
# If there are no such Feature NULL will returns&lt;br /&gt;
PATH=&amp;quot;/home/foo/mp3;/media/card/mp3&amp;quot;&lt;br /&gt;
SUPPORT_MIME=&amp;quot;mp3;ogg&amp;quot;&lt;br /&gt;
PAUSE_WHEN_RING_EVENT=&amp;quot;true&amp;quot;&lt;br /&gt;
RESTART_WHEN_CALL_END_EVENT=&amp;quot;false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ApplicationBox|&lt;br /&gt;
Name=[[Mokoko]]|&lt;br /&gt;
Description=Mokoko is a media player program, you can use it to play mp3 and ogg files on Neo.|&lt;br /&gt;
Screenshot=Mokoko.png|&lt;br /&gt;
Homepage=http://code.google.com/p/om-mediaplayer/|&lt;br /&gt;
TestedOn=|&lt;br /&gt;
PackageName=http://om-mediaplayer.googlecode.com/files/mokoko_0.1_svnr119_r0_armv4t.opk&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio Applications]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Mokoko</id>
		<title>Mokoko</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Mokoko"/>
				<updated>2008-12-17T19:08:47Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Release information: How to make the current release work. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mokoko is a mediaplayer program develop by OM software engineers.&lt;br /&gt;
You can download ipk from [http://om-mediaplayer.googlecode.com/files/mokoko_0.1_svnr119_r0_armv4t.opk here]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/om-mediaplayer/wiki/Mokoko Project's home wiki].&lt;br /&gt;
&lt;br /&gt;
===Release information===&lt;br /&gt;
* Date: 20081022&lt;br /&gt;
&lt;br /&gt;
* SVN revision: 119&lt;br /&gt;
&lt;br /&gt;
The release from december the 1st won't install on shr since some dependencies cannot be matched, --- but the files that mokoko needs are core gtk files and clearly there. A&lt;br /&gt;
 opkg install --force-depends http://om-mediaplayer.googlecode.com/files/mokoko_0.1_svnr127-r1_armv4t.opk&lt;br /&gt;
&lt;br /&gt;
===Documentation===&lt;br /&gt;
We used doxygen to generate documentation from source code. You can generate it by yourself. Install doxygen first and use the script we provide.&lt;br /&gt;
&lt;br /&gt;
The script is placed in&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blahblah&amp;gt;/om-mediaplayer/mokoko/gendoc&lt;br /&gt;
&lt;br /&gt;
Or you can see it online. I put it in Here Download and Install&lt;br /&gt;
&lt;br /&gt;
* get mokoko opk file and upload it to Neo.(Get it here)&lt;br /&gt;
&lt;br /&gt;
* opkg install mokoko&lt;br /&gt;
&lt;br /&gt;
the dependency suppose be installed automatically.&lt;br /&gt;
&lt;br /&gt;
Mokoko.conf&lt;br /&gt;
&lt;br /&gt;
We didn't implement Song Select yet. please add .mokoko.conf to your home direcotory.&lt;br /&gt;
&lt;br /&gt;
$cat ~/.mokoko.conf&lt;br /&gt;
&lt;br /&gt;
# This file defines the setting of momoko&lt;br /&gt;
# Features will be stored as string sep is ';'&lt;br /&gt;
# If there are no such Feature NULL will returns&lt;br /&gt;
PATH=&amp;quot;/home/foo/mp3;/media/card/mp3&amp;quot;&lt;br /&gt;
SUPPORT_MIME=&amp;quot;mp3;ogg&amp;quot;&lt;br /&gt;
PAUSE_WHEN_RING_EVENT=&amp;quot;true&amp;quot;&lt;br /&gt;
RESTART_WHEN_CALL_END_EVENT=&amp;quot;false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ApplicationBox|&lt;br /&gt;
Name=[[Mokoko]]|&lt;br /&gt;
Description=Mokoko is a media player program, you can use it to play mp3 and ogg files on Neo.|&lt;br /&gt;
Screenshot=Mokoko.png|&lt;br /&gt;
Homepage=http://code.google.com/p/om-mediaplayer/|&lt;br /&gt;
TestedOn=|&lt;br /&gt;
PackageName=http://om-mediaplayer.googlecode.com/files/mokoko_0.1_svnr119_r0_armv4t.opk&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Audio Applications]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-12-02T18:38:04Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Add uboot boot entry: The read only flag ('ro') breaks current versions of openmoko, so I removed it.*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
This page explains how to boot a FreeRunner from the [[Supported_microSD_cards|(micro-)SD card]] rather than from the built-in NAND flash memory. The SD card shares a bus with the GPU, so it may not perform as well, but it is another option.&lt;br /&gt;
&lt;br /&gt;
{{Warning | Booting from SDHC may cause problems at this time (see below).}} &lt;br /&gt;
&lt;br /&gt;
== Booting from SDHC / suspend problems ==&lt;br /&gt;
&lt;br /&gt;
First, a warning. There is a longstanding bug, probably somewhere in the Linux kernel, that tends to eat the partition table of high-capacity SD cards when the system suspends. This is ticket [https://docs.openmoko.org/trac/ticket/1802 #1802]. See [http://thread.gmane.org/gmane.comp.handhelds.openmoko.community/19154/focus=19281| this thread] for explanation of the partition table removal on suspend and maybe other problems related to using high capacity SD cards. A safety net is to keep a written copy of the partition table on paper, just in case one needs to recreate it.&lt;br /&gt;
&lt;br /&gt;
== How it Works ==&lt;br /&gt;
&lt;br /&gt;
On the Neo, [[u-boot]] performs a similar role to the 'grub' bootloader on a PC. U-boot loads a kernel image into memory and then passes a list of parameters to the kernel. These parameters specify, among other things, the device on which the root filesystem is located.&lt;br /&gt;
&lt;br /&gt;
As the kernel boots, it initializes the hardware and then mounts the root filesystem. The kernel then runs &amp;quot;/sbin/init&amp;quot;, which handles the rest of the boot-up sequence (such as displaying the splash screen and progress bar).&lt;br /&gt;
&lt;br /&gt;
This sequence is the same whether the device is booting from built-in Flash or from the SD card. The differences are how the kernel is loaded, and which device is mounted as the root filesystem.&lt;br /&gt;
&lt;br /&gt;
The following sections provide additional details.&lt;br /&gt;
&lt;br /&gt;
=== Menu Entries ===&lt;br /&gt;
&lt;br /&gt;
U-boot menu entries are defined by environment variables named &amp;quot;menu_X&amp;quot; (where X is a number). The value of the environment variable is a string &amp;quot;&amp;lt;label&amp;gt;:&amp;lt;commands&amp;gt;&amp;quot;, where &amp;lt;label&amp;gt; is the text shown on the screen, and &amp;lt;commands&amp;gt; is a sequence of u-boot commands (delimited by ';' characters) to be executed when the menu item is selected. When entering a string of commands, the ';' and '$' characters must be backslash-escaped (&amp;quot;\;&amp;quot; and &amp;quot;\$&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
=== Loading the Kernel ===&lt;br /&gt;
&lt;br /&gt;
A pair of u-boot commands must be used to load the kernel from SD. First is &amp;quot;mmcinit&amp;quot;, which will cause u-boot to detect the card. Next is a command to load a file into memory - either &amp;quot;fatload&amp;quot; or &amp;quot;ext2load&amp;quot; depending on whether the kernel is on a FAT filesytem or an ext2/ext3 filesystem.&lt;br /&gt;
&lt;br /&gt;
The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 fatload mmc 1:&amp;amp;lt;p&amp;amp;gt; 0x32000000 &amp;amp;lt;filepath&amp;amp;gt;&lt;br /&gt;
 ext2load mmc 1:&amp;amp;lt;p&amp;amp;gt; 0x32000000 &amp;amp;lt;filepath&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;amp;lt;p&amp;amp;gt; is the partition number, and &amp;amp;lt;filepath&amp;amp;gt; is the path to the file that is to be loaded.&lt;br /&gt;
&lt;br /&gt;
{{Note| The &amp;quot;ext2load&amp;quot; command is broken on u-boot binary earlier than &amp;quot;20080723&amp;quot;, including the one shipped with the first batch of FreeRunners, are affected by bug [http://docs.openmoko.org/trac/ticket/799 #799]. If you update your U-Boot and kernel packages you can use direct ext2 / 3 boot all in one partition.}}&lt;br /&gt;
&lt;br /&gt;
{{Warning | Be careful when updating u-boot on a Neo1973 as there is a risk of bricking the device (unless you have a debug board). This is not an issue for the FreeRunner as it has a protected copy of u-boot in the NOR flash }}&lt;br /&gt;
&lt;br /&gt;
{{Note| U-Boot supports SDHC protocol on the FreeRunner only: on the Neo1973, u-boot is unable to access SDHC cards (4G or larger). The kernel does have SDHC support on Neo1973, so it is possible to have the root filesystem on SDHC and the kernel on NAND flash to work around it. }}&lt;br /&gt;
&lt;br /&gt;
=== Root Filesystem Parameters ===&lt;br /&gt;
&lt;br /&gt;
The contents of the &amp;quot;bootargs&amp;quot; environment variable are passed to the kernel. Bootargs is a space-delimited list of &amp;quot;name=value&amp;quot; definitions. The items relevant to SD-booting are &amp;quot;root&amp;quot;, &amp;quot;rootfstype&amp;quot;, and &amp;quot;rootdelay&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
For example, the following parameters would tell the kernel to mount the third partition of the SD-card as an ext3 filesystem:&lt;br /&gt;
&lt;br /&gt;
  root=/dev/mmcblk0p3 rootfstype=ext3 rootdelay=5 &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;rootdelay&amp;quot; parameter allows time for the card to be properly initialized before it is accessed. &lt;br /&gt;
&lt;br /&gt;
Note that the kernel must have built-in support (i.e. not a module) for the filesystem specified in &amp;quot;rootfstype&amp;quot;. The default Openmoko kernel configs as of [http://git.openmoko.org/?p=kernel.git;a=commit;h=642cbda5f3b7e7a61512426e1d30a41ab4691123| 2008-07-17] have built-in support for both ext2 and ext3. You can check the available filesystems with the Linux command&lt;br /&gt;
&lt;br /&gt;
 less /proc/filesystems&lt;br /&gt;
&lt;br /&gt;
It is not possible to use VFAT for the root filesystem.&lt;br /&gt;
&lt;br /&gt;
==== ext2 vs. ext3 ====&lt;br /&gt;
&lt;br /&gt;
Opinion is divided on whether it is better to use ext2 or ext3 for the root filesystem. Ext3 in general is a superior choice, because it is a journalled filesystem and so does not require a long 'fsck' (file system check) after an unclean shutdown. However, if used on a flash device that does not support wear-leveling then ext3 may cause premature wear on the blocks of the card where the journal is stored. SD cards are supposed to support wear leveling, but this can not be guaranteed for all vendors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Acquiring a tarfile rootfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways of acquiring an rootfs image as a tar archive. You can either build it on your own using the OpenEmbedded Distribution. Or download it from the openmoko buildhost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Possibility 1: Downloading the rootfs/kernel tar from the Openmoko buildhost ===&lt;br /&gt;
&lt;br /&gt;
Choose and find the rootfs/kernel combo you would like to install at [[Latest Images]].&lt;br /&gt;
&lt;br /&gt;
=== Possibility 2: Building a tarfile distribution using OpenEmbedded ===&lt;br /&gt;
&lt;br /&gt;
Another possibility to get a tar archive of your rootfs is to build it on your own with the OpenEmbedded environment.&lt;br /&gt;
&lt;br /&gt;
To build OM-2007.2 you need to add &amp;quot;tar&amp;quot; to the image types in your ''local.conf'':&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that build a new image by issuing:&lt;br /&gt;
 &lt;br /&gt;
 bitbake openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
or if you are using the MokoMakefile: &lt;br /&gt;
 &lt;br /&gt;
 make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
After the process finished there will be a ''Openmoko-....tar'' in the deploy directory, which is your newly created rootfs archive&lt;br /&gt;
&lt;br /&gt;
=== Possibility 3 : Convert a jff2 image to a tarfile ===&lt;br /&gt;
&lt;br /&gt;
See [[Userspace root image]] for more details on how to access contents of a jffs2 image.&lt;br /&gt;
&lt;br /&gt;
== Prepare the SD card ==&lt;br /&gt;
&lt;br /&gt;
=== Partioning the SD card ===&lt;br /&gt;
&lt;br /&gt;
u-boot pre-2008-07-23 can only boot from FAT filesystems; if you update u-boot, you can boot from FAT or ext2.&lt;br /&gt;
This example shows how to do an example partition using the fdisk utility. Feel free to use the partitioning utility of your liking for this task.&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/mmcblk0&lt;br /&gt;
&lt;br /&gt;
'''''Note:''''' The device file might differ on your system. If you are not sure about it, you may check your kernel message log by calling ''dmesg'' to find the correct device.&lt;br /&gt;
&lt;br /&gt;
We will now create a 8 MB partition for our kernel and another one for the rootfs which will take up all the remaining space.&lt;br /&gt;
&lt;br /&gt;
   Command (m for help): d&lt;br /&gt;
   Selected partition 1&lt;br /&gt;
   Command (m for help): n&lt;br /&gt;
   Command action&lt;br /&gt;
      e   extended&lt;br /&gt;
      p   primary partition (1-4)&lt;br /&gt;
   p&lt;br /&gt;
   Partition number (1-4): 1&lt;br /&gt;
   First cylinder (1-983, default 1):&lt;br /&gt;
   Using default value 1&lt;br /&gt;
   Last cylinder or +size or +sizeM or +sizeK (1-983, default 983): +8M&lt;br /&gt;
   Command (m for help): n&lt;br /&gt;
   Command action&lt;br /&gt;
      e   extended&lt;br /&gt;
      p   primary partition (1-4)&lt;br /&gt;
   p&lt;br /&gt;
   Partition number (1-4): 2&lt;br /&gt;
   First cylinder (18-983, default 18):&lt;br /&gt;
   Using default value 18&lt;br /&gt;
   Last cylinder or +size or +sizeM or +sizeK (18-983, default 983):&lt;br /&gt;
   Using default value 983&lt;br /&gt;
   Command (m for help): w&lt;br /&gt;
   The partition table has been altered!&lt;br /&gt;
   Calling ioctl() to re-read partition table.&lt;br /&gt;
   Syncing disks.&lt;br /&gt;
&lt;br /&gt;
''Should probably need to change type of first partition to FAT 16 too ?''&lt;br /&gt;
&lt;br /&gt;
''(type &amp;quot;t&amp;quot; in fdisk, choose the partition 1 and type &amp;quot;6&amp;quot; for FAT16. Check with &amp;quot;p&amp;quot;, then type &amp;quot;w&amp;quot; to write)''&lt;br /&gt;
&lt;br /&gt;
''How about a swap partition also?''&lt;br /&gt;
&lt;br /&gt;
if it exits with something like&lt;br /&gt;
&lt;br /&gt;
   Calling ioctl() to re-read partition table&lt;br /&gt;
   fdisk: WARNING: rereading partition table failed, kernel still uses old table:   Device or resource busy&lt;br /&gt;
&lt;br /&gt;
do&lt;br /&gt;
&lt;br /&gt;
   umount /dev/mmcblk0p1&lt;br /&gt;
&lt;br /&gt;
on another shell and try again.&lt;br /&gt;
&lt;br /&gt;
=== Formatting the SD card ===&lt;br /&gt;
&lt;br /&gt;
Just issue the following command to create at FAT filesystem:&lt;br /&gt;
&lt;br /&gt;
 mkfs.vfat /dev/mmcblk0p1&lt;br /&gt;
{{Note|if you do not have mkfs.vfat you must find and install the &amp;quot;dosfstools&amp;quot; package. This package does not seem to be in the official feeds, but an unofficial build may be downloaded from http://members.shaw.ca/mmontour/neo/dosfstools_2.11-r0_armv4t.ipk}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second partition is about to be formatted with ext3 (for ext2 to work you need to make sure you compiled the kernel with the correct configuration):&lt;br /&gt;
&lt;br /&gt;
 mkfs.ext3 /dev/mmcblk0p2&lt;br /&gt;
&lt;br /&gt;
== Populate SD card ==&lt;br /&gt;
&lt;br /&gt;
Your sd card is now ready to be filled up with the rootfs and the needed kernel to boot.&lt;br /&gt;
&lt;br /&gt;
Mount the second partition of your SD card somewhere and put the image on it:&lt;br /&gt;
&lt;br /&gt;
 mount /dev/mmcblk0p2 /mnt/moko&lt;br /&gt;
 tar -C /mnt/moko/ -xzvf openmoko-devel-image-fic-gta01-20070313022035.rootfs.tar.gz&lt;br /&gt;
&lt;br /&gt;
'''''Note:''''' As always in this guide the device name as well as the rootfs name needs to be adjusted to your device and filename structure&lt;br /&gt;
&lt;br /&gt;
'''''Note:''''' There's a nice gotcha to take care about if you use your host OS automount.  Some hosts mount these removable devices with &amp;quot;nodev&amp;quot; option by default for security.  If the image you are unpacking has a populated /dev directory, the nodes will fail to create as devices then.  If automounting the SD on your host, confirm there are no unexpected mount options by using &amp;quot;mount&amp;quot; command alone to list the mounts.&lt;br /&gt;
&lt;br /&gt;
The next step is to mount the first partition of the sd card and install the kernel on it.&lt;br /&gt;
&lt;br /&gt;
 mount /dev/mmcblk0p1 /mnt/mokokernel&lt;br /&gt;
 cp uImage-fic-gta01-latest.bin /mnt/mokokernel/uImage.bin&lt;br /&gt;
&lt;br /&gt;
Or, for some versions of NOR u-boot:&lt;br /&gt;
&lt;br /&gt;
 mount /dev/mmcblk0p1 /mnt/mokokernel&lt;br /&gt;
 cp uImage-fic-gta01-latest.bin /mnt/mokokernel/uimage&lt;br /&gt;
&lt;br /&gt;
(Yes, lower case i and no extension.)&lt;br /&gt;
&lt;br /&gt;
Make sure your kernel is called ''uImage.bin'' (or ''uimage'' for some versions of NOR u-boot). If the u-boot doesn't find the kernel image during boot, [[Bootloader#Using usbtty from Linux|log into the bootloader]] with ''[http://www.airs.com/ian/uucp.html cu]'', mount the partition with mmcinit and check the presence and the name of the kernel image with ''fatls mmc 1:1'' for FAT filesystem or ''ext2ls mmc 1:1'' for ext2 filesystem. Compare this carefully with the result of ''printenv sd_image_name''. Remember that you can modify the environment in NAND FLASH, but not in NOR FLASH, so if you plan to boot from NOR FLASH you have to modify the file name to match the environment variable.&lt;br /&gt;
&lt;br /&gt;
Unmount both the rootfs partition and the kernel partition and make sure all remaining buffers are written to it:&lt;br /&gt;
&lt;br /&gt;
 umount /mnt/moko&lt;br /&gt;
 umount /mnt/mokokernel&lt;br /&gt;
 sync&lt;br /&gt;
&lt;br /&gt;
== Add uboot boot entry ==&lt;br /&gt;
*See also&amp;quot; [[Qi]]&lt;br /&gt;
&lt;br /&gt;
Depending on the revision of the phone and the partition type (ext2/ext3) you are using, it might be necessary to add an entry to the bootmenu to be able to boot the system off your SD card.&lt;br /&gt;
If you are using a FreeRunner and have created an FAT kernel/ext2 rootfs partition you should be able to boot from the card right out of the box, because a boot menu entry for this should already exist in the NOR/NAND boot menu.&lt;br /&gt;
In any other case you should at least make sure the needed entry exists in your menu before proceeding.&lt;br /&gt;
You will need to enter the uboot shell of the NAND boot menu for this. A description on how to connect to the uboot loader shell can be found in this article: [[Uboot#Bootloader_prompt]]. Details on howto get into the NAND boot menu can be found [[Booting#Log_into_U-Boot_in_the_NAND_Flash|here]].&lt;br /&gt;
&lt;br /&gt;
After you read these two references you should be connected to your NAND uboot shell right now. The first thing to do is to set the boot menu timeout to a really high value. Unfortunately if you don't do this, the boot loader will continue booting after the default timeout (60 seconds) even if you are connected to the uboot shell. Just enter the following command to the menu prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv boot_menu_timeout 99999&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will set the timeout to 99999 seconds which should definitely enough time for us finish whatever work we want accomplish in the boot loader shell.&lt;br /&gt;
&lt;br /&gt;
Now we will make sure a appropriate menu item for booting from sd exists, or create it otherwise. You can print the defined boot loader environment by issuing the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
printenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it shows a line beginning with ''menu_'' followed by the commands which are just to follow in this guide, you do not need to create a new menu entry. In any other case please proceed with the following.&lt;br /&gt;
&lt;br /&gt;
Please make sure you are using the correct configuration based on the decisions you made earlier.  For more information on the uboot prompt, see&lt;br /&gt;
* help&lt;br /&gt;
* help &amp;lt;command&amp;gt;&lt;br /&gt;
* and [[Bootloader]] and [[Bootloader commands]].&lt;br /&gt;
&lt;br /&gt;
{{Note| The backslashes (\) are important for uboot to set the command as new environment variable (menu_9) instead of just executing them as soon as enter is pressed.}}&lt;br /&gt;
&lt;br /&gt;
{{Note| Copy and paste may not work depending on your terminal emulator. Commi just works or you can use [[NeoCon|neocon]] terminal emulator and add a per-character delay.  Otherwise, you will have to type in the commandline manually.}}&lt;br /&gt;
&lt;br /&gt;
It is important to distinguish between FAT or ext2 kernel partitions and ext2 or ext3 root partitions at this point.&lt;br /&gt;
&lt;br /&gt;
Please watch partition numbers in the following commands.  In particular, you may need to change some of&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root=/dev/mmcblk0p#&lt;br /&gt;
fatload mmc#&lt;br /&gt;
ext2load mmc#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
depending on which partition number your root and kernel, respectively, are located.  Number starts from unity.&lt;br /&gt;
&lt;br /&gt;
'''Boot entry for FAT kernel+ext3 rootfs partitions:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv menu_9 Boot from microSD (FAT+ext3): setenv bootargs \${bootargs_base} rootfstype=ext3 root=/dev/mmcblk0p2 rootdelay=5 \${mtdparts}\; mmcinit\; fatload mmc 1 0x32000000 \${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Boot entry for FAT kernel+ext2 rootfs partitions:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv menu_9 Boot from microSD (FAT+ext2): setenv bootargs \${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 \${mtdparts}\; mmcinit\; fatload mmc 1 0x32000000 \${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or: with additional 'init=/sbin/init' kernel parameter (may be needed for some images):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv menu_9 Boot 200808 from microSD (FAT+ext2): setenv bootargs \${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 \${mtdparts} init=/sbin/init\; mmcinit\; fatload mmc 1 0x32000000 \${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Boot entry for ext2 kernel+ext2 rootfs partitions: (requires newer u-boot)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv menu_2 Boot from microSD part2 (ext2+ext2): setenv bootargs \${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 \${mtdparts}\; mmcinit\; ext2load mmc 1 0x32000000 \${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Boot entry for kernel and rootfs on same ext2 partition (tested with Qtopia/requires newer u-boot)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv menu_3 QTopia: setenv bootargs \${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p1 rootdelay=5 \${mtdparts}\; mmcinit\; ext2load mmc 1:1 0x32000000 \${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You are nearly done. Just issue a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
printenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that your newly created entry is correctly displayed (This time the backslashes are not displayed anymore).&lt;br /&gt;
&lt;br /&gt;
If everything looks fine enter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
into the prompt and press enter. The new configuration should now be saved to the NAND.&lt;br /&gt;
&lt;br /&gt;
Shutdown your neo with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
neo1973 power-off&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you restarted the Neo and got back to the NAND boot menu you should be able to select your newly created menu entry and successfully boot into the rootfs from your SD card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you got error when loading kernel, add sleep to boot entry.&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mmcinit\; ext2load mmc 1 0x32000000 \${sd_image_name}\;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mmcinit\; sleep 1\; ext2load mmc 1 0x32000000 \${sd_image_name}\;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
See also [[Moving current system from flash to SD]] which shows how to move the running system currently running in flash to an SD card, in order to keep a backup system on SD on which to boot from.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
&lt;br /&gt;
=== Boot from SDHC ===&lt;br /&gt;
&lt;br /&gt;
{{Note|the following text was written for the Neo1973. SDHC and SD should both work in a FreeRunner if you have u-boot from 2008-07-23 or later.}}&lt;br /&gt;
&lt;br /&gt;
As SDHC is not supported in older u-boot versions you can't use the Booting from SD guide.&lt;br /&gt;
But there's a kind of workaround that is a good option to have at least your rootfs on the microSDHC:&lt;br /&gt;
&lt;br /&gt;
First you can follow Step 1 to get an kernel-image with mmc- and ext2-support. But instead of copying the image to the rootfs you will have to flash it to the Neo's internal NAND-Flash (using [[Dfu-util]]).&lt;br /&gt;
Now you can continue with Step 2 (like mentioned before you do not have to copy your uImage to the rootfs) and follow the instructions to Step 3.&lt;br /&gt;
Instead of the setenv commands in Step 3 you have to enter the following:&lt;br /&gt;
&lt;br /&gt;
 GTA01Bv4 # setenv menu_5 Boot from SDHC: setenv  bootargs root=/dev/mmcblk0p1 console=tty0 rootdelay=5 neo1973-nand:0x00040000(u-boot),0x00004000(u-boot_env),0x00200000(kernel),0x000a0000(splash)\; nand read.e 0x32000000 kernel\; bootm 0x32000000&lt;br /&gt;
 GTA01Bv4 # saveenv&lt;br /&gt;
&lt;br /&gt;
And that's it!&lt;br /&gt;
Now you can use the newly created menu option &amp;quot;Boot from SDHC&amp;quot; to boot the internal kernel, using the root-filesystem on the microSDHC.&lt;br /&gt;
&lt;br /&gt;
=== Autoboot from SDHC ===&lt;br /&gt;
&lt;br /&gt;
Maybe you want to Boot automatically from SDHC: &lt;br /&gt;
Set a new Bootmenu Entry for booting from NAND first&lt;br /&gt;
&lt;br /&gt;
 GTA01Bv4 # setenv menu_6 Boot from NAND: setenv bootargs \${bootargs_base} \${mtdparts}\; nand read.e 0x32000000 kernel\; bootm 0x32000000&lt;br /&gt;
 GTA01Bv4 # saveenv&lt;br /&gt;
&lt;br /&gt;
then Power-off, and enter the Bootmenu to test the new Entry.If you can boot from NAND, shutdown, enter Boot menu, connect to bootloader and set the (auto)bootcmd for boot from SDHC:&lt;br /&gt;
&lt;br /&gt;
 GTA01Bv4 # setenv bootcmd setenv bootargs root=/dev/mmcblk0p1 rootdelay=10 console=tty0 neo1973-nand:0x00040000(u-boot),0x00004000(u-boot_env),0x00200000(kernel),0x000a0000(splash)\; nand read.e 0x32000000 kernel\; bootm 0x32000000 &lt;br /&gt;
 GTA01Bv4 # saveenv&lt;br /&gt;
&lt;br /&gt;
Now you boot from SDHC everytime you press the Power-Button or reboot and if you like to boot from NAND -just use the bootmenu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Fixing udev automount ===&lt;br /&gt;
&lt;br /&gt;
Udev automatically mounts the SD Card in /media/mmcblk0p1/ you can disable this with&lt;br /&gt;
&lt;br /&gt;
 echo /dev/mmcblk &amp;gt;&amp;gt; /etc/udev/mount.blacklist&lt;br /&gt;
&lt;br /&gt;
=== Remarks on Kernel Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== loglevel ====&lt;br /&gt;
&lt;br /&gt;
Some people suggested adding:&lt;br /&gt;
&lt;br /&gt;
 loglevel=8&lt;br /&gt;
&lt;br /&gt;
to the kernel command line. IF you also have &amp;quot;console=tty0&amp;quot; on your kernel commandline this makes the boot process extremely slow because the framebuffer (the neo display in text mode) has to print out tons of lines of debug messages like:&lt;br /&gt;
&lt;br /&gt;
 s3c2410-sdi s3c2410-sdi: ......&lt;br /&gt;
 mmc0: ....&lt;br /&gt;
&lt;br /&gt;
{{Languages|Booting_from_SD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Advanced End User]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko-mediaplayer2</id>
		<title>Openmoko-mediaplayer2</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko-mediaplayer2"/>
				<updated>2008-11-20T00:55:37Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ApplicationBox|&lt;br /&gt;
Name=[[Openmoko-mediaplayer2]]|&lt;br /&gt;
Description=Media player originally written for Om 2007.2.|&lt;br /&gt;
Screenshot=No-screenshot.png|&lt;br /&gt;
Homepage=http://abraxa.dyndns.org:81/random/openmoko-mediaplayer-theme.tar.bz2|&lt;br /&gt;
TestedOn=Om 2008.8|&lt;br /&gt;
PackageName=openmoko-mediaplayer2&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Source code: '''http://abraxa.dyndns.org:81/random/openmoko-mediaplayer-theme.tar.bz2'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Openmoko-mediaplayer2 is a program for play MP3.&lt;br /&gt;
Sice this media player currently is based on the pulseaudio sound server --- and this sound server breaks all phone applications using sound as soon as the phone goes into power saving mode it is unwise to install this application at this time.&lt;br /&gt;
&lt;br /&gt;
If you have already install this application you have to uninstall pulseaudio, as well, to get your phone working as a phone again.&lt;br /&gt;
&lt;br /&gt;
This Media Player is basically useless due to the default theme, to. To install with a better theme run:&lt;br /&gt;
&amp;lt;pre&amp;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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you wonder where you have to put the media files so openmoko-mediaplayer2 will be able to find them --- it's /media/card or /home/root/Documents.   &lt;br /&gt;
[[Category:Audio Applications]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Zhone</id>
		<title>Zhone</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Zhone"/>
				<updated>2008-11-15T16:09:18Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Zen Phone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FSO}}&lt;br /&gt;
&lt;br /&gt;
==Zen Phone==&lt;br /&gt;
&lt;br /&gt;
Screenshots: [[FSO UI Tutorial]]&lt;br /&gt;
&lt;br /&gt;
Zhone is often told to be a demo application for the free softphone framework (FSO). But it actually is a quite usable phone program that allows to send and receive calls, SMS messages and tells you your gps coordinates. The FSO automagically detects when the gps coordinates are no more shown and shuts down the GPS hardware as long as it is not needed.&lt;br /&gt;
&lt;br /&gt;
Since it mainly only sends commands over dbus to the daemons that actually do the work it is rather stable and even able to do multitasking like allowing you to read an SMS whilst using the phone.&lt;br /&gt;
&lt;br /&gt;
==Installing Zhone on Ubuntu ==&lt;br /&gt;
&lt;br /&gt;
{{Warning|Adding those repositories (or the zhone installation?) may lead to problems on a Kubuntu 8.04 Hardy Heron.&lt;br /&gt;
Many packages update are done at the same time (200+ changes), and something break the upgrade.&lt;br /&gt;
Removing repositories and launching an &amp;quot;apt-get -f install&amp;quot; fix the problem.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
*Add this to your /etc/apt/sources.lst :&lt;br /&gt;
 deb http://pkg-fso.alioth.debian.org/debian/ unstable main&lt;br /&gt;
 deb-src http://pkg-fso.alioth.debian.org/debian/ unstable main&lt;br /&gt;
 deb http://ftp.debian.org/debian/ experimental main&lt;br /&gt;
 deb http://e17.dunnewind.net/ubuntu hardy e17&lt;br /&gt;
*Execute:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install zhone&lt;br /&gt;
* remove this from your /etc/apt/sources.lst&lt;br /&gt;
 deb http://ftp.debian.org/debian/ experimental main&lt;br /&gt;
* Now you can finally execute:&lt;br /&gt;
 zhone&lt;br /&gt;
&lt;br /&gt;
== Developing Zhone ==&lt;br /&gt;
* Install Zhone see [[Zhone#Installing Zhone on Ubuntu]]&lt;br /&gt;
* apt-get source zhone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FSO]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Om_2008_Guide</id>
		<title>Om 2008 Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Om_2008_Guide"/>
				<updated>2008-09-14T09:44:18Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* = =opkg install qtopia-phone-x11-mediaplayer: Was a typo. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Om 2008.8}}&lt;br /&gt;
&lt;br /&gt;
This documents quickly some key usability bits about [[Om 2008.8]] and initial setup.&lt;br /&gt;
&lt;br /&gt;
=== Interface ===&lt;br /&gt;
&lt;br /&gt;
'''New Keyboard'''&lt;br /&gt;
&lt;br /&gt;
More details at : [[Om2008.8 Keyboard]]&lt;br /&gt;
&lt;br /&gt;
'''Installer'''&lt;br /&gt;
&lt;br /&gt;
The button to run the Installer is now on the bottom of the homescreen.&lt;br /&gt;
The plus signs are placeholders for the graphical buttons to be added later.&lt;br /&gt;
&lt;br /&gt;
'''Top Menu'''&lt;br /&gt;
&lt;br /&gt;
The top menu is now your task switcher and is activated by touching the down arrow.&lt;br /&gt;
Press &amp;quot;remove&amp;quot; to close currently focused application.&lt;br /&gt;
&lt;br /&gt;
=== Things to know ===&lt;br /&gt;
&lt;br /&gt;
''' Commands '''&lt;br /&gt;
&lt;br /&gt;
These commands may be used in the terminal application (or in a remote SSH connection). Minimal shell usage skills may be required for Unix newcomers.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;ifconfig&amp;quot;''' - Displays network information.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;opkg update&amp;quot;''' - Updates list of available software.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;opkg install&amp;quot;''' - Install software.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;opkg upgrade&amp;quot;''' - Updates your software.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;killall packagekitd&amp;quot;''' - Quits any package manager which could be running. (Run this command if you get the &amp;quot;Could not obtain administrative lock&amp;quot; error message while running opkg commands)&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;shutdown -r now&amp;quot;''' or  '''&amp;quot;reboot&amp;quot;'''- Reboots your phone.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Om 2008.8 ===&lt;br /&gt;
&lt;br /&gt;
==== Internet ====&lt;br /&gt;
&lt;br /&gt;
===== Connecting your FR through USB to an internet-connected computer =====&lt;br /&gt;
&lt;br /&gt;
Follow this [http://support.microsoft.com/kb/306126 guide (Windows Users)]to share your internet with your phone.&lt;br /&gt;
&lt;br /&gt;
To share your internet connection on a Linux host follow this [[USB_Networking|USB networking guide]].&lt;br /&gt;
&lt;br /&gt;
*If you are also behind a router you may have to change your LAN IP range in your router to avoid using 192.168.0.* as this is the same IP range as what your phone and ICS uses. (If you don't there will be an IP conflict) (see below for a workaround)&lt;br /&gt;
&lt;br /&gt;
After you install and run [[http://wiki.openmoko.org/wiki/Om2008.8#Download Om 2008.8 ]] for the first time you have to restart to get the USB working. Once you have done that you have to ssh into your phone (192.168.0.202) to edit your /etc/network/interfaces so you can access the internet through USB to install software and updates. &lt;br /&gt;
&lt;br /&gt;
Edit the USB section to look like this:&lt;br /&gt;
&lt;br /&gt;
 # Ethernet/RNDIS gadget (g_ether)&lt;br /&gt;
 # ... or on host side, usbnet and random hwaddr&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
 	address 192.168.0.202&lt;br /&gt;
 	netmask 255.255.255.0&lt;br /&gt;
 	network 192.168.0.0&lt;br /&gt;
 	gateway 192.168.0.1&lt;br /&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 &lt;br /&gt;
 	#up echo nameserver 192.168.0.200 &amp;gt; /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
If you have a 192.168.0.* network, with .200 to .203 ip not used, you can do the following on FR:&lt;br /&gt;
&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
 	address 192.168.0.202&lt;br /&gt;
 	netmask 255.255.255.252&lt;br /&gt;
 	network 192.168.0.200&lt;br /&gt;
 	gateway 192.168.0.201&lt;br /&gt;
&lt;br /&gt;
and set your host ip to 201. Don't forget to modify routing and check [[USB_Networking|USB networking guide]] for a DNS MASQ using 192.168.0.201 as FR DNS. --[[User:Femto|Femto]] 00:34, 1 September 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
===== Wireless =====&lt;br /&gt;
&lt;br /&gt;
See [[Neo FreeRunner Wifi]] for details on how to use Wifi to connect your FR to the internet.&lt;br /&gt;
&lt;br /&gt;
==== Advanced power management ====&lt;br /&gt;
If you decide not to install the Unofficial Zecke updates you should install &amp;quot;illume-config&amp;quot; to can gain access to more advanced power management features and to change the look of the GUI through the wrench that will now appear in the top bar. (Restart your phone)&lt;br /&gt;
&lt;br /&gt;
==== Mediaplayer ====&lt;br /&gt;
&lt;br /&gt;
There are 2 media players available for the 2008.8 device.&lt;br /&gt;
&lt;br /&gt;
===== opkg install qtopia-phone-x11-mediaplayer =====&lt;br /&gt;
Seems to be a very nice application, although I haven't found out yet where to put the music I want to play.&lt;br /&gt;
&lt;br /&gt;
Install it using the &amp;quot;install&amp;quot; application or by typing:&lt;br /&gt;
 opkg install qtopia-phone-x11-mediaplayer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== openmoko-mediaplayer2 ===== &lt;br /&gt;
Sice this media player currently is based on the pulseaudio sound server --- and this sound server breaks all phone applications using sound as soon as the phone goes into power saving mode it is unwise to install this application at this time.&lt;br /&gt;
&lt;br /&gt;
If you have already install this application you have to uninstall pulseaudio, as well, to get your phone working as a phone again.&lt;br /&gt;
&lt;br /&gt;
This Media Player is basically useless due to the default theme, to. To install with a better theme run:&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;
=== Bugs/Fixes ===&lt;br /&gt;
&lt;br /&gt;
{{todo|Link to bugreports and check if some of them might be fixed in newer updates}}&lt;br /&gt;
&lt;br /&gt;
*The Media Player is basically unusable because of the skin. And is also very buggy.&lt;br /&gt;
*Battery meter always says its charging. Installing a terminal and running &amp;quot;apm&amp;quot; will display the proper battery status.  (Appears to now work with the latest updates -- [[User:Tkep|Tkep]]&lt;br /&gt;
&lt;br /&gt;
*Your phone will go into standby after 30 seconds EVEN when connected to your computer or wall charger. (Disable this under the settings menu)&lt;br /&gt;
&lt;br /&gt;
*The wifi doesn't work too well right now. (well, works now with 2008.8 updates, I think -- [[User:OlivierBerger|OlivierBerger]] 14:25, 31 August 2008 (UTC))&lt;br /&gt;
&lt;br /&gt;
*Accelerometers have alpha support via [[Gestures]]&lt;br /&gt;
&lt;br /&gt;
*If you only want the rotate screen effect you can give a [[rotate|try to this one]] &lt;br /&gt;
&lt;br /&gt;
*If you let the battery completely drain you will have problems booting it up. Plug it into the wall charger for a few hours and then plug it into your computer and press power.&lt;br /&gt;
*BUT, '''if you have another charged battery''', such as from the [http://us.direct.openmoko.com/products/spares-pack Spares pack], you can boot the Neo with the good battery, plug in wall-charger, and hot-swap the drained battery while booted. This allows you to immediately start &amp;quot;fast-charging&amp;quot; with the wall-charger. (Neo needs to be booted to recognize charger and switch to fast-charging)&lt;br /&gt;
&lt;br /&gt;
*You'll have to install &amp;quot;illume-config&amp;quot; to have more control over power management, scrolling speeds, keyboard options, and to change how the interface looks.&lt;br /&gt;
&lt;br /&gt;
*Some software that you install by command-line may appear in in the settings menu (wrench) that you unlock after installing &amp;quot;illume-config&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Om 2008.8]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Om_2008_Guide</id>
		<title>Om 2008 Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Om_2008_Guide"/>
				<updated>2008-09-14T09:43:26Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Mediaplayer: The old mediaplayer breaks the new phone ;-( */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Om 2008.8}}&lt;br /&gt;
&lt;br /&gt;
This documents quickly some key usability bits about [[Om 2008.8]] and initial setup.&lt;br /&gt;
&lt;br /&gt;
=== Interface ===&lt;br /&gt;
&lt;br /&gt;
'''New Keyboard'''&lt;br /&gt;
&lt;br /&gt;
More details at : [[Om2008.8 Keyboard]]&lt;br /&gt;
&lt;br /&gt;
'''Installer'''&lt;br /&gt;
&lt;br /&gt;
The button to run the Installer is now on the bottom of the homescreen.&lt;br /&gt;
The plus signs are placeholders for the graphical buttons to be added later.&lt;br /&gt;
&lt;br /&gt;
'''Top Menu'''&lt;br /&gt;
&lt;br /&gt;
The top menu is now your task switcher and is activated by touching the down arrow.&lt;br /&gt;
Press &amp;quot;remove&amp;quot; to close currently focused application.&lt;br /&gt;
&lt;br /&gt;
=== Things to know ===&lt;br /&gt;
&lt;br /&gt;
''' Commands '''&lt;br /&gt;
&lt;br /&gt;
These commands may be used in the terminal application (or in a remote SSH connection). Minimal shell usage skills may be required for Unix newcomers.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;ifconfig&amp;quot;''' - Displays network information.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;opkg update&amp;quot;''' - Updates list of available software.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;opkg install&amp;quot;''' - Install software.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;opkg upgrade&amp;quot;''' - Updates your software.&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;killall packagekitd&amp;quot;''' - Quits any package manager which could be running. (Run this command if you get the &amp;quot;Could not obtain administrative lock&amp;quot; error message while running opkg commands)&lt;br /&gt;
&lt;br /&gt;
*'''&amp;quot;shutdown -r now&amp;quot;''' or  '''&amp;quot;reboot&amp;quot;'''- Reboots your phone.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Om 2008.8 ===&lt;br /&gt;
&lt;br /&gt;
==== Internet ====&lt;br /&gt;
&lt;br /&gt;
===== Connecting your FR through USB to an internet-connected computer =====&lt;br /&gt;
&lt;br /&gt;
Follow this [http://support.microsoft.com/kb/306126 guide (Windows Users)]to share your internet with your phone.&lt;br /&gt;
&lt;br /&gt;
To share your internet connection on a Linux host follow this [[USB_Networking|USB networking guide]].&lt;br /&gt;
&lt;br /&gt;
*If you are also behind a router you may have to change your LAN IP range in your router to avoid using 192.168.0.* as this is the same IP range as what your phone and ICS uses. (If you don't there will be an IP conflict) (see below for a workaround)&lt;br /&gt;
&lt;br /&gt;
After you install and run [[http://wiki.openmoko.org/wiki/Om2008.8#Download Om 2008.8 ]] for the first time you have to restart to get the USB working. Once you have done that you have to ssh into your phone (192.168.0.202) to edit your /etc/network/interfaces so you can access the internet through USB to install software and updates. &lt;br /&gt;
&lt;br /&gt;
Edit the USB section to look like this:&lt;br /&gt;
&lt;br /&gt;
 # Ethernet/RNDIS gadget (g_ether)&lt;br /&gt;
 # ... or on host side, usbnet and random hwaddr&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
 	address 192.168.0.202&lt;br /&gt;
 	netmask 255.255.255.0&lt;br /&gt;
 	network 192.168.0.0&lt;br /&gt;
 	gateway 192.168.0.1&lt;br /&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 &lt;br /&gt;
 	#up echo nameserver 192.168.0.200 &amp;gt; /etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
If you have a 192.168.0.* network, with .200 to .203 ip not used, you can do the following on FR:&lt;br /&gt;
&lt;br /&gt;
 auto usb0&lt;br /&gt;
 iface usb0 inet static&lt;br /&gt;
 	address 192.168.0.202&lt;br /&gt;
 	netmask 255.255.255.252&lt;br /&gt;
 	network 192.168.0.200&lt;br /&gt;
 	gateway 192.168.0.201&lt;br /&gt;
&lt;br /&gt;
and set your host ip to 201. Don't forget to modify routing and check [[USB_Networking|USB networking guide]] for a DNS MASQ using 192.168.0.201 as FR DNS. --[[User:Femto|Femto]] 00:34, 1 September 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
===== Wireless =====&lt;br /&gt;
&lt;br /&gt;
See [[Neo FreeRunner Wifi]] for details on how to use Wifi to connect your FR to the internet.&lt;br /&gt;
&lt;br /&gt;
==== Advanced power management ====&lt;br /&gt;
If you decide not to install the Unofficial Zecke updates you should install &amp;quot;illume-config&amp;quot; to can gain access to more advanced power management features and to change the look of the GUI through the wrench that will now appear in the top bar. (Restart your phone)&lt;br /&gt;
&lt;br /&gt;
==== Mediaplayer ====&lt;br /&gt;
&lt;br /&gt;
There are 2 media players available for the 2008.8 device.&lt;br /&gt;
&lt;br /&gt;
===== =opkg install qtopia-phone-x11-mediaplayer ==== &lt;br /&gt;
Seems to be a very nice application, although I haven't found out yet where to put the music I want to play.&lt;br /&gt;
&lt;br /&gt;
Install it using the &amp;quot;install&amp;quot; application or by typing:&lt;br /&gt;
 opkg install qtopia-phone-x11-mediaplayer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== openmoko-mediaplayer2 ===== &lt;br /&gt;
Sice this media player currently is based on the pulseaudio sound server --- and this sound server breaks all phone applications using sound as soon as the phone goes into power saving mode it is unwise to install this application at this time.&lt;br /&gt;
&lt;br /&gt;
If you have already install this application you have to uninstall pulseaudio, as well, to get your phone working as a phone again.&lt;br /&gt;
&lt;br /&gt;
This Media Player is basically useless due to the default theme, to. To install with a better theme run:&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;
=== Bugs/Fixes ===&lt;br /&gt;
&lt;br /&gt;
{{todo|Link to bugreports and check if some of them might be fixed in newer updates}}&lt;br /&gt;
&lt;br /&gt;
*The Media Player is basically unusable because of the skin. And is also very buggy.&lt;br /&gt;
*Battery meter always says its charging. Installing a terminal and running &amp;quot;apm&amp;quot; will display the proper battery status.  (Appears to now work with the latest updates -- [[User:Tkep|Tkep]]&lt;br /&gt;
&lt;br /&gt;
*Your phone will go into standby after 30 seconds EVEN when connected to your computer or wall charger. (Disable this under the settings menu)&lt;br /&gt;
&lt;br /&gt;
*The wifi doesn't work too well right now. (well, works now with 2008.8 updates, I think -- [[User:OlivierBerger|OlivierBerger]] 14:25, 31 August 2008 (UTC))&lt;br /&gt;
&lt;br /&gt;
*Accelerometers have alpha support via [[Gestures]]&lt;br /&gt;
&lt;br /&gt;
*If you only want the rotate screen effect you can give a [[rotate|try to this one]] &lt;br /&gt;
&lt;br /&gt;
*If you let the battery completely drain you will have problems booting it up. Plug it into the wall charger for a few hours and then plug it into your computer and press power.&lt;br /&gt;
*BUT, '''if you have another charged battery''', such as from the [http://us.direct.openmoko.com/products/spares-pack Spares pack], you can boot the Neo with the good battery, plug in wall-charger, and hot-swap the drained battery while booted. This allows you to immediately start &amp;quot;fast-charging&amp;quot; with the wall-charger. (Neo needs to be booted to recognize charger and switch to fast-charging)&lt;br /&gt;
&lt;br /&gt;
*You'll have to install &amp;quot;illume-config&amp;quot; to have more control over power management, scrolling speeds, keyboard options, and to change how the interface looks.&lt;br /&gt;
&lt;br /&gt;
*Some software that you install by command-line may appear in in the settings menu (wrench) that you unlock after installing &amp;quot;illume-config&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Om 2008.8]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Om_2008.8</id>
		<title>Om 2008.8</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Om_2008.8"/>
				<updated>2008-09-14T09:26:30Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Known Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Om 2008.8}}&lt;br /&gt;
{{Om 2008.8}}&lt;br /&gt;
&lt;br /&gt;
{{Distributions|Om 2008.8}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
'''Om 2008.8''' is the successor to [[Om 2007.2]] and had '''ASU''' as a codename. It was [http://lists.openmoko.org/pipermail/community/2008-August/025619.html released] on '''August 08, 2008''' (+ update &amp;quot;stable&amp;quot; releases starting from '''August 26, 2008'''). Om 2008.8 uses EFL for the launcher, custom UI applications and [[QtopiaOnX11|Qtopia on X11]] for telephony. The distribution  is the first step from GTK+ on x11 to using multiple toolkits in combination.&lt;br /&gt;
&lt;br /&gt;
== What's New ? ==&lt;br /&gt;
&lt;br /&gt;
Compared to 2007.2 that has a longer development history, Om 2008.8 is definitely a .0 major release. So think KDE 4.0 vs. 3.5, not Linux 2.6.23 vs. 2.6.22. There are daily updates, some good some bad. If you want the stability level required to use the FreeRunner as your main phone, it is suggested for now to keep 2007.2 in the phone's flash memory and test 2008.8 on a removable SD card.&lt;br /&gt;
&lt;br /&gt;
The main user-visible changes:&lt;br /&gt;
&lt;br /&gt;
* The user interface has been fully revised with a new window manager [[illume]]. It is visually much richer, and can be customized further by using your own [[Edje]] files.&lt;br /&gt;
* '''[[Om2008.8_Installer|A graphical installer]]''' allows to add easily new applications, themes and functionality.&lt;br /&gt;
* A new [[Om2008.8_Locations|Locations]] application is provided, to save your favorite spots and share them with friends via sms.&lt;br /&gt;
* Power management has been improved: The Aux button now locks the screen, the Power button suspends and the red LED behind the Aux button lights up when charging.&lt;br /&gt;
* The [[Om2008.8_Keyboard| keyboard]] is now the Qtopia one (whether this is an improvement has been [[Keyboard_Debate|hotly debated]]).&lt;br /&gt;
&lt;br /&gt;
For developers, the main changes are:&lt;br /&gt;
* Multiple toolkits: '''Om 2008.8''' supports [http://www.enlightenment.org/ EFL], [http://trolltech.com/products/qtopia Qtopia] and [http://www.gtk.org GTK+] applications.&lt;br /&gt;
* A [[CommunityRepository| Community Repository]] has been set up, it is integrated in the ([[Om2008.8_Installer|Installer]]).&lt;br /&gt;
* '''Source Codes''' are publicly available, allowing for customization all the way down to low level systems.&lt;br /&gt;
&lt;br /&gt;
For more details, see the [[Om 2008.8 Guide]] and the [[Om2008.8 Feature Plan|Om 2008.8 Feature Plan]].&lt;br /&gt;
&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:33% &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:33% &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:33% &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:33% &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:33% &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:33% &amp;quot; |&lt;br /&gt;
[[Image:Om locations4.png|200px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---the following anchor is here to ensure that the &amp;quot;Download&amp;quot; link at http://openmoko.com/download.html links to the correct section. please don't delete the anchor unless that link is changed or removed---&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;Flash_Om_2008.8_images&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
To install the Om2008.8 stable distribution on the Neo FreeRunner, download the Root Filesystem and the Kernel image files from [[Download]] page and install according to [[Flashing the Neo FreeRunner]]. Note that flashing the smartphone will overwrite all your existing data and software.&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
&lt;br /&gt;
This is only a subset, and some of the bits reported below may have been fixed by stable updates (see [http://onlinedev.blogspot.com/search/label/om2008.8%20review Alasal's test reports] as well as the &amp;quot;Updates&amp;quot; section below). See [http://docs.openmoko.org/trac/search?q=2008.8 all tickets with 2008.8] in the bug tracker.&lt;br /&gt;
&lt;br /&gt;
'''Suspend'''&lt;br /&gt;
&lt;br /&gt;
Builds from the last days of August tend to suspend after 30s no matter what you set in settings. Switching the screensaver off with `xset s off' disables suspend completely.  Note that this command must be typed into the terminal application on the phone itself; if you try to run it from an ssh session it fails with the error `xset:  unable to open display &amp;quot;&amp;quot;'.  This is because ssh sessions change the display settings expecting you might want X11 forwarding.  In fact if you are using X11 forwarding with ssh -Y, the command won't fail over ssh, but it still won't do what you expect, as xset will assume you're talking about the forwarded X11 session, and thus doesn't affect the X11 session on the phone. Therefore if you use a ssh session you need to enter `xset -display :0 s off'.&lt;br /&gt;
&lt;br /&gt;
Alex reportedly solved the problem going into Illume Settings, then Power, and setting to OFF the 2 parameters. He still gets the screensaver, but can reactivate easily just by touching.&lt;br /&gt;
&lt;br /&gt;
If resume breaks audio (the ringing of the phone or for calling someone) a very probable reason is that the pulseaudio sound server is installed. This happens e.G. when openmoko-mediaplayer2 is installed. There seems to be [http://lists.openmoko.org/pipermail/openmoko-kernel/2008-August/004877.html activity to fix this application] already, though.&lt;br /&gt;
&lt;br /&gt;
'''GSM'''&lt;br /&gt;
&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1766 Cannot make calls or receive SMS messages]&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1662 GSM not working properly after x hours]&lt;br /&gt;
&lt;br /&gt;
'''WiFi'''&lt;br /&gt;
 &lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1929 WiFi can only connect once]&lt;br /&gt;
&lt;br /&gt;
'''Audio quality'''&lt;br /&gt;
&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1640 Improve overall audio]&lt;br /&gt;
&lt;br /&gt;
'''System Software''' &lt;br /&gt;
&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1736 Boot screen goes into sleep and never wake up if not touch during booting]&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1597 After long suspend, kernel thread events]&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1315 xglamo: performance decreases after a while]&lt;br /&gt;
* [http://docs.openmoko.org/trac/ticket/1682 Neo turns off before reaching x]&lt;br /&gt;
&lt;br /&gt;
'''QPE high cpu usage'''&lt;br /&gt;
* qpe does scan whole filesystem ( including SD card ) for documents , mp3 files , etc . if you don't want it you can edit Storage.conf ( under /opt filesystem ) and disable Sd Card scanning ( overwrite 1 by 0 ) &lt;br /&gt;
&lt;br /&gt;
'''Networking'''&lt;br /&gt;
* No Updates/Installation are possible or pings to domains because DNS is not working. This problem occurs because the /etc/resolv.conf is empty by default.&lt;br /&gt;
Add these lines in /etc/network/interfaces:&lt;br /&gt;
&lt;br /&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&lt;br /&gt;
This is to be inserted below gateway address and above the bluetooth networking. After this it will be set on every reboot.&lt;br /&gt;
&lt;br /&gt;
For resolving DNS without restarting, run the following commands:&lt;br /&gt;
&lt;br /&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&lt;br /&gt;
This should solve most of your moko side networking issues. If you need any other help please refer to [[USB Networking]]&lt;br /&gt;
&lt;br /&gt;
{{note| [http://en.wikipedia.org/wiki/Resolvconf resolvconf] is installed so should probably be used &lt;br /&gt;
&lt;br /&gt;
'''Problem''': parts of resolvconf are missing:  without the scripts under /etc/network/if-{up,down}.d, and /etc/resolvconf/run/enable-updates and /lib/resolvconf/list-records it does nothing, and even then, /etc/resolvconf/run should probably be a symlink to /var/run, or /etc/resolv.conf needs to be pointed at /etc/resolvconf/run/resolv.conf -- once all that's done, it seems to work as long as you add something like this to /etc/network/interfaces at the end of the usb0 stanza:&lt;br /&gt;
&lt;br /&gt;
    dns-nameservers 192.168.0.200&lt;br /&gt;
    dns-search example.com&lt;br /&gt;
&lt;br /&gt;
and add &amp;lt;tt&amp;gt;usb*&amp;lt;/tt&amp;gt; above &amp;lt;tt&amp;gt;eth*&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;/etc/resolvconf/interface-order&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note| '''Solution:''' Steps to add missing resolvconf script: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;touch /etc/resolvconf/run/enable-updates&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;cd /etc ; rm resolv.conf ; ln -s /etc/resolvconf/run/resolv.conf .&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;mkdir /lib/resolvconf/ ; cd /lib/resolvconf/&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;wget http://87.227.108.179/list-records&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;chmod +x list-records&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt; and remove the lines:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;       network 192.168.0.0&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;       gateway 192.168.0.200&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If we need to use the usb network more then just locally from the computer in the other end of the USB-cable, login with ssh and add a default route like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;route add default gateway 192.168.0.200&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* Usb-networking will not work until rebooted after initial boot.&lt;br /&gt;
&lt;br /&gt;
'''Usability''' &lt;br /&gt;
&lt;br /&gt;
* The Pin-Dialog by default just shows letters. You have to slide your finger up/down over the keyboard to make the numbers/uppercase/special characters appear.&lt;br /&gt;
* The installer app doesn't release administrative rights which results in not being able to use opkg. Solution: run &amp;quot;killall packagekitd&amp;quot; (on the freerunner or when ssh'ed in).&lt;br /&gt;
* The installer app doesn't release administrative rights which results in not being able to use opkg. Alternate Solution: On the FreeRunner, use the drop-down menu to close all open applications.&lt;br /&gt;
* The keyboard may not be adapted for all uses. See [[Keyboard Debate]] for a full discussion and options.&lt;br /&gt;
&lt;br /&gt;
== Updates for Om 2008.8 ==&lt;br /&gt;
&lt;br /&gt;
Posterior to the Om2008.8 release made on 2008/08/08, development has been [http://lists.openmoko.org/pipermail/community/2008-August/026491.html split in two branches] aiming respectively at the next minor and major releases.&lt;br /&gt;
&lt;br /&gt;
Support for 2008.8 occurs on the ''org.openmoko.asu.stable'' branch, with the short term goal to improve stability and useability, keeping the same features set. Changes to that branch are described in [http://git.openmoko.org/?p=openmoko.git;a=log;h=org.openmoko.asu.stable the Om 2008.8 stable changelog], and official updates  are available (as of 2008/08/26) in two forms (see [http://lists.openmoko.org/pipermail/community/2008-August/027997.html see this message] for the announcement) :&lt;br /&gt;
* in the http://downloads.openmoko.org/repository/Om2008.8/ opkg feeds. Since these are already configured  in 2008.8, using 'opkg update; opkg upgrade' is sufficient to get these.&lt;br /&gt;
* as flash-able images in http://downloads.openmoko.org/releases/Om2008.8-update/&lt;br /&gt;
As always, update often only if you like to be on the leading edge with the associated risks. Otherwise ask around on IRC before you jump or simply wait for an official announce that the branch is in a good state. Rumours are that this branch should flower every few weeks. There has even been signs that the next [http://en.wikipedia.org/wiki/Point_release point release] could be named 2008.9.&lt;br /&gt;
&lt;br /&gt;
The long-term development branch is named ''org.openmoko.dev''. This branch has refocused on the base system functionalities (applications will not be installed by default), and started by catching up with upstream. Critical bugfixes from that branch should percolate to the ''.asu.stable'' branch after an unspecified delay. Using binaries updates from that branch (or any other non-2008.8 repository) on a 2008.8 stable base is likely to send you in [http://en.wikipedia.org/wiki/Dependency_hell Dependency Hell], you have been warned.&lt;br /&gt;
&lt;br /&gt;
== Dedication ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
From: Openmoko&lt;br /&gt;
To: openmoko-community mailing list&lt;br /&gt;
&lt;br /&gt;
Om 2008.8 was designed to be empty, for the very purpose of showcasing your ideas.&lt;br /&gt;
&lt;br /&gt;
Think of our products as galleries. We're building the environment.&lt;br /&gt;
Each one different from the next. You'll get all the free art supplies&lt;br /&gt;
you could imagine because we want you to add your own meaning.&lt;br /&gt;
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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Om 2008.8| ]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-07-28T04:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* What if I borked my bootloader environment and don't get a prompt anymore? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Phase0 Quick Start ==&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
The GTA01 uses the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/snapshots in the subdirectory 200X.XX/images/.  It should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it by issuing the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
See [[Flashing Openmoko]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-07-28T04:38:32Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* How to unbork a u-boot_env */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Phase0 Quick Start ==&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
The GTA01 uses the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader source can be found at http://git.openmoko.org/?p=u-boot.git;a=shortlog;h=stable . &lt;br /&gt;
&lt;br /&gt;
To get u-boot by subversion:&lt;br /&gt;
&lt;br /&gt;
 svn co https://svn.openmoko.org/ openmoko/u-boot&lt;br /&gt;
&lt;br /&gt;
To build u-boot:&lt;br /&gt;
* Clone the git tree and check out the stable branch&lt;br /&gt;
* Set the CROSS_COMPILE environment variable to specify the prefix to your toolchain binaries&lt;br /&gt;
* Run &amp;quot;make gta02v5_config&amp;quot; (or gta01bv4_config, or whatever hardware revision you have)&lt;br /&gt;
* Run &amp;quot;make u-boot.udfu&amp;quot;. This will give you an image which you can install with dfu-util, or which you can upload into memory via JTAG (with a debug board)&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/snapshots in the subdirectory 200X.XX/images/.  It should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary rights (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, let's see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
=== What if I borked my bootloader environment and don't get a prompt anymore? ===&lt;br /&gt;
Found a solution here:&lt;br /&gt;
[[http://markmail.org/message/gqypwiohdet6x4am?q=almesberger+partition&amp;amp;page=1&amp;amp;refer=xbamkzwwsaobv7wa]]&lt;br /&gt;
&lt;br /&gt;
It works the following way:&lt;br /&gt;
* Get the devirginator:&lt;br /&gt;
 svn co http://svn.openmoko.org/trunk/src/host/devirginator&lt;br /&gt;
 cd devirginator&lt;br /&gt;
* Read the u-boot environment from the device:&lt;br /&gt;
 dfu-util -a u-boot_env -R -U env.in&lt;br /&gt;
* Create a file that contains everything you want to change in your u-boot environment or get it with the following command:&lt;br /&gt;
 wget http://svn.openmoko.org/trunk/src/host/devirginator/environment.in&lt;br /&gt;
* Now let devirginator generate a new u-boot_env partition for us, - that contains the partition table from our u-boot_env, - and all changes we wanted to make; Note that the -D GTA02 is needed for the neo Freeruner only.&lt;br /&gt;
 ./envedit.pl -i env.in -f environment.in -o env.out -D GTA02&lt;br /&gt;
* On my box the partition layout didn't seem to match the idea of envedit.pl, so it issued 2 warnings:&lt;br /&gt;
 warning: environment is 262144 bytes, expected 16384&lt;br /&gt;
 CRC error: expected 0xc33e35fc, got 0x93097bfb&lt;br /&gt;
* In this case jut add a additional argument to the command line - that has to be the 1st argument, though, and that contains the size information we got from the warning:&lt;br /&gt;
 ./envedit.pl -s 262144 -i env.in -D GTA02 -f environment.in  -o env.out&lt;br /&gt;
* Now the perl script should no more output anything but write a new u-boot_env partition that we can upload to the device by:&lt;br /&gt;
 dfu-util -a u-boot_env -R -D env.out&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...&lt;br /&gt;
 usb 4-1: USB disconnect, address 2&lt;br /&gt;
&lt;br /&gt;
A possible solution is given below. Please note that if you have a usb keyboard or mouse then the command might cause trouble. &lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
Another option is to plug the FR into a different USB port on the host, preferably one on the Motherboard not the hub.&lt;br /&gt;
&lt;br /&gt;
Disconnecting the Neo's USB while powering up may prevent this problem in the future.&lt;br /&gt;
&lt;br /&gt;
See [[Flashing Openmoko]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Backup</id>
		<title>Backup</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Backup"/>
				<updated>2008-07-27T11:55:10Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* We should backupp te other 3 partitions as well. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You will need the [[Dfu-util]] to make a backup of your existing image.&lt;br /&gt;
&lt;br /&gt;
As when [[Flashing_the_Neo_FreeRunner|flashing]], you will need to be in [[Booting_the_Neo_FreeRunner#Log_into_U-Boot_in_the_NOR_Flash|U-Boot in the NOR Flash]]. Log into the NOR uBoot menu and select ''Set console to USB''. Now you will be able to flash, make backups of your Freerunner or query the Freerunner with [[Dfu-util|dfu-util]].&lt;br /&gt;
&lt;br /&gt;
{{note|On a Windows host, omit the &amp;quot;./&amp;quot; or &amp;quot;sudo ./&amp;quot; that precedes the commands listed on this page}}&lt;br /&gt;
&lt;br /&gt;
THIS WILL TAKE AWHILE.  The rootfs will take significantly longer than the kernel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./dfu-util -a kernel -R -U good-kernel.bin&lt;br /&gt;
./dfu-util -a rootfs -R -U good-rootfs.jffs2&lt;br /&gt;
./dfu-util -a u-boot_env -R -U good-u-boot_env.bin&lt;br /&gt;
./dfu-util -a splash -R -U good-splash.bin&lt;br /&gt;
./dfu-util -a u-boot -R -U good-u-boot.bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what my successful output looked like...&lt;br /&gt;
&lt;br /&gt;
on the host PC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo ./dfu-util -a kernel -R -U good-kernel.img&lt;br /&gt;
dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
&lt;br /&gt;
Opening USB Device 0x0000:0x0000...&lt;br /&gt;
Claiming USB DFU Runtime Interface...&lt;br /&gt;
Determining device status: state = appIDLE, status = 0&lt;br /&gt;
Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
Resetting USB...&lt;br /&gt;
Opening USB Device...&lt;br /&gt;
Found Runtime: [0x1d50:0x5119] devnum=12, cfg=0, intf=0, alt=3, name=&amp;quot;kernel&amp;quot;&lt;br /&gt;
Claiming USB DFU Interface...&lt;br /&gt;
Setting Alternate Setting ...&lt;br /&gt;
Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
dfuIDLE, continuing&lt;br /&gt;
Transfer Size = 0x1000&lt;br /&gt;
Resetting USB to switch back to runtime mode&lt;br /&gt;
$ sudo ./dfu-util -a rootfs -R -U good-rootfs.jffs2&lt;br /&gt;
dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
&lt;br /&gt;
Opening USB Device 0x0000:0x0000...&lt;br /&gt;
Found Runtime: [0x1d50:0x5119] devnum=16, cfg=0, intf=0, alt=6, name=&amp;quot;rootfs&amp;quot;&lt;br /&gt;
Claiming USB DFU Interface...&lt;br /&gt;
Setting Alternate Setting ...&lt;br /&gt;
Determining device status: state = dfuERROR, status = 14&lt;br /&gt;
dfuERROR, clearing status&lt;br /&gt;
Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
dfuIDLE, continuing&lt;br /&gt;
Transfer Size = 0x1000&lt;br /&gt;
Resetting USB to switch back to runtime mode&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Despite the fact that there was a device status with state=dfuERROR, everything seems to have worked.&lt;br /&gt;
&lt;br /&gt;
on the FreeRunner:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DFU: Switching to DFU Mode&lt;br /&gt;
DEVICE_CONFIGURED: 1&lt;br /&gt;
Starting DFU Upload of partition 'kernel'&lt;br /&gt;
DEVICE_CONFIGURED: 1&lt;br /&gt;
Starting DFU Upload of partition 'rootfs'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I could backup the kernel of my GTA02  but trying to use this method to backup the rootfs failed several times....&lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface... &lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB... &lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=20, cfg=0, intf=0, alt=6, name=&amp;quot;rootfs&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 dfu_upload error -110&lt;br /&gt;
&lt;br /&gt;
In demsg I get this error&lt;br /&gt;
 usb 5-2: usbfs: USBDEVFS_CONTROL failed cmd dfu-util rqt 161 rq 2 len 4096 ret -110&lt;br /&gt;
&lt;br /&gt;
I have not been able to backup rootfs using this method.&lt;br /&gt;
[[category:Software]]&lt;br /&gt;
[[category:Technical]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Flashing_the_Neo_1973</id>
		<title>Flashing the Neo 1973</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Flashing_the_Neo_1973"/>
				<updated>2008-07-27T11:47:12Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* IMPORTANT NOTEs FOR EARLY ADOPTERS: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Flashing Openmoko}}&lt;br /&gt;
This describes how to update your Neo1973 to the latest software. We'll update the kernel, the root filesystem and optionally u-boot [[partitions]] in the internal flash memory.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* MacOS X users: please refer to [[MacOS_X]].&lt;br /&gt;
* Users without Linux please refer to [[No_Linux]] for the moment.&lt;br /&gt;
&lt;br /&gt;
You may prefer to read directly :&lt;br /&gt;
* [[Flashing the Neo FreeRunner]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{warning|If you're updating u-boot and don't have a [[Debug Board]], you might render your unit unusable if the flashing procedure is interrupted}}&lt;br /&gt;
&lt;br /&gt;
{{warning|If you have U-boot from before 2008 and upload a rootfs image that is smaller than the previous one, or if you have written to the rootfs, just flashing may not work - you may need to run a &amp;quot;[[Nand_erase|nand erase rootfs]]&amp;quot; before you then upload your rootfs (details  [[Bootloader#Accessing_the_bootloader_prompt|here]]). Running &amp;quot;nand erase rootfs&amp;quot; before flashing a new rootfs, is quick and saves you the time of a second rootfs upload. &amp;lt;b&amp;gt;Attention:&amp;lt;/b&amp;gt; If you [[Nand_erase|erase NAND]] without mentioning the partition to be erased, u-boot will be wiped out and the Neo will be bricked}}&lt;br /&gt;
&lt;br /&gt;
== Files to download ==&lt;br /&gt;
&lt;br /&gt;
The rootfs &amp;amp; kernel images you download need to match. The loadable modules for the kernel are in /lib/modules/ on the rootfs [[partition]] - if you get the wrong combination, you will get some error messages during bootup that it cannot access /lib/modules/x.y.z-moko123 - in this case swap either the kernel or the rootfs to match the other's version. Unfortunately the rootfs filename does not seem to tell what kernel version it is compatible with, you just have to try a few. '''NOTE:''' At least some combinations seem to boot up fine even if the module versions mismatch so be sure to check the console while it's booting after flashing.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moko123&amp;quot; in the error message example above indicates the openmoko patchset version.&lt;br /&gt;
&lt;br /&gt;
Necessary files are at:&lt;br /&gt;
*http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/neo1973/?C=M;O=D&lt;br /&gt;
&lt;br /&gt;
*http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/?C=M;O=D (Daily unstable builds) &lt;br /&gt;
&lt;br /&gt;
*http://buildhost.automated.it/OM2007.2/?M=D (Location of more current unofficial builds.)&lt;br /&gt;
&lt;br /&gt;
A list of download locations can be found at [[Repositories]]. See [[Phase 1 Software Testing]] for a list of tested images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changelogs can be found at:&lt;br /&gt;
*http://cia.vc/stats/project/openembedded/.rss&lt;br /&gt;
&lt;br /&gt;
*http://cia.vc/stats/project/openmoko/.rss&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get:&lt;br /&gt;
* [[dfu-util]] (the precompiled binary on http://buildhost.openmoko.org is for Linux/i386)&lt;br /&gt;
** (this is the part that runs on the PC, that pushes the files across the USB to the phone)&lt;br /&gt;
* openmoko-devel-image-fic-gta01-2007********.rootfs.jffs2&lt;br /&gt;
* uImage-2.6.21.*-moko*-r*_0_****_0-fic-gta01.bin&lt;br /&gt;
* for phase 0 (Bv03) phones:&lt;br /&gt;
** Tested by a few people:&amp;lt;BR&amp;gt;u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2040.bin&amp;lt;BR&amp;gt;MD5SUM: 60c5aeba1bd6642b05b3a5e6f2dafe83&lt;br /&gt;
** Tested by hrw:&amp;lt;BR&amp;gt;u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2062.bin&amp;lt;BR&amp;gt;MD5SUM: 716f1eba9b0f2be4a0a3be4a56724935&lt;br /&gt;
* for phase 1 phones, uboot update should not be necessary.&lt;br /&gt;
&lt;br /&gt;
== Preparing the device for DFU mode ==&lt;br /&gt;
&lt;br /&gt;
You'll need to boot your openmoko into uboot menu.  To do this:&lt;br /&gt;
&lt;br /&gt;
* Unplug all usb devices from the host.&lt;br /&gt;
* Hold the phone's [[Neo1973 AUX Button | AUX button]] and then press the phone's [[Neo1973 Power Button | POWER button]].&lt;br /&gt;
** You'll need to hold the POWER button for about 4 seconds before the device will turn on. Otherwise the screen will only flash white for a second and the phone won't power up.&lt;br /&gt;
* The u-boot menu should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot ..&lt;br /&gt;
&lt;br /&gt;
=== BOOT MENU ===&lt;br /&gt;
&lt;br /&gt;
BOOT&lt;br /&gt;
Set console to USB&lt;br /&gt;
Set console to serial&lt;br /&gt;
Power off&lt;br /&gt;
Boot from SD&lt;br /&gt;
Factory reset&lt;br /&gt;
&lt;br /&gt;
Press [AUX] to select, [POWER] to execute.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Plug Neo1973 into host with supplied USB cable. (Plug the phone directly into the host not via a hub.)&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the bootloader remains inactive for about 30 seconds, that is no keypresses or no use of the serial console, the device will automatically power down.&lt;br /&gt;
You can prevent this by just pressing the AUX button every 30 seconds or so or by telling the bootloader to not exhibit this behaviour.&lt;br /&gt;
To do so, please connect to the bootloader:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cu -l /dev/ttyACM0&lt;br /&gt;
GTA01Bv4 # setenv boot_menu_timeout 65000&lt;br /&gt;
GTA01Bv4 # saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For those that are unfamiliar with cu, to exit you need to press &amp;quot;~.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
(You may have to install the uucp package to have access to cu, and maybe also &amp;quot;&amp;lt;code&amp;gt;chown uucp:uucp /dev/ttyACM0&amp;lt;/code&amp;gt;&amp;quot; as root before it will work)&lt;br /&gt;
&lt;br /&gt;
No further navigation is needed in u-boot - the device will automatically start flashing the images when told to do so by dfu-util below. After flashing all the files, you can choose the &amp;quot;Boot&amp;quot; option to boot the newly flashed stuff.&lt;br /&gt;
&lt;br /&gt;
== Actually flashing things into the device ==&lt;br /&gt;
&lt;br /&gt;
Double check that u-boot matches your hardware version. First determine what hardware revision you have [[finding hardware revision]], so that you can download and install the correct bootloader.&lt;br /&gt;
&lt;br /&gt;
 You'll probably only want to update u-boot if you have the [[debug board]] for fixing failed u-boot updates. You can also check the current [[partitions]].&lt;br /&gt;
&lt;br /&gt;
Note: It may be necessary to run the application as root (at least in Ubuntu and Debian).&lt;br /&gt;
&lt;br /&gt;
Note: In case there are more than one available usb devices use -d 0x1457:0x5119 option.&lt;br /&gt;
&lt;br /&gt;
To update u-boot:&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not update u-boot unless you have [[debug board]] or are really sure about what you are doing. Flashing a wrong u-boot image will brick your device!}}&lt;br /&gt;
&lt;br /&gt;
I you own a FreeRunner don't be too scared, though: Unlike nearly any other deviceon the market the Freerunner contains a second bootloader on a write protected chip - that is still there, even if flashing the original bootloader goes horribly wrong. You can always make the phone use this bootloader instead by pressing the power button whilst pressing the Aux button - and get a second and any sucessive try to flash the u-boot loader the right way. In theory it should therefore be impossible to brick your phone completely enough by flashing the bootloader that a debug board is needed to unbrick it.&lt;br /&gt;
* Download the newest uBoot binary from http://downloads.openmoko.org/releases/Freerunner/&lt;br /&gt;
* start the cellular phone by pressing power whilst pressing the aux button.&lt;br /&gt;
* Run the following command, but Note especially that the image used in the line below is for GTA02_v5.&lt;br /&gt;
&lt;br /&gt;
 dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin&lt;br /&gt;
&lt;br /&gt;
The u-boot of a GTA01B_v03 (And only of a GTA01B_V03, not for example a GTA01B_v04) can be flashed with the following image: &lt;br /&gt;
 ./dfu-util -a u-boot -R -D u-boot-gta01bv3-latest.bin&lt;br /&gt;
&lt;br /&gt;
* The device is now flashed: &lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface...&lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB...&lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name=&amp;quot;u-boot&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 bytes_per_hash=4316&lt;br /&gt;
 Starting download: [##################################################] finished!&lt;br /&gt;
 state(2) = dfuIDLE, status(0) = No error condition is present &lt;br /&gt;
 Done!&lt;br /&gt;
 Resetting USB to switch back to runtime mode&lt;br /&gt;
* The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To update the kernel:&lt;br /&gt;
 ./dfu-util -a kernel -R -D ./uImage-2.6.21.1-moko10-r0_0_1883_0-fic-gta01.bin&lt;br /&gt;
Flashing the kernel will probably take less than 1 minute. If you're having trouble, you may want to compare the output that you see to a &amp;quot;known good&amp;quot; [[Flashing openmoko/Known good kernel flash U-Boot output | U-Boot]]/[[Flashing openmoko/Known good kernel flash dmesg output | dmesg]]/[[Flashing openmoko/Known good kernel flash dfu-util output | dfu-util]] output. The phone display should show &amp;quot;Starting DFU DOWNLOAD to partition 'kernel'.&lt;br /&gt;
&lt;br /&gt;
To update the root filesystem:&lt;br /&gt;
 ./dfu-util -a rootfs -R -D ./Openmoko-devel-image-fic-gta01-20070501054014.rootfs.jffs2&lt;br /&gt;
&lt;br /&gt;
Flashing the root filesystem will probably take around 13 minutes. Note that it can take over an hour if you are using a XEN VM for doing the flash.&lt;br /&gt;
&lt;br /&gt;
Here is some &amp;quot;known good&amp;quot; output from [[Flashing openmoko/Known good rootfs flash U-Boot output | U-Boot]], [[Flashing openmoko/Known good rootfs flash dmesg output | dmesg]], and [[Flashing openmoko/Known good rootfs flash dfu-util output | dfu-util]]. The phone display should show &amp;quot;Starting DFU DOWNLOAD to partition 'rootfs'.&lt;br /&gt;
&lt;br /&gt;
Notice that it's not normally necessary to update the modules anymore. It's just for people with special needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...now, you'll end up with system that boots, but does not see audio/SD card. You'll need to download corresponding modules.tgz and copy them over to openmoko.  - UPDATE:  GTA01 phones appear to not need this step, as long as you have installed a kernel that matches the version of the modules contained in the root image ('uname -r' will show the kernel version, and 'ls /lib/modules/' will show the modules that are present).&lt;br /&gt;
&lt;br /&gt;
=== Important Notes for early adopters: ===&lt;br /&gt;
Some old U-Boot versions are very buggy:&lt;br /&gt;
 &lt;br /&gt;
For U-Boot versions until somewhere in 2007 if you uploaded your rootfs image that is smaller that previous one it wouldn't work - you needed to attach to the u-boot bootloader first, erase NAND partition that would contain the rootfs later and then upload your rootfs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cu -l /dev/ttyACM0&lt;br /&gt;
GTA01Bv3 # nand erase rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, that it might be wise to type, not drag-and-drop the &amp;quot;nand erase rootfs&amp;quot; line since when characters arrived too fast u-boot versions until mid-2008 tended to &amp;quot;eat&amp;quot; characters.&lt;br /&gt;
&lt;br /&gt;
Also you may have to press the AUX button every 25 seconds or so to prevent the phone from going to sleep while being flashed. Very early versions of U-Boot also did not erase the rootfs before flashing it at all... to do that, do minicom /dev/ttyACM0, then nand erase rootfs, like written above.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
== Where to go from here ==&lt;br /&gt;
&lt;br /&gt;
So, now you have one of the more recent kernel and rootfs images, or one of the (semi)official ones, whats next?&lt;br /&gt;
&lt;br /&gt;
You probably want to set up [[USB_Networking]] and then configure your Neo1973 some more.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update your Neo1973 using&lt;br /&gt;
&lt;br /&gt;
 ipkg update &amp;amp;&amp;amp; ipkg upgrade&lt;br /&gt;
&lt;br /&gt;
or (newer versions)&lt;br /&gt;
&lt;br /&gt;
 opkg update &amp;amp;&amp;amp; opkg upgrade&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and have a look at additional ipkg [[repositories]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Question to anybody who knows: The kernel the openmoko boots from is in a different partition than the root file system in most setups right now. In former times there always was a warning that ipkg updates /boot/uImage - the location where the kernel that matches the current rootfs can be found - but didn't update the partition the kernel is loaded from in the default setup. The following line manually updates the kernel on this partition: &lt;br /&gt;
 cat /boot/uImage &amp;gt;/dev/mtdblock3&lt;br /&gt;
 &lt;br /&gt;
Is typing this line still necessary?&lt;br /&gt;
[[User:Peterpall]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting notes ==&lt;br /&gt;
&lt;br /&gt;
If you're facing errors in seemingly random places during the flashing of images, most likely the USB hub or cable through which your Neo1973 is connected is of too poor quality.  It is recommended that you always connect the phone directly to the host when using dfu-util.&lt;br /&gt;
&lt;br /&gt;
If dfu-util reports a message like the following, before it starts flashing:&amp;lt;pre&amp;gt;&lt;br /&gt;
Resetting USB...&lt;br /&gt;
not at least 2 device changes found ?!?&lt;br /&gt;
Lost device after RESET?&amp;lt;/pre&amp;gt; just retry the command - it should work on a second run.&lt;br /&gt;
&lt;br /&gt;
This message can also occur if you connect the usb cable before you are in the bootloader menu.  You must carefully follow the sequence described at the beginning of this article and not connect the USB cable too early.&lt;br /&gt;
&lt;br /&gt;
dfu-util does not seem to be able to download files if run from linux running under&lt;br /&gt;
VMWare on a Windows OS host.&lt;br /&gt;
&lt;br /&gt;
See other notes on [[Dfu-util]] page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Flashing Openmoko| ]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Flashing_the_Neo_1973</id>
		<title>Flashing the Neo 1973</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Flashing_the_Neo_1973"/>
				<updated>2008-07-27T11:43:35Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Actually flashing things into the device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Flashing Openmoko}}&lt;br /&gt;
This describes how to update your Neo1973 to the latest software. We'll update the kernel, the root filesystem and optionally u-boot [[partitions]] in the internal flash memory.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* MacOS X users: please refer to [[MacOS_X]].&lt;br /&gt;
* Users without Linux please refer to [[No_Linux]] for the moment.&lt;br /&gt;
&lt;br /&gt;
You may prefer to read directly :&lt;br /&gt;
* [[Flashing the Neo FreeRunner]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{warning|If you're updating u-boot and don't have a [[Debug Board]], you might render your unit unusable if the flashing procedure is interrupted}}&lt;br /&gt;
&lt;br /&gt;
{{warning|If you have U-boot from before 2008 and upload a rootfs image that is smaller than the previous one, or if you have written to the rootfs, just flashing may not work - you may need to run a &amp;quot;[[Nand_erase|nand erase rootfs]]&amp;quot; before you then upload your rootfs (details  [[Bootloader#Accessing_the_bootloader_prompt|here]]). Running &amp;quot;nand erase rootfs&amp;quot; before flashing a new rootfs, is quick and saves you the time of a second rootfs upload. &amp;lt;b&amp;gt;Attention:&amp;lt;/b&amp;gt; If you [[Nand_erase|erase NAND]] without mentioning the partition to be erased, u-boot will be wiped out and the Neo will be bricked}}&lt;br /&gt;
&lt;br /&gt;
== Files to download ==&lt;br /&gt;
&lt;br /&gt;
The rootfs &amp;amp; kernel images you download need to match. The loadable modules for the kernel are in /lib/modules/ on the rootfs [[partition]] - if you get the wrong combination, you will get some error messages during bootup that it cannot access /lib/modules/x.y.z-moko123 - in this case swap either the kernel or the rootfs to match the other's version. Unfortunately the rootfs filename does not seem to tell what kernel version it is compatible with, you just have to try a few. '''NOTE:''' At least some combinations seem to boot up fine even if the module versions mismatch so be sure to check the console while it's booting after flashing.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moko123&amp;quot; in the error message example above indicates the openmoko patchset version.&lt;br /&gt;
&lt;br /&gt;
Necessary files are at:&lt;br /&gt;
*http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/neo1973/?C=M;O=D&lt;br /&gt;
&lt;br /&gt;
*http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/?C=M;O=D (Daily unstable builds) &lt;br /&gt;
&lt;br /&gt;
*http://buildhost.automated.it/OM2007.2/?M=D (Location of more current unofficial builds.)&lt;br /&gt;
&lt;br /&gt;
A list of download locations can be found at [[Repositories]]. See [[Phase 1 Software Testing]] for a list of tested images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changelogs can be found at:&lt;br /&gt;
*http://cia.vc/stats/project/openembedded/.rss&lt;br /&gt;
&lt;br /&gt;
*http://cia.vc/stats/project/openmoko/.rss&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get:&lt;br /&gt;
* [[dfu-util]] (the precompiled binary on http://buildhost.openmoko.org is for Linux/i386)&lt;br /&gt;
** (this is the part that runs on the PC, that pushes the files across the USB to the phone)&lt;br /&gt;
* openmoko-devel-image-fic-gta01-2007********.rootfs.jffs2&lt;br /&gt;
* uImage-2.6.21.*-moko*-r*_0_****_0-fic-gta01.bin&lt;br /&gt;
* for phase 0 (Bv03) phones:&lt;br /&gt;
** Tested by a few people:&amp;lt;BR&amp;gt;u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2040.bin&amp;lt;BR&amp;gt;MD5SUM: 60c5aeba1bd6642b05b3a5e6f2dafe83&lt;br /&gt;
** Tested by hrw:&amp;lt;BR&amp;gt;u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2062.bin&amp;lt;BR&amp;gt;MD5SUM: 716f1eba9b0f2be4a0a3be4a56724935&lt;br /&gt;
* for phase 1 phones, uboot update should not be necessary.&lt;br /&gt;
&lt;br /&gt;
== Preparing the device for DFU mode ==&lt;br /&gt;
&lt;br /&gt;
You'll need to boot your openmoko into uboot menu.  To do this:&lt;br /&gt;
&lt;br /&gt;
* Unplug all usb devices from the host.&lt;br /&gt;
* Hold the phone's [[Neo1973 AUX Button | AUX button]] and then press the phone's [[Neo1973 Power Button | POWER button]].&lt;br /&gt;
** You'll need to hold the POWER button for about 4 seconds before the device will turn on. Otherwise the screen will only flash white for a second and the phone won't power up.&lt;br /&gt;
* The u-boot menu should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot ..&lt;br /&gt;
&lt;br /&gt;
=== BOOT MENU ===&lt;br /&gt;
&lt;br /&gt;
BOOT&lt;br /&gt;
Set console to USB&lt;br /&gt;
Set console to serial&lt;br /&gt;
Power off&lt;br /&gt;
Boot from SD&lt;br /&gt;
Factory reset&lt;br /&gt;
&lt;br /&gt;
Press [AUX] to select, [POWER] to execute.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Plug Neo1973 into host with supplied USB cable. (Plug the phone directly into the host not via a hub.)&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the bootloader remains inactive for about 30 seconds, that is no keypresses or no use of the serial console, the device will automatically power down.&lt;br /&gt;
You can prevent this by just pressing the AUX button every 30 seconds or so or by telling the bootloader to not exhibit this behaviour.&lt;br /&gt;
To do so, please connect to the bootloader:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cu -l /dev/ttyACM0&lt;br /&gt;
GTA01Bv4 # setenv boot_menu_timeout 65000&lt;br /&gt;
GTA01Bv4 # saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For those that are unfamiliar with cu, to exit you need to press &amp;quot;~.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
(You may have to install the uucp package to have access to cu, and maybe also &amp;quot;&amp;lt;code&amp;gt;chown uucp:uucp /dev/ttyACM0&amp;lt;/code&amp;gt;&amp;quot; as root before it will work)&lt;br /&gt;
&lt;br /&gt;
No further navigation is needed in u-boot - the device will automatically start flashing the images when told to do so by dfu-util below. After flashing all the files, you can choose the &amp;quot;Boot&amp;quot; option to boot the newly flashed stuff.&lt;br /&gt;
&lt;br /&gt;
== Actually flashing things into the device ==&lt;br /&gt;
&lt;br /&gt;
Double check that u-boot matches your hardware version. First determine what hardware revision you have [[finding hardware revision]], so that you can download and install the correct bootloader.&lt;br /&gt;
&lt;br /&gt;
 You'll probably only want to update u-boot if you have the [[debug board]] for fixing failed u-boot updates. You can also check the current [[partitions]].&lt;br /&gt;
&lt;br /&gt;
Note: It may be necessary to run the application as root (at least in Ubuntu and Debian).&lt;br /&gt;
&lt;br /&gt;
Note: In case there are more than one available usb devices use -d 0x1457:0x5119 option.&lt;br /&gt;
&lt;br /&gt;
To update u-boot:&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not update u-boot unless you have [[debug board]] or are really sure about what you are doing. Flashing a wrong u-boot image will brick your device!}}&lt;br /&gt;
&lt;br /&gt;
I you own a FreeRunner don't be too scared, though: Unlike nearly any other deviceon the market the Freerunner contains a second bootloader on a write protected chip - that is still there, even if flashing the original bootloader goes horribly wrong. You can always make the phone use this bootloader instead by pressing the power button whilst pressing the Aux button - and get a second and any sucessive try to flash the u-boot loader the right way. In theory it should therefore be impossible to brick your phone completely enough by flashing the bootloader that a debug board is needed to unbrick it.&lt;br /&gt;
* Download the newest uBoot binary from http://downloads.openmoko.org/releases/Freerunner/&lt;br /&gt;
* start the cellular phone by pressing power whilst pressing the aux button.&lt;br /&gt;
* Run the following command, but Note especially that the image used in the line below is for GTA02_v5.&lt;br /&gt;
&lt;br /&gt;
 dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin&lt;br /&gt;
&lt;br /&gt;
The u-boot of a GTA01B_v03 (And only of a GTA01B_V03, not for example a GTA01B_v04) can be flashed with the following image: &lt;br /&gt;
 ./dfu-util -a u-boot -R -D u-boot-gta01bv3-latest.bin&lt;br /&gt;
&lt;br /&gt;
* The device is now flashed: &lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface...&lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB...&lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name=&amp;quot;u-boot&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 bytes_per_hash=4316&lt;br /&gt;
 Starting download: [##################################################] finished!&lt;br /&gt;
 state(2) = dfuIDLE, status(0) = No error condition is present &lt;br /&gt;
 Done!&lt;br /&gt;
 Resetting USB to switch back to runtime mode&lt;br /&gt;
* The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To update the kernel:&lt;br /&gt;
 ./dfu-util -a kernel -R -D ./uImage-2.6.21.1-moko10-r0_0_1883_0-fic-gta01.bin&lt;br /&gt;
Flashing the kernel will probably take less than 1 minute. If you're having trouble, you may want to compare the output that you see to a &amp;quot;known good&amp;quot; [[Flashing openmoko/Known good kernel flash U-Boot output | U-Boot]]/[[Flashing openmoko/Known good kernel flash dmesg output | dmesg]]/[[Flashing openmoko/Known good kernel flash dfu-util output | dfu-util]] output. The phone display should show &amp;quot;Starting DFU DOWNLOAD to partition 'kernel'.&lt;br /&gt;
&lt;br /&gt;
To update the root filesystem:&lt;br /&gt;
 ./dfu-util -a rootfs -R -D ./Openmoko-devel-image-fic-gta01-20070501054014.rootfs.jffs2&lt;br /&gt;
&lt;br /&gt;
Flashing the root filesystem will probably take around 13 minutes. Note that it can take over an hour if you are using a XEN VM for doing the flash.&lt;br /&gt;
&lt;br /&gt;
Here is some &amp;quot;known good&amp;quot; output from [[Flashing openmoko/Known good rootfs flash U-Boot output | U-Boot]], [[Flashing openmoko/Known good rootfs flash dmesg output | dmesg]], and [[Flashing openmoko/Known good rootfs flash dfu-util output | dfu-util]]. The phone display should show &amp;quot;Starting DFU DOWNLOAD to partition 'rootfs'.&lt;br /&gt;
&lt;br /&gt;
Notice that it's not normally necessary to update the modules anymore. It's just for people with special needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...now, you'll end up with system that boots, but does not see audio/SD card. You'll need to download corresponding modules.tgz and copy them over to openmoko.  - UPDATE:  GTA01 phones appear to not need this step, as long as you have installed a kernel that matches the version of the modules contained in the root image ('uname -r' will show the kernel version, and 'ls /lib/modules/' will show the modules that are present).&lt;br /&gt;
&lt;br /&gt;
== IMPORTANT NOTEs FOR EARLY ADOPTERS: ==&lt;br /&gt;
Some ols U-Boot versions are very buggy:&lt;br /&gt;
 &lt;br /&gt;
For U-Boot versions until somewhere in 2007 if you uploaded your rootfs image that is smaller that previous one it wouldn't work - you needed to attach to the u-boot bootloader first, erase NAND partition that would contain the rootfs later and then upload your rootfs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cu -l /dev/ttyACM0&lt;br /&gt;
GTA01Bv3 # nand erase rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also you may have to press the AUX button every 25 seconds or so to prevent the phone from going to sleep while being flashed. Very early versions also does not erase the  rootfs before flashing it... to do that, do minicom /dev/ttyACM0, then nand erase rootfs, like written above.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
== Where to go from here ==&lt;br /&gt;
&lt;br /&gt;
So, now you have one of the more recent kernel and rootfs images, or one of the (semi)official ones, whats next?&lt;br /&gt;
&lt;br /&gt;
You probably want to set up [[USB_Networking]] and then configure your Neo1973 some more.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update your Neo1973 using&lt;br /&gt;
&lt;br /&gt;
 ipkg update &amp;amp;&amp;amp; ipkg upgrade&lt;br /&gt;
&lt;br /&gt;
or (newer versions)&lt;br /&gt;
&lt;br /&gt;
 opkg update &amp;amp;&amp;amp; opkg upgrade&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and have a look at additional ipkg [[repositories]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Question to anybody who knows: The kernel the openmoko boots from is in a different partition than the root file system in most setups right now. In former times there always was a warning that ipkg updates /boot/uImage - the location where the kernel that matches the current rootfs can be found - but didn't update the partition the kernel is loaded from in the default setup. The following line manually updates the kernel on this partition: &lt;br /&gt;
 cat /boot/uImage &amp;gt;/dev/mtdblock3&lt;br /&gt;
 &lt;br /&gt;
Is typing this line still necessary?&lt;br /&gt;
[[User:Peterpall]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting notes ==&lt;br /&gt;
&lt;br /&gt;
If you're facing errors in seemingly random places during the flashing of images, most likely the USB hub or cable through which your Neo1973 is connected is of too poor quality.  It is recommended that you always connect the phone directly to the host when using dfu-util.&lt;br /&gt;
&lt;br /&gt;
If dfu-util reports a message like the following, before it starts flashing:&amp;lt;pre&amp;gt;&lt;br /&gt;
Resetting USB...&lt;br /&gt;
not at least 2 device changes found ?!?&lt;br /&gt;
Lost device after RESET?&amp;lt;/pre&amp;gt; just retry the command - it should work on a second run.&lt;br /&gt;
&lt;br /&gt;
This message can also occur if you connect the usb cable before you are in the bootloader menu.  You must carefully follow the sequence described at the beginning of this article and not connect the USB cable too early.&lt;br /&gt;
&lt;br /&gt;
dfu-util does not seem to be able to download files if run from linux running under&lt;br /&gt;
VMWare on a Windows OS host.&lt;br /&gt;
&lt;br /&gt;
See other notes on [[Dfu-util]] page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Flashing Openmoko| ]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Flashing_the_Neo_1973</id>
		<title>Flashing the Neo 1973</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Flashing_the_Neo_1973"/>
				<updated>2008-07-27T11:31:24Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Where to go from here */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Flashing Openmoko}}&lt;br /&gt;
This describes how to update your Neo1973 to the latest software. We'll update the kernel, the root filesystem and optionally u-boot [[partitions]] in the internal flash memory.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
* MacOS X users: please refer to [[MacOS_X]].&lt;br /&gt;
* Users without Linux please refer to [[No_Linux]] for the moment.&lt;br /&gt;
&lt;br /&gt;
You may prefer to read directly :&lt;br /&gt;
* [[Flashing the Neo FreeRunner]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{warning|If you're updating u-boot and don't have a [[Debug Board]], you might render your unit unusable if the flashing procedure is interrupted}}&lt;br /&gt;
&lt;br /&gt;
{{warning|If you have U-boot from before 2008 and upload a rootfs image that is smaller than the previous one, or if you have written to the rootfs, just flashing may not work - you may need to run a &amp;quot;[[Nand_erase|nand erase rootfs]]&amp;quot; before you then upload your rootfs (details  [[Bootloader#Accessing_the_bootloader_prompt|here]]). Running &amp;quot;nand erase rootfs&amp;quot; before flashing a new rootfs, is quick and saves you the time of a second rootfs upload. &amp;lt;b&amp;gt;Attention:&amp;lt;/b&amp;gt; If you [[Nand_erase|erase NAND]] without mentioning the partition to be erased, u-boot will be wiped out and the Neo will be bricked}}&lt;br /&gt;
&lt;br /&gt;
== Files to download ==&lt;br /&gt;
&lt;br /&gt;
The rootfs &amp;amp; kernel images you download need to match. The loadable modules for the kernel are in /lib/modules/ on the rootfs [[partition]] - if you get the wrong combination, you will get some error messages during bootup that it cannot access /lib/modules/x.y.z-moko123 - in this case swap either the kernel or the rootfs to match the other's version. Unfortunately the rootfs filename does not seem to tell what kernel version it is compatible with, you just have to try a few. '''NOTE:''' At least some combinations seem to boot up fine even if the module versions mismatch so be sure to check the console while it's booting after flashing.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moko123&amp;quot; in the error message example above indicates the openmoko patchset version.&lt;br /&gt;
&lt;br /&gt;
Necessary files are at:&lt;br /&gt;
*http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/neo1973/?C=M;O=D&lt;br /&gt;
&lt;br /&gt;
*http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/?C=M;O=D (Daily unstable builds) &lt;br /&gt;
&lt;br /&gt;
*http://buildhost.automated.it/OM2007.2/?M=D (Location of more current unofficial builds.)&lt;br /&gt;
&lt;br /&gt;
A list of download locations can be found at [[Repositories]]. See [[Phase 1 Software Testing]] for a list of tested images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changelogs can be found at:&lt;br /&gt;
*http://cia.vc/stats/project/openembedded/.rss&lt;br /&gt;
&lt;br /&gt;
*http://cia.vc/stats/project/openmoko/.rss&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get:&lt;br /&gt;
* [[dfu-util]] (the precompiled binary on http://buildhost.openmoko.org is for Linux/i386)&lt;br /&gt;
** (this is the part that runs on the PC, that pushes the files across the USB to the phone)&lt;br /&gt;
* openmoko-devel-image-fic-gta01-2007********.rootfs.jffs2&lt;br /&gt;
* uImage-2.6.21.*-moko*-r*_0_****_0-fic-gta01.bin&lt;br /&gt;
* for phase 0 (Bv03) phones:&lt;br /&gt;
** Tested by a few people:&amp;lt;BR&amp;gt;u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2040.bin&amp;lt;BR&amp;gt;MD5SUM: 60c5aeba1bd6642b05b3a5e6f2dafe83&lt;br /&gt;
** Tested by hrw:&amp;lt;BR&amp;gt;u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2062.bin&amp;lt;BR&amp;gt;MD5SUM: 716f1eba9b0f2be4a0a3be4a56724935&lt;br /&gt;
* for phase 1 phones, uboot update should not be necessary.&lt;br /&gt;
&lt;br /&gt;
== Preparing the device for DFU mode ==&lt;br /&gt;
&lt;br /&gt;
You'll need to boot your openmoko into uboot menu.  To do this:&lt;br /&gt;
&lt;br /&gt;
* Unplug all usb devices from the host.&lt;br /&gt;
* Hold the phone's [[Neo1973 AUX Button | AUX button]] and then press the phone's [[Neo1973 Power Button | POWER button]].&lt;br /&gt;
** You'll need to hold the POWER button for about 4 seconds before the device will turn on. Otherwise the screen will only flash white for a second and the phone won't power up.&lt;br /&gt;
* The u-boot menu should appear:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot ..&lt;br /&gt;
&lt;br /&gt;
=== BOOT MENU ===&lt;br /&gt;
&lt;br /&gt;
BOOT&lt;br /&gt;
Set console to USB&lt;br /&gt;
Set console to serial&lt;br /&gt;
Power off&lt;br /&gt;
Boot from SD&lt;br /&gt;
Factory reset&lt;br /&gt;
&lt;br /&gt;
Press [AUX] to select, [POWER] to execute.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Plug Neo1973 into host with supplied USB cable. (Plug the phone directly into the host not via a hub.)&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the bootloader remains inactive for about 30 seconds, that is no keypresses or no use of the serial console, the device will automatically power down.&lt;br /&gt;
You can prevent this by just pressing the AUX button every 30 seconds or so or by telling the bootloader to not exhibit this behaviour.&lt;br /&gt;
To do so, please connect to the bootloader:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cu -l /dev/ttyACM0&lt;br /&gt;
GTA01Bv4 # setenv boot_menu_timeout 65000&lt;br /&gt;
GTA01Bv4 # saveenv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For those that are unfamiliar with cu, to exit you need to press &amp;quot;~.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
(You may have to install the uucp package to have access to cu, and maybe also &amp;quot;&amp;lt;code&amp;gt;chown uucp:uucp /dev/ttyACM0&amp;lt;/code&amp;gt;&amp;quot; as root before it will work)&lt;br /&gt;
&lt;br /&gt;
No further navigation is needed in u-boot - the device will automatically start flashing the images when told to do so by dfu-util below. After flashing all the files, you can choose the &amp;quot;Boot&amp;quot; option to boot the newly flashed stuff.&lt;br /&gt;
&lt;br /&gt;
== Actually flashing things into the device ==&lt;br /&gt;
&lt;br /&gt;
Double check that u-boot matches your hardware version. First determine what hardware revision you have [[finding hardware revision]], so that you can download and install the correct bootloader.&lt;br /&gt;
&lt;br /&gt;
 You'll probably only want to update u-boot if you have the [[debug board]] for fixing failed u-boot updates. You can also check the current [[partitions]].&lt;br /&gt;
&lt;br /&gt;
Note: It may be necessary to run the application as root (at least in Ubuntu and Debian).&lt;br /&gt;
&lt;br /&gt;
Note: In case there are more than one available usb devices use -d 0x1457:0x5119 option.&lt;br /&gt;
&lt;br /&gt;
To update u-boot:&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not update u-boot unless you have [[debug board]] or are really sure about what you are doing. Flashing a wrong u-boot image will brick your device! Note especially that image below is for GTA01B_v03, not GTA01B_v04&lt;br /&gt;
&lt;br /&gt;
 ./dfu-util -a u-boot -R -D u-boot-gta01bv3-r8_70124c2602ae2d4c5d3dba05b482d91548242de8_0_2040.bin}}&lt;br /&gt;
&lt;br /&gt;
This is simple - even if I find it somehow scary to flash the bootloader of a device. Don't be too scared, though: Unlike any other device I know the Freerunner contains a second bootloader on a write protected chip - that is still there, even if flashing the original bootloader goes horribly wrong. You can always make the phone use this bootloader instead by pressing the power button whilst pressing the Aux button. In theory it should therefore be impossible to brick your phone completely enough by flashing the bootloader that a debug board is needed to unbrick it.&lt;br /&gt;
* Download the newest uBoot binary from http://downloads.openmoko.org/releases/Freerunner/&lt;br /&gt;
* start the cellular phone by pressing power whilst pressing the aux button.&lt;br /&gt;
* Run the following command:  &lt;br /&gt;
 dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin&lt;br /&gt;
* The device is now flashed: &lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface...&lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB...&lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name=&amp;quot;u-boot&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 bytes_per_hash=4316&lt;br /&gt;
 Starting download: [##################################################] finished!&lt;br /&gt;
 state(2) = dfuIDLE, status(0) = No error condition is present &lt;br /&gt;
 Done!&lt;br /&gt;
 Resetting USB to switch back to runtime mode&lt;br /&gt;
* The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To update the kernel:&lt;br /&gt;
 ./dfu-util -a kernel -R -D ./uImage-2.6.21.1-moko10-r0_0_1883_0-fic-gta01.bin&lt;br /&gt;
Flashing the kernel will probably take less than 1 minute. If you're having trouble, you may want to compare the output that you see to a &amp;quot;known good&amp;quot; [[Flashing openmoko/Known good kernel flash U-Boot output | U-Boot]]/[[Flashing openmoko/Known good kernel flash dmesg output | dmesg]]/[[Flashing openmoko/Known good kernel flash dfu-util output | dfu-util]] output. The phone display should show &amp;quot;Starting DFU DOWNLOAD to partition 'kernel'.&lt;br /&gt;
&lt;br /&gt;
To update the root filesystem:&lt;br /&gt;
 ./dfu-util -a rootfs -R -D ./Openmoko-devel-image-fic-gta01-20070501054014.rootfs.jffs2&lt;br /&gt;
&lt;br /&gt;
Flashing the root filesystem will probably take around 13 minutes. Note that it can take over an hour if you are using a XEN VM for doing the flash.&lt;br /&gt;
&lt;br /&gt;
Here is some &amp;quot;known good&amp;quot; output from [[Flashing openmoko/Known good rootfs flash U-Boot output | U-Boot]], [[Flashing openmoko/Known good rootfs flash dmesg output | dmesg]], and [[Flashing openmoko/Known good rootfs flash dfu-util output | dfu-util]]. The phone display should show &amp;quot;Starting DFU DOWNLOAD to partition 'rootfs'.&lt;br /&gt;
&lt;br /&gt;
Notice that it's not normally necessary to update the modules anymore. It's just for people with special needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...now, you'll end up with system that boots, but does not see audio/SD card. You'll need to download corresponding modules.tgz and copy them over to openmoko.  - UPDATE:  GTA01 phones appear to not need this step, as long as you have installed a kernel that matches the version of the modules contained in the root image ('uname -r' will show the kernel version, and 'ls /lib/modules/' will show the modules that are present).&lt;br /&gt;
&lt;br /&gt;
VERY IMPORTANT NOTE (I would consider that as a design flaw - either dfu-util should do it automatically): If you upload rootfs image that is smaller that previous one it won't work - you need to attach to the u-boot bootloader, erase NAND first and then upload your rootfs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cu -l /dev/ttyACM0&lt;br /&gt;
GTA01Bv3 # nand erase rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Old versions of u-boot are buggy: You may have to press the AUX button every 25 seconds or so to prevent the phone from going to sleep while being flashed. It also does not erase rootfs before flashing it... to do that, do minicom /dev/ttyACM0, then nand erase rootfs.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
== Where to go from here ==&lt;br /&gt;
&lt;br /&gt;
So, now you have one of the more recent kernel and rootfs images, or one of the (semi)official ones, whats next?&lt;br /&gt;
&lt;br /&gt;
You probably want to set up [[USB_Networking]] and then configure your Neo1973 some more.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update your Neo1973 using&lt;br /&gt;
&lt;br /&gt;
 ipkg update &amp;amp;&amp;amp; ipkg upgrade&lt;br /&gt;
&lt;br /&gt;
or (newer versions)&lt;br /&gt;
&lt;br /&gt;
 opkg update &amp;amp;&amp;amp; opkg upgrade&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and have a look at additional ipkg [[repositories]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Question to anybody who knows: The kernel the openmoko boots from is in a different partition than the root file system in most setups right now. In former times there always was a warning that ipkg updates /boot/uImage - the location where the kernel that matches the current rootfs can be found - but didn't update the partition the kernel is loaded from in the default setup. The following line manually updates the kernel on this partition: &lt;br /&gt;
 cat /boot/uImage &amp;gt;/dev/mtdblock3&lt;br /&gt;
 &lt;br /&gt;
Is typing this line still necessary?&lt;br /&gt;
[[User:Peterpall]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting notes ==&lt;br /&gt;
&lt;br /&gt;
If you're facing errors in seemingly random places during the flashing of images, most likely the USB hub or cable through which your Neo1973 is connected is of too poor quality.  It is recommended that you always connect the phone directly to the host when using dfu-util.&lt;br /&gt;
&lt;br /&gt;
If dfu-util reports a message like the following, before it starts flashing:&amp;lt;pre&amp;gt;&lt;br /&gt;
Resetting USB...&lt;br /&gt;
not at least 2 device changes found ?!?&lt;br /&gt;
Lost device after RESET?&amp;lt;/pre&amp;gt; just retry the command - it should work on a second run.&lt;br /&gt;
&lt;br /&gt;
This message can also occur if you connect the usb cable before you are in the bootloader menu.  You must carefully follow the sequence described at the beginning of this article and not connect the USB cable too early.&lt;br /&gt;
&lt;br /&gt;
dfu-util does not seem to be able to download files if run from linux running under&lt;br /&gt;
VMWare on a Windows OS host.&lt;br /&gt;
&lt;br /&gt;
See other notes on [[Dfu-util]] page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Flashing Openmoko| ]]&lt;/div&gt;</summary>
		<author><name>Peterpall</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-07-20T16:26:38Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Installing multimedia, web browsing and other applications */ Needed to split up 2 commands to make them work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Getting Started with your Neo FreeRunner}}&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;
! 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;
== 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;
===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;
&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;
===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;
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;
The &amp;quot;Today&amp;quot; page is empty for now. It won't remain so for long. Keep reading to turn on the &amp;quot;full view&amp;quot;. In the full view, a second row of icons give quick links to commonly-used applications such as the dialer, and the main body of the screen displays a clock and other useful information. See [[Today/2007.2]] for more information about the Today page and customization. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Image:Todaypage_reduced_false.png|right|200px|]] --&amp;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;
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;
====Running Tasks Page====&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
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;
====Exiting 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 switch tasks at any time by clicking the menu of tasks at the far upper-left of the screen, which will display a list of running tasks, allowing you to select one.&lt;br /&gt;
&lt;br /&gt;
(''Note:'' If the task menu is not shown, use the [[#Aux|Aux]] button to bring up the Aux menu, and select &amp;quot;Toggle Fullscreen&amp;quot;.)&lt;br /&gt;
&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 the X term. The terminal application has a multitap keyboard that slides up and down from the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
===Setting date and time===&lt;br /&gt;
&lt;br /&gt;
As of this writing, I have not found a way to setup the date and time graphically. Open the terminal application and issue one of the following commands:&lt;br /&gt;
&lt;br /&gt;
 date -s ''MMDDhhmm''&lt;br /&gt;
 date -s ''MMDDhhmmYYYY''&lt;br /&gt;
 date -s ''MMDDhhmmYYYY.ss''&lt;br /&gt;
&lt;br /&gt;
where ''MM'' is the month, 01-12; ''DD'' is the day, 01-31; ''hhmm'' is the time, 0000-2359; ''YYYY'' is the optional year, and ''.ss'' is the optional seconds. See [[Setting_Date_and_Time]] for more discussion.&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 [[Getting_Started_with_your_Neo_FreeRunner#Connect_to_the_Neo_FreeRunner_By_USB_Networking|log in via usb]], and run the [[alsamixer]] application.  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;
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;
[[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;
&lt;br /&gt;
== Set up USB-based networking and update ==&lt;br /&gt;
&lt;br /&gt;
===Connect with and log in the Neo FreeRunner===&lt;br /&gt;
&lt;br /&gt;
Connect the Neo FreeRunner to your Linux computer using the standard mini-USB to USB cable provided.&lt;br /&gt;
&lt;br /&gt;
With the device connected, &lt;br /&gt;
 modprobe usbnet&lt;br /&gt;
(if necessary) and configure usb0 interface (as root):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your eth0 interface is also in the same 'range' (e.g. 192.168.0.105) then you can do the following:&lt;br /&gt;
&lt;br /&gt;
1. ping the Neo with&lt;br /&gt;
 # ping -I usb0 192.168.0.202&lt;br /&gt;
2. add a route to your Neo (adjust your firewall if necessary):&lt;br /&gt;
 # /sbin/route add -host 192.168.0.202/32 dev usb0&lt;br /&gt;
3 log in to the Neo with empty password&lt;br /&gt;
 # ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
You will eventually want to setup your computer so that it automatically connects the Neo FreeRunner to the Internet when it is plugged in. This is discussed in the [[USB_Networking]] section, which you should see if the procedure above fails.&lt;br /&gt;
&lt;br /&gt;
===Setup DNS===&lt;br /&gt;
&lt;br /&gt;
In order to use the package manager, a DNS server should be defined. To achieve this, ssh into the Neo FreeRunner and create a file /etc/resolv.conf with at least one line reading:&lt;br /&gt;
&lt;br /&gt;
 nameserver xxx.xxx.xxx.xxx&lt;br /&gt;
&lt;br /&gt;
e.g. nameserver 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
If you are unsure as to which nameserver IP address to use, a valid IP is typically available in the /etc/resolv.conf file of your host system. You will eventually want to setup the Neo so that it automatically finds a DNS server. This is discussed in the [[USB_Networking]] section.&lt;br /&gt;
&lt;br /&gt;
===Use the package manager===&lt;br /&gt;
&lt;br /&gt;
There are three layers to the software on the FreeRunner:&lt;br /&gt;
&lt;br /&gt;
* 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;
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. There are two main methods of doing this: using the package manager opkg (discussed in this section) or [[Flashing the Neo FreeRunner|flashing  the device]].&lt;br /&gt;
&lt;br /&gt;
uboot, the kernel and the root filesystem can all be flashed to update them. For uboot, this is the only possibility. The advantage of flashing the kernel, 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;
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 upgrade&lt;br /&gt;
&lt;br /&gt;
The first updates the repository information, telling opkg what packages are available. The second 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, so either upgrade dropbear from the FreeRunner's terminal and then upgrade the rest via ssh, or upgrade the xserver packages via ssh and then upgrade the rest from the FreeRunner's terminal.  For example, go to the FreeRunner terminal and type:&lt;br /&gt;
&lt;br /&gt;
 # opkg install dropbear&lt;br /&gt;
&lt;br /&gt;
which will upgrade it to the latest version.  Then connect to the FreeRunner via ssh and type:&lt;br /&gt;
&lt;br /&gt;
 # opkg upgrade&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.&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@openmoko:/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: 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;
More information about today screen customization at [[Today/2007.2]].&lt;br /&gt;
&lt;br /&gt;
With either clock, you may wish to set the correct [[Date]] and [[Timezone]].&lt;br /&gt;
&lt;br /&gt;
Also, if you prefer having a full keyboard, using matchbox's qwerty keybord, see [http://www.ginguppin.de/node/15 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;
===GPS, GPRS and WLAN===&lt;br /&gt;
&lt;br /&gt;
See [[GTA02 WLAN]] about wifi. See [[Manually using GPRS]]. &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;
More information on [[GPS]] page.&lt;br /&gt;
&lt;br /&gt;
According to some [http://lists.openmoko.org/pipermail/support/2008-July/000003.html posts], GPRS might be broken currently (2007.2), though. There are also critical [[GPS Problems]]. To install the updates when they become available, you will probably want to learn about [[Booting the Neo FreeRunner]] and [[Flashing the Neo FreeRunner]].&lt;br /&gt;
&lt;br /&gt;
=== The community ===&lt;br /&gt;
==== Mailing lists ====&lt;br /&gt;
&lt;br /&gt;
There are several [[http://lists.openmoko.org/mailman/listinfo/ Mailing lists]]&lt;br /&gt;
&lt;br /&gt;
There is an active community mailing list.&lt;br /&gt;
You may ask for help on the support mailing list : more details at https://lists.openmoko.org/mailman/listinfo/support&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An excellent tool for searching all the openmoko mailing lists is http://openmoko.markmail.org/&lt;br /&gt;
&lt;br /&gt;
==== The wiki ====&lt;br /&gt;
&lt;br /&gt;
If you want to know more about the Neo FreeRunner then you can get more information in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GTA02 Openness]]&lt;br /&gt;
* [[Neo FreeRunner]]&lt;br /&gt;
* [[Neo FreeRunner GTA02 Hardware]]&lt;br /&gt;
* [[FreeRunner/Buttons and LEDs]]&lt;br /&gt;
* [[Latest Images]]&lt;br /&gt;
* [[Distributions]]&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;
==== Blogs ====&lt;br /&gt;
&lt;br /&gt;
The [http://planet.openmoko.org/ collection of blogs on OpenMoko].&lt;br /&gt;
&lt;br /&gt;
==== Other documents ====&lt;br /&gt;
&lt;br /&gt;
* http://quickstart.openmoko.org/&lt;br /&gt;
&lt;br /&gt;
[[Category:GTA02 Hardware]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
[[Category:User Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</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>2008-07-17T19:35:28Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Developing with MokoMakefile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MokoMakefile}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MokoMakefile is a Makefile which saves lots of work when setting up an Openmoko build environment.&lt;br /&gt;
By automating the setup process of a new Openmoko build environment, it provides an environment which is configured the same for all the existing developers and should therefore be preferred over manual procedures or individual setup procedures.&lt;br /&gt;
It brings the same repeatability to build environment creation and maintenance as that which the BitBake scripts bring to [[OpenEmbedded]] ease and standardize the process of building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
Unlike the manual process described at [[Building Openmoko from scratch]], MokoMakefile does not install anything into your system (it can and should be started as normal user).&lt;br /&gt;
MokoMakefile is a wrapper around all that is required to make it easy to set up and maintain a development environment that fully complies with the setup instructions published by Openmoko.&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 [[Openmoko2007.2#How_to_build|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;
The MokoMakefile is able to build both OM-2007.2 and QTopia-X11 images.&lt;br /&gt;
&lt;br /&gt;
MokoMakefile also builds the QEMU-based Neo1973 emulator as part of the build process and has make targets to install the Openmoko images into it and run it. These commands can also be used without downloading and building the whole Openmoko OpenEmbedded distribution. This part is described in [[Using QEMU with MokoMakefile]].&lt;br /&gt;
&lt;br /&gt;
== Requirements for building Openmoko ==&lt;br /&gt;
Independent on whether MokoMakefile or a manual process is used to setup an Openmoko build environment, there are several requirements which must be fulfilled in order for the Openmoko build to succeed:&lt;br /&gt;
&lt;br /&gt;
* RAM: The build host needs to have at least 512MB of RAM, and about the same amount of swap. Some packages built by OpenEmbedded like busybox are built by compiling all source files into one binary which causes gcc to grow beyond 300MB of size and no part of this memory may be on swap for the compile to finish in predictable time. For busybox, this can be turned off, but turning this off means that busybox will not as well optimized by gcc.&lt;br /&gt;
&lt;br /&gt;
* Disk space: You need about 12 GB of available disk space for the Openmoko build to succeed (see below for a tip on how to reduce this).&lt;br /&gt;
&lt;br /&gt;
* Time: The initial build takes at least 5 hours (on 2GHz core2duo without multiprocessor optimization) and may take several days on slower machines.&lt;br /&gt;
&lt;br /&gt;
=== Required software ===&lt;br /&gt;
&lt;br /&gt;
Some distribution specific hints on preparing your build host for building OpenEmbedded are on http://wiki.openembedded.net/index.php/OEandYourDistro but they may be outdated, incomplete and do not cover everything which Openmoko needs to build.&lt;br /&gt;
&lt;br /&gt;
A good guide is [[Building Openmoko from scratch#Build host prerequisites|the section on build host prerequisites]] in [[Building Openmoko from scratch]]&lt;br /&gt;
&lt;br /&gt;
If you forgot anything which OE needs itself, OE will tell you shortly after you start building, but it does not check build dependencies of Openmoko, so you either have to install them before starting or install them after the build failed. OpenEmbedded will continue where it stopped when you restart the build afterwards.&lt;br /&gt;
&lt;br /&gt;
==== Package requirements by distribution ====&lt;br /&gt;
Your distribution needs to provide these commands in order for OpenEmbedded to start building:&lt;br /&gt;
 subversion texi2html texinfo help2man&lt;br /&gt;
&lt;br /&gt;
Openmoko needs the development packages (with header files, development libraries and tools) in order to finish building:&lt;br /&gt;
 ncurses zlib (or libz) OpenSSL GTK++&lt;br /&gt;
&lt;br /&gt;
Because there are bugs in the interaction of QEMU and GCC-4, you'll need a copy of gcc-3.x installed as well.&lt;br /&gt;
&lt;br /&gt;
===== Debian / Ubuntu =====&lt;br /&gt;
  apt-get install subversion build-essential help2man diffstat texi2html texinfo cvs gawk cogito&lt;br /&gt;
&lt;br /&gt;
  apt-get install libncurses5-dev zlib1g-dev libssl-dev libgtk2.0-dev &lt;br /&gt;
  # To prevent errors in host validation&lt;br /&gt;
  apt-get install ca-certificates&lt;br /&gt;
  # For Openmoko 2007.2 using BitBake-1.8.8:&lt;br /&gt;
  apt-get install python-pysqlite2 sqlite3 sqlite3-doc python-pysqlite2-dbg&lt;br /&gt;
  # For building faster&lt;br /&gt;
  apt-get install quilt python-psyco ccache&lt;br /&gt;
  # For qemu, install a second compiler for bug avoidance; MokoMakefile knows to look for it.&lt;br /&gt;
  apt-get install gcc-3.4 g++-3.4 libsdl1.2-dev lynx netpbm dosfstools&lt;br /&gt;
&lt;br /&gt;
  # On Ubuntu 8.04, the following was required instead of cogito:&lt;br /&gt;
  apt-get install git-core&lt;br /&gt;
&lt;br /&gt;
===== SuSE =====&lt;br /&gt;
For building Openmoko on 10.3, you need&lt;br /&gt;
 gcc-c++ ncurses-devel zlib-devel libopenssl-devel gtk2-devel subversion diffstat texinfo help2man&lt;br /&gt;
For MokoMakefile to not fail on compiling qemu-user, you need to use gcc33:&lt;br /&gt;
 wget download.opensuse.org/repositories/devel:/tools:/gcc/openSUSE_Factory/i586/{cpp,gcc}33-3.3.3-41.8.i586.rpm&lt;br /&gt;
 rpm -Uhv {cpp,gcc}33-3.3.3-41.8.i586.rpm&lt;br /&gt;
&lt;br /&gt;
See also the [[Talk:MokoMakefile#Building_on_SuSE_Linux_10.3-AMD64|Talk page on Building on SuSE Linux 10.3-AMD64]]&lt;br /&gt;
&lt;br /&gt;
10.1 and 10.2: same packages as 10.3, but install &amp;lt;code&amp;gt;openssl-devel&amp;lt;/code&amp;gt; instead of libopenssl-devel.&lt;br /&gt;
&lt;br /&gt;
==== For all distributions ====&lt;br /&gt;
As the QEMU-based neo1973 emulator is also built as part of the build process started by MokoMakefile, so you need gcc-3.3 and other packages for building QEMU installed. See [[Using QEMU with MokoMakefile#Build requirements|the build requirements section]] in [[Using QEMU with MokoMakefile]] for information on the required software.&lt;br /&gt;
&lt;br /&gt;
If you are having problems compiling QEMU and do not need it, you can disable building of QEMU by adding following line to build/conf/local.conf file:&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===== Proxy =====&lt;br /&gt;
Users behind a proxy should ensure that their proxy is configured in their wgetrc file as the http_proxy environment variable is unset by MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
== Building Openmoko with MokoMakefile ==&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
Create your $OMDIR directory (note that you can change ~/moko to any directory you like. If you have your ~moko dir mounted from a different file system, be sure to edit /etc/mtab to add the 'exec' permission to the file system, else bitbake will fail with error messages stating that /usr/bin/env is an invalid interpreter):&lt;br /&gt;
   mkdir ~/moko ; cd ~/moko&lt;br /&gt;
&lt;br /&gt;
=== MokoMakefile ===&lt;br /&gt;
Grab MokoMakefile:&lt;br /&gt;
   wget http://www.rwhitby.net/files/openmoko/Makefile &lt;br /&gt;
&lt;br /&gt;
If that doesn't work, try &lt;br /&gt;
&lt;br /&gt;
   wget http://svn.projects.openmoko.org/svnroot/mokomakefile/trunk/Makefile&lt;br /&gt;
&lt;br /&gt;
{{note|MokoMakefile uses BitBake 1.8.8 which requires python-sqlite2 and sqlite-3.3 or later. Users of SUSE Linux 10.1 can update to [http://download.opensuse.org/pub/opensuse/distribution/10.2/repo/oss/suse/i586/sqlite-3.3.8-14.i586.rpm the version of openSUSE 10.2]}}&lt;br /&gt;
&lt;br /&gt;
=== Environment ===&lt;br /&gt;
Set up the environment:&lt;br /&gt;
&lt;br /&gt;
   make setup&lt;br /&gt;
&lt;br /&gt;
If you want to make the ASU or FSO instead of the OM2007.2, see [[Distributions]], you need to edit your Makefile.  Change OM_GIT_BRANCH to one of the following:&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.dev        # OM2007.2&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.asu.dev    # ASU&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.asu.stable # ASU stable&lt;br /&gt;
  OM_GIT_BRANCH := org.openembedded.dev    # FSO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buiding ===&lt;br /&gt;
Before starting a lengthy make process, check the Tips section below for how to make Make multicore aware. You may want to modify the build/conf/local.conf file for your target (emulation/chroot) environment:&lt;br /&gt;
   make openmoko-devel-image&lt;br /&gt;
   (or use &amp;quot;make openmoko-qtopia-x11-image&amp;quot; if you're building the ASU)&lt;br /&gt;
   (or use &amp;quot;make fso-image&amp;quot; if you're building the FSO)&lt;br /&gt;
&lt;br /&gt;
''Hint:'' The images build with this command can be found under {$OMDIR}/build/tmp/deploy/images/neo1973&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 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;
3 - 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;
A quick way to rebuild a new image with the latest updates:&lt;br /&gt;
   make update-makefile &amp;amp;&amp;amp; make setup update openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
==Build issues==&lt;br /&gt;
First, make sure that the problem is reproducible after running&lt;br /&gt;
&lt;br /&gt;
 make update-makefile &amp;amp;&amp;amp; make setup &amp;amp;&amp;amp; make update&lt;br /&gt;
&lt;br /&gt;
then run&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;
and finally&lt;br /&gt;
&lt;br /&gt;
 make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
With luck - you should now have images in your $omdir/build/tmp/deploy/glibc/images/neo1973/ directory.&lt;br /&gt;
You can then [[Flashing openmoko||flash these.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, and you can get the error to occur three times in a row after running that sequence of commands (including the update and setup steps) 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;
If you have chronic build problems, cleaning your environment variables and re-running the build from scratch may help.  The following script should remove all non-essential variables; you should also manually trim your path to the minimum.&lt;br /&gt;
  `env | grep -Ev '^SHELL=|^TERM=|^OLDPWD=|^USER=|^USERNAME=|^PATH=|^EDITOR=|^LANG=|^HOME=|^DISPLAY=|^_='  | sed 's/^\(.*\)=.*/unset \1/'`&lt;br /&gt;
&lt;br /&gt;
(you must include the backtics).&lt;br /&gt;
Note that on some boxes it is necessary to call &amp;quot;make&amp;quot; by typing &amp;quot;/usr/bin/make&amp;quot; afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On current ubuntu boxes another trick is necessary:&lt;br /&gt;
glibc_2.6.1 fails to build since it is unable to generate the necessary locales until you type in the following line:&lt;br /&gt;
 sudo sysctl -w vm.mmap_min_addr=0&lt;br /&gt;
Note that this temporarily disables a new security vulnerability check that has entered /etc/sysctrl - but that makes problems with loads of applications.&lt;br /&gt;
To re-enable this check do the following:&lt;br /&gt;
 sudo sysctl -w vm.mmap_min_addr=65536&lt;br /&gt;
See the talk page of this article for more details on this solution.&lt;br /&gt;
&lt;br /&gt;
===Known MokoMakefile errors ===&lt;br /&gt;
&lt;br /&gt;
===Fixes for distribution/environment-specific or isolated issues===&lt;br /&gt;
&lt;br /&gt;
Work-arounds for temporary or isolated problems can be found and 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;
*Make sure umask is set to 0022 before you run &amp;quot;make setup&amp;quot;&lt;br /&gt;
&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. ~/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. As of 10/16/07, this appears to be present in local.conf by default.&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;
* I have some problem with the parallel building, mkfs.jffs failed to build the image because the directory was modify while the building of the fs. [[User:Patrick.hetu|patrick.hetu]] 02:19, 27 May 2008 (UTC) &lt;br /&gt;
&lt;br /&gt;
* If you encounter an error related with the qemu-native package and not compiling for the qemu, you can edit the build/conf/local.conf file and add ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot; line to avoid the error.&lt;br /&gt;
&lt;br /&gt;
* To prevent building tons of locales, add a line like this to local.conf:&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8 nl_NL.UTF-8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To not build any binary locales at all, add this to local.conf:&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* If you want to rebuild the package indexes (for instance, after compiling a new version of a package) without building &amp;lt;code&amp;gt;openmoko-devel-image&amp;lt;/code&amp;gt;, run &amp;lt;code&amp;gt;make build-package-package-index&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[User:Wurp]] will update this to be a little more comprehensible, but maybe it can help someone as-is in the meantime:&lt;br /&gt;
* If MokoMakefile always fails on some fetch in zlib, just find the binary somewhere, add it to the downloads or sources directory manually (create the .md5 matching file if necessary), and retry.&lt;br /&gt;
&lt;br /&gt;
=== Useful commands ===&lt;br /&gt;
Here is the list (not complete) of useful MokoMakefile commands (actually make targets) and a short description of each one. These should be run inside $OMDIR directory.&lt;br /&gt;
&lt;br /&gt;
; make openmoko-devel-image : build the full development image&lt;br /&gt;
&lt;br /&gt;
; make openmoko-devel-tools : build statically-linked [[dfu-util]] and [[openocd]] binaries&lt;br /&gt;
&lt;br /&gt;
; make openmoko-toolchain : builds [[toolchain]]&lt;br /&gt;
&lt;br /&gt;
; make qemu : builds qemu, downloads flash images from official repository, flashes qemu emulated Neo1973 and runs emulator (see also [[Openmoko under QEMU]]). &lt;br /&gt;
&lt;br /&gt;
; make qemu-local : same as ''make qemu'', but uses locally built images instead of official ones.&lt;br /&gt;
&lt;br /&gt;
; make run-qemu : runs qemu with usb keyboard ''(note: qemu must first be built!)''. This target starts the emulator with some predefined set of options. If you need to start it with other options (enable telnet, etc), see [[QEMU_command_line]].&lt;br /&gt;
&lt;br /&gt;
; make build-package-&amp;lt;package name&amp;gt; : buids ''&amp;lt;package name&amp;gt;'' package&lt;br /&gt;
&lt;br /&gt;
; make update-makefile : updates MokoMakefile&lt;br /&gt;
&lt;br /&gt;
; make clean-package-&amp;lt;foo&amp;gt;: cleans the &amp;quot;&amp;lt;foo&amp;gt;&amp;quot; package&lt;br /&gt;
&lt;br /&gt;
; make setup : to make sure that any recent changes to the build directory structure have been applied&lt;br /&gt;
   &lt;br /&gt;
; make update : to update the Openmoko repository checkout and the MokoMakefile patches to the latest version&lt;br /&gt;
&lt;br /&gt;
==Developing with MokoMakefile==&lt;br /&gt;
&lt;br /&gt;
{{note|If using MokoMakefile with OM2007.2 then references to $OMDIR/openmoko should be replaced with $OMDIR/openembedded.  Also references to tmp/work/armv4t-linux should be replaced with tmp/work/fic-gta01-angstrom-linux-gnueabi}}&lt;br /&gt;
&lt;br /&gt;
For the following explanations $OMDIR is the directory where there Makefile puts all the stuff.&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 $OMDIR/openmoko&lt;br /&gt;
  quilt new descriptive-patch-name.patch&lt;br /&gt;
  quilt add trunk/src/name-of-file-to-change # do this for every file you are about to modify&lt;br /&gt;
  ...make the changes...&lt;br /&gt;
  quilt refresh # this creates a file in $OMDIR/patches/openmoko-HEAD/ and updates the quilt series file there&lt;br /&gt;
&lt;br /&gt;
Note: Do '''NOT''' use absolute paths as this confuses quilt and will get you a diff of the file against /dev/null!&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;
If you want to modify applications instead of the openmoko toolchain, this is what you have to do (example: openmoko-messages):&lt;br /&gt;
&lt;br /&gt;
  cd $OMDIR/build&lt;br /&gt;
  . ../setup-env&lt;br /&gt;
  bitbake -c unpack openmoko-messages&lt;br /&gt;
  cd tmp/work/armv4t-linux/openmoko-messages-0.0.1+svnnow-r2_2276/openmoko-messages/&lt;br /&gt;
  ''...make the changes...''&lt;br /&gt;
  cd -&lt;br /&gt;
  bitbake openmoko-messages&lt;br /&gt;
&lt;br /&gt;
Then continue with MokoMakefile usage.&lt;br /&gt;
&lt;br /&gt;
If you want to add an application to your openmoko distribution, do this:&lt;br /&gt;
All file edits should be done using quilt as described above. That way a patch can easily be submitted to the openmoko project.&lt;br /&gt;
First, create a directory that will correspond to your package and edit a '''.bb''' file in there:&lt;br /&gt;
  cd $OMDIR/openmoko/&lt;br /&gt;
  quilt new mycoolpackage.patch&lt;br /&gt;
  mkdir trunk/openembedded/packages/mycoolpackage&lt;br /&gt;
  quilt add trunk/openembedded/packages/mycoolpackage/mycoolpackage_1.bb&lt;br /&gt;
  quilt edit trunk/openembedded/packages/mycoolpackage/mycoolpackage_1.bb&lt;br /&gt;
&lt;br /&gt;
The file should have the following content:&lt;br /&gt;
  DESCRIPTION = &amp;quot;This is a cool package&amp;quot;&lt;br /&gt;
  SECTION = &amp;quot;username/mycoolpackage&amp;quot;&lt;br /&gt;
  PV = &amp;quot;1&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  inherit autotools&lt;br /&gt;
  &lt;br /&gt;
  SRC_URI = &amp;quot;http://www.example.com/download/mycoolpackage-1.tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
* DESCRIPTION - Just a short text explaining the package&lt;br /&gt;
* SECTION - I have no clue, but I'll use username/mycoolpackage for now&lt;br /&gt;
* PV - Package Version&lt;br /&gt;
* inherit autotools - The package can be compiled by './configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install' so we tell MokoMakefile to do it this way.&lt;br /&gt;
* SRC_URI = ... - This is the download location of the package source. It's imperative that the tar.gz contains a directory called '''packagename-packageversion''' (in this case: mycoolpackage-1) so that MokoMakefile can find it automatically or the build will fail.&lt;br /&gt;
&lt;br /&gt;
This is not all. We also need to tell MokoMakfile that it needs to build and include the package in the image. To do this, do&lt;br /&gt;
  $OMDIR/openmoko# quilt edit trunk/openembedded/packages/tasks/task-openmoko.bb&lt;br /&gt;
Here, increase the value '''PR''' by one and add '''mycoolpackage \''' (with the backslash!) just before the line reading '''#  update-alternatives \'''.&lt;br /&gt;
&lt;br /&gt;
Now run&lt;br /&gt;
  quilt refresh&lt;br /&gt;
  cd ..&lt;br /&gt;
  make update openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
And if everything's alright you should now have an OpenMoko image to flash to your phone or run in qemu as described above.&lt;br /&gt;
&lt;br /&gt;
=== Hello World application ===&lt;br /&gt;
&lt;br /&gt;
There is a [[Building a hello world application|Hello World!]] tutorial available too.&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;, &amp;quot;MokoMakefile rocks!&amp;quot;, &amp;quot;Wow this build system is nice - it just seems more polished than my gumstix toolchain buildroot system&amp;quot;, and &amp;quot;make openmoko-devel-image :) - no magic there&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Project page:&lt;br /&gt;
http://mokomakefile.projects.openmoko.org/&lt;br /&gt;
&lt;br /&gt;
[[Category:Openmoko]]&lt;br /&gt;
[[Category:Applications]]&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>Peterpall</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>2008-07-17T17:29:40Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Known MokoMakefile errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MokoMakefile}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MokoMakefile is a Makefile which saves lots of work when setting up an Openmoko build environment.&lt;br /&gt;
By automating the setup process of a new Openmoko build environment, it provides an environment which is configured the same for all the existing developers and should therefore be preferred over manual procedures or individual setup procedures.&lt;br /&gt;
It brings the same repeatability to build environment creation and maintenance as that which the BitBake scripts bring to [[OpenEmbedded]] ease and standardize the process of building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
Unlike the manual process described at [[Building Openmoko from scratch]], MokoMakefile does not install anything into your system (it can and should be started as normal user).&lt;br /&gt;
MokoMakefile is a wrapper around all that is required to make it easy to set up and maintain a development environment that fully complies with the setup instructions published by Openmoko.&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 [[Openmoko2007.2#How_to_build|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;
The MokoMakefile is able to build both OM-2007.2 and QTopia-X11 images.&lt;br /&gt;
&lt;br /&gt;
MokoMakefile also builds the QEMU-based Neo1973 emulator as part of the build process and has make targets to install the Openmoko images into it and run it. These commands can also be used without downloading and building the whole Openmoko OpenEmbedded distribution. This part is described in [[Using QEMU with MokoMakefile]].&lt;br /&gt;
&lt;br /&gt;
== Requirements for building Openmoko ==&lt;br /&gt;
Independent on whether MokoMakefile or a manual process is used to setup an Openmoko build environment, there are several requirements which must be fulfilled in order for the Openmoko build to succeed:&lt;br /&gt;
&lt;br /&gt;
* RAM: The build host needs to have at least 512MB of RAM, and about the same amount of swap. Some packages built by OpenEmbedded like busybox are built by compiling all source files into one binary which causes gcc to grow beyond 300MB of size and no part of this memory may be on swap for the compile to finish in predictable time. For busybox, this can be turned off, but turning this off means that busybox will not as well optimized by gcc.&lt;br /&gt;
&lt;br /&gt;
* Disk space: You need about 12 GB of available disk space for the Openmoko build to succeed (see below for a tip on how to reduce this).&lt;br /&gt;
&lt;br /&gt;
* Time: The initial build takes at least 5 hours (on 2GHz core2duo without multiprocessor optimization) and may take several days on slower machines.&lt;br /&gt;
&lt;br /&gt;
=== Required software ===&lt;br /&gt;
&lt;br /&gt;
Some distribution specific hints on preparing your build host for building OpenEmbedded are on http://wiki.openembedded.net/index.php/OEandYourDistro but they may be outdated, incomplete and do not cover everything which Openmoko needs to build.&lt;br /&gt;
&lt;br /&gt;
A good guide is [[Building Openmoko from scratch#Build host prerequisites|the section on build host prerequisites]] in [[Building Openmoko from scratch]]&lt;br /&gt;
&lt;br /&gt;
If you forgot anything which OE needs itself, OE will tell you shortly after you start building, but it does not check build dependencies of Openmoko, so you either have to install them before starting or install them after the build failed. OpenEmbedded will continue where it stopped when you restart the build afterwards.&lt;br /&gt;
&lt;br /&gt;
==== Package requirements by distribution ====&lt;br /&gt;
Your distribution needs to provide these commands in order for OpenEmbedded to start building:&lt;br /&gt;
 subversion texi2html texinfo help2man&lt;br /&gt;
&lt;br /&gt;
Openmoko needs the development packages (with header files, development libraries and tools) in order to finish building:&lt;br /&gt;
 ncurses zlib (or libz) OpenSSL GTK++&lt;br /&gt;
&lt;br /&gt;
Because there are bugs in the interaction of QEMU and GCC-4, you'll need a copy of gcc-3.x installed as well.&lt;br /&gt;
&lt;br /&gt;
===== Debian / Ubuntu =====&lt;br /&gt;
  apt-get install subversion build-essential help2man diffstat texi2html texinfo cvs gawk cogito&lt;br /&gt;
&lt;br /&gt;
  apt-get install libncurses5-dev zlib1g-dev libssl-dev libgtk2.0-dev &lt;br /&gt;
  # To prevent errors in host validation&lt;br /&gt;
  apt-get install ca-certificates&lt;br /&gt;
  # For Openmoko 2007.2 using BitBake-1.8.8:&lt;br /&gt;
  apt-get install python-pysqlite2 sqlite3 sqlite3-doc python-pysqlite2-dbg&lt;br /&gt;
  # For building faster&lt;br /&gt;
  apt-get install quilt python-psyco ccache&lt;br /&gt;
  # For qemu, install a second compiler for bug avoidance; MokoMakefile knows to look for it.&lt;br /&gt;
  apt-get install gcc-3.4 g++-3.4 libsdl1.2-dev lynx netpbm dosfstools&lt;br /&gt;
&lt;br /&gt;
  # On Ubuntu 8.04, the following was required instead of cogito:&lt;br /&gt;
  apt-get install git-core&lt;br /&gt;
&lt;br /&gt;
===== SuSE =====&lt;br /&gt;
For building Openmoko on 10.3, you need&lt;br /&gt;
 gcc-c++ ncurses-devel zlib-devel libopenssl-devel gtk2-devel subversion diffstat texinfo help2man&lt;br /&gt;
For MokoMakefile to not fail on compiling qemu-user, you need to use gcc33:&lt;br /&gt;
 wget download.opensuse.org/repositories/devel:/tools:/gcc/openSUSE_Factory/i586/{cpp,gcc}33-3.3.3-41.8.i586.rpm&lt;br /&gt;
 rpm -Uhv {cpp,gcc}33-3.3.3-41.8.i586.rpm&lt;br /&gt;
&lt;br /&gt;
See also the [[Talk:MokoMakefile#Building_on_SuSE_Linux_10.3-AMD64|Talk page on Building on SuSE Linux 10.3-AMD64]]&lt;br /&gt;
&lt;br /&gt;
10.1 and 10.2: same packages as 10.3, but install &amp;lt;code&amp;gt;openssl-devel&amp;lt;/code&amp;gt; instead of libopenssl-devel.&lt;br /&gt;
&lt;br /&gt;
==== For all distributions ====&lt;br /&gt;
As the QEMU-based neo1973 emulator is also built as part of the build process started by MokoMakefile, so you need gcc-3.3 and other packages for building QEMU installed. See [[Using QEMU with MokoMakefile#Build requirements|the build requirements section]] in [[Using QEMU with MokoMakefile]] for information on the required software.&lt;br /&gt;
&lt;br /&gt;
If you are having problems compiling QEMU and do not need it, you can disable building of QEMU by adding following line to build/conf/local.conf file:&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===== Proxy =====&lt;br /&gt;
Users behind a proxy should ensure that their proxy is configured in their wgetrc file as the http_proxy environment variable is unset by MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
== Building Openmoko with MokoMakefile ==&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
Create your $OMDIR directory (note that you can change ~/moko to any directory you like. If you have your ~moko dir mounted from a different file system, be sure to edit /etc/mtab to add the 'exec' permission to the file system, else bitbake will fail with error messages stating that /usr/bin/env is an invalid interpreter):&lt;br /&gt;
   mkdir ~/moko ; cd ~/moko&lt;br /&gt;
&lt;br /&gt;
=== MokoMakefile ===&lt;br /&gt;
Grab MokoMakefile:&lt;br /&gt;
   wget http://www.rwhitby.net/files/openmoko/Makefile &lt;br /&gt;
&lt;br /&gt;
If that doesn't work, try &lt;br /&gt;
&lt;br /&gt;
   wget http://svn.projects.openmoko.org/svnroot/mokomakefile/trunk/Makefile&lt;br /&gt;
&lt;br /&gt;
{{note|MokoMakefile uses BitBake 1.8.8 which requires python-sqlite2 and sqlite-3.3 or later. Users of SUSE Linux 10.1 can update to [http://download.opensuse.org/pub/opensuse/distribution/10.2/repo/oss/suse/i586/sqlite-3.3.8-14.i586.rpm the version of openSUSE 10.2]}}&lt;br /&gt;
&lt;br /&gt;
=== Environment ===&lt;br /&gt;
Set up the environment:&lt;br /&gt;
&lt;br /&gt;
   make setup&lt;br /&gt;
&lt;br /&gt;
If you want to make the ASU or FSO instead of the OM2007.2, see [[Distributions]], you need to edit your Makefile.  Change OM_GIT_BRANCH to one of the following:&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.dev        # OM2007.2&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.asu.dev    # ASU&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.asu.stable # ASU stable&lt;br /&gt;
  OM_GIT_BRANCH := org.openembedded.dev    # FSO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buiding ===&lt;br /&gt;
Before starting a lengthy make process, check the Tips section below for how to make Make multicore aware. You may want to modify the build/conf/local.conf file for your target (emulation/chroot) environment:&lt;br /&gt;
   make openmoko-devel-image&lt;br /&gt;
   (or use &amp;quot;make openmoko-qtopia-x11-image&amp;quot; if you're building the ASU)&lt;br /&gt;
   (or use &amp;quot;make fso-image&amp;quot; if you're building the FSO)&lt;br /&gt;
&lt;br /&gt;
''Hint:'' The images build with this command can be found under {$OMDIR}/build/tmp/deploy/images/neo1973&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 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;
3 - 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;
A quick way to rebuild a new image with the latest updates:&lt;br /&gt;
   make update-makefile &amp;amp;&amp;amp; make setup update openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
==Build issues==&lt;br /&gt;
First, make sure that the problem is reproducible after running&lt;br /&gt;
&lt;br /&gt;
 make update-makefile &amp;amp;&amp;amp; make setup &amp;amp;&amp;amp; make update&lt;br /&gt;
&lt;br /&gt;
then run&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;
and finally&lt;br /&gt;
&lt;br /&gt;
 make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
With luck - you should now have images in your $omdir/build/tmp/deploy/glibc/images/neo1973/ directory.&lt;br /&gt;
You can then [[Flashing openmoko||flash these.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, and you can get the error to occur three times in a row after running that sequence of commands (including the update and setup steps) 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;
If you have chronic build problems, cleaning your environment variables and re-running the build from scratch may help.  The following script should remove all non-essential variables; you should also manually trim your path to the minimum.&lt;br /&gt;
  `env | grep -Ev '^SHELL=|^TERM=|^OLDPWD=|^USER=|^USERNAME=|^PATH=|^EDITOR=|^LANG=|^HOME=|^DISPLAY=|^_='  | sed 's/^\(.*\)=.*/unset \1/'`&lt;br /&gt;
&lt;br /&gt;
(you must include the backtics).&lt;br /&gt;
Note that on some boxes it is necessary to call &amp;quot;make&amp;quot; by typing &amp;quot;/usr/bin/make&amp;quot; afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On current ubuntu boxes another trick is necessary:&lt;br /&gt;
glibc_2.6.1 fails to build since it is unable to generate the necessary locales until you type in the following line:&lt;br /&gt;
 sudo sysctl -w vm.mmap_min_addr=0&lt;br /&gt;
Note that this temporarily disables a new security vulnerability check that has entered /etc/sysctrl - but that makes problems with loads of applications.&lt;br /&gt;
To re-enable this check do the following:&lt;br /&gt;
 sudo sysctl -w vm.mmap_min_addr=65536&lt;br /&gt;
See the talk page of this article for more details on this solution.&lt;br /&gt;
&lt;br /&gt;
===Known MokoMakefile errors ===&lt;br /&gt;
&lt;br /&gt;
===Fixes for distribution/environment-specific or isolated issues===&lt;br /&gt;
&lt;br /&gt;
Work-arounds for temporary or isolated problems can be found and 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;
*Make sure umask is set to 0022 before you run &amp;quot;make setup&amp;quot;&lt;br /&gt;
&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. ~/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. As of 10/16/07, this appears to be present in local.conf by default.&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;
* I have some problem with the parallel building, mkfs.jffs failed to build the image because the directory was modify while the building of the fs. [[User:Patrick.hetu|patrick.hetu]] 02:19, 27 May 2008 (UTC) &lt;br /&gt;
&lt;br /&gt;
* If you encounter an error related with the qemu-native package and not compiling for the qemu, you can edit the build/conf/local.conf file and add ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot; line to avoid the error.&lt;br /&gt;
&lt;br /&gt;
* To prevent building tons of locales, add a line like this to local.conf:&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8 nl_NL.UTF-8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To not build any binary locales at all, add this to local.conf:&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* If you want to rebuild the package indexes (for instance, after compiling a new version of a package) without building &amp;lt;code&amp;gt;openmoko-devel-image&amp;lt;/code&amp;gt;, run &amp;lt;code&amp;gt;make build-package-package-index&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[User:Wurp]] will update this to be a little more comprehensible, but maybe it can help someone as-is in the meantime:&lt;br /&gt;
* If MokoMakefile always fails on some fetch in zlib, just find the binary somewhere, add it to the downloads or sources directory manually (create the .md5 matching file if necessary), and retry.&lt;br /&gt;
&lt;br /&gt;
=== Useful commands ===&lt;br /&gt;
Here is the list (not complete) of useful MokoMakefile commands (actually make targets) and a short description of each one. These should be run inside $OMDIR directory.&lt;br /&gt;
&lt;br /&gt;
; make openmoko-devel-image : build the full development image&lt;br /&gt;
&lt;br /&gt;
; make openmoko-devel-tools : build statically-linked [[dfu-util]] and [[openocd]] binaries&lt;br /&gt;
&lt;br /&gt;
; make openmoko-toolchain : builds [[toolchain]]&lt;br /&gt;
&lt;br /&gt;
; make qemu : builds qemu, downloads flash images from official repository, flashes qemu emulated Neo1973 and runs emulator (see also [[Openmoko under QEMU]]). &lt;br /&gt;
&lt;br /&gt;
; make qemu-local : same as ''make qemu'', but uses locally built images instead of official ones.&lt;br /&gt;
&lt;br /&gt;
; make run-qemu : runs qemu with usb keyboard ''(note: qemu must first be built!)''. This target starts the emulator with some predefined set of options. If you need to start it with other options (enable telnet, etc), see [[QEMU_command_line]].&lt;br /&gt;
&lt;br /&gt;
; make build-package-&amp;lt;package name&amp;gt; : buids ''&amp;lt;package name&amp;gt;'' package&lt;br /&gt;
&lt;br /&gt;
; make update-makefile : updates MokoMakefile&lt;br /&gt;
&lt;br /&gt;
; make clean-package-&amp;lt;foo&amp;gt;: cleans the &amp;quot;&amp;lt;foo&amp;gt;&amp;quot; package&lt;br /&gt;
&lt;br /&gt;
; make setup : to make sure that any recent changes to the build directory structure have been applied&lt;br /&gt;
   &lt;br /&gt;
; make update : to update the Openmoko repository checkout and the MokoMakefile patches to the latest version&lt;br /&gt;
&lt;br /&gt;
==Developing with MokoMakefile==&lt;br /&gt;
&lt;br /&gt;
{{note|If using MokoMakefile with OM2007.2 then references to $OMDIR/openmoko should be replaced with $OMDIR/openembedded.  Also references to tmp/work/armv4t-linux should be replaced with tmp/work/fic-gta01-angstrom-linux-gnueabi}}&lt;br /&gt;
&lt;br /&gt;
For the following explanations $OMDIR is the directory where there Makefile puts all the stuff.&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 $OMDIR/openmoko&lt;br /&gt;
  quilt new descriptive-patch-name.patch&lt;br /&gt;
  quilt add trunk/src/name-of-file-to-change # do this for every file you are about to modify&lt;br /&gt;
  ...make the changes...&lt;br /&gt;
  quilt refresh # this creates a file in $OMDIR/patches/openmoko-HEAD/ and updates the quilt series file there&lt;br /&gt;
&lt;br /&gt;
Note: Do '''NOT''' use absolute paths as this confuses quilt and will get you a diff of the file against /dev/null!&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;
If you want to modify applications instead of the openmoko toolchain, this is what you have to do (example: openmoko-messages):&lt;br /&gt;
&lt;br /&gt;
  cd $OMDIR/build&lt;br /&gt;
  . ../setup-env&lt;br /&gt;
  bitbake -c unpack openmoko-messages&lt;br /&gt;
  cd tmp/work/armv4t-linux/openmoko-messages-0.0.1+svnnow-r2_2276/openmoko-messages/&lt;br /&gt;
  ''...make the changes...''&lt;br /&gt;
  cd -&lt;br /&gt;
  bitbake openmoko-messages&lt;br /&gt;
&lt;br /&gt;
Then continue with MokoMakefile usage.&lt;br /&gt;
&lt;br /&gt;
If you want to add an application to your openmoko distribution, do this:&lt;br /&gt;
All file edits should be done using quilt as described above. That way a patch can easily be submitted to the openmoko project.&lt;br /&gt;
First, create a directory that will correspond to your package and edit a '''.bb''' file in there:&lt;br /&gt;
  cd $OMDIR/openmoko/&lt;br /&gt;
  quilt new mycoolpackage.patch&lt;br /&gt;
  mkdir trunk/oe/packages/mycoolpackage&lt;br /&gt;
  quilt add trunk/oe/packages/mycoolpackage/mycoolpackage_1.bb&lt;br /&gt;
  quilt edit trunk/oe/packages/mycoolpackage/mycoolpackage_1.bb&lt;br /&gt;
&lt;br /&gt;
The file should have the following content:&lt;br /&gt;
  DESCRIPTION = &amp;quot;This is a cool package&amp;quot;&lt;br /&gt;
  SECTION = &amp;quot;username/mycoolpackage&amp;quot;&lt;br /&gt;
  PV = &amp;quot;1&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  inherit autotools&lt;br /&gt;
  &lt;br /&gt;
  SRC_URI = &amp;quot;http://www.example.com/download/mycoolpackage-1.tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
* DESCRIPTION - Just a short text explaining the package&lt;br /&gt;
* SECTION - I have no clue, but I'll use username/mycoolpackage for now&lt;br /&gt;
* PV - Package Version&lt;br /&gt;
* inherit autotools - The package can be compiled by './configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install' so we tell MokoMakefile to do it this way.&lt;br /&gt;
* SRC_URI = ... - This is the download location of the package source. It's imperative that the tar.gz contains a directory called '''packagename-packageversion''' (in this case: mycoolpackage-1) so that MokoMakefile can find it automatically or the build will fail.&lt;br /&gt;
&lt;br /&gt;
This is not all. We also need to tell MokoMakfile that it needs to build and include the package in the image. To do this, do&lt;br /&gt;
  $OMDIR/openmoko# quilt edit trunk/oe/packages/tasks/task-openmoko.bb&lt;br /&gt;
Here, increase the value '''PR''' by one and add '''mycoolpackage \''' (with the backslash!) just before the line reading '''#  update-alternatives \'''.&lt;br /&gt;
&lt;br /&gt;
Now run&lt;br /&gt;
  quilt refresh&lt;br /&gt;
  cd ..&lt;br /&gt;
  make update openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
And if everything's alright you should now have an OpenMoko image to flash to your phone or run in qemu as described above.&lt;br /&gt;
&lt;br /&gt;
=== Hello World application ===&lt;br /&gt;
&lt;br /&gt;
There is a [[Building a hello world application|Hello World!]] tutorial available too.&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;, &amp;quot;MokoMakefile rocks!&amp;quot;, &amp;quot;Wow this build system is nice - it just seems more polished than my gumstix toolchain buildroot system&amp;quot;, and &amp;quot;make openmoko-devel-image :) - no magic there&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Project page:&lt;br /&gt;
http://mokomakefile.projects.openmoko.org/&lt;br /&gt;
&lt;br /&gt;
[[Category:Openmoko]]&lt;br /&gt;
[[Category:Applications]]&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>Peterpall</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>2008-07-17T17:29:08Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Build issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MokoMakefile}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MokoMakefile is a Makefile which saves lots of work when setting up an Openmoko build environment.&lt;br /&gt;
By automating the setup process of a new Openmoko build environment, it provides an environment which is configured the same for all the existing developers and should therefore be preferred over manual procedures or individual setup procedures.&lt;br /&gt;
It brings the same repeatability to build environment creation and maintenance as that which the BitBake scripts bring to [[OpenEmbedded]] ease and standardize the process of building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
Unlike the manual process described at [[Building Openmoko from scratch]], MokoMakefile does not install anything into your system (it can and should be started as normal user).&lt;br /&gt;
MokoMakefile is a wrapper around all that is required to make it easy to set up and maintain a development environment that fully complies with the setup instructions published by Openmoko.&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 [[Openmoko2007.2#How_to_build|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;
The MokoMakefile is able to build both OM-2007.2 and QTopia-X11 images.&lt;br /&gt;
&lt;br /&gt;
MokoMakefile also builds the QEMU-based Neo1973 emulator as part of the build process and has make targets to install the Openmoko images into it and run it. These commands can also be used without downloading and building the whole Openmoko OpenEmbedded distribution. This part is described in [[Using QEMU with MokoMakefile]].&lt;br /&gt;
&lt;br /&gt;
== Requirements for building Openmoko ==&lt;br /&gt;
Independent on whether MokoMakefile or a manual process is used to setup an Openmoko build environment, there are several requirements which must be fulfilled in order for the Openmoko build to succeed:&lt;br /&gt;
&lt;br /&gt;
* RAM: The build host needs to have at least 512MB of RAM, and about the same amount of swap. Some packages built by OpenEmbedded like busybox are built by compiling all source files into one binary which causes gcc to grow beyond 300MB of size and no part of this memory may be on swap for the compile to finish in predictable time. For busybox, this can be turned off, but turning this off means that busybox will not as well optimized by gcc.&lt;br /&gt;
&lt;br /&gt;
* Disk space: You need about 12 GB of available disk space for the Openmoko build to succeed (see below for a tip on how to reduce this).&lt;br /&gt;
&lt;br /&gt;
* Time: The initial build takes at least 5 hours (on 2GHz core2duo without multiprocessor optimization) and may take several days on slower machines.&lt;br /&gt;
&lt;br /&gt;
=== Required software ===&lt;br /&gt;
&lt;br /&gt;
Some distribution specific hints on preparing your build host for building OpenEmbedded are on http://wiki.openembedded.net/index.php/OEandYourDistro but they may be outdated, incomplete and do not cover everything which Openmoko needs to build.&lt;br /&gt;
&lt;br /&gt;
A good guide is [[Building Openmoko from scratch#Build host prerequisites|the section on build host prerequisites]] in [[Building Openmoko from scratch]]&lt;br /&gt;
&lt;br /&gt;
If you forgot anything which OE needs itself, OE will tell you shortly after you start building, but it does not check build dependencies of Openmoko, so you either have to install them before starting or install them after the build failed. OpenEmbedded will continue where it stopped when you restart the build afterwards.&lt;br /&gt;
&lt;br /&gt;
==== Package requirements by distribution ====&lt;br /&gt;
Your distribution needs to provide these commands in order for OpenEmbedded to start building:&lt;br /&gt;
 subversion texi2html texinfo help2man&lt;br /&gt;
&lt;br /&gt;
Openmoko needs the development packages (with header files, development libraries and tools) in order to finish building:&lt;br /&gt;
 ncurses zlib (or libz) OpenSSL GTK++&lt;br /&gt;
&lt;br /&gt;
Because there are bugs in the interaction of QEMU and GCC-4, you'll need a copy of gcc-3.x installed as well.&lt;br /&gt;
&lt;br /&gt;
===== Debian / Ubuntu =====&lt;br /&gt;
  apt-get install subversion build-essential help2man diffstat texi2html texinfo cvs gawk cogito&lt;br /&gt;
&lt;br /&gt;
  apt-get install libncurses5-dev zlib1g-dev libssl-dev libgtk2.0-dev &lt;br /&gt;
  # To prevent errors in host validation&lt;br /&gt;
  apt-get install ca-certificates&lt;br /&gt;
  # For Openmoko 2007.2 using BitBake-1.8.8:&lt;br /&gt;
  apt-get install python-pysqlite2 sqlite3 sqlite3-doc python-pysqlite2-dbg&lt;br /&gt;
  # For building faster&lt;br /&gt;
  apt-get install quilt python-psyco ccache&lt;br /&gt;
  # For qemu, install a second compiler for bug avoidance; MokoMakefile knows to look for it.&lt;br /&gt;
  apt-get install gcc-3.4 g++-3.4 libsdl1.2-dev lynx netpbm dosfstools&lt;br /&gt;
&lt;br /&gt;
  # On Ubuntu 8.04, the following was required instead of cogito:&lt;br /&gt;
  apt-get install git-core&lt;br /&gt;
&lt;br /&gt;
===== SuSE =====&lt;br /&gt;
For building Openmoko on 10.3, you need&lt;br /&gt;
 gcc-c++ ncurses-devel zlib-devel libopenssl-devel gtk2-devel subversion diffstat texinfo help2man&lt;br /&gt;
For MokoMakefile to not fail on compiling qemu-user, you need to use gcc33:&lt;br /&gt;
 wget download.opensuse.org/repositories/devel:/tools:/gcc/openSUSE_Factory/i586/{cpp,gcc}33-3.3.3-41.8.i586.rpm&lt;br /&gt;
 rpm -Uhv {cpp,gcc}33-3.3.3-41.8.i586.rpm&lt;br /&gt;
&lt;br /&gt;
See also the [[Talk:MokoMakefile#Building_on_SuSE_Linux_10.3-AMD64|Talk page on Building on SuSE Linux 10.3-AMD64]]&lt;br /&gt;
&lt;br /&gt;
10.1 and 10.2: same packages as 10.3, but install &amp;lt;code&amp;gt;openssl-devel&amp;lt;/code&amp;gt; instead of libopenssl-devel.&lt;br /&gt;
&lt;br /&gt;
==== For all distributions ====&lt;br /&gt;
As the QEMU-based neo1973 emulator is also built as part of the build process started by MokoMakefile, so you need gcc-3.3 and other packages for building QEMU installed. See [[Using QEMU with MokoMakefile#Build requirements|the build requirements section]] in [[Using QEMU with MokoMakefile]] for information on the required software.&lt;br /&gt;
&lt;br /&gt;
If you are having problems compiling QEMU and do not need it, you can disable building of QEMU by adding following line to build/conf/local.conf file:&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===== Proxy =====&lt;br /&gt;
Users behind a proxy should ensure that their proxy is configured in their wgetrc file as the http_proxy environment variable is unset by MokoMakefile.&lt;br /&gt;
&lt;br /&gt;
== Building Openmoko with MokoMakefile ==&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
Create your $OMDIR directory (note that you can change ~/moko to any directory you like. If you have your ~moko dir mounted from a different file system, be sure to edit /etc/mtab to add the 'exec' permission to the file system, else bitbake will fail with error messages stating that /usr/bin/env is an invalid interpreter):&lt;br /&gt;
   mkdir ~/moko ; cd ~/moko&lt;br /&gt;
&lt;br /&gt;
=== MokoMakefile ===&lt;br /&gt;
Grab MokoMakefile:&lt;br /&gt;
   wget http://www.rwhitby.net/files/openmoko/Makefile &lt;br /&gt;
&lt;br /&gt;
If that doesn't work, try &lt;br /&gt;
&lt;br /&gt;
   wget http://svn.projects.openmoko.org/svnroot/mokomakefile/trunk/Makefile&lt;br /&gt;
&lt;br /&gt;
{{note|MokoMakefile uses BitBake 1.8.8 which requires python-sqlite2 and sqlite-3.3 or later. Users of SUSE Linux 10.1 can update to [http://download.opensuse.org/pub/opensuse/distribution/10.2/repo/oss/suse/i586/sqlite-3.3.8-14.i586.rpm the version of openSUSE 10.2]}}&lt;br /&gt;
&lt;br /&gt;
=== Environment ===&lt;br /&gt;
Set up the environment:&lt;br /&gt;
&lt;br /&gt;
   make setup&lt;br /&gt;
&lt;br /&gt;
If you want to make the ASU or FSO instead of the OM2007.2, see [[Distributions]], you need to edit your Makefile.  Change OM_GIT_BRANCH to one of the following:&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.dev        # OM2007.2&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.asu.dev    # ASU&lt;br /&gt;
  OM_GIT_BRANCH := org.openmoko.asu.stable # ASU stable&lt;br /&gt;
  OM_GIT_BRANCH := org.openembedded.dev    # FSO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buiding ===&lt;br /&gt;
Before starting a lengthy make process, check the Tips section below for how to make Make multicore aware. You may want to modify the build/conf/local.conf file for your target (emulation/chroot) environment:&lt;br /&gt;
   make openmoko-devel-image&lt;br /&gt;
   (or use &amp;quot;make openmoko-qtopia-x11-image&amp;quot; if you're building the ASU)&lt;br /&gt;
   (or use &amp;quot;make fso-image&amp;quot; if you're building the FSO)&lt;br /&gt;
&lt;br /&gt;
''Hint:'' The images build with this command can be found under {$OMDIR}/build/tmp/deploy/images/neo1973&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 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;
3 - 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;
A quick way to rebuild a new image with the latest updates:&lt;br /&gt;
   make update-makefile &amp;amp;&amp;amp; make setup update openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
==Build issues==&lt;br /&gt;
First, make sure that the problem is reproducible after running&lt;br /&gt;
&lt;br /&gt;
 make update-makefile &amp;amp;&amp;amp; make setup &amp;amp;&amp;amp; make update&lt;br /&gt;
&lt;br /&gt;
then run&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;
and finally&lt;br /&gt;
&lt;br /&gt;
 make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
With luck - you should now have images in your $omdir/build/tmp/deploy/glibc/images/neo1973/ directory.&lt;br /&gt;
You can then [[Flashing openmoko||flash these.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, and you can get the error to occur three times in a row after running that sequence of commands (including the update and setup steps) 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;
If you have chronic build problems, cleaning your environment variables and re-running the build from scratch may help.  The following script should remove all non-essential variables; you should also manually trim your path to the minimum.&lt;br /&gt;
  `env | grep -Ev '^SHELL=|^TERM=|^OLDPWD=|^USER=|^USERNAME=|^PATH=|^EDITOR=|^LANG=|^HOME=|^DISPLAY=|^_='  | sed 's/^\(.*\)=.*/unset \1/'`&lt;br /&gt;
&lt;br /&gt;
(you must include the backtics).&lt;br /&gt;
Note that on some boxes it is necessary to call &amp;quot;make&amp;quot; by typing &amp;quot;/usr/bin/make&amp;quot; afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On current ubuntu boxes another trick is necessary:&lt;br /&gt;
glibc_2.6.1 fails to build since it is unable to generate the necessary locales until you type in the following line:&lt;br /&gt;
 sudo sysctl -w vm.mmap_min_addr=0&lt;br /&gt;
Note that this temporarily disables a new security vulnerability check that has entered /etc/sysctrl - but that makes problems with loads of applications.&lt;br /&gt;
To re-enable this check do the following:&lt;br /&gt;
 sudo sysctl -w vm.mmap_min_addr=65536&lt;br /&gt;
See the talk page of this article for more details on this solution.&lt;br /&gt;
&lt;br /&gt;
===Known MokoMakefile errors ===&lt;br /&gt;
&lt;br /&gt;
===Fixes for distribution/environment-specific or isolated issues===&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Work-arounds for temporary or isolated problems can be found and 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;
*Make sure umask is set to 0022 before you run &amp;quot;make setup&amp;quot;&lt;br /&gt;
&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. ~/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. As of 10/16/07, this appears to be present in local.conf by default.&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;
* I have some problem with the parallel building, mkfs.jffs failed to build the image because the directory was modify while the building of the fs. [[User:Patrick.hetu|patrick.hetu]] 02:19, 27 May 2008 (UTC) &lt;br /&gt;
&lt;br /&gt;
* If you encounter an error related with the qemu-native package and not compiling for the qemu, you can edit the build/conf/local.conf file and add ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot; line to avoid the error.&lt;br /&gt;
&lt;br /&gt;
* To prevent building tons of locales, add a line like this to local.conf:&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8 nl_NL.UTF-8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* To not build any binary locales at all, add this to local.conf:&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* If you want to rebuild the package indexes (for instance, after compiling a new version of a package) without building &amp;lt;code&amp;gt;openmoko-devel-image&amp;lt;/code&amp;gt;, run &amp;lt;code&amp;gt;make build-package-package-index&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[User:Wurp]] will update this to be a little more comprehensible, but maybe it can help someone as-is in the meantime:&lt;br /&gt;
* If MokoMakefile always fails on some fetch in zlib, just find the binary somewhere, add it to the downloads or sources directory manually (create the .md5 matching file if necessary), and retry.&lt;br /&gt;
&lt;br /&gt;
=== Useful commands ===&lt;br /&gt;
Here is the list (not complete) of useful MokoMakefile commands (actually make targets) and a short description of each one. These should be run inside $OMDIR directory.&lt;br /&gt;
&lt;br /&gt;
; make openmoko-devel-image : build the full development image&lt;br /&gt;
&lt;br /&gt;
; make openmoko-devel-tools : build statically-linked [[dfu-util]] and [[openocd]] binaries&lt;br /&gt;
&lt;br /&gt;
; make openmoko-toolchain : builds [[toolchain]]&lt;br /&gt;
&lt;br /&gt;
; make qemu : builds qemu, downloads flash images from official repository, flashes qemu emulated Neo1973 and runs emulator (see also [[Openmoko under QEMU]]). &lt;br /&gt;
&lt;br /&gt;
; make qemu-local : same as ''make qemu'', but uses locally built images instead of official ones.&lt;br /&gt;
&lt;br /&gt;
; make run-qemu : runs qemu with usb keyboard ''(note: qemu must first be built!)''. This target starts the emulator with some predefined set of options. If you need to start it with other options (enable telnet, etc), see [[QEMU_command_line]].&lt;br /&gt;
&lt;br /&gt;
; make build-package-&amp;lt;package name&amp;gt; : buids ''&amp;lt;package name&amp;gt;'' package&lt;br /&gt;
&lt;br /&gt;
; make update-makefile : updates MokoMakefile&lt;br /&gt;
&lt;br /&gt;
; make clean-package-&amp;lt;foo&amp;gt;: cleans the &amp;quot;&amp;lt;foo&amp;gt;&amp;quot; package&lt;br /&gt;
&lt;br /&gt;
; make setup : to make sure that any recent changes to the build directory structure have been applied&lt;br /&gt;
   &lt;br /&gt;
; make update : to update the Openmoko repository checkout and the MokoMakefile patches to the latest version&lt;br /&gt;
&lt;br /&gt;
==Developing with MokoMakefile==&lt;br /&gt;
&lt;br /&gt;
{{note|If using MokoMakefile with OM2007.2 then references to $OMDIR/openmoko should be replaced with $OMDIR/openembedded.  Also references to tmp/work/armv4t-linux should be replaced with tmp/work/fic-gta01-angstrom-linux-gnueabi}}&lt;br /&gt;
&lt;br /&gt;
For the following explanations $OMDIR is the directory where there Makefile puts all the stuff.&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 $OMDIR/openmoko&lt;br /&gt;
  quilt new descriptive-patch-name.patch&lt;br /&gt;
  quilt add trunk/src/name-of-file-to-change # do this for every file you are about to modify&lt;br /&gt;
  ...make the changes...&lt;br /&gt;
  quilt refresh # this creates a file in $OMDIR/patches/openmoko-HEAD/ and updates the quilt series file there&lt;br /&gt;
&lt;br /&gt;
Note: Do '''NOT''' use absolute paths as this confuses quilt and will get you a diff of the file against /dev/null!&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;
If you want to modify applications instead of the openmoko toolchain, this is what you have to do (example: openmoko-messages):&lt;br /&gt;
&lt;br /&gt;
  cd $OMDIR/build&lt;br /&gt;
  . ../setup-env&lt;br /&gt;
  bitbake -c unpack openmoko-messages&lt;br /&gt;
  cd tmp/work/armv4t-linux/openmoko-messages-0.0.1+svnnow-r2_2276/openmoko-messages/&lt;br /&gt;
  ''...make the changes...''&lt;br /&gt;
  cd -&lt;br /&gt;
  bitbake openmoko-messages&lt;br /&gt;
&lt;br /&gt;
Then continue with MokoMakefile usage.&lt;br /&gt;
&lt;br /&gt;
If you want to add an application to your openmoko distribution, do this:&lt;br /&gt;
All file edits should be done using quilt as described above. That way a patch can easily be submitted to the openmoko project.&lt;br /&gt;
First, create a directory that will correspond to your package and edit a '''.bb''' file in there:&lt;br /&gt;
  cd $OMDIR/openmoko/&lt;br /&gt;
  quilt new mycoolpackage.patch&lt;br /&gt;
  mkdir trunk/oe/packages/mycoolpackage&lt;br /&gt;
  quilt add trunk/oe/packages/mycoolpackage/mycoolpackage_1.bb&lt;br /&gt;
  quilt edit trunk/oe/packages/mycoolpackage/mycoolpackage_1.bb&lt;br /&gt;
&lt;br /&gt;
The file should have the following content:&lt;br /&gt;
  DESCRIPTION = &amp;quot;This is a cool package&amp;quot;&lt;br /&gt;
  SECTION = &amp;quot;username/mycoolpackage&amp;quot;&lt;br /&gt;
  PV = &amp;quot;1&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  inherit autotools&lt;br /&gt;
  &lt;br /&gt;
  SRC_URI = &amp;quot;http://www.example.com/download/mycoolpackage-1.tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Explanation:&lt;br /&gt;
* DESCRIPTION - Just a short text explaining the package&lt;br /&gt;
* SECTION - I have no clue, but I'll use username/mycoolpackage for now&lt;br /&gt;
* PV - Package Version&lt;br /&gt;
* inherit autotools - The package can be compiled by './configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install' so we tell MokoMakefile to do it this way.&lt;br /&gt;
* SRC_URI = ... - This is the download location of the package source. It's imperative that the tar.gz contains a directory called '''packagename-packageversion''' (in this case: mycoolpackage-1) so that MokoMakefile can find it automatically or the build will fail.&lt;br /&gt;
&lt;br /&gt;
This is not all. We also need to tell MokoMakfile that it needs to build and include the package in the image. To do this, do&lt;br /&gt;
  $OMDIR/openmoko# quilt edit trunk/oe/packages/tasks/task-openmoko.bb&lt;br /&gt;
Here, increase the value '''PR''' by one and add '''mycoolpackage \''' (with the backslash!) just before the line reading '''#  update-alternatives \'''.&lt;br /&gt;
&lt;br /&gt;
Now run&lt;br /&gt;
  quilt refresh&lt;br /&gt;
  cd ..&lt;br /&gt;
  make update openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
And if everything's alright you should now have an OpenMoko image to flash to your phone or run in qemu as described above.&lt;br /&gt;
&lt;br /&gt;
=== Hello World application ===&lt;br /&gt;
&lt;br /&gt;
There is a [[Building a hello world application|Hello World!]] tutorial available too.&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;, &amp;quot;MokoMakefile rocks!&amp;quot;, &amp;quot;Wow this build system is nice - it just seems more polished than my gumstix toolchain buildroot system&amp;quot;, and &amp;quot;make openmoko-devel-image :) - no magic there&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Project page:&lt;br /&gt;
http://mokomakefile.projects.openmoko.org/&lt;br /&gt;
&lt;br /&gt;
[[Category:Openmoko]]&lt;br /&gt;
[[Category:Applications]]&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-07-15T04:53:06Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Flashing your Freerunner with the newest u-boot binary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Phase0 Quick Start ==&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
The GTA01 uses the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader patches can be found at http://svn.openmoko.org/trunk/src/target/u-boot/patches/. &lt;br /&gt;
&lt;br /&gt;
Untar the sources, apply the patch, run &amp;quot;make gta01bv3_config&amp;quot; (or gta01bv2_config, or whatever hardware revision you have), run &amp;quot;make&amp;quot;.  You will get a resulting &amp;quot;u-boot.bin&amp;quot; image, which you can directly flash (either using existing bootloader or [[sjf2410-linux]]) into NAND.&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/snapshots in the subdirectory 200X.XX/images/.  It should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary right (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, lets see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
The problem disappeared at least for me by the command below on the host side. Please note that if you have usb keyboard or mouse then the command might cause trouble.. I only have PS/2 so I couldn't test it.&lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
=== Flashing your Freerunner with the newest u-boot binary ===&lt;br /&gt;
This is simple - even if I find it somehow scary to flash the bootloader of a device. Don't be too scared, though: Unlike any other device I know the Freerunner contains a second bootloader on a write protected chip - that is still there, even if flashing the original bootloader goes horribly wrong. You can always make the phone use this bootloader instead by pressing the power button whilst pressing the Aux button. In theory it should therefore be impossible to brick your phone completely enough by flashing the bootloader that a debug board is needed to unbrick it.&lt;br /&gt;
* Download the newest uBoot binary from http://downloads.openmoko.org/releases/Freerunner/&lt;br /&gt;
* start the cellular phone by pressing power whilst pressing the aux button.&lt;br /&gt;
* Run the following command:  &lt;br /&gt;
 dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin&lt;br /&gt;
* The device is now flashed: &lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface...&lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB...&lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name=&amp;quot;u-boot&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 bytes_per_hash=4316&lt;br /&gt;
 Starting download: [##################################################] finished!&lt;br /&gt;
 state(2) = dfuIDLE, status(0) = No error condition is present &lt;br /&gt;
 Done!&lt;br /&gt;
 Resetting USB to switch back to runtime mode&lt;br /&gt;
* The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.&lt;br /&gt;
&lt;br /&gt;
[[Category:System Developers]]&lt;br /&gt;
[[Category:Flashing Openmoko]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Snapshot_review/2008-07-12</id>
		<title>Snapshot review/2008-07-12</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Snapshot_review/2008-07-12"/>
				<updated>2008-07-15T04:48:47Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: Did&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Snapshot History and Overview===&lt;br /&gt;
Latest reviewed image: [[Snapshot_review/2008-07-12]]&lt;br /&gt;
&lt;br /&gt;
Latest Recommended image: [[Snapshot_review/2008-04-21]]&lt;br /&gt;
&lt;br /&gt;
Link to all [[:Category:SnapshotReview|previous snapshot reviews]].&lt;br /&gt;
&lt;br /&gt;
The latest kernel and root image recommended in these reviews will always be available [http://downloads.openmoko.org/recommended/ here]&lt;br /&gt;
&lt;br /&gt;
===Openmoko Snapshot Review Criteria===&lt;br /&gt;
&lt;br /&gt;
Date: 2008-07-12&lt;br /&gt;
&lt;br /&gt;
Rootfs Snapshot name:&lt;br /&gt;
Openmoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080712-om-gta02.rootfs.jffs2&lt;br /&gt;
&lt;br /&gt;
Kernel snapshot name:&lt;br /&gt;
uImage-2.6.24+git20080424-om-gta02.bin&lt;br /&gt;
&lt;br /&gt;
uBoot Snapshot name:&lt;br /&gt;
u-boot-gta02v5-1.3.1+svnr4297+gitb29661fc1151077776454288051bc9a488351ce8-r3.bin&lt;br /&gt;
&lt;br /&gt;
Device type:&lt;br /&gt;
Freerunner (GTA02v5)&lt;br /&gt;
&lt;br /&gt;
==Boot==&lt;br /&gt;
*Speed - (No measured test.)&lt;br /&gt;
*Error Messages - (No measured test.)&lt;br /&gt;
*Failures - (No measured test.)&lt;br /&gt;
&lt;br /&gt;
==Phone Functionality==&lt;br /&gt;
&lt;br /&gt;
'''Incoming Calls'''&lt;br /&gt;
&lt;br /&gt;
# Can receive - Yes&lt;br /&gt;
# Kinetic alert (vibrate) - Yes&lt;br /&gt;
# Auditory alert (sound) - Yes&lt;br /&gt;
# Call quality - Fine. The annoying echo heard by the caller has gone, even if was reproducible with the firmware from April 24 using the same phone. (Tested twice with both firmwares.) &lt;br /&gt;
# Missed calls display on OM-today2 - Yes&lt;br /&gt;
# Calls recorded in call log - Yes&lt;br /&gt;
# Stability - The phone sometimes seems to abort calls after a few minutes. Calling again immediately afterwards works, though.&lt;br /&gt;
&lt;br /&gt;
'''Outgoing Calls'''&lt;br /&gt;
# Can make - Yes&lt;br /&gt;
# Call quality - Yes&lt;br /&gt;
# Calls recorded in call log - Yes&lt;br /&gt;
# Stability - The phone sometimes seems to abort calls after a few minutes. Calling again immediately afterwards works, though.&lt;br /&gt;
&lt;br /&gt;
==Messaging Functionality==&lt;br /&gt;
'''Incoming SMS'''&lt;br /&gt;
# Can receive - Yes&lt;br /&gt;
# Kinetic alert (vibrate) - Yes&lt;br /&gt;
# Auditory Altert (sound) - Yes&lt;br /&gt;
# Sender identified if applicable - Yes&lt;br /&gt;
# Is message readable - Yes&lt;br /&gt;
# OM today2 displays new messages - Yes&lt;br /&gt;
# Communication logged - Yes&lt;br /&gt;
# Stability - Incoming SMS messages aren't matched against Contact list if entered using local format. [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1345 Bug #1345 Reported]&lt;br /&gt;
&lt;br /&gt;
'''Outgoing SMS'''&lt;br /&gt;
# Can send - Yes&lt;br /&gt;
# Message readable - Yes&lt;br /&gt;
# Delivery notification works - (No measured test.)&lt;br /&gt;
# Communication logged - Yes&lt;br /&gt;
# Stability - Good&lt;br /&gt;
&lt;br /&gt;
==Person Information Management==&lt;br /&gt;
'''Contacts'''&lt;br /&gt;
# Can add - Yes&lt;br /&gt;
# Can create groups - Yes&lt;br /&gt;
# Can modify - Yes&lt;br /&gt;
&lt;br /&gt;
'''Calendar'''&lt;br /&gt;
# Can add events - Yes&lt;br /&gt;
# Can view events - Yes&lt;br /&gt;
# Can remove events - Yes&lt;br /&gt;
# Events appear on openmoko-today2 - Yes&lt;br /&gt;
# Events trigger kinetic alarm - Yes&lt;br /&gt;
# Events trigger auditory alarm - Yes&lt;br /&gt;
&lt;br /&gt;
==Media Player==&lt;br /&gt;
'''Music'''&lt;br /&gt;
# Mp3 - Yes; Can even seek now.&lt;br /&gt;
# Vorbis - Yes; Can even seek now.&lt;br /&gt;
&lt;br /&gt;
'''Video'''&lt;br /&gt;
# Theora Playback - (No measured test.)&lt;br /&gt;
# Theora Pause - (No measured test.)&lt;br /&gt;
&lt;br /&gt;
==GPS==&lt;br /&gt;
- Can turn on - Yes&lt;br /&gt;
- Can turn off - Yes&lt;br /&gt;
&lt;br /&gt;
==Bluetooth==&lt;br /&gt;
# Can turn Bluetooth on - (No measured test.)&lt;br /&gt;
# Can turn Bluetooth off - (No measured test.)&lt;br /&gt;
&lt;br /&gt;
==Battery Life==&lt;br /&gt;
About 8 hours with heavy use (The 1st days with my phone...) - which was to be expected since the device was virtually never in suspend mode (see the Suspend section.)&lt;br /&gt;
&lt;br /&gt;
==Software Keyboard==&lt;br /&gt;
# Keyboard type - Multi-tap&lt;br /&gt;
# Displays correctly - Yes&lt;br /&gt;
# Usability - Poor: Multi-tap input's lack of CTRL keys harms terminal use. But at least predictive. It is easy to install a better keyboard, though using opkg.&lt;br /&gt;
&lt;br /&gt;
==Suspend==&lt;br /&gt;
# Suspend / Resume works: Many times fails to suspend; Sometimes won't resume again. &lt;br /&gt;
# All features work after suspend / resume cycle: If the phone does come up again, Yes&lt;br /&gt;
# Can receive incoming calls or sms while in suspend: Yes&lt;br /&gt;
&lt;br /&gt;
==User Feedback==&lt;br /&gt;
Please provide feedback on how to improve these reviews. Also, please identify yourself when making changes.&lt;br /&gt;
&lt;br /&gt;
[[category:SnapshotReview]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Talk:Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-07-13T09:17:34Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* = Booting the Freerunner from a SD card */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Booting the Freerunner from a SD card ==&lt;br /&gt;
My Freerunner came with a &amp;quot;boot from SD card&amp;quot; option already installed in uBoot. I just needed a SD (Not HDMC) card with the following layout:&lt;br /&gt;
* Partition 1 is a primary partition with a FAT filesystem containing the uImage - which has to be named uImage.bin&lt;br /&gt;
* Partiton 2 is a Filesystem containing the root partition. According to the uBoot environment it should be an ext2 partiton, - but it seems like the standrd kernels from the buildhost don't support this. Will try to change the uBoot environemt variable so I can boot from ext3 - which should be supported by the kernel one day. &lt;br /&gt;
My hardware setup is:&lt;br /&gt;
* Latest uBoot (July 12, 2008)&lt;br /&gt;
* Freerunner (GTA02V5, 1st batch that could be regularily ordered from the openmoko online shop.)&lt;br /&gt;
The uBoot environment variable that should allow booting from my card reads:&lt;br /&gt;
 menu_1=Boot from microSD (FAT+ext2): setenv bootargs ${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts} ro; mmcinit; fatload mmc 1 0x32000000 ${sd_image_name}; bootm 0x32000000&lt;br /&gt;
As far as I know it should be changed after logging into uBoot by &lt;br /&gt;
 setenv menu_1 Boot from microSD (FAT+ext3): setenv bootargs ${bootargs_base} root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts}ro\; mmcinit\; fatload mmc 1 0x32000000 ${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
if we want to boot a stock kernel from sd card.&lt;br /&gt;
&lt;br /&gt;
But I have not been able to test it until now, though.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Talk:Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-07-13T09:17:10Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Booting the Freerunner from a SD card =&lt;br /&gt;
My Freerunner came with a &amp;quot;boot from SD card&amp;quot; option already installed in uBoot. I just needed a SD (Not HDMC) card with the following layout:&lt;br /&gt;
* Partition 1 is a primary partition with a FAT filesystem containing the uImage - which has to be named uImage.bin&lt;br /&gt;
* Partiton 2 is a Filesystem containing the root partition. According to the uBoot environment it should be an ext2 partiton, - but it seems like the standrd kernels from the buildhost don't support this. Will try to change the uBoot environemt variable so I can boot from ext3 - which should be supported by the kernel one day. &lt;br /&gt;
My hardware setup is:&lt;br /&gt;
* Latest uBoot (July 12, 2008)&lt;br /&gt;
* Freerunner (GTA02V5, 1st batch that could be regularily ordered from the openmoko online shop.)&lt;br /&gt;
The uBoot environment variable that should allow booting from my card reads:&lt;br /&gt;
 menu_1=Boot from microSD (FAT+ext2): setenv bootargs ${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts} ro; mmcinit; fatload mmc 1 0x32000000 ${sd_image_name}; bootm 0x32000000&lt;br /&gt;
As far as I know it should be changed after logging into uBoot by &lt;br /&gt;
 setenv menu_1 Boot from microSD (FAT+ext3): setenv bootargs ${bootargs_base} root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts}ro\; mmcinit\; fatload mmc 1 0x32000000 ${sd_image_name}\; bootm 0x32000000&lt;br /&gt;
if we want to boot a stock kernel from sd card.&lt;br /&gt;
&lt;br /&gt;
But I have not been able to test it until now, though.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Talk:Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-07-13T09:01:01Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Simpler way of booting from a SD card =&lt;br /&gt;
My freerunner came with a &amp;quot;boot from SD card&amp;quot; option already installed in uBoot. I just needed a SD (Not HDMC) card with the following layout:&lt;br /&gt;
* Partition 1 is a primary partition with a FAT filesystem containing the uImage - which has to be named uImage.bin&lt;br /&gt;
* Partiton 2 is a Filesystem containing the root partition. According to the uBoot environment it should be an ext2 partiton, - but it seems like the standrd kernels from the buildhost don't support this. Will try to change the uBoot environemt variable so I can boot from ext3 - which should be supported by the kernel one day. &lt;br /&gt;
My hardware setup is:&lt;br /&gt;
* Latest uBoot (July 12, 2008)&lt;br /&gt;
* Freerunner (GTA02V5, 1st batch that could be regularily ordered from the openmoko online shop.)&lt;br /&gt;
The uBoot environment variable that should allow booting from my card reads:&lt;br /&gt;
 menu_1=Boot from microSD (FAT+ext2): setenv bootargs ${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts} ro; mmcinit; fatload mmc 1 0x32000000 ${sd_image_name}; bootm 0x32000000&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Talk:Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-07-13T08:50:07Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Simpler way of booting from a SD card =&lt;br /&gt;
My freerunner came with a &amp;quot;boot from SD card&amp;quot; option already installed in uBoot. I just needed a SD (Not HDMC) card with the following layout:&lt;br /&gt;
* Partition 1 is a primary partition with a FAT filesystem containing the uImage - which has to be named uImage.bin&lt;br /&gt;
* Partiton 2 is a Filesystem containing the root partition. According to the uBoot environment it should be an ext2 partiton, - but it seems like the standrd kernels from the buildhost don't support this.&lt;br /&gt;
My hardware setup is:&lt;br /&gt;
* Latest uBoot (July 12, 2008)&lt;br /&gt;
* Freerunner (GTA02V5)&lt;br /&gt;
The uBoot environment variable reads:&lt;br /&gt;
 menu_1=Boot from microSD (FAT+ext2): setenv bootargs ${bootargs_base} rootfstype=ext2 root=/dev/mmcblk0p2 rootdelay=5 ${mtdparts} ro; mmcinit; fatload mmc 1 0x32000000 ${sd_image_name}; bootm 0x32000000&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Talk:Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-07-12T10:55:42Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Needed a different partition layout for my SD card */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Simpler way of booting from a SD card =&lt;br /&gt;
My freerunner came with a &amp;quot;boot from SD card&amp;quot; option already installed in uBoot. I just needed a SD (Not HDMC) card with the following layout:&lt;br /&gt;
* Partition 1 is a primary partition with a FAT filesystem containing the uImage - which has to be named uImage.bin&lt;br /&gt;
* Partiton 2 is a Filesystem containing the root partition. Still don't know what filesystem type it is supposed to be. Ext3 won't work. Will try Ext2 instead.&lt;br /&gt;
My hardware setup is:&lt;br /&gt;
* Latest uBoot (July 12, 2008)&lt;br /&gt;
* Freerunner (GTA02V5)&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot</id>
		<title>Talk:Booting the Neo FreeRunner from SD via U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Booting_the_Neo_FreeRunner_from_SD_via_U-Boot"/>
				<updated>2008-07-12T08:14:27Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Neede a different partition layout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Needed a different partition layout for my SD card =&lt;br /&gt;
I needed a SD (Not HDMC) card and needed the following layout:&lt;br /&gt;
* Partition 1 is a primary partition with a FAT filesystem containing the uImage&lt;br /&gt;
* Partiton 2 is a Ext3 Filesystem containing the root filesystem. Since the uImage from this partition is never used - it is not really important keeping it up-to-date.&lt;br /&gt;
&lt;br /&gt;
My hardware setup is:&lt;br /&gt;
* Latest uBoot (July 12, 2008)&lt;br /&gt;
* Freerunner (GTA02V5)&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-07-12T06:16:27Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Flashing your Freerunner with the newest u-boot binary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Phase0 Quick Start ==&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
The GTA01 uses the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader patches can be found at http://svn.openmoko.org/trunk/src/target/u-boot/patches/. &lt;br /&gt;
&lt;br /&gt;
Untar the sources, apply the patch, run &amp;quot;make gta01bv3_config&amp;quot; (or gta01bv2_config, or whatever hardware revision you have), run &amp;quot;make&amp;quot;.  You will get a resulting &amp;quot;u-boot.bin&amp;quot; image, which you can directly flash (either using existing bootloader or [[sjf2410-linux]]) into NAND.&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/snapshots in the subdirectory 200X.XX/images/.  It should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary right (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, lets see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
The problem disappeared at least for me by the command below on the host side. Please note that if you have usb keyboard or mouse then the command might cause trouble.. I only have PS/2 so I couldn't test it.&lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
=== Flashing your Freerunner with the newest u-boot binary ===&lt;br /&gt;
This is simple - even if I find it somehow scary to flash the bootloader of a device.&lt;br /&gt;
* Download the newest uBoot binary from http://downloads.openmoko.org/releases/Freerunner/&lt;br /&gt;
* start the cellular phone by pressing power whilst pressing the aux button.&lt;br /&gt;
* Run the following command:  &lt;br /&gt;
 dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin&lt;br /&gt;
* The device is now flashed: &lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface...&lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB...&lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name=&amp;quot;u-boot&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 bytes_per_hash=4316&lt;br /&gt;
 Starting download: [##################################################] finished!&lt;br /&gt;
 state(2) = dfuIDLE, status(0) = No error condition is present &lt;br /&gt;
 Done!&lt;br /&gt;
 Resetting USB to switch back to runtime mode&lt;br /&gt;
* The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.&lt;br /&gt;
[[Category:Software (non openmoko)]]&lt;br /&gt;
[[Category:Kernel]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/U-Boot</id>
		<title>U-Boot</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/U-Boot"/>
				<updated>2008-07-12T06:12:19Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* USB connectivity problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Bootloader}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Bootloader}}&lt;br /&gt;
[[Image:GTA01-U-Boot.JPG|thumb|300px|u-boot menu on Neo1973]] [[Image:Neo1973 uboot splash closeup.jpg|thumb|300px|u-boot splash screen on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
The bootloader on the [[Neo1973]], '''U-Boot''', takes care of device functionality until [[Openmoko]] is booted. This includes [[USB DFU]] for [[flashing Openmoko]], a splash screen, a boot menu, a console for [[bootloader commands]], configuration via [[bootloader environment]], and loading a [[kernel]]. &lt;br /&gt;
&lt;br /&gt;
There are various [[bootloader versions]] available.&lt;br /&gt;
&lt;br /&gt;
== Phase0 Quick Start ==&lt;br /&gt;
* Make sure that your phone has had the battery and USB cable removed for at least 30 seconds.&lt;br /&gt;
* Connect the Neo (ie not Debug Board) to a Linux host with the USB cable.&lt;br /&gt;
* Hold in the AUX button on power-up to access the boot menu.&lt;br /&gt;
* Set the console to USB.&lt;br /&gt;
* Connect to /dev/ttyACM0 with a terminal program on the Linux host (you might need to chown uucp.uucp /dev/ttyACM0 )&lt;br /&gt;
* Note that the cdc_acm /dev/ttyACM0 access disappears as soon as the Neo boots, and is replaced by the cdc_ether usb0 network access.&lt;br /&gt;
* You're now at the bootloader prompt.&lt;br /&gt;
* Set the bootdelay uboot environment variable to -1 if you want it to always halt at the bootloader on power-up.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
The GTA01 uses the [http://u-boot.sourceforge.net/ u-boot] bootloader.&lt;br /&gt;
&lt;br /&gt;
More information on u-boot can be found at &lt;br /&gt;
* http://www.denx.de/wiki/DULG&lt;br /&gt;
* http://www.gumstix.org/tikiwiki/tiki-index.php?page=U-Boot&lt;br /&gt;
* http://linuxdevices.com/articles/AT5085702347.html&lt;br /&gt;
&lt;br /&gt;
Additions to the vanilla u-boot already implemented include: &lt;br /&gt;
* Support for boot from NAND flash using [[S3C2410 Steppingstone]]&lt;br /&gt;
* Support for S3C2410 NAND flash&lt;br /&gt;
* Support for downloading programs via S3C2410 USB Device Controller&lt;br /&gt;
* Support to display bootup logo / status on S3C2410 Framebuffer&lt;br /&gt;
&lt;br /&gt;
However, u-boot still doesn't support many of the features that GTA01 needs, such as&lt;br /&gt;
* Support for reading kernel/initrd from SD/Transflash&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte|HaraldWelte]] is working on those issues, and in fact most of them have already been implemented.&lt;br /&gt;
&lt;br /&gt;
== Bootloader source code ==&lt;br /&gt;
&lt;br /&gt;
The current bootloader patches can be found at http://svn.openmoko.org/trunk/src/target/u-boot/patches/. &lt;br /&gt;
&lt;br /&gt;
Untar the sources, apply the patch, run &amp;quot;make gta01bv3_config&amp;quot; (or gta01bv2_config, or whatever hardware revision you have), run &amp;quot;make&amp;quot;.  You will get a resulting &amp;quot;u-boot.bin&amp;quot; image, which you can directly flash (either using existing bootloader or [[sjf2410-linux]]) into NAND.&lt;br /&gt;
&lt;br /&gt;
== Bootloader binary ==&lt;br /&gt;
&lt;br /&gt;
The latest bootloader binary builds can be found under http://buildhost.openmoko.org/snapshots in the subdirectory 200X.XX/images/.  It should be written to the NAND flash address 0x00000000 (size 0x30000) (the first [[partition]]).&lt;br /&gt;
&lt;br /&gt;
== Bootloader development ==&lt;br /&gt;
&lt;br /&gt;
=== QT2410 ===&lt;br /&gt;
If you want to do bootloader development on the QT2410, it's easier to work with a bootloader image that can be downloaded via USB into RAM instead of flashing.&lt;br /&gt;
&lt;br /&gt;
To do so, you need to edit the u-boot/include/configs/qt2410.h file, and change the &amp;quot;if 0&amp;quot; in Line 32 into a &amp;quot;if 1&amp;quot;, then recompile with &amp;quot;make&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The resulting &amp;quot;u-boot.bin&amp;quot; is _NOT SUITABLE_ for NAND flash, but only for direct execution from within ram, e.g. by using the [[s3c2410_boot_usb]] program.&lt;br /&gt;
&lt;br /&gt;
=== GTA01 ===&lt;br /&gt;
&lt;br /&gt;
Doing bootloader development on the GTA01 is a bit more tricky.  first, we don't have any NOR flash.  Second, there is no other way to boot _but_ from NAND.  Therefore, we also don't have a USB downloader like the QT2410.&lt;br /&gt;
&lt;br /&gt;
The main problem is:  The [[S3C2410 Steppingstone]] unconditionally copies the first 4k of flash into its internal SRAM.   That SRAM segment stays unconditionally mapped at physical address zero. How do we get around this&lt;br /&gt;
&lt;br /&gt;
=== GTA02 ===&lt;br /&gt;
&lt;br /&gt;
The first block holds a little 4KByte RAM buffer that is auto-filled&lt;br /&gt;
from NAND by CPU hardware, called &amp;quot;steppingstone&amp;quot; when we boot from&lt;br /&gt;
NAND, or the NOR is mapped in there.&lt;br /&gt;
&lt;br /&gt;
nCS0: 00000000 07FFFFFF  4K steppingstone or NOR (Aux held down) &amp;lt;br&amp;gt;&lt;br /&gt;
nCS1: 08000000 0FFFFFFF  Glamo  &amp;lt;br&amp;gt;&lt;br /&gt;
nCS2: 10000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS3: 18000000 1FFFFFFF  NOR &amp;lt;br&amp;gt;&lt;br /&gt;
nCS4: 20000000 17FFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS5: 28000000 2FFFFFFF  nothing mapped &amp;lt;br&amp;gt;&lt;br /&gt;
nCS6: 30000000 37FFFFFF  on-MCP SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
nCS7: 38000000 3FFFFFFF  external SDRAM 128MB &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using JTAG to boot from RAM ====&lt;br /&gt;
&lt;br /&gt;
So how can we boot from RAM? We use JTAG / OpenOCD to&lt;br /&gt;
&lt;br /&gt;
* Reset and halt the cpu at PC=0&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; reset halt&lt;br /&gt;
target halted in ARM state due to debug request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400000d3 pc: 0x00000000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download a small piece of code for low-level SDRAM timing initialization (overwrite 4k SRAM of steppingstone)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/board/gta01/lowlevel_foo.bin 0            &lt;br /&gt;
downloaded 332 byte in 0s 21899us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Assert a break point at address 0x33f80000 (which indicates that the low-level code has finished)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; bp 0x33f80000 4 hw&lt;br /&gt;
breakpoint added at address 0x33f80000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Run the code up to the break point&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;gt; Target 0 halted&lt;br /&gt;
target halted in ARM state due to breakpoint, current mode: Supervisor&lt;br /&gt;
cpsr: 0x600000d3 pc: 0x33f80000&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Download the u-boot RAM image to 0x33f80000&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; load_binary /space/misc/gta01/u-boot.git/u-boot.bin 0x33f80000&lt;br /&gt;
downloaded 135692 byte in 6s 567264us&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Resume processing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
Target 0 resumed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, the display backlight gets bright and we see the following familiar prompt on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.1.6 (Jan 13 2007 - 23:44:23)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
*** Warning - bad CRC or NAND, using default environment&lt;br /&gt;
&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv2 # &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating bootable images ==&lt;br /&gt;
&lt;br /&gt;
u-boot needs bootable images (such as kernels, but also initrd and others) in form of a so-called ''uImage''.  In order to create a ''uImage'' from e.g. a ''vmlinux'' kernel image, you can proceed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
objcopy -O binary -R .note -R .comment -S vmlinux linux.bin&lt;br /&gt;
gzip -9 linux.bin&lt;br /&gt;
u-boot/tools/mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n &amp;quot;Kernel Image QT2410&amp;quot; -d linux.bin.gz uImage&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot menu ==&lt;br /&gt;
[[Image:Neo1973 uboot menu.jpg|thumb|400px|u-boot boot menu on Neo1973]]&lt;br /&gt;
&lt;br /&gt;
As of the Phase-0 release, our u-boot version now features an on-screen boot menu. The items are defined by [[bootloader environment#menu|menu entries in the environment]].&lt;br /&gt;
&lt;br /&gt;
=== Accessing the boot menu ===&lt;br /&gt;
&lt;br /&gt;
You can access the boot menu by pressing and holding the [[Neo1973 AUX Button]] together with the power button while switching the phone on.&lt;br /&gt;
&lt;br /&gt;
=== Using the boot menu ===&lt;br /&gt;
&lt;br /&gt;
By pressing the [[Neo1973 AUX Button]] you can cycle through the menu items.  Use the ''POWER'' button to select one item. &lt;br /&gt;
&lt;br /&gt;
== Bootloader prompt ==&lt;br /&gt;
&lt;br /&gt;
=== Accessing the bootloader prompt ===&lt;br /&gt;
The bootloader prompt is available either on the serial console (via [[Debug Board]]), or as virtual USB Serial device (USB CDC_ACM).&lt;br /&gt;
Whether the serial port or usb is used depends on the u-boot environment variables '''stdin''', '''stdout''' and '''stderr'''.&lt;br /&gt;
&lt;br /&gt;
Whether or not you use usbtty, the first couple of messages will always be displayed on the serial console.&lt;br /&gt;
&lt;br /&gt;
The bootloader is currently configured to wait for three seconds.  If a key press on the '''stdin''' is received within those three seconds, auto-boot is aborted.&lt;br /&gt;
&lt;br /&gt;
==== Using usbtty from Linux ====&lt;br /&gt;
&lt;br /&gt;
Just by connecting the phone in u-boot mode to your Linux pc should make it detect a [[CDC ACM]] device, and you should get a new tty device called /dev/ttyACM0. If not, enable the CONFIG_USB_ACM (Device Drivers -&amp;gt; USB support -&amp;gt; USB Modem (CDC ACM) support). (Instructions for MacOS users are [[MacOS_X#USB_Serial|here]])&lt;br /&gt;
&lt;br /&gt;
Use your favourite terminal emulator (minicom, cu, zc, screen ...) to access it like any other serial port. If you don't have a favorite, try just: (cu is in the taylor-uucp package, use &amp;quot;apt-get install cu&amp;quot; if it is not yet installed)&lt;br /&gt;
 cu -l /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
You might need to &lt;br /&gt;
 chown uucp.uucp /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
to get the necessary right (even as root).&lt;br /&gt;
&lt;br /&gt;
A nice alternative for cu is Werner Almesberger's [[NeoCon|neocon]].&lt;br /&gt;
&lt;br /&gt;
First, you should try to check whether the USB device shows up in 'lsusb' while you're running in u-boot mode:&lt;br /&gt;
&lt;br /&gt;
 # lsusb -d 1457:5119&lt;br /&gt;
 Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
&lt;br /&gt;
Second, lets see some more details about the available endpoints and configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsusb -v -d 1457:5119&lt;br /&gt;
Bus 005 Device 079: ID 1457:5119  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            2 Communications&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        16&lt;br /&gt;
  idVendor           0x1457 &lt;br /&gt;
  idProduct          0x5119 &lt;br /&gt;
  bcdDevice            0.00&lt;br /&gt;
  iManufacturer           1 OpenMoko, Inc&lt;br /&gt;
  iProduct                2 Neo1973 Bootloader U-Boot 1.2.0-g6c7cac8c-dirty-moko3&lt;br /&gt;
  iSerial                 3 0000000&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           85&lt;br /&gt;
    bNumInterfaces          3&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 TTY via USB&lt;br /&gt;
    bmAttributes         0xc0&lt;br /&gt;
      Self Powered&lt;br /&gt;
    MaxPower                0mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         2 Communications&lt;br /&gt;
      bInterfaceSubClass      2 Abstract (modem)&lt;br /&gt;
      bInterfaceProtocol      1 AT-commands (v.25ter)&lt;br /&gt;
      iInterface              6 Control Interface&lt;br /&gt;
      CDC Header:&lt;br /&gt;
        bcdCDC               0.6e&lt;br /&gt;
      CDC Call Management:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
        bDataInterface          1&lt;br /&gt;
      CDC ACM:&lt;br /&gt;
        bmCapabilities       0x00&lt;br /&gt;
      CDC Union:&lt;br /&gt;
        bMasterInterface        0&lt;br /&gt;
        bSlaveInterface         1 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        10 CDC Data&lt;br /&gt;
      bInterfaceSubClass      0 Unused&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              5 Bulk Data Interface&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x83  EP 3 IN&lt;br /&gt;
        bmAttributes            2&lt;br /&gt;
          Transfer Type            Bulk&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0010  1x 16 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              7 USB Device Firmware Upgrade&lt;br /&gt;
Device Status:     0x0001&lt;br /&gt;
  Self Powered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, you can access it using your favourite terminal program.&lt;br /&gt;
&lt;br /&gt;
Then, if the environment is not set correctly, you will need to use the current console (e.g. serial console) to change the [[bootloader environment#console|console entries in the environment]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GTA01Bv2 # setenv stderr usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdout usbtty&lt;br /&gt;
GTA01Bv2 # setenv stdin usbtty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Typical u-boot prompt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
U-Boot 1.2.0-moko1 (Feb 16 2007 - 00:36:13)&lt;br /&gt;
&lt;br /&gt;
DRAM:  128 MB&lt;br /&gt;
NAND:  64 MiB&lt;br /&gt;
Found Environment offset in OOB..&lt;br /&gt;
Video: 640x480x8 31kHz 59Hz&lt;br /&gt;
USB:   S3C2410 USB Deviced&lt;br /&gt;
In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Hit any key to stop autoboot:  0 &lt;br /&gt;
GTA01Bv3 #&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Commands on the bootloader prompt ===&lt;br /&gt;
&lt;br /&gt;
:''See [[bootloader commands]].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Device Firmware Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Our version of u-boot also implements [[USB DFU]]. This can be useful to&lt;br /&gt;
load files and kernel for quick testing.&lt;br /&gt;
&lt;br /&gt;
To find out whether your version of u-boot supports this, use the output of&lt;br /&gt;
 $ lsusb -v -d 1457:5119&lt;br /&gt;
while the phone is in u-boot mode.&lt;br /&gt;
&lt;br /&gt;
If it supports DFU, you should see the following snippet towards the end of the output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        2&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           0&lt;br /&gt;
      bInterfaceClass       254 Application Specific Interface&lt;br /&gt;
      bInterfaceSubClass      1 Device Firmware Update&lt;br /&gt;
      bInterfaceProtocol      1 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information on how to do firmware upgrades, please see [[dfu-util]].&lt;br /&gt;
&lt;br /&gt;
=== Booting files over DFU ===&lt;br /&gt;
&lt;br /&gt;
To load a file at memory address 0x32000000:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dfu-util -a 0 -D fileToLoad -R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, send 'bootm 0x32000000' to u-boot or 'bootelf 0x32000000' if&lt;br /&gt;
its an elf file.&lt;br /&gt;
&lt;br /&gt;
Simple python script that can boot an ELF image - avoiding a ACM bug that breaks on large packets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
cmd1 = &amp;quot;neo backlight off\n&amp;quot;&lt;br /&gt;
cmd2 = &amp;quot;bootelf 0x32000000\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def output(tty, str):&lt;br /&gt;
    for x in str:&lt;br /&gt;
        tty.write(x)&lt;br /&gt;
        tty.flush()&lt;br /&gt;
&lt;br /&gt;
if len(sys.argv) == 2:&lt;br /&gt;
    print &amp;quot;Loading %s...&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    loadfile = &amp;quot;dfu-util -a 0 -D %s -R&amp;quot; % sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
    os.system(loadfile)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(3)&lt;br /&gt;
&lt;br /&gt;
    tty = open(&amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;a&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    output(tty, cmd1)&lt;br /&gt;
    output(tty, cmd2)&lt;br /&gt;
&lt;br /&gt;
    tty.close()&lt;br /&gt;
else:&lt;br /&gt;
    print &amp;quot;Usage: %s elffile&amp;quot; % sys.argv[0]&lt;br /&gt;
    print &amp;quot;&amp;quot;&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== USB connectivity problems ===&lt;br /&gt;
&lt;br /&gt;
I once got errors like this (in dmesg or /var/log/messages) on the host side while connecting the neo in u-boot:&lt;br /&gt;
&lt;br /&gt;
 usb 2-1: device descriptor read/64, error -110&lt;br /&gt;
 usb usb2: Controller not stopped yet!&lt;br /&gt;
&lt;br /&gt;
The problem disappeared at least for me by the command below on the host side. Please note that if you have usb keyboard or mouse then the command might cause trouble.. I only have PS/2 so I couldn't test it.&lt;br /&gt;
&lt;br /&gt;
 rmmod uhci_hcd ; modprobe uhci_hcd&lt;br /&gt;
&lt;br /&gt;
=== Flashing your Freerunner with the newest u-boot binary ===&lt;br /&gt;
This is simple - even if I find it somehow scary to flash the&lt;br /&gt;
- start the cellular phone by pressing power whilst pressing the aux button.&lt;br /&gt;
- Run the following command:  &lt;br /&gt;
 dfu-util -a u-boot -R -D uboot-gta02v5-latest.bin&lt;br /&gt;
- The device is now flashed: &lt;br /&gt;
 dfu-util - (C) 2007 by OpenMoko Inc.&lt;br /&gt;
 This program is Free Software and has ABSOLUTELY NO WARRANTY&lt;br /&gt;
 &lt;br /&gt;
 Opening USB Device 0x0000:0x0000...&lt;br /&gt;
 Claiming USB DFU Runtime Interface...&lt;br /&gt;
 Determining device status: state = appIDLE, status = 0&lt;br /&gt;
 Device really in Runtime Mode, send DFU detach request...&lt;br /&gt;
 Resetting USB...&lt;br /&gt;
 Opening USB Device...&lt;br /&gt;
 Found Runtime: [0x1d50:0x5119] devnum=9, cfg=0, intf=0, alt=1, name=&amp;quot;u-boot&amp;quot;&lt;br /&gt;
 Claiming USB DFU Interface...&lt;br /&gt;
 Setting Alternate Setting ...&lt;br /&gt;
 Determining device status: state = dfuIDLE, status = 0&lt;br /&gt;
 dfuIDLE, continuing&lt;br /&gt;
 Transfer Size = 0x1000&lt;br /&gt;
 bytes_per_hash=4316&lt;br /&gt;
 Starting download: [##################################################] finished!&lt;br /&gt;
 state(2) = dfuIDLE, status(0) = No error condition is present &lt;br /&gt;
 Done!&lt;br /&gt;
 Resetting USB to switch back to runtime mode&lt;br /&gt;
&lt;br /&gt;
The last message (status(0)) tells us everything just worked fine - at the next boot the device will be started by the newest uboot loader.&lt;br /&gt;
[[Category:Software (non openmoko)]]&lt;br /&gt;
[[Category:Kernel]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:MokoMakefile</id>
		<title>Talk:MokoMakefile</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:MokoMakefile"/>
				<updated>2008-07-11T07:15:47Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* The lib64 issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MokoMakefile won't work on Ubuntu Hardy Heron ==&lt;br /&gt;
Hello, there!&lt;br /&gt;
&lt;br /&gt;
Since my upgrade to Hardy Heron MokoMakefile seems to be broken on my ubuntu box. I already tried several times to download a new Makefile into a fresh directory - without success. What I get is always:&lt;br /&gt;
&lt;br /&gt;
 :~/moko$ make image&lt;br /&gt;
 ( cd build &amp;amp;&amp;amp; . ../setup-env &amp;amp;&amp;amp; \&lt;br /&gt;
           ( bitbake openmoko-devel-image u-boot-openmoko ) )&lt;br /&gt;
 ERROR:  Openembedded's config sanity checker detected a potential misconfiguration.&lt;br /&gt;
         Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).&lt;br /&gt;
         Following is the list of potential problems / advisories:&lt;br /&gt;
 &lt;br /&gt;
         /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).&lt;br /&gt;
 &lt;br /&gt;
 make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&lt;br /&gt;
For another report on this problem see also: http://lists.openmoko.org/pipermail/community/2008-May/017545.html&lt;br /&gt;
&lt;br /&gt;
When trying to compile the april software update (ASU) this error doesn't occour, though.&lt;br /&gt;
&lt;br /&gt;
=== solution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudoedit /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add 'vm.mmap_min_addr = 0' (without quotes) to that file.&lt;br /&gt;
&lt;br /&gt;
== The paths that are mentioned on this page are partially wrong ==&lt;br /&gt;
I am not sure enough what the paths should be, but - two things have changed since the section &amp;quot;developing with mokomakefile/How to add your own shiny new application&amp;quot; of this page was created:&lt;br /&gt;
 - The path where the packages are kept, and&lt;br /&gt;
 - Where to add the information that we have added a new package.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu Edgy: Update git-1.4.x to 1.5.x! ==&lt;br /&gt;
With old git-1.4.x, fetching uboot does not work: Use 1.5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: package uboot-gta01-1.2.0+svnnow-r4_14da5f7675bbb427c469e3f45006e027b6e21db9_0_1811: task do_fetch: started&lt;br /&gt;
fatal: corrupted pack file .git/objects/pack/pack-a146bcbc18f4826d6bf2a7f63be5dd77bbb5b2f5.pack&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fails on a 32bit machine - try again without ccache? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/bin/sh ./libtool --mode=compile     ccache     gcc -DHAVE_CONFIG_H -I.... -W... -O2 -c -o libbfd.lo build/tmp/work/armv4t-linux/binutils-cross-2.17-r0/binutils-2.17/bfd/libbfd.c&lt;br /&gt;
ccache gcc -DHAVE_CONFIG_H -I... -W... -O2 -c  /usr/local/oe/build/tmp/work/armv4t-linux/binutils-cross-2.17-r0/binutils-2.17/bfd/libbfd.c -o   t shift count &amp;gt;= width of type&lt;br /&gt;
make[5]: *** [libbfd.lo] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any insight here? --[[User:Adam|Adam]] 23:10, 15 May 2007 (CEST)&lt;br /&gt;
: Try without ccache (did you get it compiled meanwhile or can we remove this?) --[[User:BernhardKaindl|BernhardKaindl]] 23:05, 19 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Facing Problems with ogg libraries ==&lt;br /&gt;
just get the path and delete the .bb file that causes the problem&lt;br /&gt;
== Building on Fedora Core 6 ==&lt;br /&gt;
&lt;br /&gt;
Install stuff needed for OpenMoko:&lt;br /&gt;
  # yum install python m4 make wget curl ftp cvs monotone subversion \&lt;br /&gt;
    tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html \&lt;br /&gt;
    diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds \&lt;br /&gt;
    docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git \&lt;br /&gt;
    quilt groff linuxdoc-tools patch compat-gcc-34 lynx netpbm&lt;br /&gt;
(notice ''compat-gcc-34'' wich was needed for FC6 (gcc 4 installed), and ''lynx'' which is needed by ''qemu'' (no fallback to ''wget'', ''curl'', or ''links'' at the moment and no check for it, resulting in strange &amp;quot;sleep&amp;quot; errors when trying to build without ''lynx'').&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
  $ make setup&lt;br /&gt;
  $ make openmoko-devel-image&lt;br /&gt;
  $ unset LD_LIBRARY_PATH&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;
I have also done a&lt;br /&gt;
  $ unset LD_LIBRARY_PATH; make update-makefile &amp;amp;&amp;amp; nice  make update &amp;amp;&amp;amp; nice make setup &amp;amp;&amp;amp; nice make all&lt;br /&gt;
(This takes several hours)&lt;br /&gt;
&lt;br /&gt;
Build qemu:&lt;br /&gt;
  $ make qemu&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
  # echo 1024 &amp;gt; /proc/sys/dev/rtc/max-user-freq&lt;br /&gt;
  $ make run-qemu&lt;br /&gt;
This will bring up the OpenMoko :) Use SPACE for AUX and ENTER for POWER.&lt;br /&gt;
Not quite the same as holding a Neo1973 in your hands I would guess, but this is the best we can do for now. Thanks!&lt;br /&gt;
&lt;br /&gt;
== Building on Ubuntu Feisty ==&lt;br /&gt;
&lt;br /&gt;
MokoMakefile requires more than 512 MB of RAM + Swap space (around 1GB?).&lt;br /&gt;
&lt;br /&gt;
If you need swap, please '''check that its size under Feisty is not null'''!&lt;br /&gt;
&lt;br /&gt;
[https://bugs.launchpad.net/ubuntu/+bug/105490 Bug #105490] describes the current issue and offers a workaround (23 Jul 07).&lt;br /&gt;
&lt;br /&gt;
== Fails trying to build bluez-utils == &lt;br /&gt;
on Gentoo Linux, it fails compiling bluez-utils (I've tried also &amp;quot;make clean-package-bluez-utils&amp;quot; before the following command)&lt;br /&gt;
&lt;br /&gt;
do a &amp;quot;make build-package-libusb; make clean-package-bluez-utils&amp;quot; and it should continue (the bluez-utils .bb is missing the libusb dependency)&lt;br /&gt;
&lt;br /&gt;
== openSUSE 10.1 and 10.2 workarounds ==&lt;br /&gt;
&lt;br /&gt;
ltrace package fails to build with error: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
checking for pid_t... yes&lt;br /&gt;
checking for getopt... yes&lt;br /&gt;
checking for getopt_long... yes&lt;br /&gt;
checking gelf.h usability... no&lt;br /&gt;
checking gelf.h presence... no&lt;br /&gt;
checking for gelf.h... no&lt;br /&gt;
configure: error: ***** gelf.h not found *****&lt;br /&gt;
FATAL: oe_runconf failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''FIX: '''&lt;br /&gt;
edit ''/home/moko/build/tmp/work/armv4t-linux/ltrace-0.4-r0/ltrace-0.4/configure.ac''&lt;br /&gt;
at line 44: remove the following block:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for path in /usr/include/elfutils /usr/local/include/elfutils \&lt;br /&gt;
       /usr/include/libelf /usr/local/include/libelf; do&lt;br /&gt;
   if test -f ${path}/gelf.h; then&lt;br /&gt;
       CPPFLAGS=&amp;quot;$CPPFLAGS -I ${path}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
( it adds /usr/include/elfutils to path, which causes cross-compile badness error )&lt;br /&gt;
&lt;br /&gt;
=== QEMU build fails to compile USB code ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void&lt;br /&gt;
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_handle_control':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:103: error: invalid application of `sizeof' to incomplete type `usbdevfs_ctrltran&lt;br /&gt;
sfer'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_handle_data':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:120: error: storage size of 'bt' isn't known&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:132: error: invalid application of `sizeof' to incomplete type `usbdevfs_bulktran&lt;br /&gt;
sfer'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:120: warning: unused variable `bt'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_device_open':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:199: error: storage size of 'ctrl' isn't known&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:202: error: invalid application of `sizeof' to incomplete type `usbdevfs_ioctl'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:199: warning: unused variable `ctrl'&lt;br /&gt;
make[2]: *** [usb-linux.o] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''FIX: '''&lt;br /&gt;
edit ''/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c''&lt;br /&gt;
at line 29 add the following (before ''#include &amp;lt;linux/usbdevice_fs.h&amp;gt;'')&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;linux/compiler.h&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
hint: there is a copy of the file in ''/home/moko/build/tmp/work/i686-linux/qemu-native-0.9.0+cvs20070613-r5/qemu/usb-linux.c''&lt;br /&gt;
&lt;br /&gt;
''see: http://osdir.com/ml/emulators.kvm.devel/2007-01/msg00101.html''&lt;br /&gt;
&lt;br /&gt;
== Cannot satisfy fstests ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  make openmoko-devel-image&lt;br /&gt;
...&lt;br /&gt;
| Collected errors:&lt;br /&gt;
| ERROR: Cannot satisfy the following dependencies for task-openmoko-debug:&lt;br /&gt;
|        fstests&lt;br /&gt;
NOTE: Task failed: /no-backup/Moko/build/tmp/work/fic-gta01-linux/openmoko-devel-image-1.0-r0/temp/log.do_rootfs.25036&lt;br /&gt;
NOTE: package openmoko-devel-image-1.0-r0: task do_rootfs: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Failed on debian etch 2007-07-20&lt;br /&gt;
Solution from mailing list post from hardskinone, report of an irc chat&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I got help in IRC channel. I do following steps&lt;br /&gt;
     * remove fstest from oe/packages/tasks/task-openmoko.bb ,&lt;br /&gt;
     * increase PR field by one&lt;br /&gt;
     * make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== conflicting types for 'futimens' ==&lt;br /&gt;
&lt;br /&gt;
if you encounter the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 | In file included from utimecmp.c:40:&lt;br /&gt;
 | utimens.h:2: error: conflicting types for 'futimens'&lt;br /&gt;
 | /usr/include/sys/stat.h:370: error: previous declaration of 'futimens' was here&lt;br /&gt;
&lt;br /&gt;
a patch is needed because your glibc is too new. grab &amp;amp; enable the patch as follows &lt;br /&gt;
&lt;br /&gt;
 cd openembedded/packages/coreutils&lt;br /&gt;
 mv coreutils_5.3.0.bb coreutils_5.3.0.orig&lt;br /&gt;
 wget http://www.openembedded.org/repo/org.openembedded.dev/packages/coreutils/coreutils_5.3.0.bb&lt;br /&gt;
 cd -&lt;br /&gt;
 cd openembedded/packages/coreutils/coreutils-5.3.0&lt;br /&gt;
 wget http://www.openembedded.org/repo/org.openembedded.dev/packages/coreutils/coreutils-5.3.0/futimens.patch&lt;br /&gt;
 cd -&lt;br /&gt;
&lt;br /&gt;
== Workaround for problems compiling mtd-utils ==&lt;br /&gt;
&lt;br /&gt;
Change the line on &amp;lt;code&amp;gt;openembedded/packages/mtd/mtd-utils_1.0.0+git.bb&amp;lt;/code&amp;gt; which reads:&lt;br /&gt;
&lt;br /&gt;
 SRC_URI = &amp;quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=master \&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 SRC_URI = &amp;quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=a6fa706fe9e7696b4b2045edf9698c3bac07e3e3 \&lt;br /&gt;
&lt;br /&gt;
which forces the recipe to use an older revision (the one which worked last time I built the image on my computer).&lt;br /&gt;
&lt;br /&gt;
Be sure to remember to undo the change later, or else you will not get any new changes to that package. --[[User:CesarB|CesarB]] 04:48, 25 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Note: these patches should be updated - the lzo patch is included in the current version, so backing off to the previous version and repatching seems silly.   I was able to make it through this part of the build by applying the remaining patches manually. --[[User:Mellon|Ted Lemon]] 15:44, 29 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Monotone segfaulting on Ubuntu Feisty Fawn/PPC ==&lt;br /&gt;
If you are running Ubuntu Feisty Fawn on a PowerPC computer you will experience problems running monotone. To fix this issue you need to install monotone as well as the libboost packages from Gutsy. The easiest way to accomplish this is to add the gutsy repositories to your sources.list&lt;br /&gt;
and change the preferences to look like this:&lt;br /&gt;
&lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: release a=feisty&lt;br /&gt;
 Pin-Priority: 700&lt;br /&gt;
 &lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: -100&lt;br /&gt;
 &lt;br /&gt;
 Package: libc6 libc6-dev tzdata util-linux libgcc1 libstdc++6 monotone   &lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: 800&lt;br /&gt;
 &lt;br /&gt;
 Package: libboost-*&lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: 800&lt;br /&gt;
&lt;br /&gt;
After doing this install monotone in this way:&lt;br /&gt;
 apt-get -t gutsy install monotone.&lt;br /&gt;
That should install monotone 0.35 with updated (and working) boost libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fails on ncurses install in Fedora 7 with a &amp;quot;tic -x&amp;quot; message ==&lt;br /&gt;
Adjust the following command to your system, then run it:&lt;br /&gt;
 export LD_LIBRARY_PATH=/home/moko/build/tmp/work/x86_64-linux/ncurses-native-5.4-r8/ncurses-5.4/lib&lt;br /&gt;
Then start make again and it should pick up where it left off.&lt;br /&gt;
&lt;br /&gt;
You can get a list of potential paths to use with the following command from you main moko directory:&lt;br /&gt;
 find . | grep libncurses&lt;br /&gt;
&lt;br /&gt;
The basic problem is that it is linking against your main system libraries instead of the OpenEmbedded ones.&lt;br /&gt;
&lt;br /&gt;
There's probably a cleaner way of handling this - please update this entry if you know it.&lt;br /&gt;
&lt;br /&gt;
This has been fixed in Openembedded, see [http://bugs.openembedded.org/show_bug.cgi?id=2554 Openembedded Bug #2554] for further details.&lt;br /&gt;
&lt;br /&gt;
== uboot-gta01 fails to build ==&lt;br /&gt;
Changes in the GIT of U-Boot make the OpenMoko patches unapplyable. For the use of Revision ''cc3023b9f95d7ac959a764471a65001062aecf41'' and everything will be fine for now.&lt;br /&gt;
&lt;br /&gt;
== Perl fails to build ==&lt;br /&gt;
After following every bit of advice I can find to 'make clean' and nuke the perl build directories, every build comes up with:&lt;br /&gt;
&lt;br /&gt;
 | make[1]: Entering directory `/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7'&lt;br /&gt;
 | make[1]: *** No rule to make target `&amp;lt;command-line&amp;gt;', needed by `miniperlmain.o'.  Stop.&lt;br /&gt;
 | make[1]: Leaving directory `/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7'&lt;br /&gt;
 | FATAL: oe_runmake failed&lt;br /&gt;
 NOTE: Task failed: /src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/temp/log.do_compile.19531&lt;br /&gt;
 NOTE: package perl-native-5.8.7-r3: task do_compile: failed&lt;br /&gt;
&lt;br /&gt;
Solution turned out to be editing &lt;br /&gt;
/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7/makedepend.SH and at line 169 change the regexp to eat references to &amp;quot;&amp;lt;command.line&amp;gt;&amp;quot; to catch what was leaking through.&lt;br /&gt;
&lt;br /&gt;
== Gettext fails to build ==&lt;br /&gt;
Gettext's build is broken unless you have emacs installed. Crazy though it seems. You will see an error like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| WARNING: Warnings can be ignored. :-)&lt;br /&gt;
| if test &amp;quot;no&amp;quot; != no; then \&lt;br /&gt;
|         set x; \&lt;br /&gt;
|         list='po-mode.el po-compat.el'; for p in $list; do \&lt;br /&gt;
|           if test -f &amp;quot;$p&amp;quot;; then d=; else d=&amp;quot;./&amp;quot;; fi; \&lt;br /&gt;
|           set x &amp;quot;$@&amp;quot; &amp;quot;$d$p&amp;quot;; shift; \&lt;br /&gt;
|         done; \&lt;br /&gt;
|         shift; \&lt;br /&gt;
|         EMACS=&amp;quot;no&amp;quot; /bin/bash ../../config/elisp-comp &amp;quot;$@&amp;quot; || exit 1; \&lt;br /&gt;
| if test &amp;quot;no&amp;quot; != no; then \&lt;br /&gt;
|         set x; \&lt;br /&gt;
|         list='po-mode.el po-compat.el'; for p in $list; do \&lt;br /&gt;
|           if test -f &amp;quot;$p&amp;quot;; then d=; else d=&amp;quot;./&amp;quot;; fi; \&lt;br /&gt;
|           set x &amp;quot;$@&amp;quot; &amp;quot;$d$p&amp;quot;; shift; \&lt;br /&gt;
|         done; \&lt;br /&gt;
|         shift; \&lt;br /&gt;
|         EMACS=&amp;quot;no&amp;quot; /bin/bash ../../config/elisp-comp &amp;quot;$@&amp;quot; || exit 1; \&lt;br /&gt;
|       else : ; fi&lt;br /&gt;
| mv: cannot move `elc-temp' to `elc-stamp': No such file or directory&lt;br /&gt;
| make[5]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[5]: *** [elc-stamp] Error 1&lt;br /&gt;
| make[5]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[4]: *** [po-mode.elc] Error 2&lt;br /&gt;
| make[4]: *** Waiting for unfinished jobs....&lt;br /&gt;
| make[4]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[3]: *** [all-recursive] Error 1&lt;br /&gt;
| make[3]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools'&lt;br /&gt;
| make[2]: *** [all] Error 2&lt;br /&gt;
| make[2]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools'&lt;br /&gt;
| make[1]: *** [all-recursive] Error 1&lt;br /&gt;
| make[1]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1'&lt;br /&gt;
| FATAL: oe_runmake failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is simple - install emacs (example below for debian/ubuntu) and try again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install emacs&lt;br /&gt;
make clean-package-gettext-native-0.14.1-r5&lt;br /&gt;
make openmoko-devel-image                  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building OpenMoko with chroot ==&lt;br /&gt;
&lt;br /&gt;
There may be hundreds of issues which may cause that OpenMoko fails to build on your system, so it might be more straightforward  to just install  a standardized build environment in which the openmoko build runs in chroot, independent of your distribution.&lt;br /&gt;
&lt;br /&gt;
There is now a (not fully working) script which is able to set up a 32-bit openSUSE 10.3 build environment for building OpenMoko posted on distro-devel: [http://lists.openmoko.org/pipermail/distro-devel/2007-November/000076.html]&lt;br /&gt;
&lt;br /&gt;
On gentoo and debian-like distribution, you can use debootstrap to quickly setup a base chroot.&lt;br /&gt;
&lt;br /&gt;
Please note that in addition to the common /dev, /sys and /proc, /dev/shm should also be mounted with --bind option. It is at least required to build a qtopia-x11 image. (Otherwise you will get some semaphore 'function not implemented' errors at qtopia-x11 installation stage).&lt;br /&gt;
&lt;br /&gt;
== Fails compiling binutils-cross on Gentoo/AMD64 and openSUSE/x86_64 ==&lt;br /&gt;
&lt;br /&gt;
make setup works fine, but when running make openmoko-devel-image it fails with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| make[4]: Entering directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty/testsuite'&lt;br /&gt;
| make[4]: Nothing to be done for `install'.&lt;br /&gt;
| make[4]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty/testsuite'&lt;br /&gt;
| make[3]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty'&lt;br /&gt;
| make[2]: Nothing to be done for `install-target'.&lt;br /&gt;
| make[2]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi'&lt;br /&gt;
| make[1]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi'&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross/lib/gcc-lib: No such file or directory&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross/lib: No such file or directory&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross: No such file or directory&lt;br /&gt;
| mv: cannot stat `build/tmp/cross/lib/libiberty.a': No such file or directory&lt;br /&gt;
NOTE: Task failed: build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/temp/log.do_stage.9730&lt;br /&gt;
NOTE: package binutils-cross-2.18-r0: task do_populate_staging: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
NOTE: package binutils-cross-2.18: failed&lt;br /&gt;
ERROR: Build of openembedded/packages/binutils/binutils-cross_2.18.bb do_populate_staging failed&lt;br /&gt;
ERROR: Task 1641 (openembedded/packages/binutils/binutils-cross_2.18.bb, do_populate_staging) failed&lt;br /&gt;
NOTE: Tasks Summary: Attempted 107 tasks of which 107 didn't need to be rerun and 1 failed.&lt;br /&gt;
ERROR: 'openembedded/packages/binutils/binutils-cross_2.18.bb' failed&lt;br /&gt;
make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final reason why the build cannot continue is:&lt;br /&gt;
 mv: cannot stat `/home/techiem2/Moko/build/tmp/cross/lib/libiberty.a': No such file or directory&lt;br /&gt;
&lt;br /&gt;
=== The lib64 issue ===&lt;br /&gt;
&lt;br /&gt;
Likely, Gentoo/AMD64 uses lib64 instead of lib as the library directory for x86_64 libraries. It's l likey that many (or all?) AMD64 distributions do for their 64-bit binaries. On openSUSE-x86_64, the same happens. Debian/x86-64 seems to either not use lib64 or is somehow supported by the openmoko distribution.&lt;br /&gt;
&lt;br /&gt;
On multilib/lib64 platforms like Gentoo/x86_64 and openSUSE-x86_64, the openmoko build runs into a final problem at the end of build: It tries to use fakeroot which uses LD_PRELOAD to fake a different root directory and in the final stages, after hours of compiling, fakeroot execution causes warning messages because on multilib/lib64 systems as they have two versions of many libraries, the 64-bit libraries are in /lib64, /usr/lib64 and oder lib64 paths, while the 32-bit libraries are in /lib, /usr/lib and other lib paths. Some tool on these lib64 distributions are adapted to install 64-bit libraries to lib64, but this seems to fail when cross-compiling.&lt;br /&gt;
&lt;br /&gt;
At least on openSUSE-10.3 the missing libiberty.a was installed to build/tmp/cross/lib64/libiberty.a, which looks wrong, and it is if this libiberty.a file contains 32-bit arm objects. If it contains 64-bit x86_64 objects, it's fine, but openembedded/openmoko is not expecting it in a lib64 directory. I am not sure what is the case.&lt;br /&gt;
&lt;br /&gt;
The lib64 fakeroot issue requires to change the openembedded build scripts, which is doable. But it's not very easy to find the correct script and patch it correctly. If you feel adventourus, go ahead and try to build openmoko on a lib64 distribution, but it's easyer to set up a complete 32-bit chroot environment and run a normal build in it.&lt;br /&gt;
&lt;br /&gt;
After seeing this, I assumed that openmoko/openembedded was clearly not tested with lib64 build hosts and since that would mean that even if I'd fix that error, many others could follow, and as I was not interested to fix the lib64 bugs but rather wanted to see something running first, I decided to make openmoko/openembedded think that it was running on a normal 32-bit non-lib64 machine.&lt;br /&gt;
&lt;br /&gt;
There are several ways to do that:&lt;br /&gt;
* You install an 32bit x86-Linux somewhere and use that for building:&lt;br /&gt;
** Do a native install and dual-boot the 32bit x86-linux (That's for dummies which do not know the other tricks)&lt;br /&gt;
** Install 32bit x86-Linux in a virtual machine (Takes powerful hardware and has some overhead too).  Use [http://gentoo-wiki.com/VirtualBox VirtualBox], for example.&lt;br /&gt;
* you can install a 32-bit development system in to a chroot jail and compile there (also quite some setup and inconvinience).  See [http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml the gentoo guide]&lt;br /&gt;
&lt;br /&gt;
=== Building on SuSE Linux 10.3-AMD64 with -m32 (not finished) ===&lt;br /&gt;
&lt;br /&gt;
Install the following packages for the 32-bit C/C++ compiler target option -m32 to work and to compile what is needed&lt;br /&gt;
&lt;br /&gt;
 gcc42-32bit gcc42libgcc42-32bit glibc-devel-32bit libstdc++-devel-32bit ncurses-devel-32bit zlib-devel-32bit (maybe also gtk2-devel-32bit)&lt;br /&gt;
&lt;br /&gt;
The openSUSE 10.3-AMD64 has no libopenssl-devel-32bit, but you can install the 32-bit rpm from the i586 10.3 rpm tree:&lt;br /&gt;
 &lt;br /&gt;
 libopenssl-devel&lt;br /&gt;
&lt;br /&gt;
You should also make sure that gdbm-devel is not installed.&lt;br /&gt;
The multilib support in ld has an issue which surfaces when it is called from perl's Configure script to complile a test program with -Lgdbm. If gdbm-devel is installed, it finds /usr/lib64/libgdbm.so, but since it's not compatible with 32-bit, it skips it, but also does not search the specified -Lpath where the OpenEmbedded-built libgdbm.so is already installed. To work around this, uninstall /usr/lib64/libgdbm.so with:&lt;br /&gt;
 rpm -e gdbm-devel&lt;br /&gt;
&lt;br /&gt;
Note these need to be the 32-bit cpp33 and gcc33 rpms as the 64-bit gcc33 rpms for openSUSE do not support the 32-bit target.&lt;br /&gt;
&lt;br /&gt;
To make the OpenMoko build think that its running on 32-bit i686, use linux32 (changes uname -m to i686 in the new shell):&lt;br /&gt;
&lt;br /&gt;
 linux32 bash&lt;br /&gt;
&lt;br /&gt;
And set up gcc scripts which force the use of gcc-3.3 (it can only generate 32-bit assembly) for all compilation:&lt;br /&gt;
&lt;br /&gt;
 mkdir bin;cd bin&lt;br /&gt;
 echo '/usr/bin/${0##*/}-3.3 -m32 &amp;quot;$@&amp;quot;'        &amp;gt;gcc&lt;br /&gt;
 echo '/usr/bin/${0##*/} -m elf_i386 &amp;quot;$@&amp;quot;' &amp;gt;ld&lt;br /&gt;
 echo '/usr/bin/${0##*/} --32 &amp;quot;$@&amp;quot;'        &amp;gt;gas&lt;br /&gt;
 sed -i '1i#!/bin/sh' gcc gas ld&lt;br /&gt;
 chmod 755 gcc gas ld&lt;br /&gt;
 ln -s gcc cc &lt;br /&gt;
 ln -s gcc c++&lt;br /&gt;
 ln -s gcc g++&lt;br /&gt;
 ln -s gas as&lt;br /&gt;
 echo PATH=\&amp;quot;&amp;quot;$PWD&amp;quot;:\$PATH\&amp;quot; &amp;gt;.setup-gcc-m32&lt;br /&gt;
 cd -&lt;br /&gt;
&lt;br /&gt;
Then set the path and test it:&lt;br /&gt;
&lt;br /&gt;
 source bin/.setup-gcc-m32&lt;br /&gt;
 type gcc&lt;br /&gt;
&lt;br /&gt;
== More package requirements ==&lt;br /&gt;
&lt;br /&gt;
On my system (Kubuntu 6.10) build failed with message &amp;quot;ERROR: QEMU requires SDL or Cocoa for graphical output&amp;quot; because package &amp;lt;tt&amp;gt;libsdl-image1.2-dev&amp;lt;/tt&amp;gt; was missing. Use &amp;lt;tt&amp;gt;apt-get install libsdl-image1.2-dev&amp;lt;/tt&amp;gt; to install. Additionally I had to install packages &amp;lt;tt&amp;gt;cvs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diffstat&amp;lt;/tt&amp;gt;. I was also asked to install Psyco JIT Compiler (package &amp;lt;tt&amp;gt;python-psyco&amp;lt;/tt&amp;gt;) to increase performance. Nevertheless &amp;lt;tt&amp;gt;make flash-qemu-local&amp;lt;/tt&amp;gt; took some hours, but now I finally can get an impression of the phone that I am looking for! -- [[User:Nichtich|Nichtich]] 00:26, 20 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== pango-directfb failed to build due to missing Glib 2.14.x ==&lt;br /&gt;
&lt;br /&gt;
The latest(as of Sept. 25, 2007) build started to fail with the following error:&lt;br /&gt;
&lt;br /&gt;
 | checking for GLIB... no&lt;br /&gt;
 | configure: error:&lt;br /&gt;
 | *** Glib 2.14.0 or better is required. The latest version of&lt;br /&gt;
 | *** Glib is always available from ftp://ftp.gtk.org/.&lt;br /&gt;
 | FATAL: oe_runconf failed&lt;br /&gt;
 NOTE: Task failed:&lt;br /&gt;
 /media/sdc1/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/\&lt;br /&gt;
     pango-directfb-1.18.1-r0/temp/log.do_configure.19927&lt;br /&gt;
 NOTE: package pango-directfb-1.18.1-r0: task do_configure: failed&lt;br /&gt;
 ERROR: TaskFailed event exception, aborting&lt;br /&gt;
 NOTE: package pango-directfb-1.18.1: failed&lt;br /&gt;
 ERROR: Build of /media/sdc1/moko/openembedded/packages/pango/\&lt;br /&gt;
     pango-directfb_1.18.1.bb do_configure failed&lt;br /&gt;
&lt;br /&gt;
The Glib included in the build tree seems to be only 2.12.12, so looks like something&lt;br /&gt;
is broken in term of dependency.&lt;br /&gt;
&lt;br /&gt;
This had happened on both of Fedora 7 and Debian Etch.  I am running the latest &lt;br /&gt;
MokoMakefile with OM-2007.2.  The funny thing is that the build had worked only &lt;br /&gt;
couple nights ago. Any idea?  I will update anything I find here and also on my blog(see my user profile).&lt;br /&gt;
[[User:ttz|ttz]] Wed Sep 26 12:17:33 CDT 2007&lt;br /&gt;
&lt;br /&gt;
pango-directfb had been removed from OE for now due to the report of it breaking builds like OpenMoko.&lt;br /&gt;
&lt;br /&gt;
[[User:ttz|ttz]] Thu Oct  4 10:20:12 CDT 2007&lt;br /&gt;
&lt;br /&gt;
== uicmoc4 failes to compile ==&lt;br /&gt;
&lt;br /&gt;
This is solved by installing libz-dev&lt;br /&gt;
&lt;br /&gt;
Or, look at [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=747 Bug #747]&lt;br /&gt;
&lt;br /&gt;
== svn: REPORT request failed on '/repos/tasks/!svn/vcc/default' ==&lt;br /&gt;
&lt;br /&gt;
  osiris$ make update&lt;br /&gt;
  ...&lt;br /&gt;
  Fetching external item into 'trunk/src/target/OM-2007.2/applications/openmoko-today2/libkoto'&lt;br /&gt;
  svn: REPORT request failed on '/repos/tasks/!svn/vcc/default'&lt;br /&gt;
  svn: REPORT of '/repos/tasks/!svn/vcc/default': 200 OK (http://svn.o-hand.com)&lt;br /&gt;
  make: *** [update-openmoko] Error 1&lt;br /&gt;
&lt;br /&gt;
  osiris$ cd openmoko/trunk/src/target/OM-2007.2/applications/openmoko-today2//libkoto/&lt;br /&gt;
  osiris$ svn up -r HEAD&lt;br /&gt;
  svn: REPORT request failed on '/repos/tasks/!svn/vcc/default'&lt;br /&gt;
  svn: REPORT of '/repos/tasks/!svn/vcc/default': 200 OK (http://svn.o-hand.com)&lt;br /&gt;
&lt;br /&gt;
Anyone know about this one?&lt;br /&gt;
--[[User:Blackh|Blackh]] 00:11, 12 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== bootparam_prot.h fails to install in glibc-intermediate-2.5 package (Debian sid) ==&lt;br /&gt;
&lt;br /&gt;
  | install: cannot stat&lt;br /&gt;
    `/home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/glibc-2.5/sunrpc/rpcsvc/bootparam_prot.h'&lt;br /&gt;
    No such file or directory&lt;br /&gt;
  NOTE: Task failed: /home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/temp/log.do_stage.3940&lt;br /&gt;
&lt;br /&gt;
For some reason, on Debian, the rpcgen command needs &amp;quot;-Y /usr/bin&amp;quot; added to the end of it or it won't work (&amp;quot;cannot find any C preprocessor (cpp)&amp;quot;).  This can be fixed by hand...&lt;br /&gt;
&lt;br /&gt;
 cd /home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/glibc-2.5/sunrpc/rpcsvc&lt;br /&gt;
 for f in *.x ; do rpcgen -h $f -o ${f%%.x}.h -Y /usr/bin ; done&lt;br /&gt;
&lt;br /&gt;
This command will generate the right files and you can resume the build with&lt;br /&gt;
&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
Here is a better fix - put this script, calling it rpcgen, somewhere in your PATH before /usr/bin:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  exec /usr/bin/rpcgen -Y /usr/bin &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Blackh|Blackh]] 05:17, 12 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Cannot find SVN openmoko-terminal2 ==&lt;br /&gt;
I'm having an issue when building MokoMakeFile where it is unable to find http://svn.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-terminal2.  Any ideas on how to fix this?&lt;br /&gt;
&lt;br /&gt;
--[[User:cartera|cartera]]&lt;br /&gt;
&lt;br /&gt;
== problem with make openmoko-devel-image ==&lt;br /&gt;
&lt;br /&gt;
when i try to do my first make openmoko-devel-image I obtain this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: Running task 844 of 5445 (ID: 671, /home/xraver/moko/openembedded/packages/linux/linux-openmoko_2.6.24+git.bb, do_fetch)&lt;br /&gt;
NOTE: package linux-openmoko-2.6.24+git20080422: started&lt;br /&gt;
NOTE: package linux-openmoko-1_2.6.24+git20080422-r0: task do_fetch: started&lt;br /&gt;
NOTE: fetch http://downloads.openmoko.org/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz&lt;br /&gt;
--08:47:41--  http://downloads.openmoko.org/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz&lt;br /&gt;
           =&amp;gt; `/home/xraver/moko/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz'&lt;br /&gt;
Risoluzione di downloads.openmoko.org in corso... 88.198.93.219&lt;br /&gt;
Connessione a downloads.openmoko.org|88.198.93.219:80... connesso.&lt;br /&gt;
HTTP richiesta inviata, aspetto la risposta... 404 Not Found&lt;br /&gt;
08:47:41 ERRORE 404: Not Found.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this location http://downloads.openmoko.org/sources/ the file git_git.openmoko.org.git.kernel.git_4194.tar.gz does not exist.&lt;br /&gt;
Any solutions?&lt;br /&gt;
&lt;br /&gt;
--[[User:xraver|Giorgio Ravera]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Wishlist/Wikipedia_Mirror</id>
		<title>Talk:Wishlist/Wikipedia Mirror</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Wishlist/Wikipedia_Mirror"/>
				<updated>2008-07-10T10:44:25Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* A possible place to seach in for a possible size reduction boost */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Modified zLib =&lt;br /&gt;
Since size is a big concern - maybe I have at least the idea in which direction to search for a possible solution.&lt;br /&gt;
&lt;br /&gt;
In the times everything had still to be downloaded from sunsite and compiled by hand there was a bible browser that used a modified zlib that made use of a modified zlib, - that compressed the text of the bible - but - as far as I understood - compressed every verse by itselves - which allowed for a very fast seeking - at the cost of compression ratio, since gzip no longer could learn from the past verses.&lt;br /&gt;
&lt;br /&gt;
Two years ago I stumbled over this library again on my ubuntu box so it might still be alive.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Wishlist/Wikipedia_Mirror</id>
		<title>Wishlist/Wikipedia Mirror</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Wishlist/Wikipedia_Mirror"/>
				<updated>2008-07-10T10:30:03Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Why we need SDHC support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Wishlist}}&lt;br /&gt;
__TOC__&lt;br /&gt;
A local copy of wikipedia that you can browse anywhere without incurring bandwidth costs.  It's already been done for the iPod (see [http://encyclopodia.sourceforge.net encyclopodia]), but I think we can do better on the Neo.  For starters, it has a much nicer screen, and a real UI toolkit to play with, and can run multiple apps simultaneously etc.&lt;br /&gt;
&lt;br /&gt;
--[[User:HEx|HEx]] 07:22, 5 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Size ==&lt;br /&gt;
This is the real problem.  A recent bzipped article-only dump of enwiki comes in at 2.1Gb.  Encyclopodia's download seems to be about 1.7Gb.  It seems likely that even with some optimization, a full copy of wikipedia is going to be over 1Gb.  Thus it would seem that a complete copy is probably going to be impractical for most people (assuming they want to store other things on their Neo too), so it would be worth finding out what bits can be discarded with relatively little loss.&lt;br /&gt;
&lt;br /&gt;
On the compression front, lzma would seem to be the way to go.  Clearly the input needs to be divided into blocks for random access, but the choice of which articles go into which block I think could affect the compression ratio greatly. Maybe if each category is a folder and each letter (article initial) of a category is an archive.&lt;br /&gt;
&lt;br /&gt;
[http://cs.fit.edu/~mmahoney/compression/text.html] has some interesting benchmarks for wikipedia compression.  I still think lzma would be best as it does quite well while not using much CPU and memory (plus it's already in OpenEmbedded).&lt;br /&gt;
&lt;br /&gt;
To save space, we could provide smaller sections of the main Wikipedia (eg Music, Science, Literature) and download anything else on demand. It needs to be clear what's local and remote, however, as data charges can be expensive.&lt;br /&gt;
&lt;br /&gt;
From the other side, we could simply count on 8 Gb Micro SD card. Such card could store not just the article texts but maybe even images, if they are resized in advance to the small size, suitable for OpenMoko screen.&lt;br /&gt;
&lt;br /&gt;
== Integration ==&lt;br /&gt;
It would be interesting to integrate Wikipedia with the GPS device, allowing a query about the articles, describing objects that are located nearby. There are many articles about cities and other objects with known locations in Wikipedia, and some uniform coordinate representation system seems also present.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
This is a tough one.  Despite the fact that MediaWiki's markup format is notoriously underspecified and hard to interpret, it's also widespread and human-readable and space-efficient, and, while a custom markup format could possibly be more space-efficient and easier to parse, the world really doesn't need any more markup formats.  Thus I'm tending towards just rendering MediaWiki markup directly on the Neo, which would have the plus of being able to view the source if and when rendering goes horribly awry.&lt;br /&gt;
&lt;br /&gt;
Of the possibilities at the [http://meta.wikimedia.org/wiki/Alternative_parsers list of parsers], [http://svn.wikimedia.org/svnroot/mediawiki/trunk/flexbisonparse/ flexbisonparse] looks the most promising.&lt;br /&gt;
&lt;br /&gt;
HTML or XML as an intermediate step would be a possibility, and there's sure to be a web browser available, but just dumping the output to a GtkTextView would probably be simpler and more efficient.&lt;br /&gt;
&lt;br /&gt;
== Other E-book software ==&lt;br /&gt;
&lt;br /&gt;
Since there's bound to be other, similar software being developed or ported, it would make sense to see if this could usefully be part of a larger project.  (The alternative, &amp;quot;do one thing, do it well&amp;quot;, also has some appeal though.)&lt;br /&gt;
&lt;br /&gt;
== The Mokopedia Way ==&lt;br /&gt;
&lt;br /&gt;
This section is about my [[Mokopedia]] project.&lt;br /&gt;
&lt;br /&gt;
=== Why it isn't using Wikitext ===&lt;br /&gt;
&lt;br /&gt;
Wikitext is horribly difficult to parse - just look at how tables are defined in wikitext and what thousands of possibilities you have! It would be overkill to write another wikitext Interpreter. Xhtml instead is simply parsed and can also be embedded easily in the gtkhtml widget.&lt;br /&gt;
Another reason: if the wikimedia software changes anything on its wikitext 'specification' the parser has to be changed. Its useless to use something in a program, that is no standart and is likely to change without notice.&lt;br /&gt;
Wikitext is more lightweight? right.&lt;br /&gt;
&lt;br /&gt;
=== Why we need SDHC support ===&lt;br /&gt;
&lt;br /&gt;
Size is only a problem for the english wikipedia. I managed to run the entire german wikipedia UNCOMPRESSED on my Nokia E70 Symbian phone. It had to be uncompressed because the articles were viewed with the Nokia browser from a local Raccoon install with a little Python script to search the articles. For more infos about my optimizations on the mediawiki html dump to get this running see [http://www.johannes-schauer.de/viewforum.php?f=47] (German)&lt;br /&gt;
If I compress everything with bzip2 it shrinks to 19% of it's former size but this will not help for an offline version since seeking for a special file in such a big archive will cost an enormous amount of computing power. So the only options are to either pack every file separately or to pack a few files together in chunks of several kB. But this will reduce our compression ratio enormously (~30% compression with bz2) but is unavoidable for fast access.&lt;br /&gt;
&lt;br /&gt;
Conclusion: our only hope is to hope for SDHC support. I verified that the (second largest) german wiki will fit on a 2GB non-SDHC SD-Card with every file compressed separately. With my optimizations the english wikipedia will need 2.8GB so we need 4GB SDHC media for that.&lt;br /&gt;
&lt;br /&gt;
On the [[Booting_from_SD]] page there seems to be a way to make the OpenMoko use SDHC cards. Seems like the kernel supports it already so if uboot loads the kernel from NAND using a SDHC card will work. The way of archieving this is still ugly (console work involved) - but if it does work it seems to be doable for the time.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:MokoMakefile</id>
		<title>Talk:MokoMakefile</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:MokoMakefile"/>
				<updated>2008-07-05T09:19:21Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* MokoMakefile won't work on Ubuntu Hardy Heron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MokoMakefile won't work on Ubuntu Hardy Heron ==&lt;br /&gt;
Hello, there!&lt;br /&gt;
&lt;br /&gt;
Since my upgrade to Hardy Heron MokoMakefile seems to be broken on my ubuntu box. I already tried several times to download a new Makefile into a fresh directory - without success. What I get is always:&lt;br /&gt;
&lt;br /&gt;
 :~/moko$ make image&lt;br /&gt;
 ( cd build &amp;amp;&amp;amp; . ../setup-env &amp;amp;&amp;amp; \&lt;br /&gt;
           ( bitbake openmoko-devel-image u-boot-openmoko ) )&lt;br /&gt;
 ERROR:  Openembedded's config sanity checker detected a potential misconfiguration.&lt;br /&gt;
         Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).&lt;br /&gt;
         Following is the list of potential problems / advisories:&lt;br /&gt;
 &lt;br /&gt;
         /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).&lt;br /&gt;
 &lt;br /&gt;
 make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&lt;br /&gt;
For another report on this problem see also: http://lists.openmoko.org/pipermail/community/2008-May/017545.html&lt;br /&gt;
&lt;br /&gt;
When trying to compile the april software update (ASU) this error doesn't occour, though.&lt;br /&gt;
&lt;br /&gt;
=== solution ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudoedit /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add 'vm.mmap_min_addr = 0' (without quotes) to that file.&lt;br /&gt;
&lt;br /&gt;
== The paths that are mentioned on this page are partially wrong ==&lt;br /&gt;
I am not sure enough what the paths should be, but - two things have changed since the section &amp;quot;developing with mokomakefile/How to add your own shiny new application&amp;quot; of this page was created:&lt;br /&gt;
 - The path where the packages are kept, and&lt;br /&gt;
 - Where to add the information that we have added a new package.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu Edgy: Update git-1.4.x to 1.5.x! ==&lt;br /&gt;
With old git-1.4.x, fetching uboot does not work: Use 1.5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: package uboot-gta01-1.2.0+svnnow-r4_14da5f7675bbb427c469e3f45006e027b6e21db9_0_1811: task do_fetch: started&lt;br /&gt;
fatal: corrupted pack file .git/objects/pack/pack-a146bcbc18f4826d6bf2a7f63be5dd77bbb5b2f5.pack&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fails on a 32bit machine - try again without ccache? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/bin/sh ./libtool --mode=compile     ccache     gcc -DHAVE_CONFIG_H -I.... -W... -O2 -c -o libbfd.lo build/tmp/work/armv4t-linux/binutils-cross-2.17-r0/binutils-2.17/bfd/libbfd.c&lt;br /&gt;
ccache gcc -DHAVE_CONFIG_H -I... -W... -O2 -c  /usr/local/oe/build/tmp/work/armv4t-linux/binutils-cross-2.17-r0/binutils-2.17/bfd/libbfd.c -o   t shift count &amp;gt;= width of type&lt;br /&gt;
make[5]: *** [libbfd.lo] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any insight here? --[[User:Adam|Adam]] 23:10, 15 May 2007 (CEST)&lt;br /&gt;
: Try without ccache (did you get it compiled meanwhile or can we remove this?) --[[User:BernhardKaindl|BernhardKaindl]] 23:05, 19 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Facing Problems with ogg libraries ==&lt;br /&gt;
just get the path and delete the .bb file that causes the problem&lt;br /&gt;
== Building on Fedora Core 6 ==&lt;br /&gt;
&lt;br /&gt;
Install stuff needed for OpenMoko:&lt;br /&gt;
  # yum install python m4 make wget curl ftp cvs monotone subversion \&lt;br /&gt;
    tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html \&lt;br /&gt;
    diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds \&lt;br /&gt;
    docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git \&lt;br /&gt;
    quilt groff linuxdoc-tools patch compat-gcc-34 lynx netpbm&lt;br /&gt;
(notice ''compat-gcc-34'' wich was needed for FC6 (gcc 4 installed), and ''lynx'' which is needed by ''qemu'' (no fallback to ''wget'', ''curl'', or ''links'' at the moment and no check for it, resulting in strange &amp;quot;sleep&amp;quot; errors when trying to build without ''lynx'').&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
  $ make setup&lt;br /&gt;
  $ make openmoko-devel-image&lt;br /&gt;
  $ unset LD_LIBRARY_PATH&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;
I have also done a&lt;br /&gt;
  $ unset LD_LIBRARY_PATH; make update-makefile &amp;amp;&amp;amp; nice  make update &amp;amp;&amp;amp; nice make setup &amp;amp;&amp;amp; nice make all&lt;br /&gt;
(This takes several hours)&lt;br /&gt;
&lt;br /&gt;
Build qemu:&lt;br /&gt;
  $ make qemu&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
  # echo 1024 &amp;gt; /proc/sys/dev/rtc/max-user-freq&lt;br /&gt;
  $ make run-qemu&lt;br /&gt;
This will bring up the OpenMoko :) Use SPACE for AUX and ENTER for POWER.&lt;br /&gt;
Not quite the same as holding a Neo1973 in your hands I would guess, but this is the best we can do for now. Thanks!&lt;br /&gt;
&lt;br /&gt;
== Building on Ubuntu Feisty ==&lt;br /&gt;
&lt;br /&gt;
MokoMakefile requires more than 512 MB of RAM + Swap space (around 1GB?).&lt;br /&gt;
&lt;br /&gt;
If you need swap, please '''check that its size under Feisty is not null'''!&lt;br /&gt;
&lt;br /&gt;
[https://bugs.launchpad.net/ubuntu/+bug/105490 Bug #105490] describes the current issue and offers a workaround (23 Jul 07).&lt;br /&gt;
&lt;br /&gt;
== Fails trying to build bluez-utils == &lt;br /&gt;
on Gentoo Linux, it fails compiling bluez-utils (I've tried also &amp;quot;make clean-package-bluez-utils&amp;quot; before the following command)&lt;br /&gt;
&lt;br /&gt;
do a &amp;quot;make build-package-libusb; make clean-package-bluez-utils&amp;quot; and it should continue (the bluez-utils .bb is missing the libusb dependency)&lt;br /&gt;
&lt;br /&gt;
== openSUSE 10.1 and 10.2 workarounds ==&lt;br /&gt;
&lt;br /&gt;
ltrace package fails to build with error: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
checking for pid_t... yes&lt;br /&gt;
checking for getopt... yes&lt;br /&gt;
checking for getopt_long... yes&lt;br /&gt;
checking gelf.h usability... no&lt;br /&gt;
checking gelf.h presence... no&lt;br /&gt;
checking for gelf.h... no&lt;br /&gt;
configure: error: ***** gelf.h not found *****&lt;br /&gt;
FATAL: oe_runconf failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''FIX: '''&lt;br /&gt;
edit ''/home/moko/build/tmp/work/armv4t-linux/ltrace-0.4-r0/ltrace-0.4/configure.ac''&lt;br /&gt;
at line 44: remove the following block:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for path in /usr/include/elfutils /usr/local/include/elfutils \&lt;br /&gt;
       /usr/include/libelf /usr/local/include/libelf; do&lt;br /&gt;
   if test -f ${path}/gelf.h; then&lt;br /&gt;
       CPPFLAGS=&amp;quot;$CPPFLAGS -I ${path}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
( it adds /usr/include/elfutils to path, which causes cross-compile badness error )&lt;br /&gt;
&lt;br /&gt;
=== QEMU build fails to compile USB code ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void&lt;br /&gt;
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_handle_control':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:103: error: invalid application of `sizeof' to incomplete type `usbdevfs_ctrltran&lt;br /&gt;
sfer'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_handle_data':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:120: error: storage size of 'bt' isn't known&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:132: error: invalid application of `sizeof' to incomplete type `usbdevfs_bulktran&lt;br /&gt;
sfer'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:120: warning: unused variable `bt'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_device_open':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:199: error: storage size of 'ctrl' isn't known&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:202: error: invalid application of `sizeof' to incomplete type `usbdevfs_ioctl'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:199: warning: unused variable `ctrl'&lt;br /&gt;
make[2]: *** [usb-linux.o] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''FIX: '''&lt;br /&gt;
edit ''/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c''&lt;br /&gt;
at line 29 add the following (before ''#include &amp;lt;linux/usbdevice_fs.h&amp;gt;'')&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;linux/compiler.h&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
hint: there is a copy of the file in ''/home/moko/build/tmp/work/i686-linux/qemu-native-0.9.0+cvs20070613-r5/qemu/usb-linux.c''&lt;br /&gt;
&lt;br /&gt;
''see: http://osdir.com/ml/emulators.kvm.devel/2007-01/msg00101.html''&lt;br /&gt;
&lt;br /&gt;
== Cannot satisfy fstests ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  make openmoko-devel-image&lt;br /&gt;
...&lt;br /&gt;
| Collected errors:&lt;br /&gt;
| ERROR: Cannot satisfy the following dependencies for task-openmoko-debug:&lt;br /&gt;
|        fstests&lt;br /&gt;
NOTE: Task failed: /no-backup/Moko/build/tmp/work/fic-gta01-linux/openmoko-devel-image-1.0-r0/temp/log.do_rootfs.25036&lt;br /&gt;
NOTE: package openmoko-devel-image-1.0-r0: task do_rootfs: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Failed on debian etch 2007-07-20&lt;br /&gt;
Solution from mailing list post from hardskinone, report of an irc chat&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I got help in IRC channel. I do following steps&lt;br /&gt;
     * remove fstest from oe/packages/tasks/task-openmoko.bb ,&lt;br /&gt;
     * increase PR field by one&lt;br /&gt;
     * make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== conflicting types for 'futimens' ==&lt;br /&gt;
&lt;br /&gt;
if you encounter the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 | In file included from utimecmp.c:40:&lt;br /&gt;
 | utimens.h:2: error: conflicting types for 'futimens'&lt;br /&gt;
 | /usr/include/sys/stat.h:370: error: previous declaration of 'futimens' was here&lt;br /&gt;
&lt;br /&gt;
a patch is needed because your glibc is too new. grab &amp;amp; enable the patch as follows &lt;br /&gt;
&lt;br /&gt;
 cd openembedded/packages/coreutils&lt;br /&gt;
 mv coreutils_5.3.0.bb coreutils_5.3.0.orig&lt;br /&gt;
 wget http://www.openembedded.org/repo/org.openembedded.dev/packages/coreutils/coreutils_5.3.0.bb&lt;br /&gt;
 cd -&lt;br /&gt;
 cd openembedded/packages/coreutils/coreutils-5.3.0&lt;br /&gt;
 wget http://www.openembedded.org/repo/org.openembedded.dev/packages/coreutils/coreutils-5.3.0/futimens.patch&lt;br /&gt;
 cd -&lt;br /&gt;
&lt;br /&gt;
== Workaround for problems compiling mtd-utils ==&lt;br /&gt;
&lt;br /&gt;
Change the line on &amp;lt;code&amp;gt;openembedded/packages/mtd/mtd-utils_1.0.0+git.bb&amp;lt;/code&amp;gt; which reads:&lt;br /&gt;
&lt;br /&gt;
 SRC_URI = &amp;quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=master \&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 SRC_URI = &amp;quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=a6fa706fe9e7696b4b2045edf9698c3bac07e3e3 \&lt;br /&gt;
&lt;br /&gt;
which forces the recipe to use an older revision (the one which worked last time I built the image on my computer).&lt;br /&gt;
&lt;br /&gt;
Be sure to remember to undo the change later, or else you will not get any new changes to that package. --[[User:CesarB|CesarB]] 04:48, 25 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Note: these patches should be updated - the lzo patch is included in the current version, so backing off to the previous version and repatching seems silly.   I was able to make it through this part of the build by applying the remaining patches manually. --[[User:Mellon|Ted Lemon]] 15:44, 29 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Monotone segfaulting on Ubuntu Feisty Fawn/PPC ==&lt;br /&gt;
If you are running Ubuntu Feisty Fawn on a PowerPC computer you will experience problems running monotone. To fix this issue you need to install monotone as well as the libboost packages from Gutsy. The easiest way to accomplish this is to add the gutsy repositories to your sources.list&lt;br /&gt;
and change the preferences to look like this:&lt;br /&gt;
&lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: release a=feisty&lt;br /&gt;
 Pin-Priority: 700&lt;br /&gt;
 &lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: -100&lt;br /&gt;
 &lt;br /&gt;
 Package: libc6 libc6-dev tzdata util-linux libgcc1 libstdc++6 monotone   &lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: 800&lt;br /&gt;
 &lt;br /&gt;
 Package: libboost-*&lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: 800&lt;br /&gt;
&lt;br /&gt;
After doing this install monotone in this way:&lt;br /&gt;
 apt-get -t gutsy install monotone.&lt;br /&gt;
That should install monotone 0.35 with updated (and working) boost libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fails on ncurses install in Fedora 7 with a &amp;quot;tic -x&amp;quot; message ==&lt;br /&gt;
Adjust the following command to your system, then run it:&lt;br /&gt;
 export LD_LIBRARY_PATH=/home/moko/build/tmp/work/x86_64-linux/ncurses-native-5.4-r8/ncurses-5.4/lib&lt;br /&gt;
Then start make again and it should pick up where it left off.&lt;br /&gt;
&lt;br /&gt;
You can get a list of potential paths to use with the following command from you main moko directory:&lt;br /&gt;
 find . | grep libncurses&lt;br /&gt;
&lt;br /&gt;
The basic problem is that it is linking against your main system libraries instead of the OpenEmbedded ones.&lt;br /&gt;
&lt;br /&gt;
There's probably a cleaner way of handling this - please update this entry if you know it.&lt;br /&gt;
&lt;br /&gt;
This has been fixed in Openembedded, see [http://bugs.openembedded.org/show_bug.cgi?id=2554 Openembedded Bug #2554] for further details.&lt;br /&gt;
&lt;br /&gt;
== uboot-gta01 fails to build ==&lt;br /&gt;
Changes in the GIT of U-Boot make the OpenMoko patches unapplyable. For the use of Revision ''cc3023b9f95d7ac959a764471a65001062aecf41'' and everything will be fine for now.&lt;br /&gt;
&lt;br /&gt;
== Perl fails to build ==&lt;br /&gt;
After following every bit of advice I can find to 'make clean' and nuke the perl build directories, every build comes up with:&lt;br /&gt;
&lt;br /&gt;
 | make[1]: Entering directory `/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7'&lt;br /&gt;
 | make[1]: *** No rule to make target `&amp;lt;command-line&amp;gt;', needed by `miniperlmain.o'.  Stop.&lt;br /&gt;
 | make[1]: Leaving directory `/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7'&lt;br /&gt;
 | FATAL: oe_runmake failed&lt;br /&gt;
 NOTE: Task failed: /src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/temp/log.do_compile.19531&lt;br /&gt;
 NOTE: package perl-native-5.8.7-r3: task do_compile: failed&lt;br /&gt;
&lt;br /&gt;
Solution turned out to be editing &lt;br /&gt;
/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7/makedepend.SH and at line 169 change the regexp to eat references to &amp;quot;&amp;lt;command.line&amp;gt;&amp;quot; to catch what was leaking through.&lt;br /&gt;
&lt;br /&gt;
== Gettext fails to build ==&lt;br /&gt;
Gettext's build is broken unless you have emacs installed. Crazy though it seems. You will see an error like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| WARNING: Warnings can be ignored. :-)&lt;br /&gt;
| if test &amp;quot;no&amp;quot; != no; then \&lt;br /&gt;
|         set x; \&lt;br /&gt;
|         list='po-mode.el po-compat.el'; for p in $list; do \&lt;br /&gt;
|           if test -f &amp;quot;$p&amp;quot;; then d=; else d=&amp;quot;./&amp;quot;; fi; \&lt;br /&gt;
|           set x &amp;quot;$@&amp;quot; &amp;quot;$d$p&amp;quot;; shift; \&lt;br /&gt;
|         done; \&lt;br /&gt;
|         shift; \&lt;br /&gt;
|         EMACS=&amp;quot;no&amp;quot; /bin/bash ../../config/elisp-comp &amp;quot;$@&amp;quot; || exit 1; \&lt;br /&gt;
| if test &amp;quot;no&amp;quot; != no; then \&lt;br /&gt;
|         set x; \&lt;br /&gt;
|         list='po-mode.el po-compat.el'; for p in $list; do \&lt;br /&gt;
|           if test -f &amp;quot;$p&amp;quot;; then d=; else d=&amp;quot;./&amp;quot;; fi; \&lt;br /&gt;
|           set x &amp;quot;$@&amp;quot; &amp;quot;$d$p&amp;quot;; shift; \&lt;br /&gt;
|         done; \&lt;br /&gt;
|         shift; \&lt;br /&gt;
|         EMACS=&amp;quot;no&amp;quot; /bin/bash ../../config/elisp-comp &amp;quot;$@&amp;quot; || exit 1; \&lt;br /&gt;
|       else : ; fi&lt;br /&gt;
| mv: cannot move `elc-temp' to `elc-stamp': No such file or directory&lt;br /&gt;
| make[5]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[5]: *** [elc-stamp] Error 1&lt;br /&gt;
| make[5]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[4]: *** [po-mode.elc] Error 2&lt;br /&gt;
| make[4]: *** Waiting for unfinished jobs....&lt;br /&gt;
| make[4]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[3]: *** [all-recursive] Error 1&lt;br /&gt;
| make[3]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools'&lt;br /&gt;
| make[2]: *** [all] Error 2&lt;br /&gt;
| make[2]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools'&lt;br /&gt;
| make[1]: *** [all-recursive] Error 1&lt;br /&gt;
| make[1]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1'&lt;br /&gt;
| FATAL: oe_runmake failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is simple - install emacs (example below for debian/ubuntu) and try again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install emacs&lt;br /&gt;
make clean-package-gettext-native-0.14.1-r5&lt;br /&gt;
make openmoko-devel-image                  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building OpenMoko with chroot ==&lt;br /&gt;
&lt;br /&gt;
There may be hundreds of issues which may cause that OpenMoko fails to build on your system, so it might be more straightforward  to just install  a standardized build environment in which the openmoko build runs in chroot, independent of your distribution.&lt;br /&gt;
&lt;br /&gt;
There is now a (not fully working) script which is able to set up a 32-bit openSUSE 10.3 build environment for building OpenMoko posted on distro-devel: [http://lists.openmoko.org/pipermail/distro-devel/2007-November/000076.html]&lt;br /&gt;
&lt;br /&gt;
On gentoo and debian-like distribution, you can use debootstrap to quickly setup a base chroot.&lt;br /&gt;
&lt;br /&gt;
Please note that in addition to the common /dev, /sys and /proc, /dev/shm should also be mounted with --bind option. It is at least required to build a qtopia-x11 image. (Otherwise you will get some semaphore 'function not implemented' errors at qtopia-x11 installation stage).&lt;br /&gt;
&lt;br /&gt;
== Fails compiling binutils-cross on Gentoo/AMD64 and openSUSE/x86_64 ==&lt;br /&gt;
&lt;br /&gt;
make setup works fine, but when running make openmoko-devel-image it fails with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| make[4]: Entering directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty/testsuite'&lt;br /&gt;
| make[4]: Nothing to be done for `install'.&lt;br /&gt;
| make[4]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty/testsuite'&lt;br /&gt;
| make[3]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty'&lt;br /&gt;
| make[2]: Nothing to be done for `install-target'.&lt;br /&gt;
| make[2]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi'&lt;br /&gt;
| make[1]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi'&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross/lib/gcc-lib: No such file or directory&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross/lib: No such file or directory&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross: No such file or directory&lt;br /&gt;
| mv: cannot stat `build/tmp/cross/lib/libiberty.a': No such file or directory&lt;br /&gt;
NOTE: Task failed: build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/temp/log.do_stage.9730&lt;br /&gt;
NOTE: package binutils-cross-2.18-r0: task do_populate_staging: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
NOTE: package binutils-cross-2.18: failed&lt;br /&gt;
ERROR: Build of openembedded/packages/binutils/binutils-cross_2.18.bb do_populate_staging failed&lt;br /&gt;
ERROR: Task 1641 (openembedded/packages/binutils/binutils-cross_2.18.bb, do_populate_staging) failed&lt;br /&gt;
NOTE: Tasks Summary: Attempted 107 tasks of which 107 didn't need to be rerun and 1 failed.&lt;br /&gt;
ERROR: 'openembedded/packages/binutils/binutils-cross_2.18.bb' failed&lt;br /&gt;
make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final reason why the build cannot continue is:&lt;br /&gt;
 mv: cannot stat `/home/techiem2/Moko/build/tmp/cross/lib/libiberty.a': No such file or directory&lt;br /&gt;
&lt;br /&gt;
=== The lib64 issue ===&lt;br /&gt;
&lt;br /&gt;
Likely, Gentoo/AMD64 uses lib64 instead of lib as the library directory for x86_64 libraries. It's l likey that may (or all?) AMD64 distributions do for their 64-bit binaries. On openSUSE-x86_64, the same happens. Debian/x86-64 seems to either not use lib64 or is somehow supported by the openmoko distribution.&lt;br /&gt;
&lt;br /&gt;
On multilib/lib64 platforms like Gentoo/x86_64 and openSUSE-x86_64, the openmoko build runs into a final problem at the end of build: It tries to use fakeroot which uses LD_PRELOAD to fake a different root directory and in the final stages, after hours of compiling, fakeroot execution causes warning messages because on multilib/lib64 systems as they have two versions of many libraries, the 64-bit libraries are in /lib64, /usr/lib64 and oder lib64 paths, while the 32-bit libraries are in /lib, /usr/lib and other lib paths. Some tool on these lib64 distributions are adapted to install 64-bit libraries to lib64, but this seems to fail when cross-compiling.&lt;br /&gt;
&lt;br /&gt;
At least on openSUSE-10.3 the missing libiberty.a was installed to build/tmp/cross/lib64/libiberty.a, which looks wrong, and it is if this libiberty.a file contains 32-bit arm objects. If it contains 64-bit x86_64 objects, it's fine, but openembedded/openmoko is not expecting it in a lib64 directory. I am not sure what is the case.&lt;br /&gt;
&lt;br /&gt;
The lib64 fakeroot issue requires to change the openembedded build scripts, which is doable. But it's not very easy to find the correct script and patch it correctly. If you feel adventourus, go ahead and try to build openmoko on a lib64 distribution, but it's easyer to set up a complete 32-bit chroot environment and run a normal build in it.&lt;br /&gt;
&lt;br /&gt;
After seeing this, I assumed that openmoko/openembedded was clearly not tested with lib64 build hosts and since that would mean that even if I'd fix that error, many others could follow, and as I was not interested to fix the lib64 bugs but rather wanted to see something running first, I decided to make openmoko/openembedded think that it was running on a normal 32-bit non-lib64 machine.&lt;br /&gt;
&lt;br /&gt;
There are several ways to do that:&lt;br /&gt;
* You install an IA32-Linux somewhere and use that for building:&lt;br /&gt;
** Do a native install and dual-boot the IA32-linux (That's for dummies which do not know the other tricks)&lt;br /&gt;
** Install IA32-Linux in a virtual machine (Quite some setup and has some overhead too)&lt;br /&gt;
* you can install a 32-bit development system in to a chroot jail and compile there (also quite some setup and inconvinience)&lt;br /&gt;
* Or you can install a 32-bit development system on the 64-bit host (suppored on openSUSE, should be possible with Gentoo/AMD64 too)&lt;br /&gt;
&lt;br /&gt;
=== Building on SuSE Linux 10.3-AMD64 with -m32 (not finished) ===&lt;br /&gt;
&lt;br /&gt;
Install the following packages for the 32-bit C/C++ compiler target option -m32 to work and to compile what is needed&lt;br /&gt;
&lt;br /&gt;
 gcc42-32bit gcc42libgcc42-32bit glibc-devel-32bit libstdc++-devel-32bit ncurses-devel-32bit zlib-devel-32bit (maybe also gtk2-devel-32bit)&lt;br /&gt;
&lt;br /&gt;
The openSUSE 10.3-AMD64 has no libopenssl-devel-32bit, but you can install the 32-bit rpm from the i586 10.3 rpm tree:&lt;br /&gt;
 &lt;br /&gt;
 libopenssl-devel&lt;br /&gt;
&lt;br /&gt;
You should also make sure that gdbm-devel is not installed.&lt;br /&gt;
The multilib support in ld has an issue which surfaces when it is called from perl's Configure script to complile a test program with -Lgdbm. If gdbm-devel is installed, it finds /usr/lib64/libgdbm.so, but since it's not compatible with 32-bit, it skips it, but also does not search the specified -Lpath where the OpenEmbedded-built libgdbm.so is already installed. To work around this, uninstall /usr/lib64/libgdbm.so with:&lt;br /&gt;
 rpm -e gdbm-devel&lt;br /&gt;
&lt;br /&gt;
Note these need to be the 32-bit cpp33 and gcc33 rpms as the 64-bit gcc33 rpms for openSUSE do not support the 32-bit target.&lt;br /&gt;
&lt;br /&gt;
To make the OpenMoko build think that its running on 32-bit i686, use linux32 (changes uname -m to i686 in the new shell):&lt;br /&gt;
&lt;br /&gt;
 linux32 bash&lt;br /&gt;
&lt;br /&gt;
And set up gcc scripts which force the use of gcc-3.3 (it can only generate 32-bit assembly) for all compilation:&lt;br /&gt;
&lt;br /&gt;
 mkdir bin;cd bin&lt;br /&gt;
 echo '/usr/bin/${0##*/}-3.3 -m32 &amp;quot;$@&amp;quot;'        &amp;gt;gcc&lt;br /&gt;
 echo '/usr/bin/${0##*/} -m elf_i386 &amp;quot;$@&amp;quot;' &amp;gt;ld&lt;br /&gt;
 echo '/usr/bin/${0##*/} --32 &amp;quot;$@&amp;quot;'        &amp;gt;gas&lt;br /&gt;
 sed -i '1i#!/bin/sh' gcc gas ld&lt;br /&gt;
 chmod 755 gcc gas ld&lt;br /&gt;
 ln -s gcc cc &lt;br /&gt;
 ln -s gcc c++&lt;br /&gt;
 ln -s gcc g++&lt;br /&gt;
 ln -s gas as&lt;br /&gt;
 echo PATH=\&amp;quot;&amp;quot;$PWD&amp;quot;:\$PATH\&amp;quot; &amp;gt;.setup-gcc-m32&lt;br /&gt;
 cd -&lt;br /&gt;
&lt;br /&gt;
Then set the path and test it:&lt;br /&gt;
&lt;br /&gt;
 source bin/.setup-gcc-m32&lt;br /&gt;
 type gcc&lt;br /&gt;
&lt;br /&gt;
== More package requirements ==&lt;br /&gt;
&lt;br /&gt;
On my system (Kubuntu 6.10) build failed with message &amp;quot;ERROR: QEMU requires SDL or Cocoa for graphical output&amp;quot; because package &amp;lt;tt&amp;gt;libsdl-image1.2-dev&amp;lt;/tt&amp;gt; was missing. Use &amp;lt;tt&amp;gt;apt-get install libsdl-image1.2-dev&amp;lt;/tt&amp;gt; to install. Additionally I had to install packages &amp;lt;tt&amp;gt;cvs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diffstat&amp;lt;/tt&amp;gt;. I was also asked to install Psyco JIT Compiler (package &amp;lt;tt&amp;gt;python-psyco&amp;lt;/tt&amp;gt;) to increase performance. Nevertheless &amp;lt;tt&amp;gt;make flash-qemu-local&amp;lt;/tt&amp;gt; took some hours, but now I finally can get an impression of the phone that I am looking for! -- [[User:Nichtich|Nichtich]] 00:26, 20 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== pango-directfb failed to build due to missing Glib 2.14.x ==&lt;br /&gt;
&lt;br /&gt;
The latest(as of Sept. 25, 2007) build started to fail with the following error:&lt;br /&gt;
&lt;br /&gt;
 | checking for GLIB... no&lt;br /&gt;
 | configure: error:&lt;br /&gt;
 | *** Glib 2.14.0 or better is required. The latest version of&lt;br /&gt;
 | *** Glib is always available from ftp://ftp.gtk.org/.&lt;br /&gt;
 | FATAL: oe_runconf failed&lt;br /&gt;
 NOTE: Task failed:&lt;br /&gt;
 /media/sdc1/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/\&lt;br /&gt;
     pango-directfb-1.18.1-r0/temp/log.do_configure.19927&lt;br /&gt;
 NOTE: package pango-directfb-1.18.1-r0: task do_configure: failed&lt;br /&gt;
 ERROR: TaskFailed event exception, aborting&lt;br /&gt;
 NOTE: package pango-directfb-1.18.1: failed&lt;br /&gt;
 ERROR: Build of /media/sdc1/moko/openembedded/packages/pango/\&lt;br /&gt;
     pango-directfb_1.18.1.bb do_configure failed&lt;br /&gt;
&lt;br /&gt;
The Glib included in the build tree seems to be only 2.12.12, so looks like something&lt;br /&gt;
is broken in term of dependency.&lt;br /&gt;
&lt;br /&gt;
This had happened on both of Fedora 7 and Debian Etch.  I am running the latest &lt;br /&gt;
MokoMakefile with OM-2007.2.  The funny thing is that the build had worked only &lt;br /&gt;
couple nights ago. Any idea?  I will update anything I find here and also on my blog(see my user profile).&lt;br /&gt;
[[User:ttz|ttz]] Wed Sep 26 12:17:33 CDT 2007&lt;br /&gt;
&lt;br /&gt;
pango-directfb had been removed from OE for now due to the report of it breaking builds like OpenMoko.&lt;br /&gt;
&lt;br /&gt;
[[User:ttz|ttz]] Thu Oct  4 10:20:12 CDT 2007&lt;br /&gt;
&lt;br /&gt;
== uicmoc4 failes to compile ==&lt;br /&gt;
&lt;br /&gt;
This is solved by installing libz-dev&lt;br /&gt;
&lt;br /&gt;
Or, look at [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=747 Bug #747]&lt;br /&gt;
&lt;br /&gt;
== svn: REPORT request failed on '/repos/tasks/!svn/vcc/default' ==&lt;br /&gt;
&lt;br /&gt;
  osiris$ make update&lt;br /&gt;
  ...&lt;br /&gt;
  Fetching external item into 'trunk/src/target/OM-2007.2/applications/openmoko-today2/libkoto'&lt;br /&gt;
  svn: REPORT request failed on '/repos/tasks/!svn/vcc/default'&lt;br /&gt;
  svn: REPORT of '/repos/tasks/!svn/vcc/default': 200 OK (http://svn.o-hand.com)&lt;br /&gt;
  make: *** [update-openmoko] Error 1&lt;br /&gt;
&lt;br /&gt;
  osiris$ cd openmoko/trunk/src/target/OM-2007.2/applications/openmoko-today2//libkoto/&lt;br /&gt;
  osiris$ svn up -r HEAD&lt;br /&gt;
  svn: REPORT request failed on '/repos/tasks/!svn/vcc/default'&lt;br /&gt;
  svn: REPORT of '/repos/tasks/!svn/vcc/default': 200 OK (http://svn.o-hand.com)&lt;br /&gt;
&lt;br /&gt;
Anyone know about this one?&lt;br /&gt;
--[[User:Blackh|Blackh]] 00:11, 12 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== bootparam_prot.h fails to install in glibc-intermediate-2.5 package (Debian sid) ==&lt;br /&gt;
&lt;br /&gt;
  | install: cannot stat&lt;br /&gt;
    `/home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/glibc-2.5/sunrpc/rpcsvc/bootparam_prot.h'&lt;br /&gt;
    No such file or directory&lt;br /&gt;
  NOTE: Task failed: /home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/temp/log.do_stage.3940&lt;br /&gt;
&lt;br /&gt;
For some reason, on Debian, the rpcgen command needs &amp;quot;-Y /usr/bin&amp;quot; added to the end of it or it won't work (&amp;quot;cannot find any C preprocessor (cpp)&amp;quot;).  This can be fixed by hand...&lt;br /&gt;
&lt;br /&gt;
 cd /home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/glibc-2.5/sunrpc/rpcsvc&lt;br /&gt;
 for f in *.x ; do rpcgen -h $f -o ${f%%.x}.h -Y /usr/bin ; done&lt;br /&gt;
&lt;br /&gt;
This command will generate the right files and you can resume the build with&lt;br /&gt;
&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
Here is a better fix - put this script, calling it rpcgen, somewhere in your PATH before /usr/bin:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  exec /usr/bin/rpcgen -Y /usr/bin &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Blackh|Blackh]] 05:17, 12 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Cannot find SVN openmoko-terminal2 ==&lt;br /&gt;
I'm having an issue when building MokoMakeFile where it is unable to find http://svn.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-terminal2.  Any ideas on how to fix this?&lt;br /&gt;
&lt;br /&gt;
--[[User:cartera|cartera]]&lt;br /&gt;
&lt;br /&gt;
== problem with make openmoko-devel-image ==&lt;br /&gt;
&lt;br /&gt;
when i try to do my first make openmoko-devel-image I obtain this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: Running task 844 of 5445 (ID: 671, /home/xraver/moko/openembedded/packages/linux/linux-openmoko_2.6.24+git.bb, do_fetch)&lt;br /&gt;
NOTE: package linux-openmoko-2.6.24+git20080422: started&lt;br /&gt;
NOTE: package linux-openmoko-1_2.6.24+git20080422-r0: task do_fetch: started&lt;br /&gt;
NOTE: fetch http://downloads.openmoko.org/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz&lt;br /&gt;
--08:47:41--  http://downloads.openmoko.org/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz&lt;br /&gt;
           =&amp;gt; `/home/xraver/moko/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz'&lt;br /&gt;
Risoluzione di downloads.openmoko.org in corso... 88.198.93.219&lt;br /&gt;
Connessione a downloads.openmoko.org|88.198.93.219:80... connesso.&lt;br /&gt;
HTTP richiesta inviata, aspetto la risposta... 404 Not Found&lt;br /&gt;
08:47:41 ERRORE 404: Not Found.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this location http://downloads.openmoko.org/sources/ the file git_git.openmoko.org.git.kernel.git_4194.tar.gz does not exist.&lt;br /&gt;
Any solutions?&lt;br /&gt;
&lt;br /&gt;
--[[User:xraver|Giorgio Ravera]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_OpenMoko_2007.1_from_scratch</id>
		<title>Building OpenMoko 2007.1 from scratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_OpenMoko_2007.1_from_scratch"/>
				<updated>2008-07-03T06:38:40Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: Got this one wrong. Reverting the page again.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Building_Openmoko_2007.1_from_scratch]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_OpenMoko_2007.1_from_scratch</id>
		<title>Building OpenMoko 2007.1 from scratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_OpenMoko_2007.1_from_scratch"/>
				<updated>2008-07-03T06:37:11Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: The Redirect to an instruction how to build the currend image went still to a old page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Openmoko2007.2]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:Neo_1973_Battery_Charging_Logic</id>
		<title>Talk:Neo 1973 Battery Charging Logic</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:Neo_1973_Battery_Charging_Logic"/>
				<updated>2008-06-26T07:53:50Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Added a question about a link that references informations on a page that no more contains them. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Link to the Fast Charger UBOOT entry?==&lt;br /&gt;
The link given on this page that should tell how to add an fast-charge UBOOT entry goes to the UBOOT-page - which no longer contains the referenced information.&lt;br /&gt;
==Time to pre-charge a deep discharged battery?==&lt;br /&gt;
[[User:Speedevil|Speedevil]]'s article suggested pre-charging for 1 hour.  The suggestions in this article (before I imported those from Speedevil) suggested to pre-charge for 2-4 hours.  Is there a way to choose the most effective time, and if so, is there clearer way to explain this to users? --[[User:Dcorking|Dcorking]] 15:01, 20 August 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Basically, 1 hour was an educated guess.&lt;br /&gt;
At 40mA (measured input power) an hours charge is 40mAh, or 3% charge.&lt;br /&gt;
This is plenty to boot and run for &amp;gt;5 minutes.&lt;br /&gt;
This lets you login to u-boot and setup fast-charge, or have time for it to boot and bring up cdc-ether drivers, so that the PC can turn on fast-charge.&lt;br /&gt;
--[[User:Speedevil|Speedevil]] 22:37, 21 August 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==48 kΩ trick work?==&lt;br /&gt;
On IRC, people have said the 48 kΩ trick mentioned on the page to enable fast charge doesn't actually work on the Neo. I don't want to edit it out since I don't have personal information on the matter; anyone?&lt;br /&gt;
--[[User:Mjr|Mjr]] 21:13, 21 August 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Diddn't work when I tried it.&lt;br /&gt;
Edited out.&lt;br /&gt;
--[[User:Speedevil|Speedevil]] 22:33, 21 August 2007 (CEST)&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Wish_List</id>
		<title>Wish List</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Wish_List"/>
				<updated>2008-06-13T07:20:36Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Speaker-phone/crappy alternative */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is a place to collect various thoughts about the future of the [[OpenMoko]] software platform.  Most wish list ideas have been linked from this page, but you may also wish to check all pages [[:Category:Ideas|that have a category of 'Ideas']].&lt;br /&gt;
&lt;br /&gt;
== Development ==&lt;br /&gt;
=== Painless SDK installation &amp;amp; Setup ===&lt;br /&gt;
Our goal should be a completely painless setup for somebody wanting to develop using [[OpenMoko]]&lt;br /&gt;
&lt;br /&gt;
* one command for installation (apt-get install openmoko)&lt;br /&gt;
* one command to start Xnest (openmoko-xephyr?)&lt;br /&gt;
* one command to start an i386 shell (openmoko-386-shell)&lt;br /&gt;
* one command to start an armel shell (openmoko-armel-shell)&lt;br /&gt;
&lt;br /&gt;
No extra configuration required.&lt;br /&gt;
&lt;br /&gt;
==== IDE Plugins ====&lt;br /&gt;
People like to see plugins for&lt;br /&gt;
* [http://anjuta.sourceforge.net Anjuta]&lt;br /&gt;
* [http://www.eclipse.org Eclipse] (some things are possible - see [[Development with Eclipse]].&lt;br /&gt;
* [http://www.netbeans.org NetBeans]&lt;br /&gt;
* Game engine - Game Creation plugins&lt;br /&gt;
evaluate eclipse project [http://www.eclipse.org/dsdp/index.php Device Software Development Platform Project from eclipse] and subproject [http://www.eclipse.org/proposals/tml/ Tool for Mobile Linux]&lt;br /&gt;
* [http://www.kdevelop.org KDevelop]&lt;br /&gt;
* [http://developer.apple.com/tools/xcode/ XCode]&lt;br /&gt;
* [http://www.monodevelop.com MonoDevelop]&lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/ Microsoft Visual Studio 2005]&lt;br /&gt;
&lt;br /&gt;
==== UI Designer ====&lt;br /&gt;
Glade code generation is deprecated, so we don't want to use it. The Gtk+ powers told me that the plan is to have gtk 2.12 (out early 2007) with support for GtkBuilder, a libglade derivative which breaks a bit the XML definition in order to support all the new widgets and properties; as soon as it's in the other ui builders will add support for this format. See also [http://bugzilla.gnome.org/show_bug.cgi?id=172535 the relevant bug entry]&lt;br /&gt;
* Possibly a Landscape (rotated) view for the screen (480x640 *or* 640x480)?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Built-in Scripting Language ====&lt;br /&gt;
{{Main|Wishlist:BuiltInScriptingLanguage}}&lt;br /&gt;
There was a [http://lists.openmoko.org/pipermail/community/2007-January/001909.html fruitful discussion about a built-in scripting language on the mailing list in January.]  Many people feel that it is very important for OpenMoko to choose a scripting language to ship as default in the standard OpenMoko firmware.&lt;br /&gt;
==== Easy build of the existing autotools - based packages ====&lt;br /&gt;
In the ideal case OpenMoko should exist on the top of the usual ./configure - make workflow which is typical for the majority of the C/C++ based open source projects. It should not require to rewrite or even replace the existing Makefile.am files of the project being ported, and it should allow to pass the needed parameters to the project configure script. Maybe OpenMoko project could be a bigger project having one or more (if some are libraries) autotools - based packages in its separate folders and include the proper documentation how to &amp;quot;wire&amp;quot; the standard autotools based package to the OpenMoko infrastructure.&lt;br /&gt;
&lt;br /&gt;
===Foreign Widget Set Bindings ===&lt;br /&gt;
==== Qt Integration ====&lt;br /&gt;
The Trolltech folks have a great widget library. I'd like to interface OpenMoko with Qt4, so that we can write Qt4 applications for the phone which don't look alienated.&lt;br /&gt;
&lt;br /&gt;
==== Maemo Integration ====&lt;br /&gt;
The Maemo folks have created a successful standard for Webpad applications. I'd like to have a set of MaemoMoko and MokoMaemo wrapper classes that allow me add support for running OpenMoko applications on Maemo and vice versa. Perhaps we can get help from the Nokia OSS folks for that.&lt;br /&gt;
&lt;br /&gt;
==== wxWidgets Integration ====&lt;br /&gt;
wxWidgets is a cross-platform application framework that's very popular (I'd say, #3 after Qt and Gtk+). On Linux, wxWidgets uses Gtk+ to implement the widgets. It shouldn't be hard to add support for the additional OpenMoko classes to wxWidgets hence supporting the native OpenMoko look and feel for wxWidgets applications.&lt;br /&gt;
&lt;br /&gt;
wxWidgets team wants OpenMoko classes too and we (wxWidgets) plan to include this project as one of our ideas for  [http://google-code-updates.blogspot.com/2007/02/speaking-of-summer.html GSoC 2007]&lt;br /&gt;
&lt;br /&gt;
==== SDL Integration ====&lt;br /&gt;
SDL is ''the'' game developer library. There are tons of SDL games out there. We should add OpenMoko support into SDL.&lt;br /&gt;
&lt;br /&gt;
==== Cocoa / GNUstep ====&lt;br /&gt;
Allows to use MacOS X as a development platform.&lt;br /&gt;
&lt;br /&gt;
=== Software: Language bindings ===&lt;br /&gt;
==== Python bindings ====&lt;br /&gt;
Python bindings seem to be a commonly requested feature.  &lt;br /&gt;
&lt;br /&gt;
[[User:Mickey]] says, &amp;quot;They are kind of usable on the [http://www.maemo.org Nokia 770], but it's at the lower end of being bearable. We should keep this in mind -- Gtk+ already comes with Python Bindings, so we &amp;quot;just&amp;quot; would need to wrap libmoko*. I would prefer to leave this to the community do though, since it doesn't make sense to start wrapping the API until we have a stable API -- and I can imagine it will take us a couple of months after going open until we can start with stabilizing the libmoko API.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== C++ bindings ====&lt;br /&gt;
There is a whole skilled C++ community coming from the [http://qtopia.net Qtopia] and [http://opie.handhelds.org Opie] projects. If we would consider basing OpenMoko C++ Bindings on [http://www.gtkmm.org/ Gtkmm], then we could drag these guys in.&lt;br /&gt;
&lt;br /&gt;
==== Ruby bindings ====&lt;br /&gt;
Ruby and ruby-(gtk|glade) already ported to OpenMoko according to [http://lists.openmoko.org/pipermail/openmoko-apps/2007-May/000040.html this ] and [http://groups.google.de/group/comp.lang.ruby/browse_thread/thread/6bee9970cf055504 this] mesages. It just have to be included to distribution (only 4.9 MB!)&lt;br /&gt;
&lt;br /&gt;
==== Java bindings ====&lt;br /&gt;
People who concentrate on Java programming would like to have the OpenMoko port of some java virtual machine. GNU Classpath team a lot of great work in the past creating easily portable implementation. Sun's recently open sourced code could also be ported. &lt;br /&gt;
==== Other bindings ====&lt;br /&gt;
* Perl&lt;br /&gt;
* C#&lt;br /&gt;
* I think you could skip a bunch of these by binding to Dbus; most languages already have Dbus bindings&lt;br /&gt;
&lt;br /&gt;
== Community Support ==&lt;br /&gt;
&lt;br /&gt;
=== [http://projects.openmoko.org projects.openmoko.org] ===&lt;br /&gt;
Infrastructure for developers with&lt;br /&gt;
* One bugzilla for all projects (makes moving bugs forth and backwards between projects ''very'' easy)&lt;br /&gt;
* One mailing list for project&lt;br /&gt;
&lt;br /&gt;
== Platform ==&lt;br /&gt;
=== Community Images ===&lt;br /&gt;
In the future there could be complete, unofficial &amp;quot;product images&amp;quot; that are created by the community, for example maybe one that incorporates only free software (in the GNU or OSI sense). Or images build with a particular niche market in mind -- a student for example.&lt;br /&gt;
&lt;br /&gt;
=== Wishlist voting ===&lt;br /&gt;
There could be a kind of voting system like they have at one of those big computer manufacturers homepage. Then the community could vote for the ideas that are most important to them. This would especially make sense for the hardware wishlist, because the hardware is still the part which can't be done by the community that easily.&lt;br /&gt;
&lt;br /&gt;
Here: [http://www.fevote.com/openmoko OpenMoko suggestion board]&lt;br /&gt;
&lt;br /&gt;
== Software: Additional features ==&lt;br /&gt;
&lt;br /&gt;
===PDA Mode===&lt;br /&gt;
&lt;br /&gt;
There are times when you wish to power up the device and not power up the gsm/cellphone portion of the phone. For example in meetings you might wish to access the PDA side with wifi as is the case for example on an aircraft.  On booting some method of booting to pda mode would be good - several other phones offer this feature.&lt;br /&gt;
&lt;br /&gt;
===Driving Mode===&lt;br /&gt;
&lt;br /&gt;
It may be forbidden in many countries, but many people use their cell phones while driving. With the touchscreen phones&lt;br /&gt;
this is very dangerous: You have to stare at the tiny numbers on the screen and try to hit them with your thumb or try to decipher tiny script of contacts, while steering with the other hand. There should be a configurable driving mode where the interface has a reduced functionality (e.g. only contacts and dialing) with HUGE interface buttons that are easy to use with limited attention.&lt;br /&gt;
&lt;br /&gt;
Idea: insted of using GPS for speed measurement, number of handovers (other word: cell switches) shall be measured - as one traveling a car switches cells more often than walkers)&lt;br /&gt;
&lt;br /&gt;
===Calling===&lt;br /&gt;
&lt;br /&gt;
==== Mask ID based on dialed numbers ====&lt;br /&gt;
It would be nice if my number only showed up when I call people in my address book and was otherwise masked. The phone I have now either always shows my number or never or can be set on a per call basis. Having it done automatically based on the number dialed would be good.&lt;br /&gt;
&lt;br /&gt;
==== Use calling cards and similar routing techniques for lower-cost calling ====&lt;br /&gt;
Many people use calling cards, low-cost numbers and similar ways of reducing the costs of their calls.  It would be nice to have a single panel that would allow you to configure the rules of dialing a number taking in to account such systems.&lt;br /&gt;
&lt;br /&gt;
==== Outgoing black/white lists ====&lt;br /&gt;
The ability to allow or deny outoging calls to certain numbers can be useful in a number of situations (e.g. the holder of the 'phone is a child, untrusted, etc.).  This could be related to entries in the contact list, for example a user is only allowed to call people who are in their contact list.&lt;br /&gt;
&lt;br /&gt;
Also lists for incoming calls? Some friends always come through, unknown numbers get rejected automatically.&lt;br /&gt;
&lt;br /&gt;
==== Time-based blocking/unblocking of calls ====&lt;br /&gt;
Allowing or disallowing outgoing calls at certain times of the day could be useful, e.g. blocking a business phone from making calls outside of business hours.&lt;br /&gt;
&lt;br /&gt;
====Speaker-phone====&lt;br /&gt;
* A speaker-phone is more than simply connecting the speakers to GSM audio, it's also echo cancellation, and eliminating the feedback that will otherwise happen between the speakers and the mic. This software has not been written.&amp;lt;BR&amp;gt;&lt;br /&gt;
The problem of speaker-phones is that the microphone &amp;quot;hears&amp;quot; what the speaker outputs - directly and every reflection in the surroundings of the telephone. Since the telephone line will allow noise from the microphone to pass to the speaker again - if the speaker is loud enough and the microphone sensitive enough we have a feedback loop producing echos or even a very loud beep.&amp;lt;BR&amp;gt;&lt;br /&gt;
A very crappy alternative that is used by some companies that just want to be able to print a feature on the front cover without needing to bring this feature to a useful state first now is the following:&amp;lt;BR&amp;gt;&lt;br /&gt;
Turn either the Microphone sensitivity or the speaker volume down alternatively depending on what the telephone thinks might be better in this second.&lt;br /&gt;
&lt;br /&gt;
Sounds as crappy, as this sounds, though, - and tends to make people very angry.&lt;br /&gt;
&lt;br /&gt;
====Advanced Airtime Tracking====&lt;br /&gt;
Many phone users have complicated plans, things like unlimited incoming, 100 anytime minutes, 1000 evening minutes, etc.  It would be nice if a user could input the various monthly airtime chunks their plan gives them, and then the phone could track how much is left in each chunk, i.e. How much anytime minutes are left this month? Optionally, the software could warn when someone is close to the monthly limit, to help avoid bigger bills.&lt;br /&gt;
On (at least some) prepaid [http://en.wikipedia.org/wiki/Unstructured_Supplementary_Service_Data USSD] can be used to check current balance.&lt;br /&gt;
&lt;br /&gt;
* Call duration should consider billing increments and show the durations according to accounting period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Anti-stutter software ====&lt;br /&gt;
Delayed Auditory Feedback (DAF) has shown to reduce stuttering in individuals by 70%. By using the microphone, it should be pretty simple to implement this on the OpenMoko. The DAF functionality should also be present during phone calls. See http://en.wikipedia.org/wiki/Delayed_auditory_feedback for more information.&lt;br /&gt;
&lt;br /&gt;
====Minimize In-Call mode (check address book while in call)====&lt;br /&gt;
On my locked phones I always find it annoying that one can not use other features while a call is in progress. In particular, I'd like to access the address book so that we can (1) give a caller someone else's phone number (or other info) and (2) lookup a phone number when using a calling card or some other proxy.&lt;br /&gt;
&lt;br /&gt;
Similar request when using the browser (lookup passwords, todo list, etc).&lt;br /&gt;
&lt;br /&gt;
====Hold Music (Ringback Tone)====&lt;br /&gt;
On some cellphone networks you can pay to change the normal [http://en.wikipedia.org/wiki/Ringback_tone Ringback Tone] that the caller hears when ringing, to a customised sound.&lt;br /&gt;
This can partially be implemented on the phone.&lt;br /&gt;
Issues are:&lt;br /&gt;
*In countries where callers pay, this will make you unpopular.&lt;br /&gt;
*In countries where the called party pays, it will use your minutes, or cost you money.&lt;br /&gt;
**A list of people to activate this function for would alleviate this.&lt;br /&gt;
*[[GPRS]] internet connection will stall while the hold music is being played.&lt;br /&gt;
*Extra battery used when playing music.&lt;br /&gt;
&lt;br /&gt;
Also see [[Answering Machine]].&lt;br /&gt;
&lt;br /&gt;
====Play sound clips over the air====&lt;br /&gt;
Dialer could have a tab with big buttons which, when push, send sound clips over GSM to the person on the other end of the call.  This feature is included in GizmoProject and is called sound blasts: http://support.gizmoproject.com/index.php?_a=knowledgebase&amp;amp;_j=questiondetails&amp;amp;_i=104&lt;br /&gt;
The buttons can have default sounds, but also have the ability to be customized.&lt;br /&gt;
&lt;br /&gt;
It would also be useful for notifying people why you can't talk (for example, having an &amp;quot;I can't talk tight now - I'm in the library - this is a pre-recorded message&amp;quot; would be good. Also perhaps you could loop a pre-recorded sound in the background so you can lie about where you are, and have the ability to simulate a really bad connection.&lt;br /&gt;
&lt;br /&gt;
==== DTMF Landline Dialing ====&lt;br /&gt;
The ability to hold the Neo near the microphone of a landline handset and have the Neo dial the landline by sounding DTMF tones. The DTMF tones could be generated in software or be pre-recorded files.&lt;br /&gt;
&lt;br /&gt;
Graphically this could be done by adding a 'DTFM dial' button to a context menu. The user would select a contact then presses the 'DTMF dial' button to start the process. A small delay could also be added to allow time to put the Neo near the landline handset.&lt;br /&gt;
&lt;br /&gt;
For the Neo to know which area code to use (or not use) the current or last GPS coordinates could be utilised.&lt;br /&gt;
&lt;br /&gt;
==== Conversation Recorder ====&lt;br /&gt;
&lt;br /&gt;
An option to record phone conversations.  Would be helpful to have the device always recording for every call, with the sound data encoded to low quality Ogg Vorbis or SPEEX and stored in RAM.  At the end of the conversation the user would have the option to save to flash or discard the conversation.  This idea could also be applied to voicemail so you could save voicemails locally.&lt;br /&gt;
&lt;br /&gt;
====Unlicensed Mobile Access (UMA)====&lt;br /&gt;
T-Mobile recently rolled out a UMA service that hands off calls between the GSM network and WiFi access points. Only a few phones support it right now, this could be a rather unique feature if OpenMoko can implement it.&lt;br /&gt;
&lt;br /&gt;
This can be combined with a GPS map to show where local free hubs are.&lt;br /&gt;
&lt;br /&gt;
==== Ignore-Call Button ====&lt;br /&gt;
{{Main|Wishlist:Ignore Call Button}}&lt;br /&gt;
&lt;br /&gt;
Shut up a ringing phone, without accepting or rejecting the call.&lt;br /&gt;
&lt;br /&gt;
Another alternative might be to use microphone to recognize when the user gives an audible &amp;quot;Shhh!&amp;quot; command.  This could prove difficult to determine with the simultaneous ringing, and possible in-pocket shuffling noises. &lt;br /&gt;
&lt;br /&gt;
A really usable feature is to &amp;quot;reject with SMS/text message&amp;quot; - letting the user reply the caller choosing a previously setup template or typical response: &amp;quot;I'm in a meeting - I'll call you later&amp;quot; or &amp;quot;Can't take your call now, please call back in 10 minutes&amp;quot;. This feature typically is a much better way to get your co-workers (ie boss) to back off, than to silently ignore the call.&lt;br /&gt;
&lt;br /&gt;
The accelerometers could be queried while the phone is ringing to detect a firm tap on the phone. This would avoid the delays of fumbling to remove the phone from one's pocket to silence the ringer when you've forgotten to set it to silent mode. Just firmly tap the phone through your pocket, and the ringer will silence, like some Motorola pagers. Maybe single tap = silence; double tap = (activate voicemail or preset SMS).&lt;br /&gt;
&lt;br /&gt;
==== Voice Mailbox ====&lt;br /&gt;
{{Main|Voice Mailbox}}&lt;br /&gt;
On-Phone voice mailbox that records calls on the phone and retrieves voice messages from your mobile service provider's voice mailbox and saves them locally.&lt;br /&gt;
Can act profile-dependent.&lt;br /&gt;
&lt;br /&gt;
==== Hold Button ====&lt;br /&gt;
&lt;br /&gt;
Similar to mute, but plays a sound file for the user on the other end while they wait.  The sound file could be chosen in some setup beforehand.&lt;br /&gt;
&lt;br /&gt;
==== Unanswered Call, Fast Call ====&lt;br /&gt;
&lt;br /&gt;
In Greece because of the various bill programs some people call a mobile phone, rings one time and then hangup.&lt;br /&gt;
Then the user of the mobile phone calls the other user(using the CallerID recognition).&lt;br /&gt;
&lt;br /&gt;
===Audio===&lt;br /&gt;
&lt;br /&gt;
==== Ambient Noise Detection ====&lt;br /&gt;
{{Main|Wishlist:Software:Ambient Noise Detection}}&lt;br /&gt;
&lt;br /&gt;
Using the microphone to detect ambient noise the ringtone volume could be adjusted automatically.&lt;br /&gt;
&lt;br /&gt;
If the ambient noise exceeds a preset threshold, the ring vibrator could be activated. This is good for when people forget to enable vibrate mode when entering noisy environments.&lt;br /&gt;
&lt;br /&gt;
Detection of ambient noise could also be used to subtract the noise from the audio signal. However this approach is best performed using two Microphones, one for the voice and the other to detect the noise.&lt;br /&gt;
&lt;br /&gt;
==== Active noise control ====&lt;br /&gt;
&lt;br /&gt;
Using the microphone to do [http://en.wikipedia.org/wiki/Anti-noise active noise control] on media player playback or telephone calls. This should be an independent module/library which can be used by any application which might require this feature. also provide a way to easily alter the parameters of the active noise control.&lt;br /&gt;
&lt;br /&gt;
==== Hear Impaired Mode ====&lt;br /&gt;
&lt;br /&gt;
Hearing impaired people need louder speaker(but with less volume than hands free) and equalized sound, based on their hearing problems(example 20dB hearing loss from 2KHz to 4KHz).&lt;br /&gt;
Older people 50+ years old need slower speech rate(time stretch, cut the big speech gups) and cleaner voice.&lt;br /&gt;
&lt;br /&gt;
Please note also the Hearing Aid Compatibility regulations in the US. I have tried to summarize and clarify them [http://quux.wiki.zoho.com/WhereAreHACphones.html here]. I haven't yet discovered whether the FIC device is M or T rated. For many hearing impaired users, a tcoil coupling to their hearing aid (t3/T4 rating) would be preferable to manipulating sound output in other ways.&lt;br /&gt;
&lt;br /&gt;
==== Mute Button ====&lt;br /&gt;
&lt;br /&gt;
Button to temporarily disable microphone while talking for applications such as telephone, audio recording and (when available) movie recording.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Web Browser===&lt;br /&gt;
&lt;br /&gt;
==== Full-page Zoom Support ====&lt;br /&gt;
Full page zoom is a very good feature. If possible, people would want to browse the internet with normal layout than a distorted one. It's best if I could double-tap a text or image block and zoom to a fit size.&lt;br /&gt;
&lt;br /&gt;
The [[BigPageWidget]] proposal suggests 'Full Page Zoom' should be implemented as a widget available to all applications.&lt;br /&gt;
&lt;br /&gt;
* If the processor and memory could afford, it is good to just use [http://www.mozilla.org/projects/firefox/3.0a8/releasenotes/ Firefox 3] in OpenMoko. It has implemented latest gecko's full-page-zoom ability. With certain modification, we could do the same zoom like iPhone's Safari.&lt;br /&gt;
* Firefox 3 may be a big eater. A cut-down version of it may be good enough.&lt;br /&gt;
* If this is not practical, Minimo with full-page-zoom ability is good.&lt;br /&gt;
&lt;br /&gt;
==== Plugins Support ====&lt;br /&gt;
* While an extensive browser plugin system would be costly to the efficacy of the platform four particular browser plugins as poplularized by Mozilla firefox should be adapted to the web-browser, namely: [http://noscript.net/ noscript], [http://adblockplus.org/en/ adblock plus], [http://www.greasespot.net/ greasemonkey] and [http://www.foxmarks.com/ foxmarks].&lt;br /&gt;
* Careful use of these can dramatically reduce bandwidth, page space, and rendering costs even if it comes at the risk of some hard drive space in the form of block lists.&lt;br /&gt;
* Greasemonkey, in particular, gives users control to set up scripts for commonly traveled pages to further reduce unnecessary or unwanted content.&lt;br /&gt;
&lt;br /&gt;
==== Widget support ====&lt;br /&gt;
Built-in browser with the ability to install widget shortcuts (aka links) in the main phone menu, also some apis for interfacing with the other functionality of the phone like adding contacts, reading contacts, reading gps-psoition etc.. (maybe there is some defacto widget standard that could be used)&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.w3.org/TR/widgets/ W3C spec] being developed, which may not be exactly what the original proposal had in mind, but it is about writing simple applications with HTML, SVG and JavaScript. It is mainly Opera's work, and while most [http://widgets.opera.com/ developed widgets are not very useful], there are some that are, and it creates a very nice development platform, especially for mobile devices. So, I think it makes an awful lot of sense for OpenMoko to support this spec.&lt;br /&gt;
&lt;br /&gt;
===Media===&lt;br /&gt;
====Music/Video Software====&lt;br /&gt;
A real good programming area for competition with the iPhone, a singular video/music player would be great for multimedia. A seamless integration system, a la iTunes and iPod, would be extremely popular. &lt;br /&gt;
&lt;br /&gt;
Using the Wi-Fi connectivity, a separate music program that supports wireless music sharing/ streaming (similar to what can be done when two computer running iTunes that are both on the same network) and that also supports internet radio.&lt;br /&gt;
&lt;br /&gt;
It would also be nice to have some kind of &amp;quot;announce your musical taste&amp;quot; mode. This could be implemented using last.fm profiles, such that when e.g. in a crowded place a user nearby has a similar musical taste, both users get notified so they can share their music files with each other (perhaps using a photo for id). Great for discovering new music - and making friends!&lt;br /&gt;
&lt;br /&gt;
- Possible copyright issues sharing music files?&lt;br /&gt;
&lt;br /&gt;
Sure, but that's the user's concern, not the developer's. There's no way for us to know which audio files the user is permitted/not permitted to share.&lt;br /&gt;
&lt;br /&gt;
==== Reading Support ====&lt;br /&gt;
It would be really great to be able to read :&lt;br /&gt;
&lt;br /&gt;
*PDF&lt;br /&gt;
*Open Document files&lt;br /&gt;
*Text / RTF files&lt;br /&gt;
*fb2 files (fbreader)&lt;br /&gt;
*MS Office files&lt;br /&gt;
*Aportis Doc (pdb)&lt;br /&gt;
*DjVu&lt;br /&gt;
*...&lt;br /&gt;
&lt;br /&gt;
In both landscape and portrait&lt;br /&gt;
&lt;br /&gt;
==== Wikipedia Mirror ====&lt;br /&gt;
{{Main|Wishlist:Wikipedia_Mirror}}&lt;br /&gt;
&lt;br /&gt;
==== Blog ScribblePad ====&lt;br /&gt;
&lt;br /&gt;
Draw an image (and maybe add some text), then post to your blog.&lt;br /&gt;
&lt;br /&gt;
==== E-Book Reader ====&lt;br /&gt;
* Neos brilliant ultra-sharp screen makes for a very good e-book reading device. All it takes is a good e-book reader with touch-screen page turning / scrolling (see the [[BigPageWidget]] proposal). FBReader could probably be adjusted easily by an experienced GTK hacker. Note that e-book reading is different to pure text/pdf displaying as it requires at least auto-bookmarking of the last read page, proper text and image scaling and text formatting.&lt;br /&gt;
&lt;br /&gt;
==== Personal Wiki ====&lt;br /&gt;
{{Main|Wishlist:PersonalWiki}}&lt;br /&gt;
&lt;br /&gt;
Display the notes database as a Wiki.  Inspiration:  [http://www.acrocat.com/AcroWiki/default.asp?lang=en AcroWiki].&lt;br /&gt;
&lt;br /&gt;
[http://www.didiwiki.org/ Didiwiki]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Dictionary, thesaurus, translator and flashcards ====&lt;br /&gt;
Native lookup dictionary and thesaurus and foreign translation dictionaries, also with support for Asian languages. Optional custom configurable (though preconfigured) interface with on-line versions of dictionaries, thesaurus and translation services.&lt;br /&gt;
&lt;br /&gt;
'''Dictionary'''&lt;br /&gt;
Something like [http://www-user.tu-chemnitz.de/~fri/ding/ ding]:&lt;br /&gt;
&lt;br /&gt;
advantages:&lt;br /&gt;
* small&lt;br /&gt;
* very efficient + useful&lt;br /&gt;
* only limited to really needed functions&lt;br /&gt;
&lt;br /&gt;
Support for vocabulary training with flashcard system (also usable for other content than foreign language words!)&lt;br /&gt;
&lt;br /&gt;
==== Flickr uploader ====&lt;br /&gt;
A simply, drag &amp;amp; drop uploader, tagger and organizer to upload images on phone to [http://flickr.com Flickr], with support for various languages. A good base could be the cross-platform uploader [http://juploadr.org/ jUploadr], written in Java and working on Windows, Mac and Linux. But, most of all, the best '''GPL''' program which actually do this work is '''[http://mobilepushr.jottit.com/ Mobile Pushr]''', written in C and Cocoa for iPhone, must be probably ported in python to work on OpenMoko.&lt;br /&gt;
&lt;br /&gt;
===PIM (Personal Information Managment)===&lt;br /&gt;
====Context Sensitivity====&lt;br /&gt;
Any email or sms message or application that contains a telephone number should be click to dial, eg [http://123567890 1234567890]. Addresses link to mapping software too?&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
&lt;br /&gt;
Something for taking notes would be a nice feature:&lt;br /&gt;
[http://www.gnome.org/projects/tomboy/ Tomboy] has some nice syncing features and is gtk based.&lt;br /&gt;
&lt;br /&gt;
Some Screenshots are [http://www.gnome.org/projects/tomboy/images/ here].&lt;br /&gt;
&lt;br /&gt;
==== Calendar ====&lt;br /&gt;
&lt;br /&gt;
A nice calendar application should be implemented in OpenMoko. This tool should have a syncing feature with your desktop computer.&lt;br /&gt;
The tool should have a reminder feature and other features like other mobile phones already have.&lt;br /&gt;
&lt;br /&gt;
I think synchronization sould be handled by computer with opensync+syncml based tool, not by calendar itself. --[[User:Antono|Antono]] 12:25, 7 January 2008 (CET)&lt;br /&gt;
&lt;br /&gt;
* If this cellphone is thought also as a PDA, of course it needs a calendar. But I would like to see something better than just a calendar, I was thinking that there could be some application using &amp;quot;fisheye&amp;quot; view. Just like [http://www.cs.umd.edu/hcil/datelens/], though that example seem a bit chaotic. --[[User:Yprum|Yprum]] 22:27, 21 February 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
==== Address Book ====&lt;br /&gt;
&lt;br /&gt;
* Option to search not just the stored list of addresses, but one or more of the online phonebooks. Probably should be modular to make adding/changing phonebook sites easy.  Also allows for future integration with LDAP&lt;br /&gt;
servers or whatever.&lt;br /&gt;
* Also the possibility to search all info on the contact, like number, email, postal address and so on, in case someone asks you to identify a known number.&lt;br /&gt;
* Web-based map-lookup. 'How do I get there from here? (here = current GPS location)'  This could also be done&lt;br /&gt;
by integrating with whatever on-phone GPS mapping software the Neo ends up using.&lt;br /&gt;
* Random text input 'notes' about a contact&lt;br /&gt;
* Overall, this should more resemble a Palm-pilot's address-book than your average cellphone's&lt;br /&gt;
* Automated Daily backup of phone book to a website archive (similar to Verizon's Back-up Assistant&lt;br /&gt;
*Ability to integrate address book with web-based email (such as gmail) account, for those who use web based email as their primary account&lt;br /&gt;
* '''[[Wishlist:Tagging|Tagging]]''' Place tags for contacts. Enhance message application to send messages to all contacts tagged with ... . Enhance other application(GPS, ...) with tags.&lt;br /&gt;
* Support for:&lt;br /&gt;
**[http://en.wikipedia.org/wiki/SyncML SyncML]&lt;br /&gt;
**[http://abook.sourceforge.net/ abook] a text-based addressbook program&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Ldap LDAP] address book&lt;br /&gt;
**[http://en.wikipedia.org/wiki/LDIF LDIF], [http://en.wikipedia.org/wiki/Xml XML] and [http://en.wikipedia.org/wiki/Comma-separated_values CSV] export and import (when possible).&lt;br /&gt;
*Store Bluetooth IDs of friends and notify (configurable only on this device or on both devices) when a one of these Bluetooth ID has been detected (this is more a separate application but has requirements on the address book. Should also be able to create an address book entry from a Bluetooth ID. Could be used as a nice tool to detect people who you're avoiding.&lt;br /&gt;
* Support for family relations (explained further on the [[Talk:Wish_List#Address_book:_Support_for_family_relations|talk page]]).&lt;br /&gt;
&lt;br /&gt;
==== Database/List Display/Edit ====&lt;br /&gt;
{{Main|Wishlist:PilotDB}}&lt;br /&gt;
&lt;br /&gt;
One of the most useful apps on my Palm Pilot for me is [http://pilot-db.sourceforge.net/ pilot-db].  It's GPL'd.&lt;br /&gt;
&lt;br /&gt;
==== To-Do lists ====&lt;br /&gt;
&lt;br /&gt;
* It'd be nice to have something like [http://www.joesgoals.com Joe's Goals] always available, like my phone is, even when I'm disconnected from the net.&lt;br /&gt;
* I would like to be able update my [http://todotxt.com/ todo.txt] which is stored on a personal server from the phone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Context based To-Do list ====&lt;br /&gt;
{{Main|Wishlist:context based to-do list}}&lt;br /&gt;
&lt;br /&gt;
If I arrive home and there are &amp;quot;@home&amp;quot; things in the to-do list, the Context based to-do list reminds me of that.&lt;br /&gt;
&lt;br /&gt;
==== Workout ====&lt;br /&gt;
&lt;br /&gt;
Use your phone instead of your notebook while at the gym, and get pretty graphs to admire after you're done.&lt;br /&gt;
&lt;br /&gt;
==== Shopping List ====&lt;br /&gt;
keep Track of Prices in different shops and the products you have/don't have. Ideally using a barcode reader and gps.&lt;br /&gt;
If it was made aware of recipes it could even tell you what to buy without entering a shoppinglist manually.&lt;br /&gt;
&lt;br /&gt;
==== [[Fuel Log]] ====&lt;br /&gt;
File data about fueling your car (date/time, liters, price, mileage, ...) and display some information (costs per month, average consumption, ...).&lt;br /&gt;
Advanced features could include:&lt;br /&gt;
* Automatically storing the GPS coordinates of the place where the car has been fueled (can be deactivated)&lt;br /&gt;
* Sending the data to a central server which collects the information ( spritmonitor.de, anything else ?)&lt;br /&gt;
* Let the OpenMoko receive fuel logs per SMS (e.g. if my wife with a non-openmoko mobile fuels the car and wants to file the data using her mobile phone)&lt;br /&gt;
* Let the OpenMoko device act as SMS gateway for non-openmoko devices to easily send the data to the central server&lt;br /&gt;
* Also support for air log for divers. Not that you will take this device under water but for the crew at the surface.&lt;br /&gt;
&lt;br /&gt;
==== Keep in touch reminder ====&lt;br /&gt;
A background application which keeps track of your friends and reminds you when you have not talked, SMS, IM or mailed a person for more than # days.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Menstruation period timer ====&lt;br /&gt;
Fill in statistics and compute probabilities for menstruation, fertility, mood.&lt;br /&gt;
See http://www.getjar.com/products/48/MyGirls&lt;br /&gt;
&lt;br /&gt;
==== Tagging ====&lt;br /&gt;
{{Main|Wishlist:Tagging}}&lt;br /&gt;
Tags can be used by various applications. Requirement is interoperability for further enhancement.&lt;br /&gt;
Tags should be applied to contacts, calendar events, mail/sms, calls, places(GPS) and files.&lt;br /&gt;
http://tracker-project.org has all needed tagging-and-searching functionality and ready to be used on low-resourced devices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Exchange Integration ====&lt;br /&gt;
&lt;br /&gt;
Once there is good TCP/IP connectivity on this phone, integration with corporate email/calendar/to do/contacts/etc servers would be a big advantage... near-real-time automatic email downloads and automatic bi-directional syncing are productivity boosters that you have to experience to appreciate. It turns your phone from a 'nice gadget to fiddle with' to a natural-feeling extension of your day-to-day life.&lt;br /&gt;
&lt;br /&gt;
* Is the time right to name names ? Add as your liking...&lt;br /&gt;
** Plugin/integration to &amp;amp; from Kontact&lt;br /&gt;
** Same with Evolution - Thunderbird - Seamonkey&lt;br /&gt;
** ?? Google Calendars ?? (this one is tough)&lt;br /&gt;
** Ms Exchange&lt;br /&gt;
&lt;br /&gt;
==== An electronic wallet ====&lt;br /&gt;
&lt;br /&gt;
A database which stores securely PIN codes, login data, bank and email accounts, membership informations, and other valuable and private data. Entries can be ordered in a folder-like manner. Access to the database is given by a master password. The database as well as the master password are stored with strong encryption. For security reasons, the program asks again for entry of the master password after a certain period of inactivity. The database can be synchronized with a PC application (ideally written in Java for cross platform compatibility).&lt;br /&gt;
&lt;br /&gt;
Examples: KWallet [http://docs.kde.org/stable/en/kdeutils/kwallet/index.html], Viskeeper [http://www.sfr-software.de/cms/EN/pocketpc/viskeeperpro/index.html], KeePass [http://keepass.info/], KMyMoney2&lt;br /&gt;
&lt;br /&gt;
==== Easy business card sharing for a small group (in the same room) over bluetooth or WIFI ====&lt;br /&gt;
&lt;br /&gt;
Six Neo1973 owners are having a chat in a cafe.    They agree to split but meet later.     They want to exchange their numbers with each other before they go....     The normal way to do this is for a rather longwinded repeating of numbers to each other, or half the people manually inputting numbers before phoning/texting the other half to complete the process.    All in all its a fair number of button presses to get it sorted.&lt;br /&gt;
&lt;br /&gt;
Instead the NEO could have a small app where the phones link up in a small peer to peer Bluetooth network and share automatically with one person initiating a request and the other detected NEOS agreeing/acknowledging the share.   The initiating NEO would then sync the mini-group automatically by interrogating each phone and then sending the table of results.     The NEOs would have to be clever about checking for duplicates in the address book and offering a choice to the user if there are any conflicts.&lt;br /&gt;
&lt;br /&gt;
PROS: &lt;br /&gt;
*genuine saving in time for social and business situations&lt;br /&gt;
&lt;br /&gt;
CONS: &lt;br /&gt;
*I am sure there are some security hassles to be pondered....&lt;br /&gt;
*not going to be used every day... definitely not an immediate priority.....&lt;br /&gt;
*only at geek conferences will all have a neo....&lt;br /&gt;
&lt;br /&gt;
==== SMS Counter ====&lt;br /&gt;
&lt;br /&gt;
An application which shows on the today-screen how many SMS i've already sent in this actual month. Some have for example 150 free SMS to write each month. With that program you can see all the time how many SMS are left until the end of the period. As an alternative it could be a counter which counts backwards from a predefined number over a defined period.&lt;br /&gt;
&lt;br /&gt;
==== Data Storage ====&lt;br /&gt;
&lt;br /&gt;
Store all the data about communications with a contact (SMS, MMS, phone calls, emails, IM, etc)  in a database and make them available in one list or one timeline.&lt;br /&gt;
Make this list available through the address book.&lt;br /&gt;
This would be great for people who are switching between one or more communication channels frequently&lt;br /&gt;
&lt;br /&gt;
===Profiles===&lt;br /&gt;
{{Main|Wishlist:Profiles}}&lt;br /&gt;
&lt;br /&gt;
The Wishlist:Profiles page documents many possible profiles - ways to configure the phone. Including ways to respond to calls, wifi and GPS events.&lt;br /&gt;
And how to automatically switch between them.&lt;br /&gt;
&lt;br /&gt;
===Text Messaging===&lt;br /&gt;
For '''Text Input related ideas''' see [[Wishlist:Text_Input]]. Bear in mind that T9 can not be included&lt;br /&gt;
For current development status of the messaging-app see: [[Messages]].&lt;br /&gt;
&lt;br /&gt;
There are many useful options that now can be used to full capacity:&lt;br /&gt;
&lt;br /&gt;
* '''Instant Messaging'''&lt;br /&gt;
Bringing a new GTK gui or a resized Qt gui out for the serverless Instant Messenger http://Retroshare.sf.net&lt;br /&gt;
&lt;br /&gt;
* '''Acknowledge/status SMS'''&lt;br /&gt;
In GSM networks so-called acknowledge-SMS are sent back to the SMS's dispatcher in order to indicate that the primal sms was received (as message delivery is only best effort and is not guaranteed). So in the SMS dialog there could be equal sized buttons with captions as 'send only', 'send and receive delivery status message' and 'send and notify (e.g. ring) when delivery succeeded'.&lt;br /&gt;
&lt;br /&gt;
** '''Special handling of status-SMS''' &lt;br /&gt;
Related to the previous entry, these acknowledgment-sms' should be handled in a different way than normal SMS'. Most Motorola do this, while Samsung SGH series don't &amp;amp; clog the inbox, warn of a &amp;quot;new&amp;quot; message upon Status notification: Delivery Status Messages should be stored in a separate menu so they don't bloat the received-folder and you are able to quickly review the status of the messages you had sent.&lt;br /&gt;
* '''SMS at time/date''' You could be able to set up messages that are sent at a certain time/date&lt;br /&gt;
* '''Binary SMS''' Send binary SMS. Could be used to feign WAP pushes. [http://en.wikipedia.org/wiki/Multimedia_Messaging_Service] See: &lt;br /&gt;
** Resource for SMS encoding: [http://web.archive.org/web/20021016104345/www.dreamfabric.com/sms/] [http://web.archive.org/web/20060411222332/] [http://home.student.utwente.nl/s.p.ekkebus/portfolio/resource/sms_pdu.html] [http://www.ihub.com/Binary%20Messages.htm]&lt;br /&gt;
** [http://www.gammu.org www.gammu.org] - you can use Gammu/Gammu+ source for this software and/or understanding various SMS formats including EMS, WAP, Nokia Smart Messaging, Siemens &amp;amp; Alcatel encoding ([[User:Marcin|I could]] eventually help)&lt;br /&gt;
** Resource for SMS encoding (German): http://de.wikipedia.org/wiki/SMS-Kodierung&lt;br /&gt;
** The infamous pocketpc-attack: http://www.mulliner.org/pocketpc/&lt;br /&gt;
* '''Profile-override-SMS''' SMS that start with a certain code word override the silent profile and have the phone ring. So someone could alert you in case of some emergency.&lt;br /&gt;
* '''Codeword-SMS''' An expansion of the above: check for code words and allow selectable tones for matches. E.g. &amp;quot;Server Down!&amp;quot; has a loud klaxon, &amp;quot;Disk Warning&amp;quot; has a quiet chirp.&lt;br /&gt;
* '''(De-)Abreviation-script''' Implement a script that de-abbreviates: &amp;quot;hi m8 u k?-sry i 4gt 2 cal u lst nyt-y dnt we go c film 2moz&amp;quot; becomes &amp;quot;Hi mate. Are you okay? I am sorry that I forgot to call you last night. Why don't we go and see a film tomorrow?&amp;quot; (taken from: [http://en.wikipedia.org/wiki/SMS_language])&lt;br /&gt;
** Implement a script that abbreviates :-)&lt;br /&gt;
* '''Anti-Spam''' ...feature for SMS. May be it's possible to port some Bayesian based application like bogofilter.&lt;br /&gt;
* '''Rule based authorizations''' ...for received messages. For example, delete messages from one source between 9h00 and 18h00 (workday) allow them otherwise (to get alerting messages).&lt;br /&gt;
* '''Enable chat-like SMS-viewing''' SMS-Email-like: retain SMS app, but store 'conversations' rather than pile-up. Group/archive conversations by Caller Group (Work / Friends / Home / any user-defined Caller Group). Show appropriate icon from either Caller Group or Caller ID at the source of conversations panel&lt;br /&gt;
* '''Searching''' allow full-text search or string search.&lt;br /&gt;
* '''Massive SMS Deletion''' based on Conversation, author, before-date-xx.xx.xxxx, caller group, [[Wishlist:Tagging|tags]]...&lt;br /&gt;
* '''Call Back''' Prompt 'Call Back' alongside other first-line options (Delete, Save number,.. this kind of options) that appear when reading an SMS.&lt;br /&gt;
* '''Non-destructive deletion''', deleted messages goes to trash, and are recoverable.&lt;br /&gt;
* '''SMS-EMail-Gateway'''&lt;br /&gt;
SMS comes in, gets forward to your inbox, like any other piece of mail.  Appropriate alerts and etc occur - again, just like for email. A simple SMTPD running on 127.0.0.1 that is hooked to an email-to-SMS translator that will send email addressed to 'SMS@localhost' (or whatever special address) out via SMS&lt;br /&gt;
* '''SMS-filter chain''', for stuff like Codeword-SMS above, Theft-mode activation, auto-response (reply with gsm-position for &amp;quot;Where are you?&amp;quot;), auto-substitution (like replace $POS with gsm-position in outgoing SMS).&lt;br /&gt;
* '''SCROOGE-SMS'''  This is an intelligent SMS router.    When you write your SMS you get the option of how to send it&lt;br /&gt;
** By standard carrier SMS - cost 10cents&lt;br /&gt;
** By OpenMoko SCROOGE SERVER - this will send your SMS to the OpenMoko Community SCROOGE SERVER next time you have WiFi - the phone will remind you to turn on WiFi when it knows you are in places where you have WiFi access.   The person you are sending to picks up when they come into WiFi Range.    This comes with an intelligent reminder that tells you that message has still not been delivered in 24 hours and would you now like to send it by a paymethod.    This is better than IM because both parties do not have to have WiFi at the same time. - cost FREE&lt;br /&gt;
** By email/Wifi - cost FREE&lt;br /&gt;
** By email/GPRS - cost ?&lt;br /&gt;
** Too many options!!!&lt;br /&gt;
** Alternatively SCROOGE SERVER could auto launch IM client if it detects both parties have WiFi at the same time (Status kept on SCROOGE SERVER?) to allow instant reply.....    Person who receives has the option to reply in SMS or in IM or in VOIP phone.&lt;br /&gt;
&lt;br /&gt;
=== Text input ===&lt;br /&gt;
{{Main|Wishlist:Text Input}}&lt;br /&gt;
There are many good suggestions for text input on the specific text input ideas page.&lt;br /&gt;
&lt;br /&gt;
=== More/Custom Input Method Widgets ===&lt;br /&gt;
{{Main|Wishlist:More/Custom_Input_Method_Widgets}}&lt;br /&gt;
Additional and customizable Input Method Widgets (similar to virtual keyboard).  &lt;br /&gt;
This could add soft-key functionality to games or other applications such as:&lt;br /&gt;
*D-Pads&lt;br /&gt;
*buttons&lt;br /&gt;
*virtual trackballs&lt;br /&gt;
*...&lt;br /&gt;
Personalized layouts could be associated with each application.&lt;br /&gt;
&lt;br /&gt;
=== Games ===&lt;br /&gt;
{{Main|Wishlist:Games}}&lt;br /&gt;
&lt;br /&gt;
=== Mesh Networking ===&lt;br /&gt;
{{Main|Wishlist:Mesh Networking}}&lt;br /&gt;
&lt;br /&gt;
=== Printing Support ===&lt;br /&gt;
It would be really neat to be able to print over either bluetooth, Wifi, or USB. I can imagine wanting to print:&lt;br /&gt;
&lt;br /&gt;
* Notes&lt;br /&gt;
* Maps&lt;br /&gt;
* Email&lt;br /&gt;
* Calendars&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
Cups contains a bluetooth printing backend, so (in theory) once you have your data in postscript format, you could hand it to cups and it'll do the rest. In practice, it depends on&lt;br /&gt;
&lt;br /&gt;
# GTK+'s printing support&lt;br /&gt;
# Making cups run on a really small system&lt;br /&gt;
&lt;br /&gt;
{{note| GTK+'s printing support seems to be very immature in 2.6 (which we need to use for some time). Gtk+ 2.10 contains much better printing support -- once we can use this, it should be more easy.}}&lt;br /&gt;
&lt;br /&gt;
There's always the possibility to render postscript ourselves, but this is not a piece of cake -- in general, printing is much harder than one would imagine.&lt;br /&gt;
&lt;br /&gt;
Further details:&lt;br /&gt;
* [http://groups.osdl.org/apps/group_public/download.php/2205/print-summit-gtk.pdf#search=%22gtk%2B%20printing%20API%22 osdl.org]&lt;br /&gt;
* [http://www.gnome.org/~alexl/presentations/guadec2006-printing.pdf#search=%22gtk%2B%20printing%20API%22 gnome.org]&lt;br /&gt;
* [http://www.j5live.com/?p=204 j5live.com]&lt;br /&gt;
&lt;br /&gt;
===Misc Software===&lt;br /&gt;
====Clocks/timers/Activity meters====&lt;br /&gt;
===== Sport tracker =====&lt;br /&gt;
{{Main|Wishlist:Sport_tracker}}&lt;br /&gt;
Sport tracker can be used to measure the distance/velocity from point A to point B (or it could have several intermediate stopping points) using GPS.  This would be extremely useful for running, biking, hiking, etc.&lt;br /&gt;
&lt;br /&gt;
===== Standby clock =====&lt;br /&gt;
{{Main|Wishlist:Standby_clock}}&lt;br /&gt;
A quick way to see what time it is.&lt;br /&gt;
&lt;br /&gt;
===== Egg Timer =====&lt;br /&gt;
{{Main|Wishlist:EggTimer}}&lt;br /&gt;
&lt;br /&gt;
Very simple (one click) count up / count down timers are very useful.&lt;br /&gt;
&lt;br /&gt;
===== Cycle Computer =====&lt;br /&gt;
As already mentioned by [http://wiki.openmoko.org/wiki/User_talk:Technil Technil], a cycle computer could be created using gps. The sensor at the bike's wheel could transmit data via bluetooth or some cable that would be attached to an openmoko device. In order to save power, one could switch off the gps and only use the bike's sensor.&lt;br /&gt;
* Just another idea that came to me: Why don't have sensor's transmit cable plug into the headphone/microphone plug? A tool reads the signals created by the induction of the passing magnet, then gives them to the cycle-computer-app :) --[[User:Minime|Minime]] 19:50, 12 April 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
===== NTP Server =====&lt;br /&gt;
&lt;br /&gt;
Run the [http://www.ntp.org NTP] daemon using the GPS chipset as a reference clock, so that the Neo would have a very accurate time-of-day clock and would be able to serve time to other networked devices. &lt;br /&gt;
&lt;br /&gt;
I don't know what it would take to implement this. Items to consider would be the availability of a 1 pulse-per-second hardware signal, the accuracy of timestamps delivered in NMEA messags, etc. Dealing with power-management issues (such as the device going to sleep) would also be challenging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Find Keys/locate stuff =====&lt;br /&gt;
&lt;br /&gt;
This would require an additional accessory: a tag which transmits a signal that the Openmoko device can pick up. The tag could for example be attached with a ring loop to your keys, put in your wallet, or be attached with high strength adhesive strips to your remotely controlled aircraft. Whenever you can't find back your keys, wallet, RC aircraft,... you activate this application. When the device picks up the signal of the tag, it translates it to clear audio and visual prompts to guide you in the right direction.&lt;br /&gt;
&lt;br /&gt;
A commercial device that offers this functionality is the [http://loc8tor.com/ loc8tor]. Having this in the Openmoko phone would obliviate the need for a separate device. Murphy's law dictates that you'll only loose your keys when you don't know any more where you've put the loc8tor tracking device. But you're bound to always have your phone with you. &lt;br /&gt;
&lt;br /&gt;
Additionally, you could also set a safety perimeter. Whenever a tagged item moves more then X meters from the phone, a signal will be given.&lt;br /&gt;
&lt;br /&gt;
For a related idea, see [[Wishlist#Dude.2C_Where.27s_My_Car.3F|Dude, Where's my car]].&lt;br /&gt;
&lt;br /&gt;
===== Reality check reminder =====&lt;br /&gt;
{{Main|Wishlist:Reality check reminder}}&lt;br /&gt;
&lt;br /&gt;
A tool to [http://www.phrack.org/issues.html?issue=64&amp;amp;id=16 hack your brain]&lt;br /&gt;
&lt;br /&gt;
===== Automatic timezone changing (GPS) =====&lt;br /&gt;
&lt;br /&gt;
Check the timezone with GPS and adapt them.&lt;br /&gt;
&lt;br /&gt;
====Calculators====&lt;br /&gt;
===== A Universal Unit Converter Tool =====&lt;br /&gt;
&lt;br /&gt;
One never knows when one may have to convert acre-feet into deciliters.  A unit conversion tool makes all engineers and engineer wannabes much happier. And not only the engineers. &lt;br /&gt;
&lt;br /&gt;
Ideas what kind of conversions a converter tool could do:&lt;br /&gt;
&lt;br /&gt;
Length&lt;br /&gt;
- Acceleration&lt;br /&gt;
- Angle&lt;br /&gt;
- Angular Velocity&lt;br /&gt;
- Area&lt;br /&gt;
- Capacitance&lt;br /&gt;
- Radioactivity&lt;br /&gt;
- Currency &lt;br /&gt;
- Charge&lt;br /&gt;
- Computer Memory&lt;br /&gt;
- Conductance&lt;br /&gt;
- Density&lt;br /&gt;
- Energy&lt;br /&gt;
- Illumination&lt;br /&gt;
- Power&lt;br /&gt;
- Force &lt;br /&gt;
- Flow&lt;br /&gt;
- Pressure&lt;br /&gt;
- Speed&lt;br /&gt;
- Temperature&lt;br /&gt;
- Time&lt;br /&gt;
- Torque&lt;br /&gt;
- Viscosity&lt;br /&gt;
- Volume&lt;br /&gt;
- Weight&lt;br /&gt;
&lt;br /&gt;
Roman Numerals&lt;br /&gt;
- ASCII, Hex&lt;br /&gt;
- Cooking&lt;br /&gt;
- BMI&lt;br /&gt;
- Clothing Sizes&lt;br /&gt;
&lt;br /&gt;
Money Converter based on current rates from Internet...&lt;br /&gt;
e. g. Dollar &amp;lt;-&amp;gt; Euro&lt;br /&gt;
 &lt;br /&gt;
Physical and Mathematical Constants&lt;br /&gt;
GPS conversions &lt;br /&gt;
&lt;br /&gt;
- link to or integration of a scientific calculator&lt;br /&gt;
- link to or integration of a simple calculator&lt;br /&gt;
&lt;br /&gt;
A good basis for such a converter tool could be the Palm program &amp;quot;units&amp;quot; from &lt;br /&gt;
François Pessaux [http://francois.pessaux.neuf.fr/files/units1_11.tgz]. The GPL'd program comes with full documentation.&lt;br /&gt;
&lt;br /&gt;
For GPS conversions see gpsbabel [http://www.gpsbabel.org]&lt;br /&gt;
&lt;br /&gt;
===== An Postfix Notation (RPN) calculator =====&lt;br /&gt;
&lt;br /&gt;
Many engineers, computer scientists and other groups who have grown to enjoy the simplicity and ease of an postfix notation calculator will miss them when they give up other platforms to move to OpenMoko.  A RPN calculator will increase adoption by providing one of the tools that other platforms have provided for many years.&lt;br /&gt;
&lt;br /&gt;
==== Windows CE Emulator ====&lt;br /&gt;
&lt;br /&gt;
On ARM machine, Windows CE API emulator, like Wine on x86 machines. &lt;br /&gt;
&lt;br /&gt;
==== PalmOS Emulator ====&lt;br /&gt;
&lt;br /&gt;
The Access group is probably coming out with their Linux platform any time soon. One of the components is a PalmOS emulator which I'd like to see working on OpenMoko as well. There are literally thousands of PalmOS apps.&lt;br /&gt;
&lt;br /&gt;
I'd like to see a Windows CE Emulator with active sync support.&lt;br /&gt;
&lt;br /&gt;
==== Chumby Emulator ====&lt;br /&gt;
&lt;br /&gt;
Would be very cool if the neo can act as a chumby. see http://chumby.com for more details about a chumby.&lt;br /&gt;
&lt;br /&gt;
==== TV Guide ====&lt;br /&gt;
Display a TV guide using [http://xmltv.org xmltv].&lt;br /&gt;
Something like [http://mtvg.sourceforge.net/ Maxemum TV-Guide] (QT)&lt;br /&gt;
&lt;br /&gt;
==== Alcohol meter ====&lt;br /&gt;
Give the phone some info about your body (gender, size, weigth) and when/what you drink and it will compute an approximation of the amount of alcohol in your blood. Updates automatically, could have an alarm, when you are probably sober again.&lt;br /&gt;
See, for example (German text) http://www.misterio-online.de/promille.htm&lt;br /&gt;
&lt;br /&gt;
==== Interaction with LEGO Mindstorm ====&lt;br /&gt;
With the accelerometers, GPS and good CPU, the phone could be used to control/serve as input with robots built with LEGO Mindstorm, which can be accessed by USB and Bluetooth.&lt;br /&gt;
&lt;br /&gt;
==== Flashlight ====&lt;br /&gt;
Simple finger application that makes every pixel on the entire screen white to be as bright as possible until you tap the screen again to turn it off.  This way, you can use your Neo as a (short term) flashlight!&lt;br /&gt;
&lt;br /&gt;
==== Wii Controller Emulator ====&lt;br /&gt;
Use the accelerometers and buttons on screen to work as a Wii controller via Bluetooth.&lt;br /&gt;
&lt;br /&gt;
==== FUSE support ====&lt;br /&gt;
Ability to use FUSE to mount larger file systems over wireless.  (even gmailfs, sshfs, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
Accessibility features for the visually impaired.&lt;br /&gt;
* High Contrast Themes.&lt;br /&gt;
* Screen Magnifier. Features should include automatic cursor tracking when navigating menus and entereing text and provide manual controls to zoom in on other section of the screen.&lt;br /&gt;
* Text to speech. The software should read out menu item ,contact lists ,text messages etc. Would also be useful for operating the phone while driving. see: [[Wishlist:Speech synthesis]]&lt;br /&gt;
&lt;br /&gt;
==== VOIP ====&lt;br /&gt;
* [[Dialer]] should be able to use SIP.&lt;br /&gt;
Ability to use the phone for VOIP over wi-fi such as Vonage. They currently have 2 different pieces of software for pc . Basically software creates a mac address which is paired with your Vonage account. Skype could also be implemented but I prefer Vonage. Only available when connected to wi-fi with a good connection. Phone treats calls the same as a cellular call, could keep a separate log of minutes, ability to record conversations, etc. Option to use VOIP if connection is available automaticly or manually. Small icon to show when call is using VOIP.&lt;br /&gt;
* A standard SIP client would probably fit better into the &amp;quot;free and open&amp;quot; philosophy.&lt;br /&gt;
* Ideally a SIP client that includes ZRTP/SRTP for secure communications.&lt;br /&gt;
(Note: Vonage will not give you your SIP credentials, so you cannot log into their network with a non-approved softphone. Other VoIP providers have different policies.)&lt;br /&gt;
&lt;br /&gt;
''This seems very similar to what [http://en.wikipedia.org/wiki/Generic_Access_Network UMA] offers.''&lt;br /&gt;
&lt;br /&gt;
Asterisk is a great communication platform that can run on small devices. I have an Asterisk server running on a Nokia 770 and I read about running Asterisk on an iPhone. With the crosscompiler available it sould be possible to compile it and run Asterisk on an openmoko phone and let it take care of almost everything on the wishlist below.&lt;br /&gt;
Edw/&lt;br /&gt;
&lt;br /&gt;
==== Power Meter ====&lt;br /&gt;
If the power bar is clicked on it will show time left on charge and if charging it will show time until full.&lt;br /&gt;
&lt;br /&gt;
Also a rrdtool type of configurable timespan/frequency graphical overview would be very cool and usefull to some people?&lt;br /&gt;
&lt;br /&gt;
=== Accelerometer wishes ===&lt;br /&gt;
==== Flick interface ====&lt;br /&gt;
Ability to &amp;quot;flick&amp;quot; the phone for page up/down by simply and rapidly tilting the phone back-and-forth for up and forth-and-back for down. The same motion can be implemented for sideways motion. This will take advantage of the 2 3d accelerators.&lt;br /&gt;
&lt;br /&gt;
Sensitivity of the scrolling should be configurable and a test option provided.&lt;br /&gt;
&lt;br /&gt;
==== Reading navigation of documents enhanced by accelerometers ====&lt;br /&gt;
If the two accelerometers in Neo1973 allows it, it will be nice if when you're reading, give a newspaper, you can move up, down, left and to the right the viewing of the document just moving the phones to the corresponding direction.&lt;br /&gt;
&lt;br /&gt;
I don't know if this is possible (haven't seen the project in detail yet) but this feature could be very attractive for final users (and this is good). (sorry for my english but i'm italian)&lt;br /&gt;
&lt;br /&gt;
==== Wand UI ====&lt;br /&gt;
In keeping with the requests to think outside of the box... the dual 3d accelerometers should enable a 'magic wand'-style UI for certain uses. Macros could be recorded and edited, or presets could be used. For example, flipping the device playfully could initiate a game mode or could signal the end of the work day.&lt;br /&gt;
==== Panning interface ====&lt;br /&gt;
Some applications display underlying data that is larger than the screen.  Typically they let you pan across the data using scroll bars.&lt;br /&gt;
&lt;br /&gt;
In cases where the data is only (say) 3 or 4 screens wide or high, it may be very intuitive to just shift the hand held device a few centimeters to the left or right, up or down to pan in that direction.  The screen would appear to be a hole into the world of the data, and you're just moving the hole to look at something else.&lt;br /&gt;
&lt;br /&gt;
When the underlying data is very large, you obviously wouldn't want to use this mechanism unaltered; you'd have to walk to the next room to see the data 100 screens away.  Instead different accelerations can be used for different panning sizes.  This is the same adaption used for accelerated mouse pointers typical on touch pads.  A quick flick moves the mouse pointer fast and far.  A slower drag over the same area on a touch pad moves the pointer slower and with more precision.&lt;br /&gt;
&lt;br /&gt;
==== Shake-to-Wake ====&lt;br /&gt;
Giving the phone a shake enables voice commands for a few seconds.&lt;br /&gt;
Usage Examples: &lt;br /&gt;
&lt;br /&gt;
* {Shake} &amp;quot;Call&amp;quot; ''ContactName'' ''PhoneType''&lt;br /&gt;
* {Shake} &amp;quot;Call John Mobile&amp;quot;  (Calls John's mobile)&lt;br /&gt;
* {Shake} ''ApplicationName''&lt;br /&gt;
* {Shake} &amp;quot;Reader&amp;quot; (Opens the e-book application)&lt;br /&gt;
&lt;br /&gt;
Would require a method of inputting voice tags for applications and contacts and obviously will only work for P2 (accelerometers)&lt;br /&gt;
But lets get voice command functionality working before P2 (just by pressing a button on the screen instead of shaking)&lt;br /&gt;
&lt;br /&gt;
I think that is possibly to replace &amp;quot;Shake&amp;quot; with double hit with finger in the side of phone. Proper algorithms(with accelerometers) should recognize any similar activities.&lt;br /&gt;
&lt;br /&gt;
==== Emergency call ====&lt;br /&gt;
When the accelerometer detects a great acceleration (i.e. 5G) start a countdown sequence, if it is not stopped make a call to a preconfigured emergency number. If the data from the GPS is accurate give it.&lt;br /&gt;
&lt;br /&gt;
A first version could use a recorded message (an audio file). In next version it could use a synthesizer, so it can give more information (add GPS information when it is ready).&lt;br /&gt;
&lt;br /&gt;
:I would worry that most such events would be false positives, and hard to distinguish from the real thing.  A user dropping their phone (an event very common in the life of any cellphone) is far more likely than a user being in a car accident with their phone, and the clatter of a cell phone on asphalt could reach 5G.  Additionally, it has to be very hard to distinguish hitting pavement from hitting a windshield, as from a physics standpoint the two are the same thing. [[User:Hashbrowncipher|Hashbrowncipher]] 02:06, 26 October 2007 (CEST)&lt;br /&gt;
::It could use the gps data to calculate the speed it is traveling with. Let's say it has been moving for more than 50 km/h for more than 10 seconds. Then it could activate the &amp;quot;emergency call if more than 5g&amp;quot; function. Aside from the countdown timer, it could increase the volume to max and warn the user that an automatic emergency call will take place in x seconds. While it is counting down it could listen for &amp;quot;Never mind, I'm fine, phone&amp;quot; and stop the countdown in case it hears that. It could also output the warning sound to the attached bluetooth headset and let the user talk to emergency services if the user is still conscious. [[User:Tommy|Tommy]] 17:48, 8 January 2008 (CET)&lt;br /&gt;
:::Perhaps have the phone yell loudly that it's about to do the emergency call for a decent amount of time, disabled by touching the screen or entering the pin number. In the case of any bluetooth device attached to the user, the phone could check to see if it's in range before calling. [[User:sin|sin]]&lt;br /&gt;
&lt;br /&gt;
==== Movement detection ====&lt;br /&gt;
By detecting that the owner is walking a user defined profile can be activated with a specific set of notification settings. For example you may wish to use a cheap old sounding ringtone so you don't attract attention from muggers. Or you may wish to have a louder ringtone if you carry your phone in a bag where it can't be so easily heard.&lt;br /&gt;
&lt;br /&gt;
==== Games ====&lt;br /&gt;
Imagine a first person shooter that you look around by turning your body.&lt;br /&gt;
&lt;br /&gt;
==== Sloshing battery indicator ====&lt;br /&gt;
Shaking the phone will produce a sloshing sound, as if  it contained a liquid. As the battery loses charge, so the sound produced on being shaken, will replicate a decreasingly empty container. [http://mobile.slashdot.org/article.pl?sid=07/11/28/1342248] for an example.&lt;br /&gt;
==== Steady screen ====&lt;br /&gt;
It may be hard to read the screen when the device is shaking from some source of vibration.  E.g.&lt;br /&gt;
* being mounted inside a vehicle&lt;br /&gt;
* during certain sports&lt;br /&gt;
* while the internal vibrator is activated (perhaps)&lt;br /&gt;
The accelerometers could be used to determine the frequency of the shaking and to make the screen appear to be steady by offsetting the contents at the same frequency in the opposite direction.  If this was handled by the graphics processor it might not even be an intensive operation or produce significant battery usage.&lt;br /&gt;
&lt;br /&gt;
At slower movements, (say just being held in an older unsteady hand) the accelerometer data could be fed directly into the screen offset.  This would allow you to compensate for unpredictable movements.  &lt;br /&gt;
&lt;br /&gt;
Such a mode would cancel out shaking, producing what would appear to be a slightly smaller but steady screen.  (Smaller because pixels at the edge of the screen may have ''any'' screen in the same location in the next fraction of the vibration).  Gross movements that move the screen to an entirely different position would not be cancelled, effectively 'panning' to keep up with the large movement.&lt;br /&gt;
&lt;br /&gt;
In situations where the hand is not experiencing the same source of vibration that the screen is, the areas of touch sensitivity should be offset at the same time as the screen.  So a steady hand touching a vibrating screen isn't interpretted by the application software as a vibrating hand.&lt;br /&gt;
&lt;br /&gt;
These features would best be implemented in the rendering and touch libraries so they could be activated for all applications.&lt;br /&gt;
&lt;br /&gt;
==== Taping as input ====&lt;br /&gt;
If I understand correctly the accelerometer should be capable to be used as a simple input. When OpenMoko is in the pocket, simple taps against the pocket should be possible to use as input. For example when there is an incoming call and the user is notified using a headset then one tap would accept the call and two concurrent taps against the pocket would cancel it. This can also be used for lot more.&lt;br /&gt;
==== Pedometer ====&lt;br /&gt;
The accelerometers should be able to detect each step and record it. If the time when the step is recorded you would then be able to determine the time used walking, the distance traveled and approximate the energy used. Acording to [http://en.wikipedia.org/wiki/Pedometer Wikipedia] this has been done in other devices.&lt;br /&gt;
==== Others ====&lt;br /&gt;
Also see the pages[[Wishlist:Auto Align Map]], [[Wishlist:Determine Position]], [[Distance Measuring]], [[Wishlist:Computer Mouse]], [[Wishlist:Dynamic Screen Orientation]].&lt;br /&gt;
&lt;br /&gt;
=== Connectivity ===&lt;br /&gt;
&lt;br /&gt;
==== VNC ====&lt;br /&gt;
A good, stylus friendly VNC client/host combo would be easy to add and terribly useful.&lt;br /&gt;
&lt;br /&gt;
==== Networked X-Windows ====&lt;br /&gt;
&lt;br /&gt;
Whether it's running true X-Windowing over the network, or your bog-standard VNC connection as mentioned above, the ability to have your phone's screen available on your laptop or palmtop would be most desirable.&lt;br /&gt;
&lt;br /&gt;
==== NX client ====&lt;br /&gt;
&lt;br /&gt;
A form of X-windows forwarding optimized for performance over slow, or high-latency links, which could prove extremely useful. Capable of streaming a good quality, full desktop session over modem speeds. The protocol and at least one implementation is gpl'd. [http://en.wikipedia.org/wiki/NX_technology wikipedia]&lt;br /&gt;
&lt;br /&gt;
==== OpenOffice Presenter Control ====&lt;br /&gt;
&lt;br /&gt;
I Think it is a good idea to control your OO Presentation with Openmoko about WLAN or Bluetooth.&lt;br /&gt;
I think it needs some buttons to go back or forward and control the mouse to show something and take normal mouse clicks.&lt;br /&gt;
But with the mouse clicks I think that we need a short time between the clicks in example 1 second. Because when you make a mouse &lt;br /&gt;
click than to fast than you must go back.&lt;br /&gt;
&lt;br /&gt;
Some similar functionality will be implemented during SoC 08. More info at [[OpenMoko Bluetooth remote controller]]&lt;br /&gt;
&lt;br /&gt;
==== Amarok and other Media Player remote control ====&lt;br /&gt;
&lt;br /&gt;
Control Amarok or any other Media Player with OpenMoko (as a remote control). Bluetooth or WLAN could be used as protocol to send and receive the data. Maybe a WebInterface of Amarok is a start. Can be used on parties for a mobile music management.&lt;br /&gt;
&lt;br /&gt;
==== Read informations with SMS ====&lt;br /&gt;
Send a SMS with Code to the OpenMoko (from a specific number).&lt;br /&gt;
For example to send get the GPS coordinates from a stolen Neo (or if you don't know where your Neo is).&lt;br /&gt;
&lt;br /&gt;
=== Security ===&lt;br /&gt;
&lt;br /&gt;
==== General Filesystem Encryption ====&lt;br /&gt;
&lt;br /&gt;
If anyone wants to get your private data saved on your OpenMoko device, he should have to get through a high security mechanism like dm-crypt. The question is how much CPU power would be needed. &lt;br /&gt;
Would it be an idea to encrypt only the private data like phone numbers, preferences, address book etc. (like /home/$USER).&lt;br /&gt;
&lt;br /&gt;
http://luks.endorphin.org&lt;br /&gt;
&lt;br /&gt;
==== My Account ====&lt;br /&gt;
{{Main|My Account}}&lt;br /&gt;
A way to securely store information about the phone, and ensure that a phone you may be considering purchasing is not stolen.&lt;br /&gt;
&lt;br /&gt;
Can we keep a serial number/user registry here on the OM wiki?  Not really secure, but something most thieves wouldn't know about.&lt;br /&gt;
&lt;br /&gt;
==== [http://zfoneproject.com/ Zfone] or similar ====&lt;br /&gt;
&lt;br /&gt;
Something that allows the user to speak with another person securely.&lt;br /&gt;
&lt;br /&gt;
==== GSM Encryption ====&lt;br /&gt;
&lt;br /&gt;
This software application would allow GSM encrypted calls to be made using the GSM Data Call Channel. &lt;br /&gt;
&lt;br /&gt;
[[OSvS]]&lt;br /&gt;
&lt;br /&gt;
==== My Voice is my Passport ====&lt;br /&gt;
Use voice recognition to unlock the phone.  &amp;quot;Hi. My name is ... My voice is my passport.  Verify me.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Firewall ====&lt;br /&gt;
A network firewall&lt;br /&gt;
&lt;br /&gt;
==== Full Mac Support ====&lt;br /&gt;
Full mac support, preferably with full software and full sync capabilities with iCal and iMail &lt;br /&gt;
&lt;br /&gt;
==== Anti Theft Application ====&lt;br /&gt;
&lt;br /&gt;
This application would enter the phone into an [[Anti-Theft Mode]] which activates particular security features to reduce the risk of theft and also to ensure a higher probability of recovery of a stolen handset.&lt;br /&gt;
&lt;br /&gt;
Hmm, if you're away from your home for more than a few days (via GPS), it starts sending its coordinates home.&lt;br /&gt;
&lt;br /&gt;
====RFID based personal alerts====&lt;br /&gt;
Assuming an RFID reader is available:  You'd put an RFID tag on your keys, wallet, etc and train a program on the phone to give you a soft or hard alert when one of them leaves detection range.  That way, if you're walking away from one of them, the phone could alert you.&lt;br /&gt;
&lt;br /&gt;
Actually there is a RFID reader available. Take a look at this: http://www.wdi.ca/ We only need driver for that thing. .... Well, never mind. I think it doesn't work because of the size. Anyway an interesting idea.&lt;br /&gt;
&lt;br /&gt;
====OpenVPN Client====&lt;br /&gt;
This application allows to configure the device as an OpenVPN client using the GUI including support for X.509 certificates.&lt;br /&gt;
&lt;br /&gt;
=== Integrated Help System ===&lt;br /&gt;
&lt;br /&gt;
A help system that is either on or off. It could be activated and deactivated by a [[five-second-press]] on a button, for example the AUX button. When the help system is activated, it will explain the use of any item you touch on screen (with stylus or finger). Example: if you touch the battery icon, it will explain that this shows battery level / remaining time. If you touch the date / time icon, it will explain that this icon shows date and time, and that if you press it, you can set date and time. Primarily, this help system should be able to explain all user interface elements in the main screen, but if it proves popular, it could be expanded to cover other applications as well.&lt;br /&gt;
&lt;br /&gt;
===Performance optimisation===&lt;br /&gt;
==== Use DMA engine in CPU for blitter ====&lt;br /&gt;
The DMA engine in the CPU can substantially speed up moving of large  areas of screen in some cases.&lt;br /&gt;
&lt;br /&gt;
==== Use virtual screen to optimise scrolling ====&lt;br /&gt;
In some other cases, the hardware supported virtual screen may also speed it up.&lt;br /&gt;
===Reusable Display/UI Widgets===&lt;br /&gt;
====Use BigPage for full page zoom, scroll, scale in many apps====&lt;br /&gt;
The [[BigPageWidget]] Page decribes a widget that could bring full natural page viewing, scaling, scrolling to the OM platform - allowing all applications to make intuitive UIs. A good way to read documents of any type without reformatting them massively increases the utility of a device with a small screen&lt;br /&gt;
&lt;br /&gt;
==Bluetooth==&lt;br /&gt;
&lt;br /&gt;
=== Voice Dialing ===&lt;br /&gt;
&lt;br /&gt;
Dial by voice commands.&lt;br /&gt;
&amp;lt;br&amp;gt;Dial by dictating phone number. This way we can voice dial any number even if not in our contact list.&lt;br /&gt;
&lt;br /&gt;
=== Music through Bluetooth Headset ===&lt;br /&gt;
&lt;br /&gt;
Music can be played through a Bluetooth headset, but would stop playing when a call comes in.&lt;br /&gt;
&lt;br /&gt;
=== Walkie Talkie ===&lt;br /&gt;
&lt;br /&gt;
Let OpenMoko devices connect to one another via bluetooth or another connection method (GPRS for long distance but high latency, probably Wifi on P2), and hold a conversation.&lt;br /&gt;
&lt;br /&gt;
Features for this applications can be:&lt;br /&gt;
* Push To Talk (PTT) button&lt;br /&gt;
* Voice Activated Control (VAC) which will set it in transmit mode when input has is detected above a certain predefined level.&lt;br /&gt;
* Optionally a full duplex mode&lt;br /&gt;
* Different channels to choose from&lt;br /&gt;
* Monitor different (preselected or all) channels for traffic.&lt;br /&gt;
* Content encryption&lt;br /&gt;
* Active noise control&lt;br /&gt;
* Allow zero config use (units can talk without any access point helping)&lt;br /&gt;
* Overview of all connected people trough sending GPS data to everyone who is in the Walkie Talkie channel&lt;br /&gt;
&lt;br /&gt;
Local (non-GPRS) use cases include chatting while biking&lt;br /&gt;
or motorcycling in a group; perhaps also in a car caravan.&lt;br /&gt;
This application could also be used as a baby-phone to monitor your siblings.&lt;br /&gt;
&lt;br /&gt;
This would be more useful if the Neo had Class 1 bluetooth, though probable Wifi on P2 will also offer more range.&lt;br /&gt;
&lt;br /&gt;
(One thumbs up from me) Jackcday&lt;br /&gt;
&lt;br /&gt;
See also [[Wish_List#WiFi_Walkie_Talkie|WiFi Walkie Talkie]] and perhaps construct one application that can handle both Bleutooth and Wifi.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Sync ===&lt;br /&gt;
&lt;br /&gt;
Automatically synchronize with desktop computer (or with any [http://en.wikipedia.org/wiki/SyncML SyncML] server) when within range based on user profile.  This may require the use of a secure data transfer.&lt;br /&gt;
&lt;br /&gt;
=== GPS Assisted Bluetooth Management ===&lt;br /&gt;
&lt;br /&gt;
Allow Bluetooth to automatically turn off after loosing connectivity and to automatically turn back on based upon GPS location.&lt;br /&gt;
&lt;br /&gt;
A Bluetooth device is configured for automatic reacquisition based on the following profiles:&lt;br /&gt;
* Manual - only when Bluetooth is on&lt;br /&gt;
* Non-mobile - the target device is not mobile, periodically attempt reacquisition when in the general area of the device.&lt;br /&gt;
* Mobile - the target device is mobile, periodically attempt reacquisition when in the general area of the device.&lt;br /&gt;
&lt;br /&gt;
Each target device is configured as follows:&lt;br /&gt;
* Automatic acquisition at last known location: enable/disable&lt;br /&gt;
* Automatic acquisition at these locations: list of nickname + coordinates + range&lt;br /&gt;
&lt;br /&gt;
==== Non-mobile devices ====&lt;br /&gt;
&lt;br /&gt;
Examples devices include: computers&lt;br /&gt;
&lt;br /&gt;
The location and range of the target device is determined via training.  Periodically, the current GPS coordinates and Bluetooth signal strength are logged. Additionally, connectivity loss events are logged.  An algorithm uses these logs to determine the device location and range.&lt;br /&gt;
&lt;br /&gt;
Connection attempts are made when in a configurable proximity to the device.  The first attempt when entering the proximity and further attempts at a configurable interval.&lt;br /&gt;
&lt;br /&gt;
==== Mobile devices ====&lt;br /&gt;
&lt;br /&gt;
Example devices include: automobiles&lt;br /&gt;
&lt;br /&gt;
Mobile devices are configured to have two types of locations:&lt;br /&gt;
# Last known location&lt;br /&gt;
# Non-mobile locations (homes)&lt;br /&gt;
&lt;br /&gt;
===== Last known location =====&lt;br /&gt;
&lt;br /&gt;
A car is mobile, ideally, when you leave your car, the phone should note the car's location when connectivity is lost and then attempt to reacquire the car when you return to the location of the car.&lt;br /&gt;
&lt;br /&gt;
===== Non-mobile locations (homes) =====&lt;br /&gt;
&lt;br /&gt;
As mobile devices may have multiple users, it is not sufficient to always use the last known location.  In this case, the device may additionally have multiple homes.  For example, a car might have as its homes: home garage and work parking lot.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth neighbor detection and multiuser apps  ===&lt;br /&gt;
&lt;br /&gt;
Like the [http://en.wikipedia.org/wiki/One_laptop_per_child one laptop per child] (OLPC) interface, keep a number in the status bar that represents a count of other openmoko or compatible bluetooth devices in the area. Allow for the spontaneous initiation of a chatroom or multiplayer game or file trading with any moko in the area.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth environment detection ===&lt;br /&gt;
&lt;br /&gt;
Capability to detect when a predetermined bt device enters/leaves bt range and launch a system-wide event accordingly. This would feed not only the &amp;quot;Neighbour detection&amp;quot; idea described above, but also the &amp;quot;Profiles&amp;quot;, &amp;quot;Context based TO-DO list&amp;quot; and &amp;quot;Location-based reminders&amp;quot; ideas. Reminders could be set to trigger in the presence of a specific person X (with BT device Y). Profiles can take into account which devices are present around the phone (car kit, for ex.). To-do list could also change according to present devices.&lt;br /&gt;
&lt;br /&gt;
=== Remote control ===&lt;br /&gt;
&lt;br /&gt;
==== Wireless presenter ====&lt;br /&gt;
Use the phone to run your OpenOffice.org Impress presentation remotely using Bluetooth. Cool features: &lt;br /&gt;
* Display the text notes for the presenter on the phone's display and update it whenever the slide is changing.&lt;br /&gt;
** OO.org has implemented support for [http://www.openoffice.org/issues/show_bug.cgi?id=12719 dual monitor]/[http://www.openoffice.org/issues/show_bug.cgi?id=18486 presenter mode] that can be used as a starting point&lt;br /&gt;
* A small timer showing the time passed (and perhaps remaining if the presentation app supports such a feature). &lt;br /&gt;
* If you want to be super-cool, you give a preview of the notes of the next slide in the show. &lt;br /&gt;
* At the end of a presentation, a &amp;quot;navigator&amp;quot; could allow to easily jump to any slide in the presentation by clicking on it on the phone.&lt;br /&gt;
** When you right-click in a running OO.org Impress presentation, you can choose &amp;quot;got o slide...&amp;quot; and select any slide to jump to.&lt;br /&gt;
&lt;br /&gt;
Some similar functionality will be implemented during SoC 08. More info at [[OpenMoko Bluetooth remote controller]]&lt;br /&gt;
&lt;br /&gt;
==== Initiated from another device ====&lt;br /&gt;
Remote control over Bluetooth from other devices to control media player (play, pause, next, previous, volume control),  camera (capture image), etc.&lt;br /&gt;
==== Directed at another device ====&lt;br /&gt;
Remote control over Bluetooth to other devices to control media player, lights in your house, etc.&lt;br /&gt;
&lt;br /&gt;
[http://mjr.iki.fi/software/remote-0.9.0.tar.gz Remote] is my draft of a python-based remote control app that allows you to define button sets and commands to run on the local or a remote host (through ssh, for instance). Error handling and command interface need work.--[[User:Mjr|Mjr]] 11:14, 18 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Z-wave uses web-browser control of devices that is said to be compatible with mobile phone browsers so should work with openmoko browser. [http://www.z-wave.com www.z-wave.com]&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth Car Connection ===&lt;br /&gt;
&lt;br /&gt;
Have a deeper connection to the car than just handsfree speakerphone.  For instance a transceiver with challenge/response systems to open, possibly even start the car.  Possibly go as far as OBD connection to monitor car status on screen/log for later.&lt;br /&gt;
&lt;br /&gt;
Could be done with a port of [https://garage.maemo.org/projects/carman/ Carman] or similar that can connect to an OBD2 adapter via USB or Bluetooth and display various information collect from the car, GPS, and accelerometers.  --[http://wiki.openmoko.org/wiki/User:Bmk789 bmk789]&lt;br /&gt;
&lt;br /&gt;
==== Dude, Where's My Car? ====&lt;br /&gt;
&lt;br /&gt;
When in range of the car navigation system, remember the position (perhaps check with the car GPS). When not in range, assumme that you are not in the car, and offer the opportunity to navigate to the car's last known position. That way, you can find your car e.g. on a large parking lot.&lt;br /&gt;
&lt;br /&gt;
=== [[Bluetooth powered Multi-SIM support]] ===&lt;br /&gt;
&lt;br /&gt;
As the Neo1971 does not come with dual-SIM support this could be solved by joining your old bluetooth-enabled mobile to your OpenMoko-phone.&lt;br /&gt;
&lt;br /&gt;
Let SIM card A be in your OpenMoko-phone and SIM card B in your old mobile:&lt;br /&gt;
* Incoming call on SIM card B - the OpenMoko-phone acts as a headset(Bluetooth Headset profile)&lt;br /&gt;
* Calling out via SIM card B - the OpenMoko-phone acts again as a headset&lt;br /&gt;
* Same for Short Messages/MMS/Internet&lt;br /&gt;
This way you'd have your old phone switched silent and connected to your OpenMoko-phone that handles all the calls and one can select which SIM card to use.&lt;br /&gt;
Advantage: No 'switching' between cards&lt;br /&gt;
Disadvantage: Second mobile needs to be in range(e.g. handbag) and charged every once in a while.&lt;br /&gt;
&lt;br /&gt;
===Internet Gateway===&lt;br /&gt;
&lt;br /&gt;
If the device could function as a Bluetooth router/gateway to the internet via the GPRS/data connector, then you could use it to get network connectivity from your laptop and other devices while on the road.  Many smartphones can be configured as modems via Bluetooth for use as Dial-Up Networking connectors, and that should be the minimum target.  Ideally, if the WiFi functionality was used so the OpenMoko could be an 802.11 router or peer to peer gateway for a laptop, this would be even better.  The full bandwidth of GPRS or whatever network is available would then be available.&lt;br /&gt;
&lt;br /&gt;
=== Social Networking ===&lt;br /&gt;
&lt;br /&gt;
Anybody running the social networking app will be broadcasting a profile, and when certain keywords are matched with other users who are also running the application, an alert is sounded. Each mokoid can be added as a hexstring to a profile page, and xml filters can be developed for each social service to convert various keywords and interests to moko-friendly format.&lt;br /&gt;
&lt;br /&gt;
=== Give userspace api control over bluetooth signal strength ===&lt;br /&gt;
&lt;br /&gt;
I have tried bluetooth handsfree sets with other phones and don't get perfect reception due to low signal strength. I suppose the reason the signal is so weak is because the manufacturer wants the battery to last long on its latest charge. Can you please make the strength setting configurable by the user of the phone through an api and perhaps even through the phones gui? I would gladly waste some battery time in exchange for stronger bluetooth signal strength.&lt;br /&gt;
&lt;br /&gt;
=== UMTS tether mode ===&lt;br /&gt;
&lt;br /&gt;
Support UMTS via tether mode over Bluetooth (see [[UMTS]] for detailed information).&lt;br /&gt;
&lt;br /&gt;
== USB ==&lt;br /&gt;
&lt;br /&gt;
=== UMTS tether mode ===&lt;br /&gt;
&lt;br /&gt;
Support UMTS via tether mode over USB (see [[UMTS]] for detailed information).&lt;br /&gt;
&lt;br /&gt;
== WiFi ==&lt;br /&gt;
&lt;br /&gt;
=== Industrial grade Wifi management ===&lt;br /&gt;
One annoyance I've had with Wifi enabled gadgets is that they simply keep the connections in a dumb list. What I'd like to see is more granular connection management, which enables me to specify whether a given connection is friend &amp;amp; family (mom's place), professional client (joe's copies and coffee), commercially available (panera), onetime use, or anything else, as well as managing router config backups, firmware images, and security keys.&lt;br /&gt;
&lt;br /&gt;
: [[User:lally|Lally]] 13:01 12 May 2008 (EST) -- Profiles of connections.  Mac OS (9 &amp;amp; X) have 'Locations', which do exactly that.  A UI for setting up/choosing them is nice, plus maybe some GPS-driven autoselection.&lt;br /&gt;
&lt;br /&gt;
=== Captive portal auto-login support ===&lt;br /&gt;
Having a nice front-end to some sort of script that checks the authenticity of a captive portal login page (SSL cert), then passes your username and password login information to automatically log you into your account would be very nice as well. This can be done with curl, but it is difficult to make it work on all captive portals out there. Perhaps just a field that you can specify &amp;quot;once I am connected to this AP, run this script: &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== WiFi Walkie Talkie ===&lt;br /&gt;
Provide walktie talkie functionality like http://www.domain17.net/walkietalkie/index.html See also [[Wish_List#Walkie_Talkie|Bluetooth Walkie Talkie]] and perhaps construct one application that can handle both Bleutooth and Wifi.&lt;br /&gt;
&lt;br /&gt;
=== UMTS tether mode ===&lt;br /&gt;
&lt;br /&gt;
Support UMTS via tether mode over WiFi (see [[UMTS]] for detailed information).&lt;br /&gt;
&lt;br /&gt;
== Wireless Piggyback ==&lt;br /&gt;
&lt;br /&gt;
HSDPA support and the like, so that users can connect directly with the internet with G3/G4 mobile service providers at speeds at or above 3.6 Mb/s.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
=== Auto Update ===&lt;br /&gt;
&lt;br /&gt;
A small tool which is configurable to download the latest OpenMoko and OpenMoko related software. Maybe if any internet connection is available or a minimum of bandwith is available then the auto update would download only security related or the whole system etc. .&lt;br /&gt;
&lt;br /&gt;
=== Vibrate Pattern Recorder ===&lt;br /&gt;
&lt;br /&gt;
An application that would allow the user to define their own vibration patterns, and possibly link them to audio files.  Recording would be done in real time initiated with a &amp;quot;Record&amp;quot; button, optionally playing the associated sound file in sync with recording).  While recording, the user would press and hold a button to define the timing and duration of vibration.  The user would press &amp;quot;Stop&amp;quot; when finished.  Vibration patterns would have the option of being looped(would terminate at some global ringtone length maximum).&lt;br /&gt;
&lt;br /&gt;
One simple suggested vibration file format would be a sort of run-length encoding: First byte defines the length of a &amp;quot;time-slice&amp;quot; in milliseconds, which would determine the overall tempo(actually the inverse of tempo).  The next byte would define the number of time-slices to leave the vibration on, and then another byte for how long to pause after.  Continue alternating these on/off bytes until the entire pattern is defined.&lt;br /&gt;
&lt;br /&gt;
- or just use MIDI, using a separate channel for the vibrator.&lt;br /&gt;
&lt;br /&gt;
An implementation of RTTL could also be used to define vibration patterns.&lt;br /&gt;
&lt;br /&gt;
=== PC Input Device ===&lt;br /&gt;
&lt;br /&gt;
Provide a method to use the touchscreen as input device for a nearby desktop machine.  Could connect over USB or bluetooth.&lt;br /&gt;
&lt;br /&gt;
Could emulate a pointer device (mouse) or even keyboard using standard bluetooth/USB interfaces for such a device.&lt;br /&gt;
&lt;br /&gt;
Use case: Alice is lazing on a couch and doesn't want to get up to do some minor interaction with the computer.  She can see the screen and uses the OpenMoko device as a mouse and/or keyboard to interact with the computer.&lt;br /&gt;
&lt;br /&gt;
=== Advanced Notification And Ringtone Manager ===&lt;br /&gt;
{{Main|Wishlist-ANARM}}&lt;br /&gt;
&lt;br /&gt;
ANARM would be an application for handling all event-based audible notifications from an OpenMoko device.&lt;br /&gt;
&lt;br /&gt;
=== Location based reminders ===&lt;br /&gt;
{{Main|Wishlist:Location_based_reminders}}&lt;br /&gt;
Location based reminders can be used to notify users of various events or reminders that are location based.&lt;br /&gt;
&lt;br /&gt;
=== Synergy Client ===&lt;br /&gt;
A synergy client would enable the user to place the device next to a desktop PC and share the desktop`s mouse, keyboard and clipboard over a TCP/IP network. [http://synergy2.sourceforge.net/ Synergy]&lt;br /&gt;
&lt;br /&gt;
=== Next device ===&lt;br /&gt;
List features for your fantasy device to come from FIC (or anyone else, for that matter).  Define the GTA03 here ;-)&lt;br /&gt;
&lt;br /&gt;
==== There is no device ====&lt;br /&gt;
From [http://wurp.blogspot.com/2008/01/teh-future.html Wurp's blog]:&lt;br /&gt;
&lt;br /&gt;
Clearly the Next Big Thing has to be for the device to go away altogether. I know the basic idea for wearables has been around forever, but it seems to me that the time has come.&lt;br /&gt;
&lt;br /&gt;
I wanna wear a bluetooth earpiece and cool shades, possibly with [ here's where my imagination is failing me :-( ] gloves, or fingerless gloves, or (ew) wristbands, and let any surface, including my hand, or no surface, be my interface. Tap the earpiece when you get a phone call, see a dial pad on your palm and tap out the number with the other hand, watch movies on a giant screen hovering in the air...&lt;br /&gt;
&lt;br /&gt;
(equipment list: bluetooth earpiece, some brick in my pocket or on my belt, glasses w/ minute camera, painted video display, &amp;amp; variable darkness lenses, and gloves)&lt;br /&gt;
&lt;br /&gt;
Why the hell do I want to dig out a device every time I want mindless entertainment or superficial conversation?&lt;br /&gt;
&lt;br /&gt;
Ideally, you could then sell any little doohickey with whatever interface you want (switches, knobs, g-spots, ...) and all it needs to do is network with some software on the brick to be anything at all...&lt;br /&gt;
&lt;br /&gt;
A rubberized shell, like some of the other new phones.  Helps me not drop it, especially when drunken wardriving. [anon ;-)]&lt;br /&gt;
&lt;br /&gt;
== GPS Software ==&lt;br /&gt;
* implement &amp;quot;Cheap GPS&amp;quot; as demonstrated in the image, may be useful for geocaching.&lt;br /&gt;
[[Image:Cheap_gps.png|right|300px|From xkcd.com :-)]]&lt;br /&gt;
*Providing GPS Support also for outdoor users in addition to ordinary street navigation features&lt;br /&gt;
** Overlay of satellite images with existing streetmaps&lt;br /&gt;
** Incorporating SRTM digital elevation model: for example using the VRML/X3D as data format (see http://www.ai.sri.com/geovrml/) which is interesting for e.g. mountaineering: using a 3d  browser rendering VRML/X3D Model, displaying the current position and track (possibly also other gps-tracks of the different routes to a summit downloaded before could be mapped onto the 3d model), (what about 3d hardware support? there is nothing written in the hardware specs about graphics: thinking of OpenGL for embedded systems (see http://www.khronos.org/opengles/)&lt;br /&gt;
** Using sth like a tracking mode to allow certain people to determine the current position and track (for rescue missions - like they have for example at http://www.steiger-stiftung.de (a German beneficence for rescue issues) There you can register your mobile phone so the rescue service is able to track you immediately if necessary. The interesting thing: It seems like some mobile phones with GPS have special support for this issue. If your phone is registered, the rescue service is able to get your GPS coordinates directly from the phone without any user assistance. Openmoko should also support this! )&lt;br /&gt;
* Implementation of 3dTracking's (http://free.3dtracking.net/) tracking software or equivalent.&lt;br /&gt;
* &amp;quot;Geomark&amp;quot; function: if you have to save the current time with your current location, only hit one button...&lt;br /&gt;
** You also should be able to navigate with a small &amp;quot;compass&amp;quot; and the distance should be displayed to your saved point (maybe where you parked your car on a big car parking area)...&lt;br /&gt;
* '''Measure the distance between two points (air line or walked way) -&amp;gt; no need for a tape measure'''&lt;br /&gt;
**I think it would be good if you could either use Bluetooth, GPRS or AdHoc Wifi, and see near Neo1972 on the GPS map so you could see where your friends are, e.g &amp;quot;You want to know if you friend is on the bus behind&amp;quot; You would need a strong wifi and GPRS would be too expensive.&lt;br /&gt;
*A bicycle sat-nav would be cool, speciayl designed for bicycles, e.g. cycle routes&lt;br /&gt;
* A user friendly app to collect data for the open street map project. http://www.openstreetmap.org/&lt;br /&gt;
&amp;lt;br&amp;gt;[[Community Based Traffic Information]]&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
{{Main|Wish List - Hardware}}&lt;br /&gt;
&lt;br /&gt;
It could be use for beepway Online service too &lt;br /&gt;
[http://www.beepway.com]&lt;br /&gt;
&lt;br /&gt;
=== Dedicated Power / Charger Pinout ===&lt;br /&gt;
&lt;br /&gt;
Having not yet seen a physical Neo device, I haven't been able to examine any of the IOs to see if there already is a dedicated power / charger input. However, I can imagine that it might be very tempting to have the device charge solely via USB. For any device that is capable of USB-host, that is a '''horrible''' idea.&lt;br /&gt;
&lt;br /&gt;
Since the device is able to run in USB host mode, it might be a good idea to allow for an alternate power supply, if say, a USB keyboard was being used for several hours. Rather than drain the battery, one could just supply power via the wall outlet while still providing endless hours of USB-host enjoyment for those hard-coders on the go.&lt;br /&gt;
&lt;br /&gt;
The main question is just deciding on where to take power from if in USB-client mode and the power cable is inserted, but really, that's not too big of a deal and can be solved with very minimal circuitry.&lt;br /&gt;
&lt;br /&gt;
This might sound extraneous at first, but when the device shuts down in the middle of an important USB file transfer, or right before that great piece of code was saved, you can bet that those users will be saying &amp;quot;Hmm... a separate power adapter would have really come in handy right now&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
I suggest a tiny 3mm, dedicated +5V power input (something a la Nokia).&lt;br /&gt;
&lt;br /&gt;
=== Inductive charging ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Inductive_charging Inductive charging] is the sort of charging where you place the device in a cradle, and a coil in the cradle induces a current in a coil inside the device, allowing it to recharge without wires. This should eliminate proprietary power connections.&lt;br /&gt;
&lt;br /&gt;
=== Tactile feedback via buzzer ===&lt;br /&gt;
Assuming the hardware has a vibrator/buzzer for silent calls, use a lightly pulsed version of that to simulate tactile feedback when dragging finger across buttons on-screen.  Implemented properly, it would almost feel as if the buttons were real.&lt;br /&gt;
: 25 ms bump on the buzzer feels about right.  Does this harm the vibrator motor? --[[User:Sagacis|Sagacis]] 05:15, 2 October 2007 (CEST)&lt;br /&gt;
:: Created a patch to do this [[User:Sagacis/ForceFeedback]] --[[User:Sagacis|Sagacis]] 05:05, 3 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
=== Detachable keyboard ===&lt;br /&gt;
Hardware keyboard that can be attached with magnets to a future version of the Neo.&lt;br /&gt;
&lt;br /&gt;
A bluetooth mini-qwerty keyboard that straps to my wrist!&lt;br /&gt;
&lt;br /&gt;
: A BT keyboard would be nice, but do you need openmoko to provide it? [[http://www.intomobile.com/2007/11/07/targus-bluetooth-mobile-tumbpad-when-the-tiny-keyboard-on-your-smartphone-just-doesnt-cut-it.html Targus bluetooth keyboard]]&lt;br /&gt;
&lt;br /&gt;
=== SD Card Slot ===&lt;br /&gt;
I think the Neo1973 should have a normal SD card slot as the micro is too small, and the SDs have more space. [unknown author]&lt;br /&gt;
&lt;br /&gt;
SD Cards now support 32GB. Their storage density will always be multiples ahead of microSD (now at only 2GB). An SD Card slot will:&lt;br /&gt;
* Provide enough storage to '''turn an OpenMoko into a music (MP3) jukebox''' large enough for entire music collections, like an iPod with Bluetooth for the car.&lt;br /&gt;
* Enable '''storage''' of:&lt;br /&gt;
** podcasts, full-length movies, or large photo collections&lt;br /&gt;
** photo and video from an on-board high-res camera&lt;br /&gt;
** entire email database at your fingertips, even in poor phone signal areas&lt;br /&gt;
** more detailed maps and charts&lt;br /&gt;
** encrypted work databases that are not available online&lt;br /&gt;
* Have easy '''external access''', without requiring battery removal like the microSD card&lt;br /&gt;
* Support '''SDIO''' accessories&lt;br /&gt;
* Enable '''transfer''' of data from an external camera's full SD memory to:&lt;br /&gt;
** a portable USB hard drive, offsetting the need to travel with a notebook PC&lt;br /&gt;
** the internet, via wifi or phone network&lt;br /&gt;
* Enable editing of videos and photos obtained from external cameras&lt;br /&gt;
&lt;br /&gt;
Without an easily accessible higher storage SD Card slot, many users will soon be playing the juggling game of which data to delete from the much smaller and harder to swap microSD card. This is especially true for OpenMoko users, who are more likely to be power users than is the average mobile phone carrying population. Why carry an OpenMoko and an iPod, when you can simply add an SD Card slot?&lt;br /&gt;
--[[User:Pedro|Pedro]] 20:06, 17 March 2008 (CET)&lt;br /&gt;
&lt;br /&gt;
: This is not true. Now you can find 2GB micros at the price of 20-30 euros. Too small for what?? --[[User:V0n0|V0n0]] 22:06, 28 December 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
: Think of putting a few '''movies''' on that SD memory card. It could really help if it was a little bigger (8GB, 16GB, 32GB). Also think of going '''offline''' for 1-2 weeks, far away from any computer you can access and then wanting to listen to some music. What you get in turn with a 2 GB memory slot is the same music over and over. Or you have to switch memory a cards a lot.&lt;br /&gt;
&lt;br /&gt;
: This situation is far more common than one would think: going in the mountains, going offshore (on a cruise ship). Or simply you may want to store many types of music, and '''share''' your device with friends. --[[User:Bogdanbiv|Bogdanbiv]] 13:47, 10 January 2008 (EEST)&lt;br /&gt;
&lt;br /&gt;
: Well, it can be micro SD, but why to put it so deep inside, under the battery and even under the SIM card? I would suggest to have a simple slot on the side where we could insert/remove the SD card equally easily as we swap CD's in computer. [[User:AudriusA|AudriusA]] 16:36, 12 January 2008 (CET)&lt;br /&gt;
&lt;br /&gt;
[[User:Cfriedt|Cfriedt]] 12:40, 24 February 2008 (CET) -- I completely agree with a more accessible SD card slot. It should be made external for quick removal / insertion. I realize that would mean program data shouldn't reside on the SD, but really 256 MB of on-board flash is plenty. Micro or normally-sized, a regular-sized SD is still trivial to implement in terms of solder pads and traces.&lt;br /&gt;
&lt;br /&gt;
: Sorry, but this looks like useless chat. Micro-SD cards are perfect for mobile devices as they don't get too much space on the pcb. Also, we can find micro-sd up to 8gb, if you want more space just wait a while and they'll produce a bigger one in a few months :-p. Really, almost every single phone that has a sd slot has in its micro version, why would we need a full-sized, huge normal sd slot ? It gets too much space on the pcb it's not only about sw configuration or pin soldering, it's more regarding pcb layout.&lt;br /&gt;
&lt;br /&gt;
: What about something like this adapter[http://linitx.com/viewproduct.php?prodid=11922]? Is there any place in the case left to put this into? Nevertheless there is a 12GB microSD card announced from SanDisk and a 8GB card costs about 40€ or 15€ for 4GB. (But a 8GB SD card costs only about 25€) --[[user:kelvan|Kelvan]]&lt;br /&gt;
&lt;br /&gt;
: Maybe just an additional microSD that is easily accessible and hot-swappable. I imagine replacing the huge lanyard hole could help with this. --[[User:Sin|Sin]] 02:30, 4 May 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
: My thoughts exactly.  Two slots: 1 internal microSD for our storage, and a second external one for more immediate expansion.  My thoughts are more towards hardware expansion.  For example, some of us could put in a second wifi card that does have promiscuous mode.  External VGA connections, etc would also be possible.  The external slot should be chosen by availability of hardware expansions as well as memory availability/price.  --[[User:lally|Lally]] 13:01 12 May 2008 (EST)&lt;br /&gt;
&lt;br /&gt;
=== IR port ===&lt;br /&gt;
Remote control applications&lt;br /&gt;
&lt;br /&gt;
Would be great to use openmoko as a Harmony remote controller.&lt;br /&gt;
&lt;br /&gt;
:I'd like to add that i fully support this. An IR port on future openmoko devices capable of controlling set-top boxes like TV/DVD/Stereo is necessary to make the device as universal as possible. A cellphone should be your window to the world and allow you to interact with it in as many ways as possible.&lt;br /&gt;
&lt;br /&gt;
:Care must be taken to use the correct type of IR chipset/controller in the phone. Most IR ports you find on devices like computers, some cellphones etc. Are for high speed data communication and CAN'T control TVs/DVDplayers/Stereos etc.&lt;br /&gt;
&lt;br /&gt;
:In order to reduce cost it maybe possible to use the sound chipset in the phone to generate the waveform sent to the IR led. IR remotes work at ~38Khz which is within the range of the sound chipset. The sound output could be internally switched between the IR led or the speakers.&lt;br /&gt;
&lt;br /&gt;
[[Category:User]]&lt;br /&gt;
[[Category:Ideas| ]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Talk:MokoMakefile</id>
		<title>Talk:MokoMakefile</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Talk:MokoMakefile"/>
				<updated>2008-06-10T05:04:45Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* A new section about Hardy Heron */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MokoMakefile won't work on Ubuntu Hardy Heron ==&lt;br /&gt;
Hello, there!&lt;br /&gt;
&lt;br /&gt;
Since my upgrade to Hardy Heron MokoMakefile seems to be broken on my ubuntu box. I already tried several times to download a new Makefile into a fresh directory - without success. What I get is always:&lt;br /&gt;
&lt;br /&gt;
 :~/moko$ make image&lt;br /&gt;
 ( cd build &amp;amp;&amp;amp; . ../setup-env &amp;amp;&amp;amp; \&lt;br /&gt;
           ( bitbake openmoko-devel-image u-boot-openmoko ) )&lt;br /&gt;
 ERROR:  Openembedded's config sanity checker detected a potential misconfiguration.&lt;br /&gt;
         Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).&lt;br /&gt;
         Following is the list of potential problems / advisories:&lt;br /&gt;
 &lt;br /&gt;
         /proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).&lt;br /&gt;
 &lt;br /&gt;
 make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&lt;br /&gt;
For another report on this problem see also: http://lists.openmoko.org/pipermail/community/2008-May/017545.html&lt;br /&gt;
&lt;br /&gt;
== The paths that are mentioned on this page are partially wrong ==&lt;br /&gt;
I am not sure enough what the paths should be, but - two things have changed since the section &amp;quot;developing with mokomakefile/How to add your own shiny new application&amp;quot; of this page was created:&lt;br /&gt;
 - The path where the packages are kept, and&lt;br /&gt;
 - Where to add the information that we have added a new package.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu Edgy: Update git-1.4.x to 1.5.x! ==&lt;br /&gt;
With old git-1.4.x, fetching uboot does not work: Use 1.5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: package uboot-gta01-1.2.0+svnnow-r4_14da5f7675bbb427c469e3f45006e027b6e21db9_0_1811: task do_fetch: started&lt;br /&gt;
fatal: corrupted pack file .git/objects/pack/pack-a146bcbc18f4826d6bf2a7f63be5dd77bbb5b2f5.pack&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fails on a 32bit machine - try again without ccache? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/bin/sh ./libtool --mode=compile     ccache     gcc -DHAVE_CONFIG_H -I.... -W... -O2 -c -o libbfd.lo build/tmp/work/armv4t-linux/binutils-cross-2.17-r0/binutils-2.17/bfd/libbfd.c&lt;br /&gt;
ccache gcc -DHAVE_CONFIG_H -I... -W... -O2 -c  /usr/local/oe/build/tmp/work/armv4t-linux/binutils-cross-2.17-r0/binutils-2.17/bfd/libbfd.c -o   t shift count &amp;gt;= width of type&lt;br /&gt;
make[5]: *** [libbfd.lo] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any insight here? --[[User:Adam|Adam]] 23:10, 15 May 2007 (CEST)&lt;br /&gt;
: Try without ccache (did you get it compiled meanwhile or can we remove this?) --[[User:BernhardKaindl|BernhardKaindl]] 23:05, 19 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Facing Problems with ogg libraries ==&lt;br /&gt;
just get the path and delete the .bb file that causes the problem&lt;br /&gt;
== Building on Fedora Core 6 ==&lt;br /&gt;
&lt;br /&gt;
Install stuff needed for OpenMoko:&lt;br /&gt;
  # yum install python m4 make wget curl ftp cvs monotone subversion \&lt;br /&gt;
    tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html \&lt;br /&gt;
    diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds \&lt;br /&gt;
    docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git \&lt;br /&gt;
    quilt groff linuxdoc-tools patch compat-gcc-34 lynx netpbm&lt;br /&gt;
(notice ''compat-gcc-34'' wich was needed for FC6 (gcc 4 installed), and ''lynx'' which is needed by ''qemu'' (no fallback to ''wget'', ''curl'', or ''links'' at the moment and no check for it, resulting in strange &amp;quot;sleep&amp;quot; errors when trying to build without ''lynx'').&lt;br /&gt;
&lt;br /&gt;
Build it:&lt;br /&gt;
  $ make setup&lt;br /&gt;
  $ make openmoko-devel-image&lt;br /&gt;
  $ unset LD_LIBRARY_PATH&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;
I have also done a&lt;br /&gt;
  $ unset LD_LIBRARY_PATH; make update-makefile &amp;amp;&amp;amp; nice  make update &amp;amp;&amp;amp; nice make setup &amp;amp;&amp;amp; nice make all&lt;br /&gt;
(This takes several hours)&lt;br /&gt;
&lt;br /&gt;
Build qemu:&lt;br /&gt;
  $ make qemu&lt;br /&gt;
&lt;br /&gt;
Run it:&lt;br /&gt;
  # echo 1024 &amp;gt; /proc/sys/dev/rtc/max-user-freq&lt;br /&gt;
  $ make run-qemu&lt;br /&gt;
This will bring up the OpenMoko :) Use SPACE for AUX and ENTER for POWER.&lt;br /&gt;
Not quite the same as holding a Neo1973 in your hands I would guess, but this is the best we can do for now. Thanks!&lt;br /&gt;
&lt;br /&gt;
== Building on Ubuntu Feisty ==&lt;br /&gt;
&lt;br /&gt;
MokoMakefile requires more than 512 MB of RAM + Swap space (around 1GB?).&lt;br /&gt;
&lt;br /&gt;
If you need swap, please '''check that its size under Feisty is not null'''!&lt;br /&gt;
&lt;br /&gt;
[https://bugs.launchpad.net/ubuntu/+bug/105490 Bug #105490] describes the current issue and offers a workaround (23 Jul 07).&lt;br /&gt;
&lt;br /&gt;
== Fails trying to build bluez-utils == &lt;br /&gt;
on Gentoo Linux, it fails compiling bluez-utils (I've tried also &amp;quot;make clean-package-bluez-utils&amp;quot; before the following command)&lt;br /&gt;
&lt;br /&gt;
do a &amp;quot;make build-package-libusb; make clean-package-bluez-utils&amp;quot; and it should continue (the bluez-utils .bb is missing the libusb dependency)&lt;br /&gt;
&lt;br /&gt;
== openSUSE 10.1 and 10.2 workarounds ==&lt;br /&gt;
&lt;br /&gt;
ltrace package fails to build with error: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
checking for pid_t... yes&lt;br /&gt;
checking for getopt... yes&lt;br /&gt;
checking for getopt_long... yes&lt;br /&gt;
checking gelf.h usability... no&lt;br /&gt;
checking gelf.h presence... no&lt;br /&gt;
checking for gelf.h... no&lt;br /&gt;
configure: error: ***** gelf.h not found *****&lt;br /&gt;
FATAL: oe_runconf failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''FIX: '''&lt;br /&gt;
edit ''/home/moko/build/tmp/work/armv4t-linux/ltrace-0.4-r0/ltrace-0.4/configure.ac''&lt;br /&gt;
at line 44: remove the following block:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for path in /usr/include/elfutils /usr/local/include/elfutils \&lt;br /&gt;
       /usr/include/libelf /usr/local/include/libelf; do&lt;br /&gt;
   if test -f ${path}/gelf.h; then&lt;br /&gt;
       CPPFLAGS=&amp;quot;$CPPFLAGS -I ${path}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
( it adds /usr/include/elfutils to path, which causes cross-compile badness error )&lt;br /&gt;
&lt;br /&gt;
=== QEMU build fails to compile USB code ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void&lt;br /&gt;
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_handle_control':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:103: error: invalid application of `sizeof' to incomplete type `usbdevfs_ctrltran&lt;br /&gt;
sfer'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_handle_data':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:120: error: storage size of 'bt' isn't known&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:132: error: invalid application of `sizeof' to incomplete type `usbdevfs_bulktran&lt;br /&gt;
sfer'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:120: warning: unused variable `bt'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c: In function `usb_host_device_open':&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:199: error: storage size of 'ctrl' isn't known&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:202: error: invalid application of `sizeof' to incomplete type `usbdevfs_ioctl'&lt;br /&gt;
/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c:199: warning: unused variable `ctrl'&lt;br /&gt;
make[2]: *** [usb-linux.o] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''FIX: '''&lt;br /&gt;
edit ''/home/moko/openmoko/trunk/src/host/qemu-neo1973/usb-linux.c''&lt;br /&gt;
at line 29 add the following (before ''#include &amp;lt;linux/usbdevice_fs.h&amp;gt;'')&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;linux/compiler.h&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
hint: there is a copy of the file in ''/home/moko/build/tmp/work/i686-linux/qemu-native-0.9.0+cvs20070613-r5/qemu/usb-linux.c''&lt;br /&gt;
&lt;br /&gt;
''see: http://osdir.com/ml/emulators.kvm.devel/2007-01/msg00101.html''&lt;br /&gt;
&lt;br /&gt;
== Cannot satisfy fstests ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  make openmoko-devel-image&lt;br /&gt;
...&lt;br /&gt;
| Collected errors:&lt;br /&gt;
| ERROR: Cannot satisfy the following dependencies for task-openmoko-debug:&lt;br /&gt;
|        fstests&lt;br /&gt;
NOTE: Task failed: /no-backup/Moko/build/tmp/work/fic-gta01-linux/openmoko-devel-image-1.0-r0/temp/log.do_rootfs.25036&lt;br /&gt;
NOTE: package openmoko-devel-image-1.0-r0: task do_rootfs: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Failed on debian etch 2007-07-20&lt;br /&gt;
Solution from mailing list post from hardskinone, report of an irc chat&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
I got help in IRC channel. I do following steps&lt;br /&gt;
     * remove fstest from oe/packages/tasks/task-openmoko.bb ,&lt;br /&gt;
     * increase PR field by one&lt;br /&gt;
     * make openmoko-devel-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== conflicting types for 'futimens' ==&lt;br /&gt;
&lt;br /&gt;
if you encounter the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 | In file included from utimecmp.c:40:&lt;br /&gt;
 | utimens.h:2: error: conflicting types for 'futimens'&lt;br /&gt;
 | /usr/include/sys/stat.h:370: error: previous declaration of 'futimens' was here&lt;br /&gt;
&lt;br /&gt;
a patch is needed because your glibc is too new. grab &amp;amp; enable the patch as follows &lt;br /&gt;
&lt;br /&gt;
 cd openembedded/packages/coreutils&lt;br /&gt;
 mv coreutils_5.3.0.bb coreutils_5.3.0.orig&lt;br /&gt;
 wget http://www.openembedded.org/repo/org.openembedded.dev/packages/coreutils/coreutils_5.3.0.bb&lt;br /&gt;
 cd -&lt;br /&gt;
 cd openembedded/packages/coreutils/coreutils-5.3.0&lt;br /&gt;
 wget http://www.openembedded.org/repo/org.openembedded.dev/packages/coreutils/coreutils-5.3.0/futimens.patch&lt;br /&gt;
 cd -&lt;br /&gt;
&lt;br /&gt;
== Workaround for problems compiling mtd-utils ==&lt;br /&gt;
&lt;br /&gt;
Change the line on &amp;lt;code&amp;gt;openembedded/packages/mtd/mtd-utils_1.0.0+git.bb&amp;lt;/code&amp;gt; which reads:&lt;br /&gt;
&lt;br /&gt;
 SRC_URI = &amp;quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=master \&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 SRC_URI = &amp;quot;git://git.infradead.org/mtd-utils.git;protocol=git;tag=a6fa706fe9e7696b4b2045edf9698c3bac07e3e3 \&lt;br /&gt;
&lt;br /&gt;
which forces the recipe to use an older revision (the one which worked last time I built the image on my computer).&lt;br /&gt;
&lt;br /&gt;
Be sure to remember to undo the change later, or else you will not get any new changes to that package. --[[User:CesarB|CesarB]] 04:48, 25 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
Note: these patches should be updated - the lzo patch is included in the current version, so backing off to the previous version and repatching seems silly.   I was able to make it through this part of the build by applying the remaining patches manually. --[[User:Mellon|Ted Lemon]] 15:44, 29 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Monotone segfaulting on Ubuntu Feisty Fawn/PPC ==&lt;br /&gt;
If you are running Ubuntu Feisty Fawn on a PowerPC computer you will experience problems running monotone. To fix this issue you need to install monotone as well as the libboost packages from Gutsy. The easiest way to accomplish this is to add the gutsy repositories to your sources.list&lt;br /&gt;
and change the preferences to look like this:&lt;br /&gt;
&lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: release a=feisty&lt;br /&gt;
 Pin-Priority: 700&lt;br /&gt;
 &lt;br /&gt;
 Package: *&lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: -100&lt;br /&gt;
 &lt;br /&gt;
 Package: libc6 libc6-dev tzdata util-linux libgcc1 libstdc++6 monotone   &lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: 800&lt;br /&gt;
 &lt;br /&gt;
 Package: libboost-*&lt;br /&gt;
 Pin: release a=gutsy&lt;br /&gt;
 Pin-Priority: 800&lt;br /&gt;
&lt;br /&gt;
After doing this install monotone in this way:&lt;br /&gt;
 apt-get -t gutsy install monotone.&lt;br /&gt;
That should install monotone 0.35 with updated (and working) boost libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fails on ncurses install in Fedora 7 with a &amp;quot;tic -x&amp;quot; message ==&lt;br /&gt;
Adjust the following command to your system, then run it:&lt;br /&gt;
 export LD_LIBRARY_PATH=/home/moko/build/tmp/work/x86_64-linux/ncurses-native-5.4-r8/ncurses-5.4/lib&lt;br /&gt;
Then start make again and it should pick up where it left off.&lt;br /&gt;
&lt;br /&gt;
You can get a list of potential paths to use with the following command from you main moko directory:&lt;br /&gt;
 find . | grep libncurses&lt;br /&gt;
&lt;br /&gt;
The basic problem is that it is linking against your main system libraries instead of the OpenEmbedded ones.&lt;br /&gt;
&lt;br /&gt;
There's probably a cleaner way of handling this - please update this entry if you know it.&lt;br /&gt;
&lt;br /&gt;
This has been fixed in Openembedded, see [http://bugs.openembedded.org/show_bug.cgi?id=2554 Openembedded Bug #2554] for further details.&lt;br /&gt;
&lt;br /&gt;
== uboot-gta01 fails to build ==&lt;br /&gt;
Changes in the GIT of U-Boot make the OpenMoko patches unapplyable. For the use of Revision ''cc3023b9f95d7ac959a764471a65001062aecf41'' and everything will be fine for now.&lt;br /&gt;
&lt;br /&gt;
== Perl fails to build ==&lt;br /&gt;
After following every bit of advice I can find to 'make clean' and nuke the perl build directories, every build comes up with:&lt;br /&gt;
&lt;br /&gt;
 | make[1]: Entering directory `/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7'&lt;br /&gt;
 | make[1]: *** No rule to make target `&amp;lt;command-line&amp;gt;', needed by `miniperlmain.o'.  Stop.&lt;br /&gt;
 | make[1]: Leaving directory `/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7'&lt;br /&gt;
 | FATAL: oe_runmake failed&lt;br /&gt;
 NOTE: Task failed: /src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/temp/log.do_compile.19531&lt;br /&gt;
 NOTE: package perl-native-5.8.7-r3: task do_compile: failed&lt;br /&gt;
&lt;br /&gt;
Solution turned out to be editing &lt;br /&gt;
/src/openmoko/build/tmp/work/i686-linux/perl-native-5.8.7-r3/perl-5.8.7/makedepend.SH and at line 169 change the regexp to eat references to &amp;quot;&amp;lt;command.line&amp;gt;&amp;quot; to catch what was leaking through.&lt;br /&gt;
&lt;br /&gt;
== Gettext fails to build ==&lt;br /&gt;
Gettext's build is broken unless you have emacs installed. Crazy though it seems. You will see an error like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| WARNING: Warnings can be ignored. :-)&lt;br /&gt;
| if test &amp;quot;no&amp;quot; != no; then \&lt;br /&gt;
|         set x; \&lt;br /&gt;
|         list='po-mode.el po-compat.el'; for p in $list; do \&lt;br /&gt;
|           if test -f &amp;quot;$p&amp;quot;; then d=; else d=&amp;quot;./&amp;quot;; fi; \&lt;br /&gt;
|           set x &amp;quot;$@&amp;quot; &amp;quot;$d$p&amp;quot;; shift; \&lt;br /&gt;
|         done; \&lt;br /&gt;
|         shift; \&lt;br /&gt;
|         EMACS=&amp;quot;no&amp;quot; /bin/bash ../../config/elisp-comp &amp;quot;$@&amp;quot; || exit 1; \&lt;br /&gt;
| if test &amp;quot;no&amp;quot; != no; then \&lt;br /&gt;
|         set x; \&lt;br /&gt;
|         list='po-mode.el po-compat.el'; for p in $list; do \&lt;br /&gt;
|           if test -f &amp;quot;$p&amp;quot;; then d=; else d=&amp;quot;./&amp;quot;; fi; \&lt;br /&gt;
|           set x &amp;quot;$@&amp;quot; &amp;quot;$d$p&amp;quot;; shift; \&lt;br /&gt;
|         done; \&lt;br /&gt;
|         shift; \&lt;br /&gt;
|         EMACS=&amp;quot;no&amp;quot; /bin/bash ../../config/elisp-comp &amp;quot;$@&amp;quot; || exit 1; \&lt;br /&gt;
|       else : ; fi&lt;br /&gt;
| mv: cannot move `elc-temp' to `elc-stamp': No such file or directory&lt;br /&gt;
| make[5]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[5]: *** [elc-stamp] Error 1&lt;br /&gt;
| make[5]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[4]: *** [po-mode.elc] Error 2&lt;br /&gt;
| make[4]: *** Waiting for unfinished jobs....&lt;br /&gt;
| make[4]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools/misc'&lt;br /&gt;
| make[3]: *** [all-recursive] Error 1&lt;br /&gt;
| make[3]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools'&lt;br /&gt;
| make[2]: *** [all] Error 2&lt;br /&gt;
| make[2]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1/gettext-tools'&lt;br /&gt;
| make[1]: *** [all-recursive] Error 1&lt;br /&gt;
| make[1]: Leaving directory `/home/raster/moko/build/tmp/work/i686-linux/gettext-native-0.14.1-r5/gettext-0.14.1'&lt;br /&gt;
| FATAL: oe_runmake failed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is simple - install emacs (example below for debian/ubuntu) and try again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install emacs&lt;br /&gt;
make clean-package-gettext-native-0.14.1-r5&lt;br /&gt;
make openmoko-devel-image                  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building OpenMoko with chroot ==&lt;br /&gt;
&lt;br /&gt;
There may be hundreds of issues which may cause that OpenMoko fails to build on your system, so it might be more straightforward  to just install  a standardized build environment in which the openmoko build runs in chroot, independent of your distribution.&lt;br /&gt;
&lt;br /&gt;
There is now a (not fully working) script which is able to set up a 32-bit openSUSE 10.3 build environment for building OpenMoko posted on distro-devel: [http://lists.openmoko.org/pipermail/distro-devel/2007-November/000076.html]&lt;br /&gt;
&lt;br /&gt;
On gentoo and debian-like distribution, you can use debootstrap to quickly setup a base chroot.&lt;br /&gt;
&lt;br /&gt;
== Fails compiling binutils-cross on Gentoo/AMD64 and openSUSE/x86_64 ==&lt;br /&gt;
&lt;br /&gt;
make setup works fine, but when running make openmoko-devel-image it fails with the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| make[4]: Entering directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty/testsuite'&lt;br /&gt;
| make[4]: Nothing to be done for `install'.&lt;br /&gt;
| make[4]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty/testsuite'&lt;br /&gt;
| make[3]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/libiberty'&lt;br /&gt;
| make[2]: Nothing to be done for `install-target'.&lt;br /&gt;
| make[2]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi'&lt;br /&gt;
| make[1]: Leaving directory `build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi'&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross/lib/gcc-lib: No such file or directory&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross/lib: No such file or directory&lt;br /&gt;
| rmdir: build/tmp/cross//home/techiem2/Moko/build/tmp/cross: No such file or directory&lt;br /&gt;
| mv: cannot stat `build/tmp/cross/lib/libiberty.a': No such file or directory&lt;br /&gt;
NOTE: Task failed: build/tmp/work/armv4t-angstrom-linux-gnueabi/binutils-cross-2.18-r0/temp/log.do_stage.9730&lt;br /&gt;
NOTE: package binutils-cross-2.18-r0: task do_populate_staging: failed&lt;br /&gt;
ERROR: TaskFailed event exception, aborting&lt;br /&gt;
NOTE: package binutils-cross-2.18: failed&lt;br /&gt;
ERROR: Build of openembedded/packages/binutils/binutils-cross_2.18.bb do_populate_staging failed&lt;br /&gt;
ERROR: Task 1641 (openembedded/packages/binutils/binutils-cross_2.18.bb, do_populate_staging) failed&lt;br /&gt;
NOTE: Tasks Summary: Attempted 107 tasks of which 107 didn't need to be rerun and 1 failed.&lt;br /&gt;
ERROR: 'openembedded/packages/binutils/binutils-cross_2.18.bb' failed&lt;br /&gt;
make: *** [openmoko-devel-image] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final reason why the build cannot continue is:&lt;br /&gt;
 mv: cannot stat `/home/techiem2/Moko/build/tmp/cross/lib/libiberty.a': No such file or directory&lt;br /&gt;
&lt;br /&gt;
=== The lib64 issue ===&lt;br /&gt;
&lt;br /&gt;
Likely, Gentoo/AMD64 uses lib64 instead of lib as the library directory for x86_64 libraries. It's l likey that may (or all?) AMD64 distributions do for their 64-bit binaries. On openSUSE-x86_64, the same happens. Debian/x86-64 seems to either not use lib64 or is somehow supported by the openmoko distribution.&lt;br /&gt;
&lt;br /&gt;
On multilib/lib64 platforms like Gentoo/x86_64 and openSUSE-x86_64, the openmoko build runs into a final problem at the end of build: It tries to use fakeroot which uses LD_PRELOAD to fake a different root directory and in the final stages, after hours of compiling, fakeroot execution causes warning messages because on multilib/lib64 systems as they have two versions of many libraries, the 64-bit libraries are in /lib64, /usr/lib64 and oder lib64 paths, while the 32-bit libraries are in /lib, /usr/lib and other lib paths. Some tool on these lib64 distributions are adapted to install 64-bit libraries to lib64, but this seems to fail when cross-compiling.&lt;br /&gt;
&lt;br /&gt;
At least on openSUSE-10.3 the missing libiberty.a was installed to build/tmp/cross/lib64/libiberty.a, which looks wrong, and it is if this libiberty.a file contains 32-bit arm objects. If it contains 64-bit x86_64 objects, it's fine, but openembedded/openmoko is not expecting it in a lib64 directory. I am not sure what is the case.&lt;br /&gt;
&lt;br /&gt;
The lib64 fakeroot issue requires to change the openembedded build scripts, which is doable. But it's not very easy to find the correct script and patch it correctly. If you feel adventourus, go ahead and try to build openmoko on a lib64 distribution, but it's easyer to set up a complete 32-bit chroot environment and run a normal build in it.&lt;br /&gt;
&lt;br /&gt;
After seeing this, I assumed that openmoko/openembedded was clearly not tested with lib64 build hosts and since that would mean that even if I'd fix that error, many others could follow, and as I was not interested to fix the lib64 bugs but rather wanted to see something running first, I decided to make openmoko/openembedded think that it was running on a normal 32-bit non-lib64 machine.&lt;br /&gt;
&lt;br /&gt;
There are several ways to do that:&lt;br /&gt;
* You install an IA32-Linux somewhere and use that for building:&lt;br /&gt;
** Do a native install and dual-boot the IA32-linux (That's for dummies which do not know the other tricks)&lt;br /&gt;
** Install IA32-Linux in a virtual machine (Quite some setup and has some overhead too)&lt;br /&gt;
* you can install a 32-bit development system in to a chroot jail and compile there (also quite some setup and inconvinience)&lt;br /&gt;
* Or you can install a 32-bit development system on the 64-bit host (suppored on openSUSE, should be possible with Gentoo/AMD64 too)&lt;br /&gt;
&lt;br /&gt;
=== Building on SuSE Linux 10.3-AMD64 with -m32 (not finished) ===&lt;br /&gt;
&lt;br /&gt;
Install the following packages for the 32-bit C/C++ compiler target option -m32 to work and to compile what is needed&lt;br /&gt;
&lt;br /&gt;
 gcc42-32bit gcc42libgcc42-32bit glibc-devel-32bit libstdc++-devel-32bit ncurses-devel-32bit zlib-devel-32bit (maybe also gtk2-devel-32bit)&lt;br /&gt;
&lt;br /&gt;
The openSUSE 10.3-AMD64 has no libopenssl-devel-32bit, but you can install the 32-bit rpm from the i586 10.3 rpm tree:&lt;br /&gt;
 &lt;br /&gt;
 libopenssl-devel&lt;br /&gt;
&lt;br /&gt;
You should also make sure that gdbm-devel is not installed.&lt;br /&gt;
The multilib support in ld has an issue which surfaces when it is called from perl's Configure script to complile a test program with -Lgdbm. If gdbm-devel is installed, it finds /usr/lib64/libgdbm.so, but since it's not compatible with 32-bit, it skips it, but also does not search the specified -Lpath where the OpenEmbedded-built libgdbm.so is already installed. To work around this, uninstall /usr/lib64/libgdbm.so with:&lt;br /&gt;
 rpm -e gdbm-devel&lt;br /&gt;
&lt;br /&gt;
Note these need to be the 32-bit cpp33 and gcc33 rpms as the 64-bit gcc33 rpms for openSUSE do not support the 32-bit target.&lt;br /&gt;
&lt;br /&gt;
To make the OpenMoko build think that its running on 32-bit i686, use linux32 (changes uname -m to i686 in the new shell):&lt;br /&gt;
&lt;br /&gt;
 linux32 bash&lt;br /&gt;
&lt;br /&gt;
And set up gcc scripts which force the use of gcc-3.3 (it can only generate 32-bit assembly) for all compilation:&lt;br /&gt;
&lt;br /&gt;
 mkdir bin;cd bin&lt;br /&gt;
 echo '/usr/bin/${0##*/}-3.3 -m32 &amp;quot;$@&amp;quot;'        &amp;gt;gcc&lt;br /&gt;
 echo '/usr/bin/${0##*/} -m elf_i386 &amp;quot;$@&amp;quot;' &amp;gt;ld&lt;br /&gt;
 echo '/usr/bin/${0##*/} --32 &amp;quot;$@&amp;quot;'        &amp;gt;gas&lt;br /&gt;
 sed -i '1i#!/bin/sh' gcc gas ld&lt;br /&gt;
 chmod 755 gcc gas ld&lt;br /&gt;
 ln -s gcc cc &lt;br /&gt;
 ln -s gcc c++&lt;br /&gt;
 ln -s gcc g++&lt;br /&gt;
 ln -s gas as&lt;br /&gt;
 echo PATH=\&amp;quot;&amp;quot;$PWD&amp;quot;:\$PATH\&amp;quot; &amp;gt;.setup-gcc-m32&lt;br /&gt;
 cd -&lt;br /&gt;
&lt;br /&gt;
Then set the path and test it:&lt;br /&gt;
&lt;br /&gt;
 source bin/.setup-gcc-m32&lt;br /&gt;
 type gcc&lt;br /&gt;
&lt;br /&gt;
== More package requirements ==&lt;br /&gt;
&lt;br /&gt;
On my system (Kubuntu 6.10) build failed with message &amp;quot;ERROR: QEMU requires SDL or Cocoa for graphical output&amp;quot; because package &amp;lt;tt&amp;gt;libsdl-image1.2-dev&amp;lt;/tt&amp;gt; was missing. Use &amp;lt;tt&amp;gt;apt-get install libsdl-image1.2-dev&amp;lt;/tt&amp;gt; to install. Additionally I had to install packages &amp;lt;tt&amp;gt;cvs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;diffstat&amp;lt;/tt&amp;gt;. I was also asked to install Psyco JIT Compiler (package &amp;lt;tt&amp;gt;python-psyco&amp;lt;/tt&amp;gt;) to increase performance. Nevertheless &amp;lt;tt&amp;gt;make flash-qemu-local&amp;lt;/tt&amp;gt; took some hours, but now I finally can get an impression of the phone that I am looking for! -- [[User:Nichtich|Nichtich]] 00:26, 20 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== pango-directfb failed to build due to missing Glib 2.14.x ==&lt;br /&gt;
&lt;br /&gt;
The latest(as of Sept. 25, 2007) build started to fail with the following error:&lt;br /&gt;
&lt;br /&gt;
 | checking for GLIB... no&lt;br /&gt;
 | configure: error:&lt;br /&gt;
 | *** Glib 2.14.0 or better is required. The latest version of&lt;br /&gt;
 | *** Glib is always available from ftp://ftp.gtk.org/.&lt;br /&gt;
 | FATAL: oe_runconf failed&lt;br /&gt;
 NOTE: Task failed:&lt;br /&gt;
 /media/sdc1/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/\&lt;br /&gt;
     pango-directfb-1.18.1-r0/temp/log.do_configure.19927&lt;br /&gt;
 NOTE: package pango-directfb-1.18.1-r0: task do_configure: failed&lt;br /&gt;
 ERROR: TaskFailed event exception, aborting&lt;br /&gt;
 NOTE: package pango-directfb-1.18.1: failed&lt;br /&gt;
 ERROR: Build of /media/sdc1/moko/openembedded/packages/pango/\&lt;br /&gt;
     pango-directfb_1.18.1.bb do_configure failed&lt;br /&gt;
&lt;br /&gt;
The Glib included in the build tree seems to be only 2.12.12, so looks like something&lt;br /&gt;
is broken in term of dependency.&lt;br /&gt;
&lt;br /&gt;
This had happened on both of Fedora 7 and Debian Etch.  I am running the latest &lt;br /&gt;
MokoMakefile with OM-2007.2.  The funny thing is that the build had worked only &lt;br /&gt;
couple nights ago. Any idea?  I will update anything I find here and also on my blog(see my user profile).&lt;br /&gt;
[[User:ttz|ttz]] Wed Sep 26 12:17:33 CDT 2007&lt;br /&gt;
&lt;br /&gt;
pango-directfb had been removed from OE for now due to the report of it breaking builds like OpenMoko.&lt;br /&gt;
&lt;br /&gt;
[[User:ttz|ttz]] Thu Oct  4 10:20:12 CDT 2007&lt;br /&gt;
&lt;br /&gt;
== uicmoc4 failes to compile ==&lt;br /&gt;
&lt;br /&gt;
This is solved by installing libz-dev&lt;br /&gt;
&lt;br /&gt;
Or, look at [http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=747 Bug #747]&lt;br /&gt;
&lt;br /&gt;
== svn: REPORT request failed on '/repos/tasks/!svn/vcc/default' ==&lt;br /&gt;
&lt;br /&gt;
  osiris$ make update&lt;br /&gt;
  ...&lt;br /&gt;
  Fetching external item into 'trunk/src/target/OM-2007.2/applications/openmoko-today2/libkoto'&lt;br /&gt;
  svn: REPORT request failed on '/repos/tasks/!svn/vcc/default'&lt;br /&gt;
  svn: REPORT of '/repos/tasks/!svn/vcc/default': 200 OK (http://svn.o-hand.com)&lt;br /&gt;
  make: *** [update-openmoko] Error 1&lt;br /&gt;
&lt;br /&gt;
  osiris$ cd openmoko/trunk/src/target/OM-2007.2/applications/openmoko-today2//libkoto/&lt;br /&gt;
  osiris$ svn up -r HEAD&lt;br /&gt;
  svn: REPORT request failed on '/repos/tasks/!svn/vcc/default'&lt;br /&gt;
  svn: REPORT of '/repos/tasks/!svn/vcc/default': 200 OK (http://svn.o-hand.com)&lt;br /&gt;
&lt;br /&gt;
Anyone know about this one?&lt;br /&gt;
--[[User:Blackh|Blackh]] 00:11, 12 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== bootparam_prot.h fails to install in glibc-intermediate-2.5 package (Debian sid) ==&lt;br /&gt;
&lt;br /&gt;
  | install: cannot stat&lt;br /&gt;
    `/home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/glibc-2.5/sunrpc/rpcsvc/bootparam_prot.h'&lt;br /&gt;
    No such file or directory&lt;br /&gt;
  NOTE: Task failed: /home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/temp/log.do_stage.3940&lt;br /&gt;
&lt;br /&gt;
For some reason, on Debian, the rpcgen command needs &amp;quot;-Y /usr/bin&amp;quot; added to the end of it or it won't work (&amp;quot;cannot find any C preprocessor (cpp)&amp;quot;).  This can be fixed by hand...&lt;br /&gt;
&lt;br /&gt;
 cd /home/blackh/src/openmoko/moko/build/tmp/work/armv4t-angstrom-linux-gnueabi/&lt;br /&gt;
    glibc-intermediate-2.5-r7/glibc-2.5/sunrpc/rpcsvc&lt;br /&gt;
 for f in *.x ; do rpcgen -h $f -o ${f%%.x}.h -Y /usr/bin ; done&lt;br /&gt;
&lt;br /&gt;
This command will generate the right files and you can resume the build with&lt;br /&gt;
&lt;br /&gt;
make openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
Here is a better fix - put this script, calling it rpcgen, somewhere in your PATH before /usr/bin:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  exec /usr/bin/rpcgen -Y /usr/bin &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Blackh|Blackh]] 05:17, 12 October 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Cannot find SVN openmoko-terminal2 ==&lt;br /&gt;
I'm having an issue when building MokoMakeFile where it is unable to find http://svn.openmoko.org/trunk/src/target/OM-2007.2/applications/openmoko-terminal2.  Any ideas on how to fix this?&lt;br /&gt;
&lt;br /&gt;
--[[User:cartera|cartera]]&lt;br /&gt;
&lt;br /&gt;
== problem with make openmoko-devel-image ==&lt;br /&gt;
&lt;br /&gt;
when i try to do my first make openmoko-devel-image I obtain this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: Running task 844 of 5445 (ID: 671, /home/xraver/moko/openembedded/packages/linux/linux-openmoko_2.6.24+git.bb, do_fetch)&lt;br /&gt;
NOTE: package linux-openmoko-2.6.24+git20080422: started&lt;br /&gt;
NOTE: package linux-openmoko-1_2.6.24+git20080422-r0: task do_fetch: started&lt;br /&gt;
NOTE: fetch http://downloads.openmoko.org/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz&lt;br /&gt;
--08:47:41--  http://downloads.openmoko.org/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz&lt;br /&gt;
           =&amp;gt; `/home/xraver/moko/sources/git_git.openmoko.org.git.kernel.git_4194.tar.gz'&lt;br /&gt;
Risoluzione di downloads.openmoko.org in corso... 88.198.93.219&lt;br /&gt;
Connessione a downloads.openmoko.org|88.198.93.219:80... connesso.&lt;br /&gt;
HTTP richiesta inviata, aspetto la risposta... 404 Not Found&lt;br /&gt;
08:47:41 ERRORE 404: Not Found.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this location http://downloads.openmoko.org/sources/ the file git_git.openmoko.org.git.kernel.git_4194.tar.gz does not exist.&lt;br /&gt;
Any solutions?&lt;br /&gt;
&lt;br /&gt;
--[[User:xraver|Giorgio Ravera]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:Peterpall</id>
		<title>User:Peterpall</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:Peterpall"/>
				<updated>2008-05-08T07:08:54Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: New page: I'm the maintainer of the [http://projects.openmoko.org/projects/audiorec audiorec] project that has started about when the first GTA01 cellular phones came around.  Even if I programmed a...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm the maintainer of the [http://projects.openmoko.org/projects/audiorec audiorec] project that has started about when the first GTA01 cellular phones came around.&lt;br /&gt;
&lt;br /&gt;
Even if I programmed a lot till now (I am a Hardware/software design engineer) this project was the first time I actually tried to access gnome from the C side.&lt;/div&gt;</summary>
		<author><name>Peterpall</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-05-04T11:50:18Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* More automatic. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Getting Started with your Neo FreeRunner}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for purchasing this Developer release of Neo FreeRunner. &lt;br /&gt;
This guide will help you know your Neo FreeRunner and explain how to:&lt;br /&gt;
&lt;br /&gt;
*Flash new kernel&lt;br /&gt;
*Flash new root filesystem&lt;br /&gt;
*Connect to Neo FreeRunner&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Contents==&lt;br /&gt;
*What Is In The Box&lt;br /&gt;
*Getting To Know Neo FreeRunner&lt;br /&gt;
*Turning On Neo FreeRunner&lt;br /&gt;
*Flashing Neo FreeRunner&lt;br /&gt;
*Connect To Neo FreeRunner By USB Networking&lt;br /&gt;
&lt;br /&gt;
==What Is In The Box==&lt;br /&gt;
*Neo FreeRunner&lt;br /&gt;
*Stylus&lt;br /&gt;
*Battery&lt;br /&gt;
*Charger&lt;br /&gt;
*USB Cable &lt;br /&gt;
*microSD Card 512MB&lt;br /&gt;
&lt;br /&gt;
==Getting To Know Neo FreeRunner==&lt;br /&gt;
===Turning On Neo FreeRunner===&lt;br /&gt;
There are three ways to boot your Neo FreeRunner. You can power up into an Openmoko Image directly. &lt;br /&gt;
Alternately, you may also boot into U-Boot via NAND Flash or NOR Flash, which will allow you to update the kernel and root filesystem.&lt;br /&gt;
&lt;br /&gt;
====Log in Openmoko Image====&lt;br /&gt;
Press and hold Power button until Openmoko splash screen turns up. You may now release the Power button, and Neo FreeRunner will continue to boot into Openmoko Image.&lt;br /&gt;
&lt;br /&gt;
====Log in U-Boot in NAND Flash====&lt;br /&gt;
Press and hold Power button, then press and hold AUX button. You can see BOOT MENU for NAND Flash.&lt;br /&gt;
&lt;br /&gt;
You can download the connection tool from : http://svn.openmoko.org/developers/werner/neocon&lt;br /&gt;
&lt;br /&gt;
Connect Neo FreeRunner to Linux host with USB cable and key in the command in the terminal of Linux host.&lt;br /&gt;
&lt;br /&gt;
 ./neocon /dev/ttyACM0&lt;br /&gt;
&lt;br /&gt;
 [Open]&lt;br /&gt;
 In:  usbtty&lt;br /&gt;
 Out: usbtty&lt;br /&gt;
 Err: usbtty&lt;br /&gt;
 PCB rev: 0x000&lt;br /&gt;
 switching led 2 0&lt;br /&gt;
 switching led 2 1&lt;br /&gt;
 switching led 2 0&lt;br /&gt;
 DEVICE_CONFIGURED: 1&lt;br /&gt;
 GTA02v5#&lt;br /&gt;
&lt;br /&gt;
====Log in U-Boot in NOR Flash====&lt;br /&gt;
Press and hold AUX button, then press and hold Power button. Release AUX button. You can see BOOT MENU for NOR Flash.&lt;br /&gt;
&lt;br /&gt;
You can download the connection tool from : http://svn.openmoko.org/developers/werner/neocon&lt;br /&gt;
&lt;br /&gt;
Connect Neo FreeRunner to Linux host with USB cable and key in the command in the terminal of Linux host.&lt;br /&gt;
&lt;br /&gt;
 ./neocon /dev/ttyACM0 &lt;br /&gt;
&lt;br /&gt;
 [Open]&lt;br /&gt;
 ##Executing script at 18050100&lt;br /&gt;
 mtdparts mtdparts=physmap-flash:-(nor);neo1973-nand:0x00040000(u-boot),0x00040000(u-boot_env),&lt;br /&gt;
 0x00800000(kernel),0x000a0000(splash),0x00040000(factory),0x0f6a0000(rootfs)&lt;br /&gt;
 Ready.&lt;br /&gt;
 DEVICE_CONFIGURED: 1&lt;br /&gt;
 GTA02v5#&lt;br /&gt;
&lt;br /&gt;
===Flashing Neo FreeRunner===&lt;br /&gt;
As Openmoko development continues, Openmoko regularly releases updated versions of the Openmoko root filesystem, the kernel, and the U-Boot. These may be programmed into the Flash memory of Neo FreeRunner. You can use the USB cable and Openmoko provided tool to flash Neo FreeRunner.&lt;br /&gt;
&lt;br /&gt;
Neo FreeRunner needs to boot into U-Boot when flashing.&lt;br /&gt;
&lt;br /&gt;
You can download the flashing tool from: &lt;br /&gt;
http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/dfu-util&lt;br /&gt;
&lt;br /&gt;
====Flashing Kernel====&lt;br /&gt;
You can download the latest kernel from :&lt;br /&gt;
http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/&lt;br /&gt;
&lt;br /&gt;
Key in the command in the terminal of Linux host.&lt;br /&gt;
&lt;br /&gt;
 ./dfu-util -a kernel -R -D uImage-2.6.24+svnr4082-r4055-r3-neo1973.bin&lt;br /&gt;
&lt;br /&gt;
When flashing succeeds&lt;br /&gt;
&lt;br /&gt;
status(0) = No error condition is present&amp;lt;br&amp;gt;&lt;br /&gt;
Done!&lt;br /&gt;
&lt;br /&gt;
====Flashing Root Filesystem====&lt;br /&gt;
You can download the latest root filesystem from :&lt;br /&gt;
http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/&lt;br /&gt;
&lt;br /&gt;
Key in the command in the terminal of Linux host.&lt;br /&gt;
&lt;br /&gt;
 ./dfu-util -a rootfs -R -D openmoko-devel-image-fic-gta02.jffs2&lt;br /&gt;
&lt;br /&gt;
When flashing succeeds&lt;br /&gt;
&lt;br /&gt;
status(0) = No error condition is present&amp;lt;br&amp;gt;&lt;br /&gt;
Done!&lt;br /&gt;
&lt;br /&gt;
====Connect To Neo FreeRunner By USB Networking====&lt;br /&gt;
&lt;br /&gt;
Connect Neo FreeRunner to Linux host with USB cable. After booting into Openmoko image, there will be a new interface, usb0, in your Linux host.&lt;br /&gt;
&lt;br /&gt;
=====Manual Method=====&lt;br /&gt;
Key in the command in the terminal of Linux host.&lt;br /&gt;
&lt;br /&gt;
 ifconfig usb0 192.168.0.200 netmask 255.255.255.0&lt;br /&gt;
 ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Press Enter to pass the password.&lt;br /&gt;
&lt;br /&gt;
=====Automatic Method=====&lt;br /&gt;
*Ubuntu&lt;br /&gt;
Edit /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
 auto 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;
&lt;br /&gt;
Restart the networking service and key in the command in the terminal of Linux host.&lt;br /&gt;
&lt;br /&gt;
 ssh root@192.168.0.202&lt;br /&gt;
&lt;br /&gt;
Press Enter to pass the password.&lt;br /&gt;
=====Making things even more automatic=====&lt;br /&gt;
If you don't want to remember the IP number of your phone you can create an alias by adding the following line to your /etc/hosts:&lt;br /&gt;
&lt;br /&gt;
 192.168.0.202   openmoko&lt;br /&gt;
&lt;br /&gt;
Now it should immediately be possible to connect your phone using the following command line:&lt;br /&gt;
&lt;br /&gt;
 ssh root@openmoko&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T11:10:16Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* The configuration of the autotools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
What is to be said to this section is that I included some requirements like gnome-vfs to the requirements not because our application actually needs these packages but because it was very hard to find out how to do so - and I therefore wanted to document how to add them.&lt;br /&gt;
&lt;br /&gt;
If anybody doesn't like this approach - feel free to edit this wiki.&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;hello&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
&lt;br /&gt;
===== src/Makefile.am ===== &lt;br /&gt;
This file is a template Makefile that when filled with life by the configure script will compile our code.&lt;br /&gt;
&lt;br /&gt;
The most important step here is to tell which files our program consists of. &lt;br /&gt;
 AM_CFLAGS = $(DEPEND_CFLAGS) -Wall&lt;br /&gt;
 &lt;br /&gt;
 AM_LDFLAGS = $(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 LDADD = $(LIBINTL)&lt;br /&gt;
 &lt;br /&gt;
 bin_PROGRAMS = hello&lt;br /&gt;
 hello_SOURCES = hello.c&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
===== Internationalization =====&lt;br /&gt;
Now the instructions on how to generate a gnome build system for our application should be nearly working. In order to generate a .tar.gz- archieve of the complete project that contains the full build system just type the following two lines: &lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 make dist&lt;br /&gt;
&lt;br /&gt;
What still has to be done is internationalization: A very fine feature of open-source software is that it is possible to translate them to nearlly all languages - and normally sooner or later somebody will have done this.&lt;br /&gt;
&lt;br /&gt;
The only thing that has to be done so our program can easily be internationalized is the following:&lt;br /&gt;
* get a '''gettext.h''' file and copy it to your src directory&lt;br /&gt;
* add an '''#include gettext,h''' to all source files that contain text that can be translated.&lt;br /&gt;
* add an '''_(''' in front of all strings that might be translated and an ''')''' after the string.&lt;br /&gt;
&lt;br /&gt;
Our source file looks now like this:&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;gettext.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (_(&amp;quot;Hello World\n&amp;quot;));&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Building our new package ====&lt;br /&gt;
I never used the offical openmoko toolchain, so no documentation for this for now - even if I don't think there is any magic there. Since the documentation of the MokoMakefile is rather good, I will document this approach - that I actually used - neither.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T11:06:10Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Formatting, the 2nd try. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;hello&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
&lt;br /&gt;
===== src/Makefile.am ===== &lt;br /&gt;
This file is a template Makefile that when filled with life by the configure script will compile our code.&lt;br /&gt;
&lt;br /&gt;
The most important step here is to tell which files our program consists of. &lt;br /&gt;
 AM_CFLAGS = $(DEPEND_CFLAGS) -Wall&lt;br /&gt;
 &lt;br /&gt;
 AM_LDFLAGS = $(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 LDADD = $(LIBINTL)&lt;br /&gt;
 &lt;br /&gt;
 bin_PROGRAMS = hello&lt;br /&gt;
 hello_SOURCES = hello.c&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
===== Internationalization =====&lt;br /&gt;
Now the instructions on how to generate a gnome build system for our application should be nearly working. In order to generate a .tar.gz- archieve of the complete project that contains the full build system just type the following two lines: &lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 make dist&lt;br /&gt;
&lt;br /&gt;
What still has to be done is internationalization: A very fine feature of open-source software is that it is possible to translate them to nearlly all languages - and normally sooner or later somebody will have done this.&lt;br /&gt;
&lt;br /&gt;
The only thing that has to be done so our program can easily be internationalized is the following:&lt;br /&gt;
* get a '''gettext.h''' file and copy it to your src directory&lt;br /&gt;
* add an '''#include gettext,h''' to all source files that contain text that can be translated.&lt;br /&gt;
* add an '''_(''' in front of all strings that might be translated and an ''')''' after the string.&lt;br /&gt;
&lt;br /&gt;
Our source file looks now like this:&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;gettext.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (_(&amp;quot;Hello World\n&amp;quot;));&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Building our new package ====&lt;br /&gt;
I never used the offical openmoko toolchain, so no documentation for this for now - even if I don't think there is any magic there. Since the documentation of the MokoMakefile is rather good, I will document this approach - that I actually used - neither.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T11:05:21Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Tried to get the formatting right. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;hello&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
&lt;br /&gt;
===== src/Makefile.am ===== &lt;br /&gt;
This file is a template Makefile that when filled with life by the configure script will compile our code.&lt;br /&gt;
&lt;br /&gt;
The most important step here is to tell which files our program consists of. &lt;br /&gt;
 AM_CFLAGS = $(DEPEND_CFLAGS) -Wall&lt;br /&gt;
 &lt;br /&gt;
 AM_LDFLAGS = $(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 LDADD = $(LIBINTL)&lt;br /&gt;
 &lt;br /&gt;
 bin_PROGRAMS = hello&lt;br /&gt;
 hello_SOURCES = hello.c&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
===== Internationalization =====&lt;br /&gt;
Now the instructions on how to generate a gnome build system for our application should be nearly working. In order to generate a .tar.gz- archieve of the complete project that contains the full build system just type the following two lines: &lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 make dist&lt;br /&gt;
&lt;br /&gt;
What still has to be done is internationalization: A very fine feature of open-source software is that it is possible to translate them to nearlly all languages - and normally sooner or later somebody will have done this.&lt;br /&gt;
&lt;br /&gt;
The only thing that has to be done so our program can easily be internationalized is the following:&lt;br /&gt;
- get a '''gettext.h''' file and copy it to your src directory&lt;br /&gt;
- add an '''#include gettext,h''' to all source files that contain text that can be translated.&lt;br /&gt;
- add an '''_(''' in front of all strings that might be translated and an ''')''' after the string.&lt;br /&gt;
&lt;br /&gt;
Our source file looks now like this:&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;gettext.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (_(&amp;quot;Hello World\n&amp;quot;));&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Building our new package ====&lt;br /&gt;
I never used the offical openmoko toolchain, so no documentation for this for now - even if I don't think there is any magic there. Since the documentation of the MokoMakefile is rather good, I will document this approach - that I actually used - neither.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T11:04:52Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Internationalization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;hello&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
&lt;br /&gt;
===== src/Makefile.am ===== &lt;br /&gt;
This file is a template Makefile that when filled with life by the configure script will compile our code.&lt;br /&gt;
&lt;br /&gt;
The most important step here is to tell which files our program consists of. &lt;br /&gt;
 AM_CFLAGS = $(DEPEND_CFLAGS) -Wall&lt;br /&gt;
 &lt;br /&gt;
 AM_LDFLAGS = $(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 LDADD = $(LIBINTL)&lt;br /&gt;
 &lt;br /&gt;
 bin_PROGRAMS = hello&lt;br /&gt;
 hello_SOURCES = hello.c&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;br /&gt;
===== Internationalization =====&lt;br /&gt;
Now the instructions on how to generate a gnome build system for our application should be nearly working. In order to generate a .tar.gz- archieve of the complete project that contains the full build system just type the following two lines: &lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 make dist&lt;br /&gt;
&lt;br /&gt;
What still has to be done is internationalization: A very fine feature of open-source software is that it is possible to translate them to nearlly all languages - and normally sooner or later somebody will have done this.&lt;br /&gt;
&lt;br /&gt;
The only thing that has to be done so our program can easily be internationalized is the following:&lt;br /&gt;
 - get a '''gettext.h''' file and copy it to your src directory&lt;br /&gt;
 - add an '''#include gettext,h''' to all source files that contain text that can be translated.&lt;br /&gt;
 - add an '''_(''' in front of all strings that might be translated and an ''')''' after the string.&lt;br /&gt;
&lt;br /&gt;
Our source file looks now like this:&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;gettext.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (_(&amp;quot;Hello World\n&amp;quot;));&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
==== Building our new package ====&lt;br /&gt;
I never used the offical openmoko toolchain, so no documentation for this for now - even if I don't think there is any magic there. Since the documentation of the MokoMakefile is rather good, I will document this approach - that I actually used - neither.&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T10:48:33Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* src/Makefile.am */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;hello&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
&lt;br /&gt;
===== src/Makefile.am ===== &lt;br /&gt;
This file is a template Makefile that when filled with life by the configure script will compile our code.&lt;br /&gt;
&lt;br /&gt;
The most important step here is to tell which files our program consists of. &lt;br /&gt;
 AM_CFLAGS = $(DEPEND_CFLAGS) -Wall&lt;br /&gt;
 &lt;br /&gt;
 AM_LDFLAGS = $(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 LDADD = $(LIBINTL)&lt;br /&gt;
 &lt;br /&gt;
 bin_PROGRAMS = hello&lt;br /&gt;
 hello_SOURCES = hello.c&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T10:45:49Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Will try to make my descriptions canonical. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;hello&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 &lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T10:42:14Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Makefile.am */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;helloworld&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
===== Makefile.am =====&lt;br /&gt;
This file is a template top-level-Makefile that will be filled with life by the configure script.&lt;br /&gt;
&lt;br /&gt;
One thing that is added to the standard Makefile is code for automatically generate the '''_control'''-file mentioned above on a '''make dist'''&lt;br /&gt;
 # A list of all subdirectories.&lt;br /&gt;
 SUBDIRS = src po # help&lt;br /&gt;
 &lt;br /&gt;
 # Allow automake to interpret m4 macros (needed for interpreting&lt;br /&gt;
 # gettext's makefile.in&lt;br /&gt;
 ACLOCAL_AMFLAGS = -I m4&lt;br /&gt;
 # Files that aren't source files and still have to be in the tarball&lt;br /&gt;
 EXTRA_DIST = @PACKAGE_NAME@_control&lt;br /&gt;
 &lt;br /&gt;
 # An (currently unused) extension to the &amp;quot;install&amp;quot; target&lt;br /&gt;
 install-data-local:&lt;br /&gt;
 &lt;br /&gt;
 @PACKAGE_NAME@_control: Makefile.am configure.ac&lt;br /&gt;
 	echo &amp;quot;Package: @PACKAGE_NAME@&amp;quot;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Version: @PACKAGE_VERSION@&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Description: An voice recorder that can stop recording during silence&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Section: openmoko/applications&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Priority: optional&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Maintainer: your_name&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Architecture: armv4t&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Homepage: (The homepage of this project)&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Depends: gtk+ alsa-lib libogg libvorbis gnome-vfs libgnomeui&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 	echo &amp;quot;Source: \$${SRC}&amp;quot;&amp;gt;&amp;gt;$@&lt;br /&gt;
 &lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T10:34:17Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* configure.ac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;helloworld&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
====== configure.ac ======&lt;br /&gt;
This file tells what the configure script has to do - and which parts of the intelligence delivered with the tools that generate the configure script we need. &lt;br /&gt;
&lt;br /&gt;
I documented every line of which I found out what it actually does. The first line is for to tell the emacs text editor that it has to treat this file as an autoconf file. &lt;br /&gt;
 #                                               -*- Autoconf -*-&lt;br /&gt;
 # Process this file with autoconf to produce a configure script.&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to check what version of autoconf we need.&lt;br /&gt;
 AC_PREREQ(2.61)&lt;br /&gt;
 &lt;br /&gt;
 # Initialize autoconf and tell it what program we wrote, the version&lt;br /&gt;
 # of our program, and the address bug reports have to be sent to.&lt;br /&gt;
 AC_INIT([audiorec],[0.2],[audiorec.projects.openmoko.org])&lt;br /&gt;
 &lt;br /&gt;
 # tell autoconf where to put the temporary files it generates &lt;br /&gt;
 AC_CONFIG_AUX_DIR([build-aux])&lt;br /&gt;
 &lt;br /&gt;
 # This one is thaken from the &amp;quot;Migrationg to gnome Documentation Build&lt;br /&gt;
 # utilities&amp;quot;. No Idea, what it does.&lt;br /&gt;
 AC_CONFIG_MACRO_DIR([m4])&lt;br /&gt;
 &lt;br /&gt;
 # give autoconf the name of a file whose existence is a hint that&lt;br /&gt;
 # autoconf has been started from the right directory. &lt;br /&gt;
 AC_CONFIG_SRCDIR([src/diskusagemeter.c])&lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf where to put the output file that contains all&lt;br /&gt;
 # definitions our C program will need&lt;br /&gt;
 AC_CONFIG_HEADER([src/config.h:src/config.hin])&lt;br /&gt;
 &lt;br /&gt;
 # Initialize automake, and tell it to tell the C compiler to output as&lt;br /&gt;
 # many warnings as it can&lt;br /&gt;
 AM_INIT_AUTOMAKE([-Wall foreign])&lt;br /&gt;
 &lt;br /&gt;
 # The GNU Gettext version we used for internationalization of our&lt;br /&gt;
 # program... &lt;br /&gt;
 AM_GNU_GETTEXT_VERSION([0.16.1])&lt;br /&gt;
 # ...Or alternatively the local gnu gettext installation&lt;br /&gt;
 AM_GNU_GETTEXT([external])&lt;br /&gt;
 &lt;br /&gt;
 # Check for a C compiler&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # Include all m4 macros that have to do with the language C&lt;br /&gt;
 AC_LANG_C&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_ISC_POSIX&lt;br /&gt;
 &lt;br /&gt;
 # ???&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 &lt;br /&gt;
 # Checks for programs.&lt;br /&gt;
 AC_PROG_CC&lt;br /&gt;
 &lt;br /&gt;
 # We need the following type definitions from autoconf - or somebody else.&lt;br /&gt;
 AC_TYPE_INT8_T&lt;br /&gt;
 AC_TYPE_INT16_T&lt;br /&gt;
 AC_TYPE_INT32_T&lt;br /&gt;
 &lt;br /&gt;
 # AC_CHECK_LIB(libgnome-2.0, gnome_help_display_uri, [AC_DEFINE(HAVE_LIBGNOME, 1)])&lt;br /&gt;
 &lt;br /&gt;
 # Prepare building the gnome documentation of this program&lt;br /&gt;
 #GNOME_DOC_INIT&lt;br /&gt;
 &lt;br /&gt;
 # Checks for libraries.&lt;br /&gt;
 dnl Checking for the required libraries.&lt;br /&gt;
 GTK_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 LIBGNOMEUI_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GCONF_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 GNOMEVFS_REQUIRED_VERSION=2.0.0&lt;br /&gt;
 ALSA_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 OGG_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBIS_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 VORBISENC_REQUIRED_VERSION=1.0.0&lt;br /&gt;
 PKG_CHECK_MODULES(DEPEND, gtk+-2.0 &amp;gt;= $GTK_REQUIRED_VERSION gconf-2.0 &amp;gt;= $GCONF_REQUIRED_VERSION gnome-vfs-2.0 &amp;gt;= $GNOMEVFS_REQUIRED_VERSION libgnomeui-2.0 &amp;gt;= $LIBGNOMEUI_REQUIRED_VERSION alsa &amp;gt;= $ALSA_REQUIRED_VERSION ogg &amp;gt;= $OGG_REQUIRED_VERSION vorbis &amp;gt;= $VORBIS_REQUIRED_VERSION vorbisenc &amp;gt;= $VORBISENC_REQUIRED_VERSION)&lt;br /&gt;
 &lt;br /&gt;
 AC_SUBST(DEPEND_CFLAGS)&lt;br /&gt;
 AC_SUBST(DEPEND_LIBS)&lt;br /&gt;
 &lt;br /&gt;
 # Gettext wants to know the path to the top directory and such things...&lt;br /&gt;
 top_builddir=`pwd`&lt;br /&gt;
 AC_SUBST(top_builddir)&lt;br /&gt;
 AC_SUBST(PACKAGE)&lt;br /&gt;
 AC_SUBST(LOCALEDIR)&lt;br /&gt;
 &lt;br /&gt;
 # Checks for the header files we include.&lt;br /&gt;
 AC_HEADER_STDC&lt;br /&gt;
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/vfs.h])&lt;br /&gt;
 &lt;br /&gt;
 # Checks for typedefs, structures, and compiler characteristics.&lt;br /&gt;
 AC_C_CONST&lt;br /&gt;
 &lt;br /&gt;
 # Checks for library functions that we really need.&lt;br /&gt;
 AC_FUNC_MALLOC&lt;br /&gt;
 &lt;br /&gt;
 # Check for doxygen, so we can decide if we create a &amp;quot;doc&amp;quot; make target&lt;br /&gt;
 # that depends on doxygen- &lt;br /&gt;
 AC_CHECK_PROG([DOXYGEN], [doxygen], [doc], [])&lt;br /&gt;
 AC_SUBST(DOXYGEN)&lt;br /&gt;
 &lt;br /&gt;
 # A list of all configuration files we have to generate&lt;br /&gt;
 AC_CONFIG_FILES([Makefile src/Makefile src/images/Makefile po/Makefile.in doc/Makefile]) #help/Makefile &lt;br /&gt;
 &lt;br /&gt;
 # Tell autoconf to start outputting whatever it has to.&lt;br /&gt;
 AC_OUTPUT&lt;br /&gt;
&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Building_a_hello_world_application</id>
		<title>Building a hello world application</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Building_a_hello_world_application"/>
				<updated>2008-05-04T10:25:04Z</updated>
		
		<summary type="html">&lt;p&gt;Peterpall: /* Seems this line was intodruced accidentally-  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preparation ===&lt;br /&gt;
This guide assumes that you have performed the steps in [[Building_OpenMoko_from_scratch]]&lt;br /&gt;
&lt;br /&gt;
=== The commandline program ===&lt;br /&gt;
Store the following more or less standard hello world code in hello.c&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
   printf (&amp;quot;Hello World\n&amp;quot;);&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Compiling it the ''wrong'' / easy way ===&lt;br /&gt;
Assuming your current working directory is '''/home/moko''', and that you stored the code in '''/home/moko/hello.c''' it should now be possible to compile the application using&lt;br /&gt;
 ./build/tmp/cross/arm-linux/bin/gcc -o hello hello.c&lt;br /&gt;
&lt;br /&gt;
==== Testing it ====&lt;br /&gt;
Assuming you have followed [[OpenMoko_under_QEMU#Setting_up_USB_connection|Setting up USB connection]] and you have a working network connection to either a qemu Neo or a real Neo.&lt;br /&gt;
 scp hello root@192.168.0.202:/tmp/&lt;br /&gt;
 ssh root@192.168.0.202 /tmp/hello&lt;br /&gt;
This sequence of commands ought to give you a nice ''Hello World'', btw. the default root password is blank, just press return.&lt;br /&gt;
&lt;br /&gt;
=== GDK the Wrong / Easy Way ===&lt;br /&gt;
Building a GDK application the wrong way is slightly more complex, but is still fun to try.  It requires using pkg-config to specify including and linking with the ARM header files and libraries.&lt;br /&gt;
&lt;br /&gt;
Given the following program as main.c:&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 gchar *hello = &amp;quot;Howdy&amp;quot;;&lt;br /&gt;
 gchar *world = &amp;quot;World&amp;quot;;&lt;br /&gt;
 GtkWidget *label;&lt;br /&gt;
 gchar *labeltext;&lt;br /&gt;
 &lt;br /&gt;
 void buttoncb(GtkWidget *widget, gpointer data)&lt;br /&gt;
 {&lt;br /&gt;
 if (labeltext == hello)&lt;br /&gt;
    {&lt;br /&gt;
    labeltext = world;&lt;br /&gt;
    gtk_label_set_text(GTK_LABEL(label), labeltext);&lt;br /&gt;
    }&lt;br /&gt;
 else if (labeltext == world)&lt;br /&gt;
    gtk_main_quit();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
 GtkWidget *window;&lt;br /&gt;
 GtkWidget *button;&lt;br /&gt;
 &lt;br /&gt;
 gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
 window = gtk_window_new(GTK_WINDOW_TOPLEVEL);&lt;br /&gt;
 button = gtk_button_new();&lt;br /&gt;
 labeltext = hello;&lt;br /&gt;
 label = gtk_label_new(labeltext);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(button), label);&lt;br /&gt;
 g_signal_connect(G_OBJECT(button), &amp;quot;clicked&amp;quot;, G_CALLBACK(buttoncb), NULL);&lt;br /&gt;
 gtk_container_add(GTK_CONTAINER(window), button);&lt;br /&gt;
 gtk_widget_show_all(window);&lt;br /&gt;
 gtk_main();&lt;br /&gt;
 &lt;br /&gt;
 return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You must first point pkg-config to the proper directory:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/home/username/moko/build/tmp/staging/arm-linux/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
And set up an environment variable to make things easier:&lt;br /&gt;
&lt;br /&gt;
 export OMDIR=/home/username/moko&lt;br /&gt;
&lt;br /&gt;
The compile/link line is rather long - you will only want to do this once before you decide to create a shell script or make file:&lt;br /&gt;
&lt;br /&gt;
 $OMDIR/build/tmp/cross/arm-angstrom-linux-gnueabi/bin/gcc -L $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ \&lt;br /&gt;
                    -Wl, rpath-link, $OMDIR/build/tmp/staging/arm-angstrom-linux-gnueabi/lib/ -Wl, -O1 -g -o hw main.c \&lt;br /&gt;
                    '$OMDIR/build/tmp/staging/i686-linux/bin/pkg-config --cflags --libs openmoko-libs gtk+-2.0'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then copy and run as in the original hello world command line program above.&lt;br /&gt;
&lt;br /&gt;
===== Why was it the ''wrong'' way? =====&lt;br /&gt;
OpenMoko provides a precompiled [[Toolchain]] package for that. It also comes with some scripts that make your life much easier. Besides, you don't need [[OpenEmbedded]] to build applications. If you ''do'' want to customize your complete distribution, then read on how to  use bitbake when building stuff. In any way, at least you now know that you can easily cross compile for OpenMoko.&lt;br /&gt;
&lt;br /&gt;
=== The Right Way: Using the gnome build system ===&lt;br /&gt;
Even if I am no expert in this - somebody had to make a start so I'll write down everything I still believe to remember from my 1st 'real' gnome application that used the autotools and all: I have never been able to find a good tutorial for making a &amp;quot;canonical&amp;quot; gnome application - and such a tutorial is urgently needed.&lt;br /&gt;
&lt;br /&gt;
Since I know that many of these things will be missing or even inaccurate in the 1st step - if You find out to make it work better or at all - please document how to do this.&lt;br /&gt;
&lt;br /&gt;
===== Creating the necessary documentation files and directory structure =====&lt;br /&gt;
First of all go into the directory you want to be the topmost application of yout new application, and create the following files:&lt;br /&gt;
{|&lt;br /&gt;
AUTHORS||A list of all authors that took part in developing this project&lt;br /&gt;
COPYING||The copyright notice. Favourably the GPL&lt;br /&gt;
INSTALL||This file should contain the information how to build and install this program&lt;br /&gt;
README||This file should contain all important information about the program including what the program was written for. &lt;br /&gt;
NEWS||The name of this file should be self-describing&lt;br /&gt;
TODO||The wishlist of your project&lt;br /&gt;
Changelog||A list of the major changes to your project&lt;br /&gt;
|}&lt;br /&gt;
I remember that some of these files were mandatory - it's better create them all&lt;br /&gt;
&lt;br /&gt;
Then create a directory named '''src'' - and copy the source code of the program there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== The configuration of the autotools =====&lt;br /&gt;
====== autogen.sh ======&lt;br /&gt;
This file is a shell script that calls all autotools in the right order and with the right parameters so they will in the end generate the standard configure script that will detect how to build our program.&lt;br /&gt;
&lt;br /&gt;
As you can see all of the following examples these files are taken from audiorec. Feel free to change PKG_NAME to something more accurate for your application.&lt;br /&gt;
 #! /bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # Most if not all of the contents of this file was taken from the openmoko&lt;br /&gt;
 # sample application as it was shipped with the openmoko toolchain on&lt;br /&gt;
 # January 31st, 2008&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 srcdir=`dirname $0`&lt;br /&gt;
 test -z &amp;quot;$srcdir&amp;quot; &amp;amp;&amp;amp; srcdir=.&lt;br /&gt;
 &lt;br /&gt;
 PKG_NAME=&amp;quot;audiorec&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 (test -f $srcdir/configure.ac) || {&lt;br /&gt;
         echo -n &amp;quot;**Error**: Directory &amp;quot;\`$srcdir\'&amp;quot; does not look like the&amp;quot;&lt;br /&gt;
         echo &amp;quot; top-level $PKG_NAME directory&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 which gnome-autogen.sh || {&lt;br /&gt;
         echo &amp;quot;You need to install gnome-common from the GNOME CVS&amp;quot;&lt;br /&gt;
         exit 1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=0 REQUIRED_GETTEXT_VERSION=0.10.36 . gnome-autogen.sh&lt;br /&gt;
&lt;br /&gt;
{{Languages|Building_a_hello_world_application}}&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Peterpall</name></author>	</entry>

	</feed>