Getting Started with the Trolltech Greenphone SDK

Everything you need to know to start programming for the cool new Greenphone.
Getting Ready

Loading the development environment is simple—run the installation program on Windows or Linux, respond affirmatively to the prompts, and within a minute you will have VMware and the SDK tools, application sources, documentation and binaries installed with an icon on your desktop to start things up.

This makes life really easy for reluctant developers using MS Windows to get into both embedded and desktop Linux and Qt application development.

At the time of this writing, developers using the x86 version of Macintosh OS X can use the Greenphone SDK under VMware Fusion, but they need to copy over the virtual machine's files from another installation; however, this may change by the time this article is published.

Getting Started Building Applications

Trolltech always ships its products with copious documentation and example code demonstrating all common features, and the Greenphone SDK is no exception. For starters, the “Developer Quickstart Guide” shows what needs to be done to build an application with a few one-liners.

First, we start the Qtopia emulator using the Qt Virtual Frame Buffer and a Greenphone skin by clicking on the runqvfb icon on our desktop. This is analogous to an X server for Qtopia, and it provides an exact pixel-for-pixel representation of the program running on the phone.

Then, we start the Qtopia phone environment by clicking the runqpe icon, which then connects to the qvfb process and displays its contents in its virtual screen.

Figure 2. qvfb Running with qpe Running in It

We need to run a script to set our QPEVER and PATH environment variables and to define some functions for communicating to the phone. If building for the x86 version of Qtopia, we would use:

. /opt/Qtopia/SDK/scripts/devel-x86.sh

Otherwise, if building for the actual Greenphone itself, we would choose the cross-compile environment with:

. /opt/Qtopia/SDK/scripts/devel-greenphone.sh

Then, we change to our directories and build:


cd ~/projects/application
qtopiamake -project && qtopiamake && make && gph -p -i

The qtopiamake program is Qtopia's version of the Qt qmake utility. It can generate a .PRO project file based on the contents of the current directory if given the -project parameter, but its most important job is to use the project file as the starting point to generate a Makefile based on the installed configuration of Qtopia and the type of build we want.

Typically, we generate a new .PRO and Makefile only when we have new files to add to our project, but qtopiamake takes so little time to execute that it is common to see it run from a standard shell script every time.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

reply this post

Anonymous's picture

Don't you understand that this is correct time to get the loans, which can make you dreams real.

hi i have a graduation

motsh's picture

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

eosorio's picture

Greenphone

teia's picture

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.

Weird Dude's picture

Great info. Thanks.

Beating the OpenMoko to It

Roy Schestowitz's picture

Thanks for a refreshing review (and a sigh of relief after Ty's take, which left room for doubt).

White Paper
Fabric-Based Computing Enables Optimized Hyperscale Data Centers

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

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.

Learn More

Sponsored by DLT Solutions