OpenMoko2007.2

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(updates general build infos)
m (Robot: Fixing double redirect)
 
(16 intermediate revisions by 9 users not shown)
Line 1: Line 1:
'''OM 2007.2''' is the second version of the OpenMoko distribution.  Development began on 2007-07-26.
+
#REDIRECT [[Om 2007.2]]
 
+
Goals of the new version are an improved set of PIM applications, improved theming that fixes a lot of the usability problems of the 1st generation design, more formalized UI guidelines and a number of changes in the build system. The latter should introduce more recent software by staying closer in sync with upstream org.openembedded.dev.
+
 
+
An official announcement was made by Sean Moss-Pultz on August 20:
+
* http://lists.openmoko.org/pipermail/announce/2007-August/000018.html
+
 
+
(Initially this was named OM-2008 in SVN but renamed shortly after that.)
+
 
+
==FAQ==
+
 
+
=== Q: What are differences between 2007.1 and 2007.2? ===
+
 
+
* UI redesigned for small and recessed screen
+
* Simplified visuals for performance
+
* Simplified UI
+
* More interactions including finger scrolling
+
* [[Today|openmoko-today]] rewritten; supports AUX and POWER buttons for navigation
+
* Updated upstream packages
+
 
+
=== Q: Where to get snapshot images? ===
+
 
