(Please, move this section somewhere else. That's an advanced usage already.) |
(→Install MeeGo Runtime) |
||
| Line 138: | Line 138: | ||
See [http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes Downloading a Runtime and Using QEMU] | See [http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes Downloading a Runtime and Using QEMU] | ||
| + | |||
| + | == Install Your Own MeeGo Target/MeeGo Runtime == | ||
| + | Above steps instructs you to install MeeGo target(MADDE rootfs)/MeeGo Runtime(QEMU Image), those images are created by MeeGo and downloaded from "http://download3.meego.com/"; This section mainly introduces how to install MeeGo target/MeeGo Runtime that created by yourself. (creatimg MeeGo image is not introduced in this section) | ||
| + | |||
| + | By default, MeeGo target and MeeGo Runtime are installed to directory: | ||
| + | * MeeGo Target ----> "/usr/lib/madde/linux-i686/sysroots" | ||
| + | * MeeGo Runtime ----> "/usr/lib/madde/linux-i686/runtimes" | ||
| + | |||
| + | The default configuration files of Target and Runtime are installed "/usr/lib/madde/linux-i686/cache/madde.conf.d/". You can install your own MeeGo Target/MeeGo Runtime based on the following three steps: | ||
| + | *(1) Create your configure file under "/usr/lib/madde/linux-i686/cache/madde.conf.d/", you can refer those "conf" files under this direcotory. | ||
| + | *(2) Copy your packaged MeeGo Target/MeeGo Runtime images to "/usr/lib/madde/linux-i686/cache" | ||
| + | *(3) Run "sudo mad-admin create -f <Your_Target>" and "sudo mad-admin create -f -e <Your_Runtime>" | ||
| + | |||
| + | We take adding "MeeGo runtime" as an example to introduce the integration method in a simple way. Suppose you created one QEMU image named "'''aaa-bbb-ccc'''.raw": | ||
| + | PC$ cd /usr/lib/madde/linux-i686/runtimes | ||
| + | PC$ sudo mkdir '''aaa-bbb-ccc'''-runtime | ||
| + | PC$ sudo cp '''aaa-bbb-ccc'''.raw '''aaa-bbb-ccc'''-runtime/ | ||
| + | PC$ cd '''aaa-bbb-ccc'''-runtime | ||
| + | PC$ sudo vim information | ||
| + | qemu='/usr/lib/madde/linux-i686/tools/qemu-meego/bin/qemu-meego' | ||
| + | qemu_path_native='/usr/lib/madde/linux-i686/tools/qemu-meego/bin/qemu-meego' | ||
| + | libpath='LD_LIBRARY_PATH=/usr/lib/madde/linux-i686/tools/qemu-meego/lib' | ||
| + | qemu_args='-hda '''aaa-bbb-ccc'''.raw -skin /opt/meego/qemu-gl/share/qemugl/meego/skin/handset/skin.xml -usbdevice tablet -name MeeGo -m 1024 -boot c -enable-kvm -vga std -enable-gl -device virtio-gl-pci -soundhw ac97 -net nic -net user,hostfwd=tcp:127.0.0.1:6666-:22,hostfwd=tcp:127.0.0.1:13219-:13219,hostfwd=tcp:127.0.0.1:14168-:14168' | ||
| + | ip='127.0.0.1' | ||
| + | sshport='6666' | ||
| + | redirport2='13219' | ||
| + | redirport3='14168' | ||
| + | PC$ mad list runtime | ||
| + | ............................................................. | ||
| + | '''aaa-bbb-ccc'''-runtime (installed) | ||
| + | ............................................................. | ||
| + | Start your runtime: | ||
| + | PC$ sudo mad remote -r '''aaa-bbb-ccc'''-runtime poweron | ||
== Configuring Qt Creator to use the MeeGo toolchain(s) == | == Configuring Qt Creator to use the MeeGo toolchain(s) == | ||
This page describes how to install and configure the MeeGo 1.1 SDK on your Linux development system.
/etc/apt/sources.list.d/meego-sdk.list.deb http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/ /
$ gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A $ gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
$ sudo apt-get update
$ apt-cache policy madde
$ cd /etc/yum.repos.d/
$ sudo wget http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
$ sudo rpm --import http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/repodata/repomd.xml.key
$ sudo yum update
$ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
$ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
$ sudo apt-get install meego-sdk
$ sudo yum install meego-sdk
$ sudo zypper install meego-sdk
For ARM only:
$ sudo apt-get install meego-sdk-armv7l
$ sudo yum install meego-sdk-armv7l
$ sudo zypper install meego-sdk-armv7l
For IA32 only:http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes
$ sudo apt-get install meego-sdk-ia32
$ sudo yum install meego-sdk-ia32
$ sudo zypper install meego-sdk-ia32
A Target is used to build programs using the MeeGo toolchain and libraries (sysroot). It is downloaded as a large (~250MB) .bz2 file using the commands below. MADDE (MeeGo Application Develop and Debug Environment (background)) is a tool that assists in the download and installation of the Target. "mad-admin" is the MADDE command-line tool. You can install multiple Targets and switch easily between them in Qt Creator (described later).
-f flag instructs MADDE to download the Target tarball (bz2) first.
$ sudo mad-admin create -f <target>
If you encounter problems, check the Troubleshooting page
$ mad -t <target> pscreate -t qt-simple qthello $ cd qthello $ mad -t <target> qmake $ mad -t <target> make
Note: Running qmake will print "-unix is deprecated" This is not an error with the compilation. You can safely ignore this for now.
$ file build/qthello
A Runtime is the MeeGo OS image that is run with QEMU when debugging applications on your host system. It is not required if you develop against real hardware running MeeGo. It is downloaded as a large (~650MB) .bz2 file using MADDE. The Runtime is not needed until you have finished configuring Qt Creator. However, as this step may take some time, it is recommended to start it now so that it can proceed in the background while you continue following the steps on this page.
See Downloading a Runtime and Using QEMU
Above steps instructs you to install MeeGo target(MADDE rootfs)/MeeGo Runtime(QEMU Image), those images are created by MeeGo and downloaded from "http://download3.meego.com/"; This section mainly introduces how to install MeeGo target/MeeGo Runtime that created by yourself. (creatimg MeeGo image is not introduced in this section)
By default, MeeGo target and MeeGo Runtime are installed to directory:
* MeeGo Target ----> "/usr/lib/madde/linux-i686/sysroots" * MeeGo Runtime ----> "/usr/lib/madde/linux-i686/runtimes"
The default configuration files of Target and Runtime are installed "/usr/lib/madde/linux-i686/cache/madde.conf.d/". You can install your own MeeGo Target/MeeGo Runtime based on the following three steps:
*(1) Create your configure file under "/usr/lib/madde/linux-i686/cache/madde.conf.d/", you can refer those "conf" files under this direcotory. *(2) Copy your packaged MeeGo Target/MeeGo Runtime images to "/usr/lib/madde/linux-i686/cache" *(3) Run "sudo mad-admin create -f <Your_Target>" and "sudo mad-admin create -f -e <Your_Runtime>"
We take adding "MeeGo runtime" as an example to introduce the integration method in a simple way. Suppose you created one QEMU image named "aaa-bbb-ccc.raw":
PC$ cd /usr/lib/madde/linux-i686/runtimes
PC$ sudo mkdir aaa-bbb-ccc-runtime
PC$ sudo cp aaa-bbb-ccc.raw aaa-bbb-ccc-runtime/
PC$ cd aaa-bbb-ccc-runtime
PC$ sudo vim information
qemu='/usr/lib/madde/linux-i686/tools/qemu-meego/bin/qemu-meego'
qemu_path_native='/usr/lib/madde/linux-i686/tools/qemu-meego/bin/qemu-meego'
libpath='LD_LIBRARY_PATH=/usr/lib/madde/linux-i686/tools/qemu-meego/lib'
qemu_args='-hda aaa-bbb-ccc.raw -skin /opt/meego/qemu-gl/share/qemugl/meego/skin/handset/skin.xml -usbdevice tablet -name MeeGo -m 1024 -boot c -enable-kvm -vga std -enable-gl -device virtio-gl-pci -soundhw ac97 -net nic -net user,hostfwd=tcp:127.0.0.1:6666-:22,hostfwd=tcp:127.0.0.1:13219-:13219,hostfwd=tcp:127.0.0.1:14168-:14168'
ip='127.0.0.1'
sshport='6666'
redirport2='13219'
redirport3='14168'
PC$ mad list runtime
.............................................................
aaa-bbb-ccc-runtime (installed)
.............................................................
Start your runtime:
PC$ sudo mad remote -r aaa-bbb-ccc-runtime poweron
Start Qt Creator by selecting Applications > Programming > Qt Creator.
Configure Qt Creator to use the MeeGo toolchain(s):
usr/lib/madde/linux-i686/targets/<target>/bin/qmake.
It is also possible to use Qt Creator without a MeeGo toolchain. This option can be useful if you don't need to cross-compile your software: for example, if you are doing QML development with no use of C++.
The steps are the same as above, but the qmake location is set to the qmake installed with the meego-sdk-qt libraries. The usual location for this on Linux is:
$ /opt/meego/meego-sdk-qt/bin/qmake
Note: On Ubuntu 10.10, you may need to install g++ in order for this step to work. If necessary, do this:
$ sudo apt-get install g++
To start developing with the MeeGo SDK, the hello world tutorial is a good starting point.
This tutorial covers how to start a project, package it, and deploy it to a device (either a real device, or a QEMU runtime set up through MADDE).
To remove installed components, run:
$ sudo apt-get remove --purge meego-sdk-qtcreator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu meego-sdk-qt
To remove dependencies related to installed components, run:
$ sudo apt-get autoremove
To remove MADDE directory (it is not automatically removed when "madde" package is uninstalled):
$ sudo rm -rf /usr/lib/madde
To remove the packages from your local repository (/var/cache/apt/archives/), run:
$ sudo apt-get clean
To remove installed components, run:
$ sudo yum remove meego-sdk-qt-creator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu
To remove MADDE directory:
$ sudo rm -rf /usr/lib/madde
To remove installed components, run:
$ sudo zypper remove -u meego-sdk-qt-creator madde qt-tools arm-2009q1 qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu
To remove MADDE directory:
$ sudo rm -rf /usr/lib/madde