Meego Wiki
Views

SDK/Docs/1.1/Getting started with the MeeGo SDK for Windows

From MeeGo wiki
< SDK | Docs | 1.1(Difference between revisions)
Jump to: navigation, search
(Removing components)
(For advanced users only: How to create QEMU images used by SDK for windows)
 
(38 intermediate revisions not shown)
Line 5: Line 5:
[[Category:windows]]
[[Category:windows]]
-
This page describes how to install and configure the MeeGo 1.1 SDK on your Windows development system.
+
This page describes how to install and configure the MeeGo 1.1 SDK on your Windows development system. For more information about MeeGo SDK for Windows, check [[SDK/MeeGo_SDK_for_Windows]].
== Prerequisites ==
== Prerequisites ==
Line 11: Line 11:
* '''Hardware:''' Any reasonably modern IA hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.
* '''Hardware:''' Any reasonably modern IA hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.
** The SDK version of QEMU relies on kqemu to provide CPU virtualization support, but on some machines with this support, images will still not run. This is believed to be related to certain types of CPU. Below are some details of tested hardware:
** The SDK version of QEMU relies on kqemu to provide CPU virtualization support, but on some machines with this support, images will still not run. This is believed to be related to certain types of CPU. Below are some details of tested hardware:
-
*:* Known to work: Intel(R) Core(TM) 2 Quad CPU, Q8200; Intel(R) i5 and i7
+
*:* Known to work: Intel Core 2 Quad CPU, Q8200; Intel i5 and i7
-
*:* Known not to work: Intel(R) Core(TM) 2 Duo P9400 in Thinkpad T400; Intel(R) Core(TM)2 Q9400 in HP7900 Ultra-slim
+
*:* Known not to work: Intel Core 2 Duo P9400 in Thinkpad T400; Intel(R) Core(TM)2 Q9400 in HP7900 Ultra-slim
* '''Software:''' Only Windows XP 32-bit and Windows 7 32-bit are officially supported.
* '''Software:''' Only Windows XP 32-bit and Windows 7 32-bit are officially supported.
-
*: Currently the QEMU emulator only works for IA targets on 32-bit Windows. If you are using 64-bit Windows, QEMU is not available.
+
*: Currently, the QEMU emulator works only for IA targets on 32-bit Windows. If you are using 64-bit Windows, QEMU is not available.
-
*: For support status and issues using other host operating systems, see [http://wiki.meego.com/SDK/Docs/1.1/MeeGo_1.1_SDK_Host_OS_Support this page].
+
*: For support status and issues, using other host operating systems, see [[SDK/Docs/1.1/MeeGo_1.1_SDK_Host_OS_Support|the support page]].
-
* '''Filesystem:''' MeeGo SDK should be installed on a hardlink-capable filesystem such as NTFS. FAT* filesystems are not hardlink-capable and not supported.
+
* '''Filesystem:''' MeeGo SDK should be installed on a hardlink-capable filesystem, such as NTFS. FAT* filesystems are not hardlink-capable and not supported.
=== Notes and caveats ===
=== Notes and caveats ===
Line 22: Line 22:
* '''QEMU runtimes and targets''': The following pre-defined targets and runtimes are the only ones which have been verified on Windows:
* '''QEMU runtimes and targets''': The following pre-defined targets and runtimes are the only ones which have been verified on Windows:
** Targets:
** Targets:
-
*** meego-handset-ia32-w32-1.1
+
*** meego-handset-ia32-1.1.2
-
*** meego-netbook-ia32-w32-1.1
+
*** meego-netbook-ia32-1.1.2
-
*** meego-core-armv7l-1.1
+
*** meego-core-armv7l-1.1.2
** Runtimes:
** Runtimes:
-
*** meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime
+
*** meego-handset-ia32-qemu-1.1.20110110.1026-runtime
-
*** meego-netbook-ia32-w32-qemu-1.1.20101031.2037-sda-runtime
+
*** meego-netbook-ia32-qemu-1.1.20110110.1049-runtime
*: '''Others may be listed by MADDE, but are not guaranteed to work.'''
*: '''Others may be listed by MADDE, but are not guaranteed to work.'''
-
* '''Uninstalling:''' Everything you've installed as part of the SDK, ''including MADDE targets and runtimes'', will be removed if you run the MeeGo SDK uninstaller.
+
* '''Uninstalling:''' Everything you've installed as part of the SDK, ''including MADDE targets and runtimes'', will be removed, if you run the MeeGo SDK uninstaller.
* '''Commands:''' Terminal commands in the instructions below are prefaced with "$". Do not include $ when entering the commands in your terminal.
* '''Commands:''' Terminal commands in the instructions below are prefaced with "$". Do not include $ when entering the commands in your terminal.
-
== Install the MeeGo SDK ==
+
== Download and setup the MeeGo SDK ==
-
 
+
-
The SDK consists of a single downloadable file which you use to install Qt Creator and MADDE on your development machine. Toolchains and runtimes for MADDE (see later) are optional and installed using MADDE (via the command-line tool <code>mad-admin</code>).
+
<ol>
<ol>
-
  <li>Download the MeeGo SDK installer. You can choose either offline or online installer:
+
  <li>Download the MeeGo SDK installer:</li>
<table border='1' cellpadding='3px' style="padding: 0em">
<table border='1' cellpadding='3px' style="padding: 0em">
-
  <tr><th>File</th><th>Size</th></tr>
+
  <tr><th>File</th><th>Description</th><th>Size</th></tr>
-
<tr><td>[http://download3.meego.com/MeeGoSDK/1.1/meego-1.1-sdk-beta-online-installer.exe MeeGo SDK Windows online installer]</td>
+
<tr><td>http://download3.meego.com/MeeGoSDK/1.1.2/meego-1.1-sdk-update-installer.exe</td>
-
     <td>13.8MB</td>
+
     <td>MeeGo SDK Windows installer</td>
-
    </tr>
+
     <td>54MB</td>
-
<tr><td>[http://download3.meego.com/MeeGoSDK/1.1/meego-1.1-sdk-beta-offline-installer.exe MeeGo SDK Windows offline installer]</td>
+
</tr>
-
     <td>55.7MB</td>
+
-
    </tr>
+
</table>
</table>
-
  </li>
 
   <li>Double-click on the downloaded <code>.exe</code> file and follow the prompts to install the SDK.</li>
   <li>Double-click on the downloaded <code>.exe</code> file and follow the prompts to install the SDK.</li>
-
   <li>If you are using Windows XP, please download a small file vcredist_x86.exe (Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)) from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2 and install it to your system. This is not needed for Windows 7.</li>
+
   <li>If you are using Windows XP, please download a small file vcredist_x86.exe (Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)) from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2 and install it to your system. This is not needed for Windows 7.
 +
  <li>Launch MADDE Terminal with ''Start > All Programs > MeeGo SDK > MADDE Terminal''.</li>
 +
    <ol>
 +
        <li> Run something like "export http_proxy=XXX" if you are in an intranet.</li>
 +
        <li> Run "mad-admin create -f meego-handset-ia32-w32-1.1" to create target "meego-handset-ia32-w32-1.1". Some huge files will be downloaded automatically.</li>
 +
        <li> Run "mad-admin create -e -f meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime" to create a runtime "meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime". Some huge files will be downloaded automatically.</li>
 +
        <ul>
 +
            <li><b>Known issue: </b>If there is error like "/bin/mad-admin: line 25: __ml_path__/madlib/madlib.sh:" No such file or directory.". Run the /postinstall/postinstall.sh to fix paths and try again.(see bug report http://bugs.meego.com/show_bug.cgi?id=11605)</li>
 +
        </ul>
 +
    </ol>
 +
  <li>Launch Qt Creator with ''Start > All Programs > MeeGo SDK > QtCreator''.</li>
 +
  <li> Configure Qt Creator to support MeeGo sysroot. Inside Qt Creator, follow these steps:
 +
    <ol>
 +
      <li>From the ''Tools'' menu, choose ''Options''.</li>
 +
      <li>Click into the ''Qt4'' section, and make sure the ''Qt Versions'' tab is open.</li>
 +
      <li>Click the ''+'' button, and then fill the ''Version name'' and the ''qmake location'' of the MeeGo target:
 +
        <ul>
 +
          <li>''Version name:'' '''meego-handset'''</li>
 +
          <li>''qmake location:'' '''&lt;MEEGO_SDK&gt;\MADDE\targets\&lt;target name&gt;\bin\qmake.exe'''<br/>
 +
          Replace &lt;MEEGO_SDK&gt; with the directory where you installed MeeGo SDK; the default is <code>C:\MeeGoSDK_1.1</code>; replace &lt;target_name&gt; with the name of the target (for example, '''meego-handset-ia32-w32-1.1''').</li>
 +
          <li>Once added, select the new entry and click on the ''Rebuild'' button (bottom right) to build the debugging helper for this Qt version. This enables you to use debugging from Qt Creator.</li>
 +
        </ul>
 +
The result should look like this:<br/>
 +
[[File:Meego-sdk-qt4.png|800px]]
 +
      </li>
 +
    </ol>
 +
 
</ol>
</ol>
-
Once you have these components installed, you need to optionally install MADDE runtimes and targets, as described in the following sections.
+
== Use Qt Creator to develop MeeGo Applications ==
 +
<ol>
-
=== Install the QEMU Accelerator ===
+
<li> '''Create a MeeGo touch project (for handset) or Qt Gui project (for netbook) ''' </li>
 +
Go to the menu: File -> New File or Project -> Qt Application Project -> Meego Touch Framework Application. <br/>
 +
[[File:Windows_sdk_2.png]]
-
"QEMU Accelerator (KQEMU) is a driver allowing the QEMU PC emulator to run much faster when emulating a PC on an x86 host" (from http://wiki.qemu.org/KQemu/Doc).
+
In "Project setup" dialog, choose "meego-handset".
-
'''The QEMU Accelerator can only be used on 32-bit Windows; it does not work with 64-bit Windows. If you have 64-bit Windows, you need to use a real MeeGo device instead of an emulated one.'''
+
[[File:Meego-sdk-project-setup.png]]
-
Install the QEMU Accelerator as follows:
+
<li> '''Set up emulator: Install kqemu accelerator for QEMU on 32-bit Windows system'''</li>
 +
Notice: The kqemu could only be used on 32-bit Windows. 64-bit Windows could not work with kqemu. You can not use emulator on 64-bit Windows. Use a real device instead.
-
<ol>
+
Download package from http://wiki.qemu.org/download/kqemu-1.4.0pre1.tar.gz
-
<li>Download the source tarball from http://wiki.qemu.org/download/kqemu-1.4.0pre1.tar.gz</li>
+
-
<li>Unpack the tarball, using a tool like [http://www.winzip.com/ WinZip] or [http://www.7-zip.org/ 7zip].</li>
+
-
<li>If you are using a Windows 7 or Windows Vista system, edit the <code>kqemu.inf</code> file in the unpacked directory. Modify the lines as follows:
+
-
<pre>
+
-
[DefaultInstall.NT] should be changed to [DefaultInstall]
+
-
[DefaultInstall.NT.Services] should be changed to [DefaultInstall.Services]
+
-
[Uninstall.NT] should be changed to [Uninstall]
+
-
[Uninstall.NT.Services] should be changed to [Uninstall.Services]
+
-
</pre>
+
-
</li>
+
-
<li>Right click the kqemu.inf file and select ''Install''.</li>
+
-
</ol>
+
-
You must start kqemu manually, and will need to do this each time you reboot:
+
Get the kqemu.inf and kqemu.sys files from above package
-
<ol>
+
For Windows XP system, right click the kqemu.inf file and select "install".
-
<li>Select ''Start > All Programs > Accessories''.</li>
+
-
<li>If you have adminstrator privileges on the machine, select ''Command Prompt''.<br/>
+
-
If you don't have administrator privileges, you will need to run the command prompt as an administrator:
+
-
<ol>
+
-
<li>Right click on ''Command Prompt'' and select ''Run as...''.</li>
+
-
<li>Click on the radio button next to ''The following user'' and enter the credentials of an adminstrator.</li>
+
-
</ol>
+
-
</li>
+
-
<li>Once the command prompt is open, run the following command:
+
-
<pre>
+
-
net start kqemu
+
-
</pre>
+
-
</li>
+
-
</ol>
+
-
== Install MeeGo target(s) ==
+
For Windows 7 or Windows Vista system, edit the kqemu.inf file to do below changes, and then right click the kqemu.inf, select "install".
-
A ''target'' is used to build programs using a MeeGo toolchain and libraries (sysroot). They are downloaded as a large (~250MB) .bz2 file and a large (~50MB) .gz file using the commands below. MADDE (MeeGo Application Develop and Debug Environment ([http://wiki.maemo.org/MADDE background])) is a tool that assists in the download and installation of targets. You can install multiple targets and switch easily between them in Qt Creator.
+
  [DefaultInstall.NT] --> [DefaultInstall]
 +
  [DefaultInstall.NT.Services] --> [DefaultInstall.Services]
 +
  [Uninstall.NT] --> [Uninstall]
 +
  [Uninstall.NT.Services] --> [Uninstall.Services]
-
First start the MADDE Terminal from ''Start menu > All Programs > MeeGo SDK > MADDE Terminal''.
+
Start the kqemu manually. Select ''Start > All Programs > Accessories'', click right mouse button over ''Command Prompt'', and select "Run as administrator". In Command Prompt, run the following command:
 +
net start kqemu
 +
You need to start kqemu again after you reboot the system.
-
If you are in an intranet which requires a proxy, you may need to run the following command in the MADDE Terminal before you can download any targets or runtimes:
 
-
<pre>
 
-
$ export http_proxy=10.0.5.1
 
-
</pre>
 
-
replacing '''10.0.5.1''' with the IP address or host name of your proxy.
 
-
Then follow these steps to create and test a MADDE target for MeeGo.
+
<li> '''Configuration for a MeeGo Emulator device''' </li>
-
<ol>
 
-
<li>Create the target by running the command below.  Replace <target> with one of:
 
-
  <ul>
 
-
    <li>'''meego-core-armv7l-1.1''':  Build applications for ARM handheld devices (such as N900)</li>
 
-
    <li>'''meego-handset-ia32-w32-1.1''':  Build applications for x86 handheld devices (such as Aava)</li>
 
-
    <li>'''meego-netbook-ia32-w32-1.1''': Build applications for x86 netbooks.</li>
 
-
  </ul>
 
-
Note that the <code>-f</code> flag instructs MADDE to download the toolchain tar ball (gz) and sysroot tar ball (bz2) first.
 
-
<pre>$ mad-admin create -f <target> </pre>
 
-
If you encounter problems, check the [[MeeGo_SDK_Troubleshooting#General_SDK_Errors Troubleshooting|SDK troubleshooting page]]
 
-
</li>
 
-
<li>To check that the target has been installed correctly, run the following, replacing &lt;target&gt; with one of the values described in the previous step:
 
-
<pre>$ mad -t <target> pscreate -t qt-simple qttest
 
-
$ cd qttest
 
-
$ mad -t <target> qmake
 
-
$ mad -t <target> make
 
-
</pre>
 
-
</li>
 
-
<li>To check that the qt-simple application is created for the correct target, run:
 
-
<pre>$ file build/qttest</pre>
 
-
If you compiled with an IA32 toolchain, you should see something like this:
 
-
<pre>
 
-
build/qttest: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), for GNU/Linux 2.6.25,
 
-
dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
 
-
</pre>
 
-
While compiling with an ARM toolchain should yield something like:
 
-
<pre>
 
-
build/qttest: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.25,
 
-
dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
 
-
</pre>
 
-
</li>
 
-
</ol>
 
-
== Install MeeGo runtime(s) ==
 
-
A ''runtime'' is the MeeGo OS image that is run with QEMU when debugging applications on your host system. It is downloaded as a large (~650MB) .bz2 file using MADDE.  The runtime is not needed until you have finished configuring Qt Creator, and is not required at all if you only intend to develop against real hardware running MeeGo. However, as this step may take some time, it is recommended that you start it now so it can proceed in the background while you continue with the remaining steps.
+
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"; set "Username" to "root"; set "Password" to "meego".<br/>
 +
[[File:Meego-sdk-emulator.png|800px]]
-
The verified MADDE targets available on Windows are:
+
<li> '''Set Run Configuration''' </li>
 +
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 make sure 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).<br>
 +
[[File:Meego-sdk-run-settings.png|800px]]
-
* '''meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime''' (corresponding to the meego-handset-ia32-w32-1.1 target)
+
Note: You can also start the Qemu from MADDE terminal. For that, you need to go to Start->Programs->MeeGoSDK->MADDE Terminal. In the terminal type:
-
* '''meego-netbook-ia32-w32-qemu-1.1.20101031.2037-sda-runtime''' (corresponding to the meego-netbook-ia32-w32-1.1 target)
+
mad list
 +
to see the runtime and target names, and then type:
 +
mad remote -r <runtime> poweron
-
MADDE may list other targets, but they are not guaranteed to work.
+
<li> '''Build, run and deploy the application'''</li>
 +
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.<br>
 +
[[File:Qemu-handset.png|800px]]
-
See [[SDK/Docs/1.1/Configuring_QEMU_runtimes|Configuring QEMU runtimes]] for further instructions.
 
-
== Configuring Qt Creator to use the MeeGo target(s)==
 
-
Launch Qt Creator with ''Start > All Programs > MeeGo SDK > QtCreator''.
+
<li> '''Debug the application'''</li>
-
 
+
You can also debug the application by clicking the "Debug" icon. Setting breakpoints and stepping are the same as local applications.<br>
-
Configure Qt Creator to use the MeeGo target(s):
+
[[File:Qemu-handset-debug.png|800px]]
 +
</ol>
 +
=== Configure Qt Creator to work with real devices ===
<ol>
<ol>
-
<li>Go to ''Tools > Options > Qt4 > Qt Versions''.</li>
+
<li> Go to Tools -> Options -> Projects -> MeeGo Device Configurations and click "Add" button. Select "Remote Device" for "Device type", input other information and enter a name for this configuration.</li>
-
<li>On the right side of the ''Qt Versions'' view, click on the plus sign button to add a new version. A blank, new version appears in the ''Qt Versions'' view.</li>
+
[[File:Real-device.png|800px]]
-
<li>On the ''Version Name'' line, specify a name for the new version (e.g. '''MeeGo netbook''').</li>
+
<li> Open your project and in the "Projects" mode, click "Run" in the little MeeGo target window, and select the configuration you just created in "Device Configuration".</li>
-
<li>On the ''qmake location'' line, select a qmake location for the new version by browsing to a <code>qmake</code> binaries for one of your installed targets. The full path will look something like:
+
[[File:Meego-sdk-run-settings-real-device.png|800px]]
-
<pre>
+
<li> Launch terminal inside the device, and run command "xhost +" in it. </li>
-
C:\&lt;MeeGo SDK install directory&gt;\MADDE\targets\&lt;target name&gt;\bin\qmake.exe
+
<li> Click "Run" or "Debug" on the lower left corner of Qt Creator to run or debug your application on the configured Device.</li>
-
</pre>
+
-
where <code>&lt;MeeGo SDK install directory&gt;</code> is the path to the MeeGo SDK directory (default is <code>C:\MeeGoSDK_1.1</code>), and <code>&lt;target&gt;</code> is the name of one of the installed targets (for example, '''meego-netbook-ia32-w32-1.1''').</li>
+
-
<li>Once added, select the new entry and click on the ''Rebuild'' button (bottom right) to build the debugging helper for this Qt version. </li>
+
-
<li>Click ''OK''.</li>
+
</ol>
</ol>
-
The resulting configuration should look something like this:
+
== How to SSH into QEMU Image ==
 +
Anytime MeeGo is running in QEMU, you can use SSH to connect to the image from another terminal on the host system.
 +
<ol><li>Launch QEMU with MeeGo image </li>
 +
<li>From a terminal on the host, connect to the running image</li>
 +
$ ssh meego@127.0.0.1 -p 6666
 +
</ol>
 +
Two user accounts are available in the MeeGo images:<br>
 +
User: meego Password: meego<br>
 +
User: root    &nbsp;&nbsp;&nbsp;&nbsp; Password: meego<br>
-
[[File:Meego-sdk-qt-creator-configuring-toolchain.PNG]]
+
== Known issues about QEMU image and workarounds for them==
-
 
+
*[http://bugs.meego.com/show_bug.cgi?id=10412 Bug #10412: mouse udev not ready before starting X server while running handset image on QEMU windows]
-
== Developing with the SDK ==
+
<ol>
-
 
+
<li>SSH into QEMU runtime as root user.</li>
-
To start developing with the MeeGo SDK, the [[SDK/Docs/1.1/Creating_Hello_World|hello world tutorial]] is a good starting point.
+
<li>edit /usr/sbin/meego-dm to add "sleep 5" </li>
-
 
+
sleep 5    # new added line
-
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).
+
shopt -s execfail
 +
</ol>
 +
*[http://bugs.meego.com/show_bug.cgi?id=9737 Bug #9737: Fail to run application in Qemu]
 +
<ol>
 +
<li> SSH into QEMU runtime as root user.</li>
 +
<li> Invoke the following command:</li>
 +
rm -rf /etc/ssh/*key*
 +
</ol>
-
== Removing components ==
+
==Other known issues and workarounds==
-
'''This will remove all SDK components, including any MADDE runtimes and targets you may have installed.'''
+
Please refer to [[SDK/Docs/1.1/Troubleshooting]].
-
To uninstall the SDK:
+
== For advanced users only: How to create QEMU images used by SDK for windows ==
 +
The QEMU images for SDK on Linux could be built from the [http://meego.gitorious.org/meego-os-base/image-configurations/trees/MeeGo1.1/SDK kick start file] by using mic-image-creator tool (command to run the mic-image-creator could be found in each ks file). Ideally, the images are host platform independent. However, due to the booting time and some other issues with kqemu, minor changes were done on the images obtained from ks file, so that they could boot up successfully on Windows. Suppose you have had a raw image, say abc.raw, built from kick start file in hand, below are the changes needed:
-
* Select ''Start menu > All Programs > MeeGo SDK > Maintain MeeGo SDK''.
+
1. mount into the image
-
* In the dialog box, select ''Remove all components'' and click ''Next''.
+
sudo mount -o loop,offset=512 abc.raw /mnt
-
* Click ''Uninstall'' to remove the SDK.
+
2. edit /mnt/usr/sbin/meego-dm to add "sleep 5" to solve [http://bugs.meego.com/show_bug.cgi?id=10412 bug #10412: mouse udev not ready before starting X server while running handset image on QEMU windows]
 +
sleep 5    # new added line
 +
shopt -s execfail
 +
3. edit /mnt/boot/extlinux/extlinux.conf to add kernel option "intel_idle.max-cstate=0" to solve [http://bugs.meego.com/show_bug.cgi?id=10149 bug #10149: Home screen can't show up after starting emulator from Qt Creator on Windows7 32bit]
 +
append ro root=/dev/sda1 vga=current intel_idle.max-cstate=0 quiet
 +
4. unmount the image
 +
sudo umount /mnt

Latest revision as of 23:00, 22 June 2011


This page describes how to install and configure the MeeGo 1.1 SDK on your Windows development system. For more information about MeeGo SDK for Windows, check SDK/MeeGo_SDK_for_Windows.

Contents

Prerequisites

  • Hardware: Any reasonably modern IA hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.
    • The SDK version of QEMU relies on kqemu to provide CPU virtualization support, but on some machines with this support, images will still not run. This is believed to be related to certain types of CPU. Below are some details of tested hardware:
    • Known to work: Intel Core 2 Quad CPU, Q8200; Intel i5 and i7
    • Known not to work: Intel Core 2 Duo P9400 in Thinkpad T400; Intel(R) Core(TM)2 Q9400 in HP7900 Ultra-slim
  • Software: Only Windows XP 32-bit and Windows 7 32-bit are officially supported.
    Currently, the QEMU emulator works only for IA targets on 32-bit Windows. If you are using 64-bit Windows, QEMU is not available.
    For support status and issues, using other host operating systems, see the support page.
  • Filesystem: MeeGo SDK should be installed on a hardlink-capable filesystem, such as NTFS. FAT* filesystems are not hardlink-capable and not supported.

Notes and caveats

  • QEMU runtimes and targets: The following pre-defined targets and runtimes are the only ones which have been verified on Windows:
    • Targets:
      • meego-handset-ia32-1.1.2
      • meego-netbook-ia32-1.1.2
      • meego-core-armv7l-1.1.2
    • Runtimes:
      • meego-handset-ia32-qemu-1.1.20110110.1026-runtime
      • meego-netbook-ia32-qemu-1.1.20110110.1049-runtime
    Others may be listed by MADDE, but are not guaranteed to work.
  • Uninstalling: Everything you've installed as part of the SDK, including MADDE targets and runtimes, will be removed, if you run the MeeGo SDK uninstaller.
  • Commands: Terminal commands in the instructions below are prefaced with "$". Do not include $ when entering the commands in your terminal.

Download and setup the MeeGo SDK

  1. Download the MeeGo SDK installer:
  2. FileDescriptionSize
    http://download3.meego.com/MeeGoSDK/1.1.2/meego-1.1-sdk-update-installer.exe MeeGo SDK Windows installer 54MB
  3. Double-click on the downloaded .exe file and follow the prompts to install the SDK.
  4. If you are using Windows XP, please download a small file vcredist_x86.exe (Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)) from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2 and install it to your system. This is not needed for Windows 7.
  5. Launch MADDE Terminal with Start > All Programs > MeeGo SDK > MADDE Terminal.
    1. Run something like "export http_proxy=XXX" if you are in an intranet.
    2. Run "mad-admin create -f meego-handset-ia32-w32-1.1" to create target "meego-handset-ia32-w32-1.1". Some huge files will be downloaded automatically.
    3. Run "mad-admin create -e -f meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime" to create a runtime "meego-handset-ia32-w32-qemu-1.1.20101031.2201-sda-runtime". Some huge files will be downloaded automatically.
      • Known issue: If there is error like "/bin/mad-admin: line 25: __ml_path__/madlib/madlib.sh:" No such file or directory.". Run the /postinstall/postinstall.sh to fix paths and try again.(see bug report http://bugs.meego.com/show_bug.cgi?id=11605)
  6. Launch Qt Creator with Start > All Programs > MeeGo SDK > QtCreator.
  7. Configure Qt Creator to support MeeGo sysroot. Inside Qt Creator, follow these steps:
    1. From the Tools menu, choose Options.
    2. Click into the Qt4 section, and make sure the Qt Versions tab is open.
    3. Click the + button, and then fill the Version name and the qmake location of the MeeGo target:
      • Version name: meego-handset
      • qmake location: <MEEGO_SDK>\MADDE\targets\<target name>\bin\qmake.exe
        Replace <MEEGO_SDK> with the directory where you installed MeeGo SDK; the default is C:\MeeGoSDK_1.1; replace <target_name> with the name of the target (for example, meego-handset-ia32-w32-1.1).
      • Once added, select the new entry and click on the Rebuild button (bottom right) to build the debugging helper for this Qt version. This enables you to use debugging from Qt Creator.

      The result should look like this:
      Meego-sdk-qt4.png

Use Qt Creator to develop MeeGo Applications

  1. Create a MeeGo touch project (for handset) or Qt Gui project (for netbook)
  2. Go to the menu: File -> New File or Project -> Qt Application Project -> Meego Touch Framework Application.
    Windows sdk 2.png

    In "Project setup" dialog, choose "meego-handset".

    Meego-sdk-project-setup.png

  3. Set up emulator: Install kqemu accelerator for QEMU on 32-bit Windows system
  4. Notice: The kqemu could only be used on 32-bit Windows. 64-bit Windows could not work with kqemu. You can not use emulator on 64-bit Windows. Use a real device instead.

    Download package from http://wiki.qemu.org/download/kqemu-1.4.0pre1.tar.gz

    Get the kqemu.inf and kqemu.sys files from above package

    For Windows XP system, right click the kqemu.inf file and select "install".

    For Windows 7 or Windows Vista system, edit the kqemu.inf file to do below changes, and then right click the kqemu.inf, select "install".

      [DefaultInstall.NT] --> [DefaultInstall]
      [DefaultInstall.NT.Services] --> [DefaultInstall.Services]
      [Uninstall.NT] --> [Uninstall]
      [Uninstall.NT.Services] --> [Uninstall.Services]
    

    Start the kqemu manually. Select Start > All Programs > Accessories, click right mouse button over Command Prompt, and select "Run as administrator". In Command Prompt, run the following command:

    net start kqemu
    

    You need to start kqemu again after you reboot the system.


  5. Configuration for a MeeGo Emulator device

  6. 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"; set "Username" to "root"; set "Password" to "meego".
    Meego-sdk-emulator.png

  7. Set Run Configuration
  8. 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 make sure 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).
    Meego-sdk-run-settings.png

    Note: You can also start the Qemu from MADDE terminal. For that, you need to go to Start->Programs->MeeGoSDK->MADDE Terminal. In the terminal type:

    mad list
    

    to see the runtime and target names, and then type:

    mad remote -r <runtime> poweron
    
  9. Build, run and deploy the application
  10. 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.
    Qemu-handset.png


  11. Debug the application
  12. You can also debug the application by clicking the "Debug" icon. Setting breakpoints and stepping are the same as local applications.
    Qemu-handset-debug.png

Configure Qt Creator to work with real devices

  1. Go to Tools -> Options -> Projects -> MeeGo Device Configurations and click "Add" button. Select "Remote Device" for "Device type", input other information and enter a name for this configuration.
  2. Real-device.png

  3. Open your project and in the "Projects" mode, click "Run" in the little MeeGo target window, and select the configuration you just created in "Device Configuration".
  4. Meego-sdk-run-settings-real-device.png

  5. Launch terminal inside the device, and run command "xhost +" in it.
  6. Click "Run" or "Debug" on the lower left corner of Qt Creator to run or debug your application on the configured Device.

How to SSH into QEMU Image

Anytime MeeGo is running in QEMU, you can use SSH to connect to the image from another terminal on the host system.

  1. Launch QEMU with MeeGo image
  2. From a terminal on the host, connect to the running image
  3. $ 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

Known issues about QEMU image and workarounds for them

  1. SSH into QEMU runtime as root user.
  2. edit /usr/sbin/meego-dm to add "sleep 5"
  3. sleep 5    # new added line
    shopt -s execfail
    
  1. SSH into QEMU runtime as root user.
  2. Invoke the following command:
  3. rm -rf /etc/ssh/*key*
    

Other known issues and workarounds

Please refer to SDK/Docs/1.1/Troubleshooting.

For advanced users only: How to create QEMU images used by SDK for windows

The QEMU images for SDK on Linux could be built from the kick start file by using mic-image-creator tool (command to run the mic-image-creator could be found in each ks file). Ideally, the images are host platform independent. However, due to the booting time and some other issues with kqemu, minor changes were done on the images obtained from ks file, so that they could boot up successfully on Windows. Suppose you have had a raw image, say abc.raw, built from kick start file in hand, below are the changes needed:

1. mount into the image

sudo mount -o loop,offset=512 abc.raw /mnt

2. edit /mnt/usr/sbin/meego-dm to add "sleep 5" to solve bug #10412: mouse udev not ready before starting X server while running handset image on QEMU windows

sleep 5    # new added line
shopt -s execfail

3. edit /mnt/boot/extlinux/extlinux.conf to add kernel option "intel_idle.max-cstate=0" to solve bug #10149: Home screen can't show up after starting emulator from Qt Creator on Windows7 32bit

append ro root=/dev/sda1 vga=current intel_idle.max-cstate=0 quiet

4. unmount the image

sudo umount /mnt
Personal tools