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

	<entry>
		<id>http://wiki.openmoko.org/wiki/Customizing_the_Openmoko_Distribution</id>
		<title>Customizing the Openmoko Distribution</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Customizing_the_Openmoko_Distribution"/>
				<updated>2007-09-14T18:09:36Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: replace PACKAGE_INSTALL with IMAGE_INSTALL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What's the goal? ==&lt;br /&gt;
&lt;br /&gt;
The goal of this page is to teach you how to take an application that you've coded (or the sample app) and properly get it included in your rootfs. This article is a bit of an aggregate page, it's going to take information from [[MokoMakefile]], [[User:CesarB/Using a local overlay|Using a local overlay]], [[Building a hello world application]], and [[Create a package from existing sources]]. So as you can see the goal is for it to be a very thorough introduction, and will take you from &amp;quot;Idea to Inclusion&amp;quot; of your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting Up the OpenMoko Environment ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; &lt;br /&gt;
 |*If you already have the environment set up then it is imperative that you update your Makefile.&lt;br /&gt;
Do this by running:&lt;br /&gt;
&amp;lt;pre&amp;gt;make update-makefile&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This part of the tutorial is going to be pretty basic. I absolutely love [[MokoMakefile]] -- it's fantastic. The creator has done and continues to do a fantastic job with this. I see absolutely no reason not to use it. I put my OpenMoko development directory in /home/bryce/mokodev/ and it works great for me. You can feel free to do the same or put it anywhere else in your user directory (or anywhere on your system if you're feeling daring and a little nutty).&lt;br /&gt;
&lt;br /&gt;
To get your environment set up, please get it set up according to [[MokoMakefile]]. However, if you do have the build environment set up manually and you're sure you know what you're doing, then feel free to go forward with this.&lt;br /&gt;
&lt;br /&gt;
== Setting Up a Local Overlay ==&lt;br /&gt;
If you're at the point of setting up a local overlay, this means a couple things. First: you've had a brilliant idea for an application that you just need to have on the OpenMoko platform. Second: you realize that this killer app of yours needs to be done properly and you're not going to do anything silly like include it in the actual tree for the OpenMoko distro because it would probably end up just getting overwritten eventually, or you just realize that it's bad practice!&lt;br /&gt;
&lt;br /&gt;
If you're wondering why and what a local overlay is then let me take this time to explain it to you. A local overlay is where you, as a developer, keep your local files in an OE style setup so that you can simply pull your updated code into the tree. You add your overlay tree into the bitbake setup so that when you call bitbake it will pull your own or your customized packages before going to the OE or OpenMoko trees. This keeps everything nice and organized for you and also allows you to build/rebuild/include your apps by using the [[MokoMakefile]]&lt;br /&gt;
&lt;br /&gt;
Thank you to [[User:CesarB]] for this part of the wiki.&lt;br /&gt;
&lt;br /&gt;
To create a local overlay:&lt;br /&gt;
&lt;br /&gt;
* Create a &amp;quot;local&amp;quot; directory and its subdirectories&lt;br /&gt;
&lt;br /&gt;
 mkdir local local/conf local/classes local/packages local/packages/images local/packages/tasks&lt;br /&gt;
