Getting Started with the Trolltech Greenphone SDK
gph Utility
The gph utility is a useful awk script that provides convenience functions for doing things like building, packaging, installing and running applications in the Qtopia environment, either emulated or actually on the phone. It can be invoked instead of make, and it is powerful enough that we can use it to convert from raw source code to running applications installed from a package onto a real or emulated device.
For example, to rebuild the code, package it and install and run on qvfb, we would try the following command:
gph -C x86 -debug -c -all
If that were to go well, and we were happy with enough to want to run it on an actual phone, we could build ourselves a package to install with the following:
gph -C greenphone -p
This would give us a file in our pkg directory with a name like qpe-application_1.0.0-1_arm.qpk.
To have a more complete idea of the gph capabilities, we can look at its help message:
$gph --help
FORMAT: /opt/Qtopia/SDK/scripts/gph <options>
Options:
-h display command help
-q quiet mode
-c clean
-C <opt> reconfig <x86> or <greenphone>, default greenphone
-b make
-p make package
-i install package to greenphone
-r run application on greenphone
-all reconfig, make, make package, install, run
-debug force configure for debug build, override default
-release force configure for release build, override default
-options "<opts>" pass extra options to build system
eg. /opt/Qtopia/SDK/scripts/gph -C x86 -all -options
"CONFIG+=debug"
-net bring up network to greenphone
-console console on greenphone
-qpk <file> install qpk to SDK http server for installation
-rescan Tell Qtopia to rescan for new documents and applications
When applications are packaged for distribution to Qtopia devices, they reside in .qpk files that are specially made gzip'd tar files. In addition to the executable file itself, there also are the help files, multilingual translation files and the desktop entry. This desktop entry file contains elements to describe the name of the executable, the icon, what type of application it is and, finally, the MIME type to indicate what sort of data it can process.
Debugging our application on the Greenphone itself is fairly easy to set up.
First, we need to configure our build environment to cross-compile for the ARM architecture on the Greenphone:
. /opt/Qtopia/SDK/scripts/devel-greenphone.sh
Next, we need to rebuild our Makefile and executables, package them up and install them onto the phone:
qtopiamake -debug && make clean && make && gph -p -i -r -debug
At this point, we can click the arm-linux debugger icon on the desktop, open the example program on the phone and click run to execute it in the remote debugger.
A number of application deployment methodologies are available when developing with the Greenphone SDK.
First, we can build and run our applications so that they execute within the virtual machine's ersatz phone-like environment complete with a JPEG skin that looks like a phone sitting on your desktop. It is great for working out the GUI parts of an application, and it saves us the step of having to compile, flash on to the unit and debug remotely.
Second, applications can be compiled and packaged for the Greenphone, then run and tested on the device itself. As mentioned previously, the VM installs with a gdb debugger that can run inside the virtual machine and debug applications remotely on the phone.
Finally, we have “Phone bounce” mode, using the phone as a standard GSM/GPRS modem connected to the development machine via a USB cable. Our applications would run inside the emulator on the local machine, but would be joined logically to the real phone by whatever network link you have to it, such as a USB connection.
We do not have to customize the Greenphone in a piecemeal fashion. The Flash image representing the whole Greenphone Linux distribution on the phone can be updated using either the mini-SD Flash reader or the USB cable to re-install a complete new Linux distribution along with all the applications and configuration files. This makes it easier for enterprise use where items such as standard configuration options are set to enable things like corporate branding with visual themes, VPN settings, default address-book entries and localization settings, among others.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Evernote is much more...
1 hour 57 min ago - Reply to comment | Linux Journal
10 hours 42 min ago - Dynamic DNS
11 hours 16 min ago - Reply to comment | Linux Journal
12 hours 15 min ago - Reply to comment | Linux Journal
13 hours 5 min ago - Not free anymore
17 hours 7 min ago - Great
20 hours 54 min ago - Reply to comment | Linux Journal
21 hours 2 min ago - Understanding the Linux Kernel
23 hours 17 min ago - General
1 day 1 hour ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
reply this post
Don't you understand that this is correct time to get the loans, which can make you dreams real.
hi i have a graduation
hi
i have a graduation project and i want to develop aprogram on green phone but i still need help please if any one has experience please email me
mohamed.gamal21@yahoo.com
RIP Linux Greenphone
It's a shame that this happens
http://www.linuxdevices.com/news/NS6964769377.html
Greenphone
Is this phone available to buy for use as a regular phone? My contract is almost up and I want a Linux smartphone...
Great info. Thanks.
Great info. Thanks.
Beating the OpenMoko to It
Thanks for a refreshing review (and a sigh of relief after Ty's take, which left room for doubt).