https://github.com/zytc2009/BigTeam_learning
分类: 嵌入式
2010-10-08 10:04:35
Virtualization (VT) support is needed on your system for graphics acceleration. Check the to ensure your system is capable. If your system is not enabled, see the .
Host OS | QEMU GL Package | How to install |
---|---|---|
Fedora 12 or 13 | $ sudo yum localinstall qemu-gl-0.12.4-5.1.i386-fc12.rpm --nogpgcheck | |
Ubuntu 9.10 or 10.04 (see below for 64bit) | $ sudo dpkg -i qemu-gl_0.12.4-4_i386.deb |
Building From Source: For information on building qemu-gl from source, see the .
$ tar xvjf$ chmod +x ./meego-qemu-start To start handset image with Avaa device skin: $ ./meego-qemu-start -s aava To start netbook image without skin: $ ./meego-qemu-start
(See the script for details on the command and parameters)
The ubuntu package above is for 32bit systems and won't install on 64bit systems. Several additional steps have to be taken to install and run it on a 64bit device:
$ sudo dpkg -i --force-architecture qemu-gl_0.12.4-4_i386.deb
$ ldd /usr/bin/qemugl
$ wget http://launchpadlibrarian.net/30426073/libcurl3-gnutls_7.18.0-1ubuntu2.2_i386.deb $ wget
$ mkdir tmp $ dpkg -X libcurl3-gnutls_7.18.0-1ubuntu2.2_i386.deb ./tmp $ dpkg -X libgnutls13_1.6.3-1build1_i386.deb ./tmp
$ sudo cp ./tmp/usr/lib/* /lib32
$ qemugl
Host OS | Required Package | How to install |
---|---|---|
Fedora 12 or 13 | rpm-build | $ sudo yum install rpm-build |
Ubuntu 9.10 or 10.04 | rpm | $ sudo apt-get install rpm |
File | Size | MD5SUM |
---|---|---|
install-meego-dev-env-0.7.25-linux-i686.sh | 225MB | 60f22163789d299bec0e479d46fe2a51 |
Add executive permission, run the binary, and follow the instructions to install MeeGo Qt Creator
$ chmod +x install-meego-dev-env-0.7.25-linux-i686.sh $ ./install-meego-dev-env-0.7.25-linux-i686.sh
All tools are installed in $HOME/meego-sdk by default. For convenience, we export the installed path for the next steps:
$ export MEEGO_SDK=$HOME/meego-sdk/0.7.25
Before we can use Qt Creator to build applications targeting MeeGo, we need to create one or more targets:
$ cd $MEEGO_SDK/bin $ ./mad-admin create_from_image
where
To view the list of targets and runtimes:
$ ./mad-admin list
You can easily remove the target image you created in the previous step:
$ ./mad-admin remove
Start Qt Creator for your development:
$ ${MEEGO_SDK}/tools/qt-creator/bin/qtcreator
Go to the menu: Tools -> Options -> Qt4 -> Qt Versions.
Click the "+" button, and then fill the "Version name" and the "qmake location" of MeeGo target: ${MEEGO_SDK}/targets/
Go to the menu: File -> New File or Project -> Qt Application Project -> Meego Touch Framework Application.
At the end of project creation, you will see the "Project setup" dialog. Choose the MeeGo toolchain you configured.
Click the "Projects" icon on the left of Qt Creator. The "MeeGo" build and run configuration page will be shown. Create a new build configuration by selecting the "Add" dropdown button and selecting the MeeGo toolchain you configured above.
Get to the menu: Tools -> Options -> Projects -> MeeGo Device Configurations. Click "Add" button to add a runtime for emulator. Set "Device type" to "MeeGo emulator"; set "Authentication type" to "Password"; "MeeGo emulator" as "Device type", set "Username" to "root"; set "Password" to "meego".
Click "Projects" again on the left side. Select "Run" in the MeeGo Build/Run box at the top. Make sure that the "Device configuration" is set to "MeeGo Emulator". This will ensure that QEMU is started when you run your application. You can now launch the QEMU MeeGo emulator. Click the "Start Meego emulator" icon near the bottom left corner of Qt Creator (circled in red in the screenshot below).
After QEMU starts, click the "Run" icon to run your application. Qt Creator will package and deploy your application to QEMU and start it on the target. You can see the window of your application in QEMU.
Image rotation: If you are using the MeeGo handset image, you can rotate the screen with ALT+SHIFT+R
You can also debug the application by clicking the "Debug" icon. Setting breakpoints and stepping are the same as local applications.
Qt Creator working with QEMU is out of the box, but sometimes we need to work with real device. Here is how:
Anytime MeeGo is running in QEMU, you can use SSH to connect to the image from another terminal on the host system.
$ ssh meego@127.0.0.1 -p 6666
Two user accounts are available in the MeeGo images:
User: meego Password: meego
User: root Password: meego
It is the Qt project file for qmake to generate Makefile. Please pay attention to the following lines:
CONFIG += meegotouch # This is to tell qmake to add necessary include and library path for MeeGo Touch Framework
target.path=/usr/bin
INSTALLS=target # These two lines are to generate "install" target, so that we can generate RPM package and deploy it to QEMU-GL or device to run.
It is a typical MTF application main program including initialization of MApplication, MApplicationWindow and MApplicationPage
We have integrated MTF help document into Qt Creator. Just click on the "Help" mode, you can see "MeeGo Touch Reference Documentation". You can also press "F1" in source code to start context helper. More up to date Qt and MTF documentation can be found at http://meego.com/developers/meego-api