| Line 3: | Line 3: | ||
[http://wiki.qemu.org/ QEMU] is a component of the MeeGo SDK. It can run handset or netbook images under an emulator, so you can test your applications on a MeeGo operating system, even if you don't have a MeeGo device. | [http://wiki.qemu.org/ QEMU] is a component of the MeeGo SDK. It can run handset or netbook images under an emulator, so you can test your applications on a MeeGo operating system, even if you don't have a MeeGo device. | ||
| - | + | The best way to use a MeeGo OS image with QEMU start it from inside Qt Creator. | |
| - | + | However, this page covers an alternative approach: starting a runtime from the command line. This can be useful to verify that a runtime is working correctly (for example, if it doesn't work from Qt Creator); and also useful for general testing of runtimes. | |
| - | + | == Prerequisites == | |
| - | + | If you haven't already installed the SDK, see: | |
| - | + | * [[SDK/Docs/1.2/Installing_and_configuring_MeeGo_SDK_for_Linux|Installing the SDK on Linux]] or [[SDK/Docs/1.2/MeeGo_SDK_1.2_Preview_for_Windows|Installing the SDK on Windows]] | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | You will need to install at least one target with a runtime as part of this. Most MeeGo targets include a runtime: a virtual machine image to run under QEMU. See [[SDK/Docs/1.2/Installing_and_configuring_MeeGo_SDK_for_Linux#Finding_and_installing_targets|these instructions]] for installation details. | |
| - | + | For QEMU, it is also important that you check your graphics capability. See [[SDK/Docs/1.2/MeeGo SDK Graphics Acceleration|this page about graphics acceleration]] for details. '''Please read this page carefully and follow the instructions on it if you are having issues starting runtimes under QEMU.''' | |
=== Using a runtime from the command line === | === Using a runtime from the command line === | ||
QEMU is a component of the MeeGo SDK. It can run handset or netbook images under an emulator, so you can test your applications on a MeeGo operating system, even if you don't have a MeeGo device.
The best way to use a MeeGo OS image with QEMU start it from inside Qt Creator.
However, this page covers an alternative approach: starting a runtime from the command line. This can be useful to verify that a runtime is working correctly (for example, if it doesn't work from Qt Creator); and also useful for general testing of runtimes.
Contents |
If you haven't already installed the SDK, see:
You will need to install at least one target with a runtime as part of this. Most MeeGo targets include a runtime: a virtual machine image to run under QEMU. See these instructions for installation details.
For QEMU, it is also important that you check your graphics capability. See this page about graphics acceleration for details. Please read this page carefully and follow the instructions on it if you are having issues starting runtimes under QEMU.
To start an installed runtime, use the mad command to boot the image inside QEMU.
You can get a list of installed runtimes with:
$ mad list runtimes meego-tablet-ia32-qemu-1.2.0.0.0.20110516.6-runtime (installed) meego-netbook-ia32-qemu-1.2.0.0.0.20110516.6-runtime (installed) ...
(You may get different output depending on which runtimes you installed.)
The installed runtimes are available to run. To run one, do:
$ sudo mad remote -r <runtime name> poweron -fg
The -fg flag puts the process into the foreground, which is useful for debugging.
For example, to start the tablet runtime above, do:
$ sudo mad remote -r meego-tablet-ia32-qemu-1.2.0.0.0.20110516.6-runtime poweron -fg
Here's what the tablet image looks like (this is the Home zone):
And the IA32 netbook runtime:
$ sudo mad remote -r meego-netbook-ia32-qemu-1.2.0.0.0.20110516.6-runtime poweron -fg
Here's what the netbook image looks like (this is Myzone):
You can now use this running image as a deployment target for Qt Creator, or log into it manually over SSH (see below).
When you've finished, use the power off icon in the emulator to switch it off (if available); or from the command line, do:
$ sudo mad remote -r <netbook runtime name> poweroff
If you are having issues with running QEMU, you can try running the image without graphics to help isolate the problem. To do this, set QEMU_NOGRAPHIC=yes in the environment before running the emulator. For example:
$ QEMU_NOGRAPHIC=yes mad remote -r <handset runtime name> poweron
If you are then able to ssh into the running image, you can be fairly certain that your issues are graphics-related, rather than anything to do with the image itself.
Any time MeeGo is running in QEMU, you can use SSH to connect to the image from a command-line terminal on the host system.
When the SDK starts QEMU, it sets up a redirect from port 6666 on the host to the SSH port (port 22) on the guest (MeeGo on QEMU). So you can log into the running QEMU image with:
$ ssh meego@127.0.0.1 -p 6666
Two user accounts are available:
To configure access to an emulated device: