Last Update: 08 December 2008
As always, use at your own risk. This may do anything from cure world hunger to destabilize time and space, although it's far more likely that this will cause you to lose all data on your GTA01 or GTA02, and trash your internal SD card. If you are at all concerned about this, close this web page and proceed no further.
NOTE: Applies to all Qtopia images
Begin by downloading the kernel appropriate for your device. Kernels can be found here. Refer to the Openmoko wiki for information on how to flash a new kernel.
Note that if you are going to go through the trouble to flash a more recent kernel, you should do the job correctly and also download and extract the matching kernel modules at the same time. If you don't you'll certainly run into trouble, at a time when you least expect it. For those who need specific examples of the sort of thing that won't work if you don't install the modules, well, anything that requires the crypto modules -- such as WPA with the wifi.
This topic has it's own page. It should be fixed in Qt Extended 4.4.2 and beyond.
A recent update to gcc makes it perform some stricter checks while compiling; this update is appearing in some host distros (Fedora 9, for example). This has exposed a latent bug in the Qt Extended source code. The qmemoryfile_unix_open_args.patch patch resolves this minor issue.
A script used during the build process incorrectly uses the host's pkg-config instead of the cross toolchain's version.
For the 4.4.2 sources, use the pkg-config-template.patch patch.
For the 4.4.3 source snapshots, use the pkg-config-template-443.patch patch.
The astute observer will note that while the Qt Extended sources are large, they do not build an entire distribution. Instead, Qt Extended is exactly like a (large) application, running on an existing operating system and rootfs.
The recommended operating system is one of the kernels listed on this very website (kernels and modules). The rootfs provided is actually a custom version of the Openmoko 2008.x rootfs.
There are a number of difficulties with this, not the least of which is the amount of manual effort that someone (Thanks Mr. Potter!) has to do in order to assemble and test these images. Because of this effort, they also tend to lag behind a bit. Installing additional software is also troublesome, as there are no good repos to use (since the image is customized so).
The solution seems clear: why not have an existing distro create a base rootfs image that can be used with Qt Extended? And while doing that, why not have that same distro create a toolchain/SDK suitable for building QT Extended? This would make it easy for users to keep up with changes in the core rootfs, provide a simple way to get access to the feeds, redirect support and problems that are related to the core software to those who are actually in charge of the core software, and permit Nokia/Trolltech to focus on Qt Extended. Not to mention that doing this should be simple, since it's what the Openembedded system is all about. It's just so obvious...
...but like all obvious things, the devil is in the details. So it took a lot of work, and some help from the OE experts, but it's done.
Follow the instructions on the wiki to build the FSO distro. Do not proceed until you have successfully built the fso-image, and can see the jffs2 image that was built.
Now bitbake the stripped-down image. If you are using the Makefile, cd
to fso-unstable or fso-testing, whichever you built above, and type
. ./setup-env; exec bitbake fso-image-nox.
And now the toolchain:
. ./setup-env; exec bitbake meta-toolchain-fso
Make a special note -- the lines above start with period-space-period-slash-"setup-env";
it would be Not A Good Thing to get that wrong.
At this point, you should be able to find the toolchain (named something like "tmp/deploy/sdk/openmoko--20081108-armv4t-linux-gnueabi-toolchain-fso.tar.bz2") and the rootfs (named something like "tmp/deploy/glibc/images/neo1973/openmoko-fso-image-nox-glibc-ipk--20081108-om-gta01.rootfs.jffs2"). There will also be a rootfs with a ".summary" suffix for the GTA02, as you might expect, and you may or may not (depending on the options you set in your local.conf file) see ".tar" versions of the rootfs.
(Note: if you don't feel up to building the rootfs or the toolchain yourself, you might check to see if the Qt Extended site is currently offering any prebuilt ones, or if the normal hosting sites for FSO images have these available for download. It might save you many hours and many gigabytes of disk space.)
((Sub-note: heck, you might even be so bold as to check to see if there might be a set of images on my site right here... if my bandwidth holds up, I might be able to upload a set temporarily: check here.))
Ok, so let's assume you have a rootfs, ready to flash. And you have a toolchain in a tarball. Now we need to build Qt Extended. This is done just like you would do it normally -- the only difference is that the FSO toolchain installs to a different location, and we need to apply a patch to update some stuff in Qt Extended to know about the new toolchain and some of its newer features.
Download and extract the Qt Extended sources in the normal fashion. As root, cd to "/" and extract the new toolchain -- it will extract into /usr/local/openmoko, so be careful if you already have a toolchain there. Move the old one aside, or delete it.
Now download the FSO toolchain patchset: fso_toolchain.patch, and apply it to the Qt Extended sources. Note that you also need the patches mentioned earlier, or you'll encounter other build failures.
Now build Qt Extended in the usual way, and populate the image directory with
bin/qbuild image command. Turn the image into a tarball:
tar czf /my/path/to/qtextended_fso.tgz *
Ok, we now have all the stuff built. We need to assemble it. This is still pretty manual -- we need someone to build an installer for Qt Extended on the FSO "nox" rootfs. For now, you'll just have to do it the hard way:
Flash the rootfs and kernel onto your Neo or Freerunner. Use either the kernel built by the FSO build process, or the recommended kernel from this site -- either will work for this.
Boot the Neo or Freerunner -- note that no GUI will appear on the phone. It will complete the boot rather quickly, and stop at a login prompt on the display. Without a GUI, of course you can't login on the display -- so ssh into phone.
Prepare the base image. Start by downloading the qtopia APM scripts,
which are not included on the FSO image itself. Use wget on the phone,
or some other means:
apm-qtopia-v2.tgz. Untar that, and execute the install script.
Now execute the following command on the phone:
ln -s ../init.d/qpe /etc/rc5.d/S98qpe
Almost there. On the host, use the following command sequence to blast the
Qt Extended tar ball we created earlier to the phone and have it extracted
in the correct place:
cat /my/path/to/qtextended_fso.tgz | ssh "email@example.com" \
'(set -x; mkdir -p /opt/Trolltech/Qtopia; cd /opt/Trolltech/Qtopia; \
tar xzvf -; cp /opt/Trolltech/Qtopia/qpe.sh /etc/init.d/qpe; \
poweroff; sleep 1)'
This will take a while, and when done, your phone will power off. Power it back up -- this time it should (probably) start Qt Extended. Note that like the other images, this image will have the same issue where it can suspend itself before it has successfully started up, with the result that it won't resume again. If that happens, just reboot it again. You might be able to avoid this problem altogether if you pull out the USB cable, and then re-insert it after the OS has booted and before Qt Extended is up and running -- this will make sure that the kernel sees that it's plugged in and has external power (this is a kernel bug, really, and not so much a Qt Extended problem).
Now that it's up and running, if you are running the "mwester" kernel from this site, take a moment to download the modules for that kernel and install them. See here.
Note that there's probably some tuning to be done -- things like proper hostnames for package feeds, and probably some other issues. Feedback is welcome. And since this is a work-in-progress, expect major cleanup and change in the procedures described here. That's a Good Thing.
Need to contact me? You can usually find me on the #openmoko IRC channel. If I'm awake, that is.