User:Radagast

From Openmoko

(Difference between revisions)
Jump to: navigation, search
m
(Newbite stuff, make my phone work, compile Qt Extended SDK)
Line 17: Line 17:
 
Next download the kernel and rootfs to your workstation. Here's a link to the [http://other.lastnetwork.net/OpenMoko/qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2 rootfs] created by Hypnotize. And here's the [http://qtextended.org/modules/mydownloads/visit.php?lid=91 mwebster flash image] containing the kernel. Boot your FreeRunner in dfu mode and use the dfu commands:
 
Next download the kernel and rootfs to your workstation. Here's a link to the [http://other.lastnetwork.net/OpenMoko/qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2 rootfs] created by Hypnotize. And here's the [http://qtextended.org/modules/mydownloads/visit.php?lid=91 mwebster flash image] containing the kernel. Boot your FreeRunner in dfu mode and use the dfu commands:
  
bash# dfu-util -d 0x1d50:0x5119 -a kernel -R -D  uImage-gta02-mwester-stable-d6f9fd270943fb22.bin
+
bash# dfu-util -d 0x1d50:0x5119 -a kernel -R -D  uImage-gta02-mwester-stable-d6f9fd270943fb22.bin
 
+
 
     ... stuff ...
 
     ... stuff ...
 
+
bash# dfu-util -d 0x1d50:0x5119 -a rootfs -R -D  qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2
+
bash# dfu-util -d 0x1d50:0x5119 -a rootfs -R -D  qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2
 
+
 
     ... more stuff ...
 
     ... more stuff ...
 
+
 
<h2>Qt Extended Stuff</h2>
 
<h2>Qt Extended Stuff</h2>
  
Line 53: Line 53:
 
bash# route delete default gateway 192.168.0.200
 
bash# route delete default gateway 192.168.0.200
 
bash# route add default gateway 192.168.3.1
 
bash# route add default gateway 192.168.3.1
 +
 +
----
 +
 +
<h1>Compiling Qt Extended SDK</h1>
 +
 +
These instructions are based on Jim Morris' [http://blog.wolfman.com/articles/2008/08/27/porting-xgps-to-qtopia-for-the-freerunner excellent article].
 +
 +
I downloaded the [http://qtextended.org/modules/mydownloads/visit.php?lid=97 SDK source] and [http://qtextended.org/modules/mydownloads/visit.php?lid=38  toolchain] from [http://qtextended.org qtextended.org]. Change directory to your machine's root directory then untar the toolchain - it will install itself to /opt/toolchains. Next create <tt>/opt/QtopiaSDK/qt-extended-4.4.2</tt> and <tt>/opt/QtopiaSDK/build</tt> directories. Unpack the Qt extended SDK source to <tt>/opt/QtopiaSDK/qt-extended-4.4.2</tt>. Set a pair of environment variables as follows:
 +
 +
bash# export QTOPIA_DEPOT_PATH=/opt/QtopiaSDK/qt-extended-4.4.2
 +
bash# export QPEDIR=/opt/QtopiaSDK/build/qt-extended-4.4.2
 +
 +
Next download a pair of patches from mwester's openmoko stuff: [http://moko.mwester.net/download/pkg-config-template.patch pkg-config-template.patch] and [http://moko.mwester.net/download/qmemoryfile_unix_open_args.patch qmemoryfile_unix_open_args.patch]. Copy these to the qt-extended-4.4.2 source directory and execute these commands:
 +
 +
bash# patch -p1 < qmemoryfile_uniz_open_args.patch
 +
bash# patch -p1 < pkg-config-template.patch
 +
 +
Now change directory to the build directory. Execute the following:
 +
 +
bash# cd $QPEDIR
 +
bash# $QTOPIA_DEPOT_PATH/configure -device neo -D _FORTIFY_SOURCE=0
 +
bash# make
 +
bash# make install
 +
 +
The <tt>_FORTIFY_SOURCE=0</tt> turns off some extra error checking that is turned on by default in many linux distros but borks the qt extended build process.

Revision as of 02:24, 19 February 2009

Contents

Total Newbie's Getting Started Guide

Introduction

This guide is intended for people who just want to get their Freerunner working as a phone. I tried every distribution available in Jan 2009 and I will summarize my results for anyone who is interested.

Getting the Freerunner working as a Phone

First, make sure that your SIM card works with the Freerunner. Go to the Carriers page, find your country and carrier, and check what people have said about their SIM cards. My original SIM card did not work (Canada/Rogers) but Rogers kindly replaced it with a supported SIM.

Next is your choice of distribution. The great thing about the Freerunner is that you have lots of choices. The bad thing is that some choices are better than others for certain tasks, and it is not always clear which is which. I have tested every distribution available in January 2009, and in my opinion the best distribution for using your Freerunner as a phone is Qt Extended, which is the Free version of Trolltech's QTopia (used on the Sharp Zaurus).

Installing Qt Extended

You must download the kernel and rootfs and flash them to your Freerunner. First read throughFlashing_the_Neo_FreeRunner page. Whatever OS you use on your desktop/laptop, you will need the dfu command line utility to copy the kernel and rootfs to your Freerunner. For most of my coding work I use Mac OS X, but for FreeRunner hacking I find it much easier to reboot into Ubuntu.

Next download the kernel and rootfs to your workstation. Here's a link to the rootfs created by Hypnotize. And here's the mwebster flash image containing the kernel. Boot your FreeRunner in dfu mode and use the dfu commands:

bash# dfu-util -d 0x1d50:0x5119 -a kernel -R -D  uImage-gta02-mwester-stable-d6f9fd270943fb22.bin

    ... stuff ...

bash# dfu-util -d 0x1d50:0x5119 -a rootfs -R -D  qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2

    ... more stuff ...

Qt Extended Stuff

Official Documentation

The official documentation for Qt Extended is at Trolltech's website.

Booting Qt Extended

Disconnect the USB cable before booting Qt Extended. Don't know why, but my FreeRunner often hangs if I boot with the USB cable plugged in.

Power Management

Some people claim that Suspend/Resume works on their FreeRunner running Qt Extended. My testing shows that my FreeRunner sometimes does not wake for incoming calls. My solution for the moment is to disable suspend.

Adding New Media

Secure shell to the FreeRunner and create a Documents directory in /home/root. Then secure copy media files to /home/root/Documents. In Qt Extended use the File Manager to browse your Documents directory (might have to do a rescan from the options menu).

As far as I can tell, Qt Extended plays ogg, wav and some mp3. Note that some of my mp3 files would not play, so I converted them to ogg using ogg2mp3.

Networking

Changing the Default Route

Every time I connect the USB cable FreeRunner changes the default route to 192.168.0.200 interface usb0. Which is a pain in the butt, because I prefer to keep the wifi as my default gateway. I think this is caused by the line "gateway 192.168.0.200" in /etc/network/interfaces. The obvious fix is to remove that line. Here are the to change default route:

bash# route delete default gateway 192.168.0.200 bash# route add default gateway 192.168.3.1


Compiling Qt Extended SDK

These instructions are based on Jim Morris' excellent article.

I downloaded the SDK source and toolchain from qtextended.org. Change directory to your machine's root directory then untar the toolchain - it will install itself to /opt/toolchains. Next create /opt/QtopiaSDK/qt-extended-4.4.2 and /opt/QtopiaSDK/build directories. Unpack the Qt extended SDK source to /opt/QtopiaSDK/qt-extended-4.4.2. Set a pair of environment variables as follows:

bash# export QTOPIA_DEPOT_PATH=/opt/QtopiaSDK/qt-extended-4.4.2
bash# export QPEDIR=/opt/QtopiaSDK/build/qt-extended-4.4.2

Next download a pair of patches from mwester's openmoko stuff: pkg-config-template.patch and qmemoryfile_unix_open_args.patch. Copy these to the qt-extended-4.4.2 source directory and execute these commands:

bash# patch -p1 < qmemoryfile_uniz_open_args.patch
bash# patch -p1 < pkg-config-template.patch

Now change directory to the build directory. Execute the following:

bash# cd $QPEDIR
bash# $QTOPIA_DEPOT_PATH/configure -device neo -D _FORTIFY_SOURCE=0
bash# make
bash# make install

The _FORTIFY_SOURCE=0 turns off some extra error checking that is turned on by default in many linux distros but borks the qt extended build process.

Personal tools

Total Newbie's Getting Started Guide

Introduction

This guide is intended for people who just want to get their Freerunner working as a phone. I tried every distribution available in Jan 2009 and I will summarize my results for anyone who is interested.

Getting the Freerunner working as a Phone

First, make sure that your SIM card works with the Freerunner. Go to the Carriers page, find your country and carrier, and check what people have said about their SIM cards. My original SIM card did not work (Canada/Rogers) but Rogers kindly replaced it with a supported SIM.

Next is your choice of distribution. The great thing about the Freerunner is that you have lots of choices. The bad thing is that some choices are better than others for certain tasks, and it is not always clear which is which. I have tested every distribution available in January 2009, and in my opinion the best distribution for using your Freerunner as a phone is Qt Extended, which is the Free version of Trolltech's QTopia (used on the Sharp Zaurus).

Installing Qt Extended

You must download the kernel and rootfs and flash them to your Freerunner. First read throughFlashing_the_Neo_FreeRunner page. Whatever OS you use on your desktop/laptop, you will need the dfu command line utility to copy the kernel and rootfs to your Freerunner. For most of my coding work I use Mac OS X, but for FreeRunner hacking I find it much easier to reboot into Ubuntu.

Next download the kernel and rootfs to your workstation. Here's a link to the rootfs created by Hypnotize. And here's the mwebster flash image containing the kernel. Boot your FreeRunner in dfu mode and use the dfu commands:

bash# dfu-util -d 0x1d50:0x5119 -a kernel -R -D uImage-gta02-mwester-stable-d6f9fd270943fb22.bin

    ... stuff ...

bash# dfu-util -d 0x1d50:0x5119 -a rootfs -R -D qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2

    ... more stuff ...

Qt Extended Stuff

Official Documentation

The official documentation for Qt Extended is at Trolltech's website.

Booting Qt Extended

Disconnect the USB cable before booting Qt Extended. Don't know why, but my FreeRunner often hangs if I boot with the USB cable plugged in.

Power Management

Some people claim that Suspend/Resume works on their FreeRunner running Qt Extended. My testing shows that my FreeRunner sometimes does not wake for incoming calls. My solution for the moment is to disable suspend.

Adding New Media

Secure shell to the FreeRunner and create a Documents directory in /home/root. Then secure copy media files to /home/root/Documents. In Qt Extended use the File Manager to browse your Documents directory (might have to do a rescan from the options menu).

As far as I can tell, Qt Extended plays ogg, wav and some mp3. Note that some of my mp3 files would not play, so I converted them to ogg using ogg2mp3.

Networking

Changing the Default Route

Every time I connect the USB cable FreeRunner changes the default route to 192.168.0.200 interface usb0. Which is a pain in the butt, because I prefer to keep the wifi as my default gateway. I think this is caused by the line "gateway 192.168.0.200" in /etc/network/interfaces. The obvious fix is to remove that line. Here are the to change default route:

bash# route delete default gateway 192.168.0.200 bash# route add default gateway 192.168.3.1