DeveloperSetupTipsNavigation Bar:| [Search] | [UsefulLinks] | [RecentChanges] | [AddingPages] | [HowToUseWiki]
by Jason Perlow (perlowj@sharpsec.com) and Chris Larson (sir_kergoth@operamail.com), QA by Warwick Allison (warwick@trolltech.com)
As the Zaurus platforrm is Open Source and requires components from multiple sources to create a working developer environment, we've created this "cheat sheet" to help you get going quickly.
For starters, you'll need to install a Linux distribution on your development PC, preferably one that natively supports RPM packages, such as RedHat?, SuSE, Mandrake or Caldera. You can also use distros such as Slackware and Debian as well, but you may need to use a RPM conversion utility such as "alien" to support the RPM format.
Once you have instaled Linux on your PC, you'll need to acquire the following packages:
Qtopia SDK (Version 2) from http://contest.trolltech.com/register.html (you'll need to register as a Qt developer)
filename: qtopia-sdk-1.5.0-3.i386.rpm (Qtopia SDK preview edition)
ARM toolchain from Sharp Japan website:
filename: http://more.sbc.co.jp/slj/tool/gcc-cross-sa1100-2.95.2-0.i386.rpm (gcc compiler for ARM architecture) filename: http://more.sbc.co.jp/slj/tool/binutils-cross-arm-2.11.2-0.i386.rpm (binary utilities for ARM architecture) filename: http://more.sbc.co.jp/slj/tool/glibc-arm-2.2.2-0.i386.rpm (GNU C libraries for ARM architecture) filename: http://more.sbc.co.jp/slj/tool/linux-headers-arm-sa1100-2.4.6-3.i386.rpm (linux header files for ARM architecture)
For each of the RPM files, you will want to install them from the shell prompt using the following command:
rpm -Uvh filename.rpm
For example, to install the Qtopia SDK, you will need to run
rpm -Uvh qtopia-sdk-1.5.0-3.i386.rpm
By default, RPM installs the Qtopia SDK in /opt/Qtopia and the ARM toolchain in /opt/Embedix.
After you have installed the toolchain and the SDK, you should create two batch files in your home directory, one for setting environmental variables for compiling x86 versions of your Zaurus applications for use in the Qt Virtual Framebutter on your PC for testing, and the other for setting the environment for doing native ARM versions crosscompiled for the Zaurus. Thanks to Chris Larson of the OpenZaurus project (sir_kergoth@operamail.com) for creating and debugging these files.
PLEASE NOTE: THERE SHOULD NOT BE ANY QUESTION MARKS IN YOUR BATCH FILES. THEY ARE ONLY BEING DISPLAYED THIS WAY DUE TO THE WAY THE WIKI WORKS. THANKS.
Batch file #1, named "dev-x86-qpe.sh"
#!/bin/bash CROSSCOMPILE=/opt/Embedix/tools QPEDIR=/opt/Qtopia QTDIR=/opt/Qtopia PATH=$QTDIR/bin:$QPEDIR/bin:$PATH:/opt/Embedix/tools/bin TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-x86-g++/ LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH PS1='!sharp-dev-x86\u@\h:\w\$ '
export QPEDIR QTDIR PATH TMAKEPATH LD_LIBRARY_PATH PS1 echo "Altered environment for Sharp Zaurus SL-5000D Development x86"
Batch file #2, named "dev-arm-qpe.sh"
#!/bin/bash CROSSCOMPILE=/opt/Embedix/tools QPEDIR=/opt/Qtopia/sharp QTDIR=/opt/Qtopia/sharp PATH=$QTDIR/bin:$QPEDIR/bin:$CROSSCOMPILE/bin:$QPEDIR/bin:$PATH TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++/ LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH PS1='!sharp-dev-arm\u@\h:\w\$ '
export QPEDIR QTDIR PATH LD_LIBRARY_PATH TMAKEPATH PS1 echo "Altered environment for Sharp Zaurus SL-5000D Development ARM"
When you want to compile and test X86 versions of your Zaurus apps, simply run source dev-x86-qpe.sh from your home directory. Conversely, run source dev-arm-qpe.sh when you want to cross compile.
To test your compilers, you'll want to build the example application in in /opt/Qtopia/example.
1. First, run the x86 environment script in your home directory using source dev-x86-qpe.sh from a shell session.
2. Next, from within the same session, run tmake example.pro > Makefile from within the /opt/Qtopia/example directory. To actually build the app, run make within that directory.
Alternatively, to build an ARM version to run on the Zaurus,
1. Run source dev-arm-qpe.sh from your home directory,
2. Remove the old Makefile (rm Makefile in /opt/Qtopia/example, it is ESSENTIAL THAT YOU DO THIS!)
3. Run make clean from within /opt/Qtopia/example to clean out the old temporary fiiles for the x86 configuration
4. Run tmake example.pro > Makefile again to make the Makefiles for the Zaurus.
5. To build the arm binary, run make from within that directory. Once its built, you'll want to copy that over to your Zaurus and execute it from the embeddedkonsole application to run it. For further information on Tmake, you'll want to consult the Qt/Embedded documentation listed at the end of this article.
Testing your X86 applications is easy:
1. Run ./qvfb & from /opt/Qtopia/bin to launch the simulated Zaurus display. Any Qt/Embedded applications compiled for x86 you launch will now display in this window.
2. Next, run ./example -qws to run the example app in server mode. Alternatively, you could run the qpe application from /opt/Qtopia/bin to simulate an actual Qtopia environment and then run the example app in non-server mode within that.
That's it. You've now installed and tested your developer environment. Happy Hacking!
Resources:
Qtopia SDK Documentation: Located in /opt/Qtopia/doc/html/qtopia/index.html on your PC, Also available on http://doc.trolltech.com for online updated version