&lt;br /&gt;
* Copy &amp;lt;code&amp;gt;site.conf&amp;lt;/code&amp;gt; from the openmoko tree to &amp;lt;code&amp;gt;local/conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cp build/conf/site.conf local/conf/site.conf&lt;br /&gt;
&lt;br /&gt;
* Edit the local/conf/site.conf you copied to add the new tree as a source for bitbake recipes.&lt;br /&gt;
&lt;br /&gt;
Change the current &amp;lt;code&amp;gt;BBFILES&amp;lt;/code&amp;gt; to look like this:&lt;br /&gt;
 BBFILES := &amp;quot;${OMDIR}/openembedded/packages/*/*.bb ${OMDIR}/oe/packages/*/*.bb ${OMDIR}/local/packages/*/*.bb&amp;quot;&lt;br /&gt;
Change your &amp;lt;code&amp;gt;BBFILE_COLLECTIONS&amp;lt;/code&amp;gt; line to look like this:&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local overlay&amp;quot;&lt;br /&gt;
Add this line:&lt;br /&gt;
 BBFILE_PATTERN_overlay = &amp;quot;^${OMDIR}/local/&amp;quot;&lt;br /&gt;
Add this line:&lt;br /&gt;
 BBFILE_PRIORITY_overlay = &amp;quot;20&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;BBFILE_PRIORITY&amp;lt;/code&amp;gt; should be greater than all the other &amp;lt;code&amp;gt;BBFILE_PRIORITY&amp;lt;/code&amp;gt; variables on the same file.&lt;br /&gt;
&lt;br /&gt;
* Change your &amp;lt;code&amp;gt;BBPATH&amp;lt;/code&amp;gt; environment variable to add the new tree ''before'' the two others in your &amp;lt;code&amp;gt;setup-env&amp;lt;/code&amp;gt; file. Bitbake only seems to use the first site.conf file it finds. &amp;lt;code&amp;gt;setup-env&amp;lt;/code&amp;gt; is created by [[MokoMakefile]] automatically and is located in your &amp;lt;code&amp;gt;${OMDIR}&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;${OMDIR}/local:${OMDIR}/build:${OMDIR}/oe:${OMDIR}/openembedded&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Using Your New Local Overlay ==&lt;br /&gt;
&lt;br /&gt;
=== Changing files in conf/ ===&lt;br /&gt;
&lt;br /&gt;
To change a file in conf/, just copy the file to the overlay tree (preserving the directory structure) and edit it.&lt;br /&gt;
&lt;br /&gt;
=== Changing files in classes/ ===&lt;br /&gt;
&lt;br /&gt;
To change a file in classes/, just copy the file to the overlay tree and edit it.&lt;br /&gt;
&lt;br /&gt;
=== Changing packages ===&lt;br /&gt;
&lt;br /&gt;
Changing a package's recipe is a bit more complex. You have to copy over (or symlink) not only the .bb file for the package, but also ''all'' the files it includes with &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt;, and the &amp;lt;code&amp;gt;FILESDIR&amp;lt;/code&amp;gt; directories (all directories referred to by &amp;lt;code&amp;gt;FILESDIR&amp;lt;/code&amp;gt;, usually named either ''package''-''version'' or &amp;lt;code&amp;gt;files&amp;lt;/code&amp;gt;). If you forget one of them, the build will give an error (either when parsing the recipe in the case of &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt;, or when trying to build in the case of the &amp;lt;code&amp;gt;FILESDIR&amp;lt;/code&amp;gt; directories).&lt;br /&gt;
&lt;br /&gt;
=== Adding a new package ===&lt;br /&gt;
&lt;br /&gt;
You can add a new package (or a recipe for a new version of a package) to the overlay tree simply by creating it on the overlay tree.&lt;br /&gt;
&lt;br /&gt;
=== Creating your own images ===&lt;br /&gt;
&lt;br /&gt;
To create you own images we'll use the base openmoko .bb files and modify them to suit. Where you see ''scaredycat'' replace this with something to identify your own images.&lt;br /&gt;
&lt;br /&gt;
edit local/packages/images/scaredycat-openmoko-devel-image.bb and paste this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
require scaredycat-openmoko-image.bb&lt;br /&gt;
&lt;br /&gt;
IMAGE_INSTALL += &amp;quot;task-openmoko-debug&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then edit local/packages/images/scaredycat-openmoko-image.bb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#------------------------------------------------------&lt;br /&gt;
# OpenMoko Image Recipe&lt;br /&gt;
#------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
export IMAGE_BASENAME = &amp;quot;${PN}&amp;quot;&lt;br /&gt;
export IMAGE_LINGUAS = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
export IMAGE_INSTALL = &amp;quot;\&lt;br /&gt;
  ${MACHINE_TASK_PROVIDER} \&lt;br /&gt;
  task-openmoko-linux \&lt;br /&gt;
  task-openmoko-net \&lt;br /&gt;
  task-openmoko-ui \&lt;br /&gt;
  task-openmoko-base \&lt;br /&gt;
  task-openmoko-phone \&lt;br /&gt;
  task-openmoko-games \&lt;br /&gt;
  task-openmoko-pim \&lt;br /&gt;
  task-openmoko-scaredycat \&lt;br /&gt;
  &amp;quot;&lt;br /&gt;
&lt;br /&gt;
inherit image&lt;br /&gt;
&lt;br /&gt;
LICENSE = MIT&lt;br /&gt;
&lt;br /&gt;
ROOTFS_POSTPROCESS_COMMAND += 'date &amp;quot;+%m%d%H%M%Y&amp;quot; &amp;gt;${IMAGE_ROOTFS}/etc/timestamp'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
edit packages/tasks/task-openmoko-scaredycat.bb - this is where we put the things we want to include in our image, above and beyond the standard image. This example includes '''[http://wiki.openmoko.org/wiki/Scummvm scummvm]''' and '''[http://www.handhelds.org/moin/moin.cgi/kbdd kbdd]'''. If you modify this file, make sure you update the '''PR''' by incrementing the number each time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DESCRIPTION = &amp;quot;OpenMoko: Scaredycat Additions&amp;quot;&lt;br /&gt;
SECTION = &amp;quot;openmoko/base&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;original&amp;quot;&lt;br /&gt;
PR = &amp;quot;r2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
inherit task&lt;br /&gt;
&lt;br /&gt;
RDEPENDS_task-openmoko-scaredycat = &amp;quot;\&lt;br /&gt;
  scummvm \&lt;br /&gt;
  kbdd \&lt;br /&gt;
&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Actually building your image ====&lt;br /&gt;
&lt;br /&gt;
To build you image, which will be located with your other images, do the following:&lt;br /&gt;
&lt;br /&gt;
 # cd build ; . ../setup-env ; bitbake scaredycat-openmoko-devel-image&lt;br /&gt;
&lt;br /&gt;
== Your First Application ==&lt;br /&gt;
&lt;br /&gt;
I know that I said I'd have a GDK application in here, however, I'd really like to get this whole course done first and have you guys starting to code instead of just looking at what I've written!&lt;br /&gt;
&lt;br /&gt;
This will be a very simple CLI hello world.&lt;br /&gt;
&lt;br /&gt;
=== Before We Code ===&lt;br /&gt;
&lt;br /&gt;
Like a good coder you want to make sure that you're not just doing things, but that you're doing them the right way! &lt;br /&gt;
&lt;br /&gt;
Now change directories into your &amp;lt;code&amp;gt;local/packages&amp;lt;/code&amp;gt; directory.The following commands expect you'll be in that directory so don't change unless you know what you're doing!&lt;br /&gt;
&lt;br /&gt;
You'll want to make a directory with the name of your application, and a subdirectory called files.&lt;br /&gt;
  mkdir myhelloworld myhelloworld/files&lt;br /&gt;
Now you'll want to create two files in the &amp;lt;code&amp;gt;files&amp;lt;/code&amp;gt; directory&lt;br /&gt;
  touch myhelloworld/files/README.txt myhelloworld/files/myhelloworld.c&lt;br /&gt;
And finally you'll want to create a bitbake file.&lt;br /&gt;
  touch myhelloworld/myhelloworld.bb&lt;br /&gt;
&lt;br /&gt;
Alrighty now all your necessary files are created so lets go over this real quick.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$HOME&lt;br /&gt;
 +- $OMDIR (contains the official openmoko tree)&lt;br /&gt;
 |  +- local/&lt;br /&gt;
 |     +- packages/&lt;br /&gt;
 |        +- myhelloworld/&lt;br /&gt;
 |           +- myhelloworld.bb&lt;br /&gt;
 |           +- files/&lt;br /&gt;
 |              +- myhelloworld.c&lt;br /&gt;
 |              +- README.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That should be your structure, if it's not you should go and fix it up.&lt;br /&gt;
=== Filling the Files ===&lt;br /&gt;
&lt;br /&gt;
So you've got your sample files all laid out now it's time to make them actually do something.&lt;br /&gt;
&lt;br /&gt;
myhelloworld.c&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char** argv)&lt;br /&gt;
{&lt;br /&gt;
        printf(&amp;quot;Ello Poppet!\n&amp;quot;);&lt;br /&gt;
        return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
README.txt&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is a command line application. It prints a simple Hello World! To stdout.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
myhelloworld.bb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DESCRIPTION = &amp;quot;A killer hello world application&amp;quot;&lt;br /&gt;
AUTHOR = &amp;quot;Bryce Leo&amp;quot;&lt;br /&gt;
HOMEPAGE = &amp;quot;&amp;quot;&lt;br /&gt;
SECTION = &amp;quot;console/applications&amp;quot;&lt;br /&gt;
PRIORITY = &amp;quot;optional&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;MIT&amp;quot;&lt;br /&gt;
#DEPENDS = &amp;quot;&amp;quot;&lt;br /&gt;
#RDEPENDS = &amp;quot;&amp;quot;&lt;br /&gt;
#RRECOMMENDS = &amp;quot;&amp;quot;&lt;br /&gt;
#RCONFLICTS = &amp;quot;&amp;quot;&lt;br /&gt;
#SRCDATE = &amp;quot;20070729&amp;quot;&lt;br /&gt;
#PV = &amp;quot;0.1&amp;quot;&lt;br /&gt;
#PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
SRC_URI = &amp;quot;file://myhelloworld.c \&lt;br /&gt;
          file://README.txt &amp;quot;&lt;br /&gt;
&lt;br /&gt;
S = &amp;quot;${WORKDIR}/myhelloworld/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
do_compile() {&lt;br /&gt;
        ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/myhelloworld.c -o myhelloworld&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
do_install() {&lt;br /&gt;
        install -m 0755 -d ${D}${bindir} ${D}${docdir}/myhelloworld&lt;br /&gt;
        install -m 0755 ${S}/myhelloworld ${D}${bindir}&lt;br /&gt;
        install -m 0644 ${WORKDIR}/README.txt ${D}${docdir}/myhelloworld&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Your First Compilation ===&lt;br /&gt;
&lt;br /&gt;
This is where the [[MokoMakefile]] comes in very very handy. Change to your ${OMDIR} directory, You'll know it by the fact that it is where &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; resides.&lt;br /&gt;
 make build-package-myhelloworld&lt;br /&gt;
&lt;br /&gt;
(make sure you run make openmoko-devel-image at least once before building your own packages)&lt;br /&gt;
&lt;br /&gt;
This should all come back and not return any error messages, The output should end in something similar to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOTE: package myhelloworld-1.0: completed&lt;br /&gt;
NOTE: build 200707291926: completed&lt;br /&gt;
Build statistics:&lt;br /&gt;
  Attempted builds: 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that no errors were thrown we are happily done!&lt;br /&gt;
&lt;br /&gt;
== Adding Your Application to the Image ==&lt;br /&gt;
&lt;br /&gt;
So you've had an idea, you've setup the build environment, you've setup your local overlay, you've laid out your application tree, you've put code into those fantastic files of yours and now it compiles.There's only one thing left to do. Add that application to your image.&lt;br /&gt;
&lt;br /&gt;
Now lets go over in words and whys what we're about to do. First we need to make modify the &amp;lt;code&amp;gt;${OMDIR}/build/conf/local.conf&amp;lt;/code&amp;gt;. We add in the variable &amp;lt;code&amp;gt;DISTRO_EXTRA_RDEPENDS&amp;lt;/code&amp;gt; and set its value to include &amp;lt;code&amp;gt;myhelloworld&amp;lt;/code&amp;gt;. If you'd like to include other packages from your own overlay or the OM tree just add them inseparated by spaces. After this gets added as a dependency to build the Distro (in this case OpenMoko). Now we have to re-build the task-base package. This essentially just generates an ipk file that will &amp;quot;Merge machine and distro options to create a basic machine task/package.&amp;quot; It pretty much builds a file with a list of packages to be installed that are required for the distro to work correctly. So then you just go through and make &amp;lt;code&amp;gt;openmoko-devel-image, build-qemu, flash-qemu-local,&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;run-qemu&amp;lt;/code&amp;gt;. Then calibrate your stylus, head over to the terminal, and run your application!&lt;br /&gt;
&lt;br /&gt;
=== Modifying Your local.conf ===&lt;br /&gt;
Now, go into your build config directory &amp;lt;code&amp;gt;${OMDIR}/build/conf/&amp;lt;/code&amp;gt; and now you'll be editing &amp;lt;code&amp;gt;local.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
Add this line to you &amp;lt;code&amp;gt;local.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
  DISTRO_EXTRA_RDEPENDS += &amp;quot;myhelloworld&amp;quot;&lt;br /&gt;
With this line you can also include other applications from the OE tree. For instance my &amp;lt;code&amp;gt;local.conf&amp;lt;/code&amp;gt; looks like this.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MACHINE = &amp;quot;fic-gta01&amp;quot;&lt;br /&gt;
DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
BUILD_ARCH = &amp;quot;i686&amp;quot;&lt;br /&gt;
SRCDATE_eds-dbus = &amp;quot;now&amp;quot;&lt;br /&gt;
DISTRO_EXTRA_RDEPENDS += &amp;quot;lua dillo myhelloworld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you've fixed your &amp;lt;code&amp;gt;local.conf&amp;lt;/code&amp;gt; it's time to go through all the necessary tasks to add and re-build you image and have your sweet package included.&lt;br /&gt;
&lt;br /&gt;
=== Building ===&lt;br /&gt;
Now come the easy part thanks to [[MokoMakefile]]. &lt;br /&gt;
&lt;br /&gt;
  make rebuild-package-task-base&lt;br /&gt;
  make openmoko-devel-image&lt;br /&gt;
  make build-qemu&lt;br /&gt;
  make flash-qemu-local&lt;br /&gt;
&lt;br /&gt;
Now all you have to do is run qemu.&lt;br /&gt;
  make run-qemu&lt;br /&gt;
&lt;br /&gt;
From here after you calibrate your stylus, you click on the Menu in the top right, click down to terminal, then just run your program.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@fic-gta02:/$ myhelloworld&lt;br /&gt;
Ello Poppet!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding Python scripts as applications==&lt;br /&gt;
This is for adding [[python]] scripts/packages to the image for your own use.&lt;br /&gt;
===First steps===&lt;br /&gt;
First, you need to modify the &amp;lt;code&amp;gt;local.conf&amp;lt;/code&amp;gt; file as described above. You need to modify &lt;br /&gt;
  DISTRO_EXTRA_RDEPENDS += &amp;quot;myhelloworld&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
  DISTRO_EXTRA_RDEPENDS += &amp;quot;myhelloworld python&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Xkr47|xkr47]] 18:21, 11 August 2007 (CEST) Hmm surely the new line should be DISTRO_EXTRA_RDEPENDS += &amp;quot;pyhelloworld python&amp;quot; instead since the package we create below is pyhelloworld..&lt;br /&gt;
&lt;br /&gt;
This is because python is not included by default in the openmoko image. Or you can use &amp;lt;code&amp;gt;python-pygtk2&amp;lt;/code&amp;gt; if you wish.&lt;br /&gt;
&lt;br /&gt;
Next, you need to perform these actions from the &amp;lt;code&amp;gt;$OMDIR/local&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
  mkdir packages/pyhelloworld packages/pyhelloworld/files&lt;br /&gt;
&lt;br /&gt;
  touch packages/pyhelloworld/files/pyhello packages/pyhelloworld/README.txt&lt;br /&gt;
&lt;br /&gt;
  touch packages/pyhelloworld/pyhelloworld.bb&lt;br /&gt;
&lt;br /&gt;
===Filling in the files===&lt;br /&gt;
Now, edit &amp;lt;code&amp;gt;packages/pyhelloworld/files/pyhello&amp;lt;/code&amp;gt; to contain:&lt;br /&gt;
&amp;lt;pre&amp;gt;  &lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;hello world!&amp;quot;&lt;br /&gt;
print &amp;quot;shutting down now. Farewell oh cruel, cruel world!&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
Next up, is editing &amp;lt;code&amp;gt;packages/pyhelloworld/files/README.txt&amp;lt;/code&amp;gt; to say:&lt;br /&gt;
&lt;br /&gt;
  This is the most awesome helloworld application ever. Know why? It has SNAKES!&lt;br /&gt;
&lt;br /&gt;
Kidding aside, next is the all important &amp;lt;code&amp;gt; packages/pyhelloworld/pyhelloworld.bb:&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DESCRIPTION = &amp;quot;A pythonic hello world application&amp;quot;&lt;br /&gt;
AUTHOR = &amp;quot;Tyler Laing&amp;quot;&lt;br /&gt;
HOMEPAGE = &amp;quot;&amp;quot;&lt;br /&gt;
SECTION = &amp;quot;console/applications&amp;quot;&lt;br /&gt;
PRIORITY = &amp;quot;optional&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;MIT&amp;quot;&lt;br /&gt;
#DEPENDS = &amp;quot;&amp;quot;&lt;br /&gt;
#RDEPENDS = &amp;quot;&amp;quot;&lt;br /&gt;
#RRECOMMENDS = &amp;quot;&amp;quot;&lt;br /&gt;
#RCONFLICTS = &amp;quot;&amp;quot;&lt;br /&gt;
#SRCDATE = &amp;quot;20070729&amp;quot;&lt;br /&gt;
#PV = &amp;quot;0.1&amp;quot;&lt;br /&gt;
#PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
SRC_URI = &amp;quot;file://pyhello \&lt;br /&gt;
          file://README.txt &amp;quot;&lt;br /&gt;
&lt;br /&gt;
S = &amp;quot;${WORKDIR}/pyhelloworld/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
do_install() {&lt;br /&gt;
        install -m 0755 -d ${D}${bindir} ${D}${docdir}/pyhelloworld&lt;br /&gt;
        install -m 0755 ${WORKDIR}/pyhello ${D}${bindir}&lt;br /&gt;
        install -m 0644 ${WORKDIR}/README.txt ${D}${docdir}/pyhelloworld&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I'll explain each of the parts right here, for future reference.&lt;br /&gt;
&lt;br /&gt;
====Meanings of variables in .bb files====&lt;br /&gt;
&lt;br /&gt;
  $WORKDIR = $OMDIR/local/packages/&amp;lt;application directory&amp;gt;&lt;br /&gt;
  $bindir  = $OMDIR/build/tmp/work/armv4t-linux/&amp;lt;application directory&amp;gt;/image/usr/bin&lt;br /&gt;
  $docir   = $OMDIR/build/tmp/work/armv4t-linux/&amp;lt;application directory&amp;gt;/image/usr/share/doc&lt;br /&gt;
  $D       = $OMDIR/build/&lt;br /&gt;
&lt;br /&gt;
====Final steps====&lt;br /&gt;
Complete the last steps as per the above instructions, from the point of altering &amp;lt;code&amp;gt;DISTRO_EXTRA_RDEPENDS&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
And your done!&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications]]&lt;br /&gt;
[[Category:OpenMoko]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

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

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

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland</id>
		<title>Openmoko Local Groups: Cleveland</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland"/>
				<updated>2007-08-31T10:26:08Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: clean up table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are there any other OpenMoko community members located in North East Ohio (Akron, Canton, Cleveland)?&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
!Name&lt;br /&gt;
!Skills&lt;br /&gt;
!Interest&lt;br /&gt;
!Location&lt;br /&gt;
!Has Device&lt;br /&gt;
!Has Debug Board&lt;br /&gt;
|-&lt;br /&gt;
|[[User:cbrake]]&lt;br /&gt;
|Programming, Embedded Systems dev&lt;br /&gt;
|Embedded Sys dev, using the NEO as a phone&lt;br /&gt;
|Akron, OH&lt;br /&gt;
|[[Image: Moko.jpg|center]]&lt;br /&gt;
|[[Image: MokoBox.jpg|center]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:davioh]]&lt;br /&gt;
|Programming, &lt;br /&gt;
|runing business applications, using the NEO as a phone&lt;br /&gt;
|Akron, OH&lt;br /&gt;
|[[Image: Moko.jpg|center]]&lt;br /&gt;
|[[Image: MokoBox.jpg|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland</id>
		<title>Openmoko Local Groups: Cleveland</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland"/>
				<updated>2007-08-23T17:11:53Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: update cleveland group with table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are there any other OpenMoko community members located in North East Ohio (Akron, Canton, Cleveland)?&lt;br /&gt;
* [[User:cbrake]]&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
!Name&lt;br /&gt;
!Skills&lt;br /&gt;
!Interest&lt;br /&gt;
!Location&lt;br /&gt;
!Has Device&lt;br /&gt;
!Has Debug Board&lt;br /&gt;
|-&lt;br /&gt;
|[[User:cbrake]]&lt;br /&gt;
|Programming, Embedded Systems dev&lt;br /&gt;
|Embedded Sys dev, using the NEO as a phone&lt;br /&gt;
|Akron, OH&lt;br /&gt;
|[[Image: Moko.jpg|center]]&lt;br /&gt;
|[[Image: MokoBox.jpg|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland</id>
		<title>Openmoko Local Groups: Cleveland</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland"/>
				<updated>2007-08-04T18:41:18Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are there any other OpenMoko community members located in North East Ohio (Akron, Canton, Cleveland)?&lt;br /&gt;
* [[User:cbrake]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland</id>
		<title>Openmoko Local Groups: Cleveland</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Openmoko_Local_Groups:_Cleveland"/>
				<updated>2007-08-04T18:40:55Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: cbrake is located in Cleveland area&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are there any other OpenMoko community members located in North East Ohio (Akron, Canton, Cleveland)?&lt;br /&gt;
 * [[User:cbrake]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Neo_1973_OpenOCD</id>
		<title>Neo 1973 OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Neo_1973_OpenOCD"/>
				<updated>2007-04-11T13:31:39Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: restore last good version of this page and discard bogus GPS data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
[http://openocd.berlios.de/ OpenOCD] is a 100% free software On-chip-debugger for commonly-found ARM JTAG probes such as [[wiggler]], chamaeleon, jtag-key and others.&lt;br /&gt;
&lt;br /&gt;
It provides a human-readable telnet interface for manually halting/resuming the target device, reading/writing registers and memory, etc.&lt;br /&gt;
&lt;br /&gt;
In addition, it provides a RDI (remote debugger interface) on a TCP port.  This interface can be used by gdb (the GNU Debugger).&lt;br /&gt;
&lt;br /&gt;
The GTA01 development team uses OpenOCD with a [[wiggler]] compatible probe as their ICE solution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
=== Debian Package ===&lt;br /&gt;
&lt;br /&gt;
We now have a Debian binary package of OpenOCD, available from http://people.openmoko.org/laforge/dpkg. Installing this package is the preferred method to install OpenOCD on your development machine like&lt;br /&gt;
&lt;br /&gt;
 dpkg --install openocd_82-1_i386.deb&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
OpenOCD Revision 82 and later have been proven to work with our [[QT2410]] and [[Neo1973]] target board and wiggler as well as Amontect JTAGkey and JTAGkey tiny.  You can e.g. check rev. 130 out of the OpenOCD subversion via&lt;br /&gt;
&lt;br /&gt;
 svn co -r 130 http://svn.berlios.de/svnroot/repos/openocd/trunk&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
[[User:HaraldWelte]] has provided a [http://people.gta01.hmw-consulting.de/laforge/misc/openocd.cfg openocd.cfg configuration file] for use of OpenOCD with wiggler and the QT2410 target board. &lt;br /&gt;
&lt;br /&gt;
== Using OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
We cannot provide a full manual for OpenOCD, but please check &lt;br /&gt;
[[Bootloader#Using_JTAG_to_boot_from_RAM]] and [[NAND bad blocks#JTAG_.2F_OpenOCD_.2F_u-boot_RAM_based]], as well as the [[Neo1973 OpenOCD#Using OpenOCD telnet interface]] section below.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs and Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== CP15 register read/write of ARM920T core not working ===&lt;br /&gt;
&lt;br /&gt;
This has been reported upstream. Bugfix pending.&lt;br /&gt;
&lt;br /&gt;
=== Did you turn it on ? ===&lt;br /&gt;
&lt;br /&gt;
An easily made but devastating mistake is to forget to actually activate the CPU. Just connecting power is not enough !&lt;br /&gt;
Press and hold the power button until the boot loader does its count-down, or, in case there is no runnable boot loader,&lt;br /&gt;
the CPU keeps itself busy.&lt;br /&gt;
&lt;br /&gt;
=== number of discovered devices in JTAG chain doesn't match configuration ===&lt;br /&gt;
&lt;br /&gt;
You get something like:&lt;br /&gt;
 Error:   jtag.c:1224 jtag_examine_chain(): number of discovered devices in JTAG chain (51) doesn't match configuration (1)&lt;br /&gt;
&lt;br /&gt;
This seems like a libftdi initialization bug.  Sometimes the FT2232 doesn't get completely reset into a sane state at startup of OpenOCD.  Please unplug the USB cable from the [[Amontec JTAGkey]] / [[Debug Board]] and re-plug.  It should immediately work the next time.  Bugfix would be appreciated a lot!&lt;br /&gt;
&lt;br /&gt;
=== JTAG communication failure ===&lt;br /&gt;
&lt;br /&gt;
Another common error is this one:&lt;br /&gt;
 JTAG communication failure, check connection, JTAG interface, target power etc.&lt;br /&gt;
&lt;br /&gt;
Also this one is fixed by unplugging and re-plugging USB.&lt;br /&gt;
&lt;br /&gt;
== OpenOCD and [[Debug Board]] ==&lt;br /&gt;
&lt;br /&gt;
=== libftdi-0.8 ===&lt;br /&gt;
&lt;br /&gt;
If you want to use OpenOCD with our Debug Board v2, and want to use the serial port simultaneously with OpenOCD, you '''need libftdi-0.8 or later'''.  Chances are high that your distribution still ships an earlier version of libftdi, so you might want to download it from http://www.intra2net.com/de/produkte/opensource/ftdi/ and build yourself.&lt;br /&gt;
&lt;br /&gt;
=== openocd.cfg ===&lt;br /&gt;
&lt;br /&gt;
This is an openocd.cfg that is known to work with [[Debug Board]], [[Neo1973 Hardware#GTA01Bv3]] and OpenOCD 130:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet_port 4444&lt;br /&gt;
gdb_port 3333&lt;br /&gt;
interface ft2232&lt;br /&gt;
jtag_speed 0&lt;br /&gt;
ft2232_vid_pid 0x1457 0x5118&lt;br /&gt;
ft2232_layout &amp;quot;jtagkey&amp;quot;&lt;br /&gt;
reset_config trst_and_srst&lt;br /&gt;
jtag_device 4 0x1 0xf 0xe&lt;br /&gt;
daemon_startup attach&lt;br /&gt;
target arm920t little reset_run 0 arm920t&lt;br /&gt;
working_area 0 0x200000 0x4000 backup&lt;br /&gt;
run_and_halt_time 0 5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using OpenOCD telnet interface ===&lt;br /&gt;
&lt;br /&gt;
The telnet interface can be accessed using&lt;br /&gt;
 telnet localhost 4444&lt;br /&gt;
&lt;br /&gt;
it provides a plethora of functions for debugging. You might be interested in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
reset&lt;br /&gt;
reset halt&lt;br /&gt;
resume&lt;br /&gt;
poll&lt;br /&gt;
reg&lt;br /&gt;
load_binary&lt;br /&gt;
mdw&lt;br /&gt;
mww&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using OpenOCD and gdb for remote debugging ===&lt;br /&gt;
&lt;br /&gt;
First, you will need a suitable cross-gdb (a gdb that runs on your host architecture, e.g. i386, but works with code for arm).  In OpenEmbedded, you can build such a cross-gcc by using&lt;br /&gt;
 bitbake  gdb-cross&lt;br /&gt;
&lt;br /&gt;
If you want to debug the kernel, you can then start this gdb with&lt;br /&gt;
 $ arm-linux-gdb vmlinux&lt;br /&gt;
&lt;br /&gt;
which will give you something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GNU gdb 6.6&lt;br /&gt;
Copyright (C) 2006 Free Software Foundation, Inc.&lt;br /&gt;
GDB is free software, covered by the GNU General Public License, and you are&lt;br /&gt;
welcome to change it and/or distribute copies of it under certain conditions.&lt;br /&gt;
Type &amp;quot;show copying&amp;quot; to see the conditions.&lt;br /&gt;
There is absolutely no warranty for GDB.  Type &amp;quot;show warranty&amp;quot; for details.&lt;br /&gt;
This GDB was configured as &amp;quot;--host=i686-linux --target=arm-linux&amp;quot;...&lt;br /&gt;
(gdb) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now need to connect to the OpenOCD daemon, which is done using the '''target remote''' command.  In this particular example, we did already halt the target by issuing '''halt''' on the '''telnet''' command line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(gdb) target remote localhost:3333&lt;br /&gt;
Remote debugging using localhost:3333&lt;br /&gt;
warning: shared library handler failed to enable breakpoint&lt;br /&gt;
0xc0129b8c in memmove () at include/asm/current.h:9&lt;br /&gt;
9       {&lt;br /&gt;
(gdb)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/User:Cbrake</id>
		<title>User:Cbrake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/User:Cbrake"/>
				<updated>2007-03-08T13:08:20Z</updated>
		
		<summary type="html">&lt;p&gt;Cbrake: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cliff Brake&lt;br /&gt;
Embedded Linux developer/consultant&lt;br /&gt;
http://bec-systems.com&lt;/div&gt;</summary>
		<author><name>Cbrake</name></author>	</entry>

	</feed>