+
* [[OpenMoko2007.2#Pre-built_snapshot_images|Unofficial images]] listed at the bottom of this article
+
 
+
* Official snapshots and ipkg repository:
+
** http://buildhost.openmoko.org/snapshots/2007.08/
+
 
+
=== Q: Where are official releases? ===
+
 
+
No official releases yet, just official snapshots. The first release is targetted for October, 2007.
+
 
+
=== Q: My mrxvt (terminal) fonts are huge. ===
+
 
+
Edit src/feature.h to set MIN_XFT_FONT_SIZE to lower value:
+
#define MIN_XFT_FONT_SIZE          (2)
+
and rebuild mrxvt & openmoko-devel-image.
+
 
+
End edit /etc/mrxvt/mrxvt.conf
+
Mrxvt.xftSize: 4
+
Mrxvt.xftHint: 1
+
 
+
==Building 2007.2==
+
 
+
=== How to build ===
+
 
+
The MokoMakefile is now able to build OM-2007.2 images.  If you use this new version of the MokoMakefile, you can ignore everything below and just continue building OM-2007.2 in the same way that you previously built images (i.e. according to http://wiki.openmoko.org/wiki/MokoMakefile).  Make sure you set the generation correctly at the top of the file.
+
 
+
Follow the [http://www.openembedded.org/wiki/GettingStarted getting started] steps of OpenEmbedded. It is suggested to use Bitbake 1.8.8 at least.
+
 
+
Put the following in your local.conf
+
 
+
BBFILES = "${HOME}/oe/org.openembedded.dev/packages/*/*.bb"
+
+
MACHINE = "fic-gta01"
+
DISTRO = "openmoko"
+
+
ENABLE_BINARY_LOCALE_GENERATION = "1"
+
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8"
+
 
+
Replace "${HOME}/oe" with the path to where your "org.openembeded.dev" folder lives. For the other entries have a look at ''conf/local.conf.sample'' about their meaning.
+
 
+
Run ''bitbake <package name>'' (e.g. openmoko-devel-image).
+
 
+
=== Build issues ===
+
 
+
==== Wrong certificate ====
+
You may get something like this while the bitbake recipes are parsed:
+
 
+
Error validating server certificate for 'https://libw100.svn.sf.net:443':
+
  - The certificate hostname does not match.
+
  Certificate information:
+
  - Hostname: *.svn.sourceforge.net
+
  - Valid: from Fri, 27 Oct 2006 12:05:58 GMT until Sun, 28 Oct 2007 13:05:58 GMT
+
  - Issuer: Equifax Secure Certificate Authority, Equifax, US
+
  - Fingerprint: f2:6c:fe:bb:82:92:30:09:72:dd:1c:b3:e7:56:69:c7:7a:df:67:3e
+
 
+
That is an issue in a bitbake file. One should not use the short-name for sourceforge (sf.net) when certificates are only for exact host names. Accept the certificate and everything is fine for now.
+
 
+
==== openmoko-libs FTBFS ====
+
Some applications have not been fully modified to build with the new libraries of OpenMoko and still need the old-style ''openmoko-libs'' package. ''libmokogsm'' which is needed for ''openmoko-libs'' then fails to build. As a workaround you can remove the not yet ported applications that need ''openmoko-libs'' making it unneccessary itself. To do this edit ''packages/tasks/openmoko-taks.bb'' and find the following lines:
+
 
+
.
+
.
+
.
+
  openmoko-terminal \
+
  matchbox-panel-2 \
+
  matchbox-panel-2-applets \
+
  matchbox-applet-inputmanager \
+
#  openmoko-appmanager \
+
  matchbox-keyboard \
+
  matchbox-stroke \
+
  openmoko-keyboard \
+
.
+
.
+
.
+
 
+
Now put a hash (''#'') before ''openmoko-terminal'' and ''openmoko-keyboard''. You can verify that ''openmoko-libs'' is not needed any more by issuing ''bitbake -g openmoko-devel-image'' (= creates a dependency graph). There should be no mentioning of ''openmoko-libs'' in the file ''task-depends.dot''. '''Please note that the graphicall terminal and the virtual keyboard will be missing now.''' You can still have terminal access by following the [[USB Networking]] guide. For keyboard input in Qemu add the ''-usbdevice keyboard'' switch.
+
 
+
 
+
==== gtk+ fails building w/ gtkcombobox.c ====
+
 
+
If you get these errors:
+
 
+
gtkcombobox.c: In function 'gtk_combo_box_size_request':
+
gtkcombobox.c:1859: warning: unused variable 'font_desc'
+
gtkcombobox.c:1858: warning: unused variable 'metrics'
+
gtkcombobox.c:1857: warning: unused variable 'context'
+
gtkcombobox.c:1855: warning: unused variable 'arrow_size'
+
gtkcombobox.c:1854: warning: unused variable 'font_size'
+
gtkcombobox.c: In function 'gtk_combo_box_size_allocate':
+
gtkcombobox.c:1962: error: 'arrow_size' undeclared (first use in this function)
+
gtkcombobox.c:1962: error: (Each undeclared identifier is reported only once
+
gtkcombobox.c:1962: error: for each function it appears in.)
+
gtkcombobox.c:1965: error: 'font_desc' undeclared (first use in this function)
+
gtkcombobox.c:1966: error: 'context' undeclared (first use in this function)
+
gtkcombobox.c:1967: error: 'metrics' undeclared (first use in this function)
+
gtkcombobox.c:1969: error: 'font_size' undeclared (first use in this function)
+
 
+
Go to your /build/tmp/work/fic-gta01-angstrom-linux-gnueabi/gtk+-2.10.14-r3/gtk+-2.10.14/gtk directory, and patch gtkcombobox.c with the following:
+
 
+
Thanks to rmoravcik in #openmoko (patch was taken from http://pastebin.ca/654717 )
+
 
+
--- gtkcombobox.c      2007-08-12 20:30:07.000000000 +0200
+
+++ gtkcombobox.c      2007-08-12 20:29:58.000000000 +0200
+
@@ -1948,6 +1948,12 @@
+
  gtk_combo_box_size_allocate (GtkWidget    *widget,
+
                              GtkAllocation *allocation)
+
  {
+
+  gint font_size;
+
+  gint arrow_size;
+
+  PangoContext *context;
+
+  PangoFontMetrics *metrics;
+
+  PangoFontDescription *font_desc;
+
+
+
    GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
+
    gint focus_width, focus_pad;
+
    GtkAllocation child;
+
 
+
 
+
==== Building glibc fails with a segfault in QEMU ====
+
 
+
If your build aborts and you see something like this:
+
 
+
NOTE: package glibc-2.5: started
+
NOTE: package glibc-2.5-r6: task do_package: started
+
NOTE: preparing tree for binary locale generation
+
NOTE: generating locale en_US (UTF-8)
+
qemu: uncaught target signal 11 (Segmentation fault) - exiting
+
+
...
+
+
NOTE: Tasks Summary: Attempted 271 tasks of which 0 didn't need to be rerun and 1 failed.
+
ERROR: '/home/moko/oe/org.openembedded.dev/packages/glibc/glibc_2.5.bb' failed
+
 
+
Try editing your local.conf file.  Change:
+
 
+
ENABLE_BINARY_LOCALE_GENERATION = "1"
+
 
+
to
+
 
+
ENABLE_BINARY_LOCALE_GENERATION = "0"
+
 
+
and restart the build.  This may have some effect on internationalization (you will see a warning indicating that), but at least the build will continue.  Thanks to rwhitby for the tip.
+
 
+
Alternatively, as suggested by XorA in #openmoko, if you are running a 64-bit host distribution, try forcing a different QEMU rev, also in local.conf:
+
 
+
PREFERRED_VERSION_qemu-native = "0.9.0+cvs20070701"
+
SRCDATE_qemu-native = 20070701
+
 
+
 
+
==== libxml2-native fails with xmlCatalogPtr errors ====
+
 
+
Go to your build/tmp/work/i686-linux/libxml2-native-2.6.29-r1/libxml2-2.6.29/include/libxml/ directory and patch xmlversion.h with the following:
+
 
+
--- xmlversion.h        2007-08-17 10:45:42.000000000 +0100
+
+++ xmlversion.h        2007-08-17 10:51:36.000000000 +0100
+
@@ -219,7 +219,7 @@
+
  *
+
  * Whether the Catalog support is configured in
+
  */
+
-#if 0
+
+#if 1
+
  #define LIBXML_CATALOG_ENABLED
+
  #endif
+
 
+
On my system the libxml2-native-2.6.29-r1 directory is in a directory named i686-linux, yours may be different. I believe this patch to be a workaround to make libxml2-native build. I am not yet sure what the consequences of enabling XML catalogue support are.
+
 
+
 
+
=== How to build using nslu2-linux MasterMakefile (Ubuntu 7.04) ===
+
 
+
'''Note that the normal [[MokoMakefile]] can build OM-2007.2 now, so there is no need to use the procedure below.  The nslu2-linux master makefile is designed for building various OE distributions, and is likely to produce something different from the standard OpenMoko images.
+
'''
+
 
+
 
+
'''Check that your /bin/sh (ls -l /bin/sh) is not linked to dash rather than bash.''' Using dash will cause you pain. This is true for a standard install of Ubuntu 7.04 (at least when installing from Live CD). If your /bin/sh points to /bin/dash, correct it with (as root):
+
ln -sf /bin/bash /bin/sh
+
 
+
Note: on  http://www.openembedded.org/wiki/OEandYourDistro are better instructions for Ubuntu to make sh be bash.
+
 
+
Create your $OMDIR directory (note that you can change ~/OM-2007.2 to any directory you like):
+
mkdir ~/OM-2007.2 ; cd  ~/OM-2007.2
+
 
+
Grab the nslu2-linux [http://www.nslu2-linux.org/wiki/Development/MasterMakefile MasterMakefile]:
+
wget http://www.nslu2-linux.org/Makefile
+
 
+
This will make sure you'll have all the required packages:
+
sudo apt-get install \
+
                autoconf automake automake1.9 \
+
                bison \
+
                ccache cogito \
+
                cvs \
+
                diffstat \
+
                docbook \
+
                flex \
+
                gcc g++ gawk gcj gettext git-core \
+
                help2man \
+
                libc6-dev libglib2.0-dev libtool libxext-dev\
+
                m4 make \
+
                patch pkg-config \
+
                python python-dev python2.4 python2.4-dev python-psyco \
+
                sed \
+
                sharutils \
+
                texinfo texi2html \
+
                unzip \
+
                subversion \
+
                sysutils \
+
                texinfo \
+
                bzip2
+
 
+
Ubuntu 7.04 comes with monotone 0.31. You could just go with that and do a mtn db migrate but this takes hours so the easier way would be to download a suitable mtn db from http://www.openembedded.org/snapshots/ and use this.
+
mkdir -p monotone
+
wget http://www.openembedded.org/snapshots/\
+
OE-this-is-for-mtn-<your mtn version>.mtn.bz2 -O monotone/nslu2-linux.mtn.bz2
+
bunzip2 monotone/nslu2-linux.mtn.bz2
+
 
+
If you're using MokoMakefile for building OM2007.1 you probably have fresh OE.mtn for version 0.31 already downloaded. So you can just make symlink to the OE.mtn in your OM2007.1 build directory.
+
 
+
(current directory(pwd) is /path/to/OM2007.2)
+
ln -s /path/to/OM2007.1/OE.mtn monotone/nslu2-linux.mtn
+
 
+
To save even more bandwith you can also use already donwloaded source files from OM2007.1. Just make a symlink to OM2007.1 sources directory. Something like this.
+
 
+
(current directory(pwd) is /path/to/OM2007.2)
+
ln -s /path/to/OM2007.1/sources downloads
+
 
+
Go build ;)
+
make openmoko-devel-image
+
 
+
 
+
* If you an encounter an error with monotone similar to the following:
+
 
+
  mtn: misuse: database monotone/nslu2-linux.mtn is laid out according to an old schema
+
 
+
Then you need to upgrade nslu2-linux.mtn Use the following command:
+
 
+
  # mtn --db monotone/nslu2-linux.mtn db migrate
+
 
+
== Flashing with MokoMakefile ==
+
Since MokoMakefile has not been adjusted to use the new build layout you cannot use it. As a quick hack to make flashing local built image possible again try this:
+
 
+
Find the following lines in the MokoMakefile:
+
 
+
flash-qemu-local: stamps/qemu stamps/openmoko-devel-image
+
      ( cd build/qemu && openmoko/flash.sh ../tmp/deploy/images )
+
 
+
And replace them with:
+
 
+
flash-qemu-local: stamps/qemu
+
        ( cd build/qemu && openmoko/flash.sh <MY_NEW_BUILD_DIR>/tmp/deploy/glibc/images/fic-gta01 )
+
 
+
Where you should replace <MY_NEW_BUILD_DIR> with the full path to your build directory (the one where ''conf/local.conf'' lives in). Running the image should work, too. :-)
+
 
+
With this changes kernel and uboot image are picked up correctly. However the name of the root filesystem image has changed in OM-2007.2 and the current scripts will not pick it up any more. Just edit ''$OM_DIR/build/qemu/openmoko/env'' and change the line saying:
+
 
+
rootfs_wildcard="openmoko-*.rootfs.jffs2"
+
 
+
to
+
 
+
rootfs_wildcard="OpenMoko-*.rootfs.jffs2"
+
 
+
Now it will work correctly again.
+
 
+
 
+
== Pre-built snapshot images ==
+
* http://ipkg.nslu2-linux.org/feeds/openmoko/images/
+
 
+
* http://buildhost.openmoko.org/OM2007.2/tmp/deploy/glibc/images/fic-gta01/
+
 
+
* http://buildhost.openmoko.org/snapshots/2007.08/ (Official snapshots and ipkg repository)
+
 
+
[[Category:OpenMoko2007.2| ]]
+
 
+
== Updating your image ==
+
 
+
Now that you have a functional 2007.2 image on your Neo, you will want to keep it updated.  Fortunately, ipkg is already set up to pull updated packages from the openmoko buildhost.
+
 
+
On the phone, in the terminal (or via ssh), if you have a live internet connection and DNS resolution set up in /etc/resolv.conf:
+
 
+
ipkg update && ipkg upgrade
+
 
+
will bring your installed packages up to the most recent versions.
+
 
+
If you are also building your own images and packages, you can also run a simple httpd on your build host and serve your own ipkg files to the Neo.
+
 
+
On the build host, for example:
+
 
+
thttpd -d <path_to_moko/tmp/deploy/glibc/ipk> -p 8080
+
 
+
will serve your packages on port 8080.
+
 
+
Then, on the neo, make a new file at /etc/ipkg/local-feed.conf with these contents:
+
 
+
src/gz local-all http://192.168.0.200:8080/all
+
src/gz local-armv4t http://192.168.0.200:8080/armv4t
+
src/gz local-fic-gta01 http://192.168.0.200:8080/fic-gta01
+
 
+
and ipkg on the Neo (update-upgrade) will pick up files from your local build host's repository (assuming its IP address is 192.168.0.200, as is default in the [[USB Networking]] setup) in addition to the openmoko buildhost.
+
 
+
Also if you are building your own packages or packages from the OE database that aren't part of OpenMoko by default, you can install those packages as follows.
+
 
+
On the build host:
+
 
+
bitbake <name_of_package>
+
bitbake -c rebuild openmoko-devel-image
+
 
+
Then on the Neo:
+
 
+
ipkg update
+
ipkg install <name_of_package>
+
 
+
(NB: The local package repository is rebuilt as a consequence of the "rebuild openmoko-devel-image" operation, which also makes another rootfs image.  There's probably a way to rebuild the repository without rebuilding the image but I don't know what it is -- please feel free to update.)
+

Latest revision as of 21:27, 22 August 2008

  1. REDIRECT Om 2007.2
Personal tools

OM 2007.2 is the second version of the OpenMoko distribution. Development began on 2007-07-26.

Goals of the new version are an improved set of PIM applications, improved theming that fixes a lot of the usability problems of the 1st generation design, more formalized UI guidelines and a number of changes in the build system. The latter should introduce more recent software by staying closer in sync with upstream org.openembedded.dev.

An official announcement was made by Sean Moss-Pultz on August 20:

(Initially this was named OM-2008 in SVN but renamed shortly after that.)

FAQ

Q: What are differences between 2007.1 and 2007.2?

  • UI redesigned for small and recessed screen
  • Simplified visuals for performance
  • Simplified UI
  • More interactions including finger scrolling
  • openmoko-today rewritten; supports AUX and POWER buttons for navigation
  • Updated upstream packages

Q: Where to get snapshot images?

Q: Where are official releases?

No official releases yet, just official snapshots. The first release is targetted for October, 2007.

Q: My mrxvt (terminal) fonts are huge.

Edit src/feature.h to set MIN_XFT_FONT_SIZE to lower value:

#define MIN_XFT_FONT_SIZE           (2)

and rebuild mrxvt & openmoko-devel-image.

End edit /etc/mrxvt/mrxvt.conf

Mrxvt.xftSize: 4
Mrxvt.xftHint: 1

Building 2007.2

How to build

The MokoMakefile is now able to build OM-2007.2 images. If you use this new version of the MokoMakefile, you can ignore everything below and just continue building OM-2007.2 in the same way that you previously built images (i.e. according to http://wiki.openmoko.org/wiki/MokoMakefile). Make sure you set the generation correctly at the top of the file.

Follow the getting started steps of OpenEmbedded. It is suggested to use Bitbake 1.8.8 at least.

Put the following in your local.conf

BBFILES = "${HOME}/oe/org.openembedded.dev/packages/*/*.bb"

MACHINE = "fic-gta01"
DISTRO = "openmoko"

ENABLE_BINARY_LOCALE_GENERATION = "1"
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8"

Replace "${HOME}/oe" with the path to where your "org.openembeded.dev" folder lives. For the other entries have a look at conf/local.conf.sample about their meaning.

Run bitbake <package name> (e.g. openmoko-devel-image).

Build issues

Wrong certificate

You may get something like this while the bitbake recipes are parsed:

Error validating server certificate for 'https://libw100.svn.sf.net:443':
 - The certificate hostname does not match.
 Certificate information:
  - Hostname: *.svn.sourceforge.net
  - Valid: from Fri, 27 Oct 2006 12:05:58 GMT until Sun, 28 Oct 2007 13:05:58 GMT
  - Issuer: Equifax Secure Certificate Authority, Equifax, US
  - Fingerprint: f2:6c:fe:bb:82:92:30:09:72:dd:1c:b3:e7:56:69:c7:7a:df:67:3e

That is an issue in a bitbake file. One should not use the short-name for sourceforge (sf.net) when certificates are only for exact host names. Accept the certificate and everything is fine for now.

openmoko-libs FTBFS

Some applications have not been fully modified to build with the new libraries of OpenMoko and still need the old-style openmoko-libs package. libmokogsm which is needed for openmoko-libs then fails to build. As a workaround you can remove the not yet ported applications that need openmoko-libs making it unneccessary itself. To do this edit packages/tasks/openmoko-taks.bb and find the following lines:

.
.
.
 openmoko-terminal \
 matchbox-panel-2 \
 matchbox-panel-2-applets \
 matchbox-applet-inputmanager \
#  openmoko-appmanager \
 matchbox-keyboard \
 matchbox-stroke \
 openmoko-keyboard \
.
.
.

Now put a hash (#) before openmoko-terminal and openmoko-keyboard. You can verify that openmoko-libs is not needed any more by issuing bitbake -g openmoko-devel-image (= creates a dependency graph). There should be no mentioning of openmoko-libs in the file task-depends.dot. Please note that the graphicall terminal and the virtual keyboard will be missing now. You can still have terminal access by following the USB Networking guide. For keyboard input in Qemu add the -usbdevice keyboard switch.


gtk+ fails building w/ gtkcombobox.c

If you get these errors:

gtkcombobox.c: In function 'gtk_combo_box_size_request':
gtkcombobox.c:1859: warning: unused variable 'font_desc'
gtkcombobox.c:1858: warning: unused variable 'metrics'
gtkcombobox.c:1857: warning: unused variable 'context'
gtkcombobox.c:1855: warning: unused variable 'arrow_size'
gtkcombobox.c:1854: warning: unused variable 'font_size'
gtkcombobox.c: In function 'gtk_combo_box_size_allocate':
gtkcombobox.c:1962: error: 'arrow_size' undeclared (first use in this function)
gtkcombobox.c:1962: error: (Each undeclared identifier is reported only once
gtkcombobox.c:1962: error: for each function it appears in.)
gtkcombobox.c:1965: error: 'font_desc' undeclared (first use in this function)
gtkcombobox.c:1966: error: 'context' undeclared (first use in this function)
gtkcombobox.c:1967: error: 'metrics' undeclared (first use in this function)
gtkcombobox.c:1969: error: 'font_size' undeclared (first use in this function) 

Go to your /build/tmp/work/fic-gta01-angstrom-linux-gnueabi/gtk+-2.10.14-r3/gtk+-2.10.14/gtk directory, and patch gtkcombobox.c with the following:

Thanks to rmoravcik in #openmoko (patch was taken from http://pastebin.ca/654717 )

--- gtkcombobox.c       2007-08-12 20:30:07.000000000 +0200
+++ gtkcombobox.c       2007-08-12 20:29:58.000000000 +0200
@@ -1948,6 +1948,12 @@
 gtk_combo_box_size_allocate (GtkWidget     *widget,
                             GtkAllocation *allocation)
 {
+  gint font_size;
+  gint arrow_size;
+  PangoContext *context;
+  PangoFontMetrics *metrics;
+  PangoFontDescription *font_desc;
+
   GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
   gint focus_width, focus_pad;
   GtkAllocation child;


Building glibc fails with a segfault in QEMU

If your build aborts and you see something like this:

NOTE: package glibc-2.5: started
NOTE: package glibc-2.5-r6: task do_package: started
NOTE: preparing tree for binary locale generation
NOTE: generating locale en_US (UTF-8)
qemu: uncaught target signal 11 (Segmentation fault) - exiting

...

NOTE: Tasks Summary: Attempted 271 tasks of which 0 didn't need to be rerun and 1 failed.
ERROR: '/home/moko/oe/org.openembedded.dev/packages/glibc/glibc_2.5.bb' failed

Try editing your local.conf file. Change:

ENABLE_BINARY_LOCALE_GENERATION = "1"

to

ENABLE_BINARY_LOCALE_GENERATION = "0"

and restart the build. This may have some effect on internationalization (you will see a warning indicating that), but at least the build will continue. Thanks to rwhitby for the tip.

Alternatively, as suggested by XorA in #openmoko, if you are running a 64-bit host distribution, try forcing a different QEMU rev, also in local.conf:

PREFERRED_VERSION_qemu-native = "0.9.0+cvs20070701"
SRCDATE_qemu-native = 20070701


libxml2-native fails with xmlCatalogPtr errors

Go to your build/tmp/work/i686-linux/libxml2-native-2.6.29-r1/libxml2-2.6.29/include/libxml/ directory and patch xmlversion.h with the following:

--- xmlversion.h        2007-08-17 10:45:42.000000000 +0100
+++ xmlversion.h        2007-08-17 10:51:36.000000000 +0100
@@ -219,7 +219,7 @@
  *
  * Whether the Catalog support is configured in
  */
-#if 0
+#if 1
 #define LIBXML_CATALOG_ENABLED
 #endif

On my system the libxml2-native-2.6.29-r1 directory is in a directory named i686-linux, yours may be different. I believe this patch to be a workaround to make libxml2-native build. I am not yet sure what the consequences of enabling XML catalogue support are.


How to build using nslu2-linux MasterMakefile (Ubuntu 7.04)

Note that the normal MokoMakefile can build OM-2007.2 now, so there is no need to use the procedure below. The nslu2-linux master makefile is designed for building various OE distributions, and is likely to produce something different from the standard OpenMoko images.


Check that your /bin/sh (ls -l /bin/sh) is not linked to dash rather than bash. Using dash will cause you pain. This is true for a standard install of Ubuntu 7.04 (at least when installing from Live CD). If your /bin/sh points to /bin/dash, correct it with (as root):

ln -sf /bin/bash /bin/sh

Note: on http://www.openembedded.org/wiki/OEandYourDistro are better instructions for Ubuntu to make sh be bash.

Create your $OMDIR directory (note that you can change ~/OM-2007.2 to any directory you like):

mkdir ~/OM-2007.2 ; cd  ~/OM-2007.2

Grab the nslu2-linux MasterMakefile:

wget http://www.nslu2-linux.org/Makefile

This will make sure you'll have all the required packages:

sudo apt-get install \
               autoconf automake automake1.9 \
               bison \
               ccache cogito \
               cvs \
               diffstat \
               docbook \
               flex \
               gcc g++ gawk gcj gettext git-core \
               help2man \
               libc6-dev libglib2.0-dev libtool libxext-dev\
               m4 make \
               patch pkg-config \
               python python-dev python2.4 python2.4-dev python-psyco \
               sed \
               sharutils \
               texinfo texi2html \
               unzip \
               subversion \
               sysutils \
               texinfo \
               bzip2

Ubuntu 7.04 comes with monotone 0.31. You could just go with that and do a mtn db migrate but this takes hours so the easier way would be to download a suitable mtn db from http://www.openembedded.org/snapshots/ and use this.

mkdir -p monotone
wget http://www.openembedded.org/snapshots/\
OE-this-is-for-mtn-<your mtn version>.mtn.bz2 -O monotone/nslu2-linux.mtn.bz2
bunzip2 monotone/nslu2-linux.mtn.bz2

If you're using MokoMakefile for building OM2007.1 you probably have fresh OE.mtn for version 0.31 already downloaded. So you can just make symlink to the OE.mtn in your OM2007.1 build directory.

(current directory(pwd) is /path/to/OM2007.2)
ln -s /path/to/OM2007.1/OE.mtn monotone/nslu2-linux.mtn

To save even more bandwith you can also use already donwloaded source files from OM2007.1. Just make a symlink to OM2007.1 sources directory. Something like this.

(current directory(pwd) is /path/to/OM2007.2)
ln -s /path/to/OM2007.1/sources downloads

Go build ;)

make openmoko-devel-image


  • If you an encounter an error with monotone similar to the following:
 mtn: misuse: database monotone/nslu2-linux.mtn is laid out according to an old schema

Then you need to upgrade nslu2-linux.mtn Use the following command:

 # mtn --db monotone/nslu2-linux.mtn db migrate

Flashing with MokoMakefile

Since MokoMakefile has not been adjusted to use the new build layout you cannot use it. As a quick hack to make flashing local built image possible again try this:

Find the following lines in the MokoMakefile:

flash-qemu-local: stamps/qemu stamps/openmoko-devel-image
      ( cd build/qemu && openmoko/flash.sh ../tmp/deploy/images )

And replace them with:

flash-qemu-local: stamps/qemu
       ( cd build/qemu && openmoko/flash.sh <MY_NEW_BUILD_DIR>/tmp/deploy/glibc/images/fic-gta01 )

Where you should replace <MY_NEW_BUILD_DIR> with the full path to your build directory (the one where conf/local.conf lives in). Running the image should work, too. :-)

With this changes kernel and uboot image are picked up correctly. However the name of the root filesystem image has changed in OM-2007.2 and the current scripts will not pick it up any more. Just edit $OM_DIR/build/qemu/openmoko/env and change the line saying:

rootfs_wildcard="openmoko-*.rootfs.jffs2"

to

rootfs_wildcard="OpenMoko-*.rootfs.jffs2"

Now it will work correctly again.


Pre-built snapshot images

Updating your image

Now that you have a functional 2007.2 image on your Neo, you will want to keep it updated. Fortunately, ipkg is already set up to pull updated packages from the openmoko buildhost.

On the phone, in the terminal (or via ssh), if you have a live internet connection and DNS resolution set up in /etc/resolv.conf:

ipkg update && ipkg upgrade

will bring your installed packages up to the most recent versions.

If you are also building your own images and packages, you can also run a simple httpd on your build host and serve your own ipkg files to the Neo.

On the build host, for example:

thttpd -d <path_to_moko/tmp/deploy/glibc/ipk> -p 8080

will serve your packages on port 8080.

Then, on the neo, make a new file at /etc/ipkg/local-feed.conf with these contents:

src/gz local-all http://192.168.0.200:8080/all
src/gz local-armv4t http://192.168.0.200:8080/armv4t
src/gz local-fic-gta01 http://192.168.0.200:8080/fic-gta01

and ipkg on the Neo (update-upgrade) will pick up files from your local build host's repository (assuming its IP address is 192.168.0.200, as is default in the USB Networking setup) in addition to the openmoko buildhost.

Also if you are building your own packages or packages from the OE database that aren't part of OpenMoko by default, you can install those packages as follows.

On the build host:

bitbake <name_of_package>
bitbake -c rebuild openmoko-devel-image

Then on the Neo:

ipkg update
ipkg install <name_of_package>

(NB: The local package repository is rebuilt as a consequence of the "rebuild openmoko-devel-image" operation, which also makes another rootfs image. There's probably a way to rebuild the repository without rebuilding the image but I don't know what it is -- please feel free to update.)