Meego Wiki
Views

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

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
[[Category:application-developer]]
[[Category:application-developer]]
[[Category:linux]]
[[Category:linux]]
-
 
+
This page describes how to install and configure the MeeGo 1.1 SDK on your Linux development system.
-
This page instructs in setting up your MeeGo 1.1 development environment on Linux.
+
== Prerequisites ==
== Prerequisites ==
-
* To use the MeeGo SDK, you should be running a reasonably modern Linux distributionCurrently the MeeGo 1.1 SDK has been validated on [https://fedoraproject.org/en/index Fedora 12, Fedora 13], [http://www.ubuntu.com/ Ubuntu 9.10, and Ubuntu 10.04 LTS].  Other distributions such as [http://www.opensuse.org/en/ openSUSE 11.x] and Windows XP are planned for support soonIn addition, you should run on reasonably modern hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.
+
* '''Hardware:''' Any reasonably modern hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.  '''To use QEMU''' to run MeeGo in a virtual machine your system must have support for ''Virtualization Technology'' (VT)See the [[SDK/Docs/1.1/MeeGo_SDK_Graphics_Acceleration|Graphics Acceleration]] page for details.
-
* If you intend to [[SDK/Docs/1.1/Configuring QEMU runtimes|use QEMU]], you will get reasonable performance only if your host system has VT support. See [[SDK/Docs/1.1/MeeGo_SDK_Graphics_Acceleration|this page]] for details of how to check your system's capabilities.
+
* '''Software:'''  The MeeGo 1.1 SDK has been validated on 32-bit versions of [https://fedoraproject.org/en/index Fedora 12], [[https://fedoraproject.org/en/index Fedora 13], [http://www.ubuntu.com/ Ubuntu 9.10], and [http://www.ubuntu.com/ Ubuntu 10.04 LTS].  For support status and issues using other host OS's see [http://wiki.meego.com/SDK/Docs/1.1/MeeGo_1.1_SDK_Host_OS_Support this page].  
-
* To configure and install many components, you will need to have root privileges.  Commands that indicate root privileges are prefaced with "sudo". (To add "sudo power" to your account, edit the /etc/sudoers file. See "$ man sudoers")
+
* '''Root privileges:''' To install the SDK you will need to have root privileges.  Commands that require root privileges are prefaced with "sudo". For convenience, you may wish to setup "sudo" capabilities to easily switch between root and normal user privileges (see [http://www.gratisoft.us/sudo/sudo.man.html sudoers manpage].)
-
* Command-line commands are prefaced with "$".  Do not enter $ when entering the commands in your terminal.
+
* '''Commands:''' Terminal commands are prefaced with "$".  Do not enter $ when entering the commands in your terminal.
== Configuring distributions package manager ==
== Configuring distributions package manager ==
-
===On Debian or Ubuntu===
+
=== On Ubuntu or Debian ===
-
# Add the following line to <code>/etc/apt/sources.list</code> file or create a <code>/etc/apt/sources.list.d/meego-sdk.list</code> file containing the following line.  Replace ${distribution}/${version} with one of the following values, depending on your Linux distribution: "debian/5.0", "ubuntu/09.10" or "ubuntu/10.04".
+
<!-- Replaced '#' with <li> so that multi-line <pre> statements would appear in a single block -->
-
#: <pre>deb <nowiki>http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/</nowiki> /</pre>
+
<ol>
-
#:
+
<li>Add the following line to <code>/etc/apt/sources.list.d/meego-sdk.list</code>.<br>
-
# Add the repository public key:
+
  Replace ${distribution}/${version} with one of the following: "ubuntu/09.10", "ubuntu/10.04", or "debian/5.0".
-
#: <pre>$ sudo gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A</pre>
+
<pre>deb http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/ / </pre>
-
#: <pre>$ sudo gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -</pre>
+
</li>
-
# Update packages database:
+
<li>Add the repository public key:
-
#: <pre>$ sudo apt-get update</pre>
+
<pre>$ sudo gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A
-
# Check that the MeeGo repository has been added to the file with, for example, the following command:
+
$ sudo gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -</pre>
-
#: <pre>$ sudo apt-cache policy madde</pre>
+
</li>
-
#: If the repository has been successfully added, the command prints the details of the MADDE package.
+
<li>Update the packages database:
 +
<pre>$ sudo apt-get update</pre>
 +
</li>
 +
<li>To check that the MeeGo repository has been correctly added, run the following command. The details of the MADDE package should be printed.
 +
<pre>$ sudo apt-cache policy madde</pre>
 +
</li>
 +
</ol>
-
===On Fedora===
+
=== On Fedora ===
-
# Go to the yum repository directory:
+
<ol>
-
#:<pre> # cd /etc/yum.repos.d/ </pre>
+
<li>Go to the yum repository directory:
-
# Add the MeeGo SDK yum repository:
+
<pre>$ cd /etc/yum.repos.d/ </pre>
-
#:<pre> # wget http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo</pre>
+
</li>
-
#: '''Note:''' replace ${distribution}/${version} pair with one of the following values, depending on your Linux distribution: "fedora/12" or "fedora/13".
+
<li>Add the MeeGo SDK yum repository. <br/>
-
# Install the signing key:
+
Replace ${distribution}/${version} with one of the following: "fedora/12" or "fedora/13".
-
#:<pre> # rpm --import http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/repodata/repomd.xml.key </pre>
+
<pre>$ sudo wget http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo</pre>
-
# Update packages database:
+
</li>
-
#: <pre># yum update</pre>
+
<li>Install the signing key:
 +
<pre>$ sudo rpm --import http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/repodata/repomd.xml.key </pre>
 +
</li>
 +
<li>Update the packages database:
 +
<pre>$ sudo yum update</pre>
 +
</li>
 +
</ol>
-
===On MeeGo===
+
=== On MeeGo ===
 +
<ul>
 +
<li>To add the MeeGo SDK repository on a system running MeeGo, run the following command. <br>
 +
Replace ${distribution}/${version} with one of the following values: "meego/1.1" or "meego/trunk".
 +
<pre>$ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo</pre>
 +
</li>
 +
</ul>
 +
=== On openSUSE ===
 +
<ul>
 +
<li>To add the MeeGo repository, run the following command. <br>
 +
Replace ${distribution}/${version} with one of the following values: "opensuse/11.2" or "opensuse/11.3".
 +
<pre>$ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo</pre>
 +
</li>
 +
</ul>
-
To add MeeGo repository, do one of the following:
+
== Installing the MeeGo SDK ==
 +
<ul>
 +
<li>Debian / Ubuntu
 +
<pre>$ sudo apt-get install meego-sdk</pre>
 +
</li>
 +
<li>Fedora
 +
<pre>$ sudo yum install meego-sdk</pre>
 +
</li>
 +
<li>OpenSUSE
 +
<pre>$ sudo zypper install meego-sdk</pre>
 +
</li>
 +
</ul>
-
* Use the command:
+
'''For ARM only:'''
-
<pre>
+
<ul>
-
zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
+
<li>Debian / Ubuntu
-
</pre>
+
<pre>$ sudo apt-get install meego-sdk-armv7l</pre>
 +
</li>
 +
<li>Fedora
 +
<pre>$ sudo yum install meego-sdk-armv7l</pre>
 +
</li>
 +
<li>OpenSUSE
 +
<pre>$ sudo zypper install meego-sdk-armv7l</pre>
 +
</li>
 +
</ul>
-
'''Note:''' replace ${distribution}/${version} pair with one of the following values, depending on your Linux distribution: "meego/1.1" or "meego/trunk".
+
'''For IA32 only:'''
 +
<ul>
 +
<li>Debian / Ubuntu
 +
<pre>$ sudo apt-get install meego-sdk-ia32</pre>
 +
</li>
 +
<li>Fedora
 +
<pre>$ sudo yum install meego-sdk-ia32</pre>
 +
</li>
 +
<li>OpenSUSE
 +
<pre>$ sudo zypper install meego-sdk-ia32</pre>
 +
</li>
 +
</ul>
-
===On openSUSE===
+
== Install MeeGo Target ==
 +
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 ([http://wiki.maemo.org/MADDE 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).
-
To add MeeGo repository, do one of the following:
+
<ol>
-
 
+
<li>Create a MeeGo target using MADDE <br>
-
* Use the command:
+
Run the command below.  Replace <target> with one of
-
<pre>
+
* '''meego-core-armv7l-1.1''': Build applications for ARM handheld devices (such as N900)
-
zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
+
* '''meego-handset-ia32-1.1''':  Build applications for x86 handheld devices (such as Aava)
 +
* '''meego-netbook-ia32-1.1''': Build applications for x86 netbooks.
 +
Note that the <code>-f</code> flag instructs MADDE to download the Target tarball (bz2) first.
 +
<pre>$ sudo mad-admin create -f <target> </pre>
 +
If you counter problems, check the [http://wiki.meego.com/MeeGo_SDK_Troubleshooting#General_SDK_Errors Troubleshooting page]
 +
</li>
 +
<li>To check that the target has been installed correctly, run the following. <br>
 +
Replace <target> with one of the values described in the previous step
 +
<pre>$ mad -t <target> pscreate -t qt-simple qthello
 +
$ cd qthello
 +
$ mad -t <target> qmake
 +
$ mad -t <target> make
</pre>
</pre>
 +
</li>
 +
<li>To check that the qt-simple application is created for the correct target, run:
 +
<pre>$ file build/qthello</pre>
 +
</li>
 +
</ol>
-
'''Note:''' replace ${distribution}/${version} pair with one of the following values, depending on your Linux distribution: "opensuse/11.2" or "opensuse/11.3".
+
== Install MeeGo Runtime ==
-
 
+
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.
-
== Installing MeeGo SDK ==
+
-
 
+
-
* Debian / Ubuntu
+
-
*: <pre>$ sudo apt-get install meego-sdk</pre>
+
-
* Fedora
+
-
*: <pre># yum install meego-sdk</pre>
+
-
* OpenSUSE
+
-
*: <pre># zypper install meego-sdk</pre>
+
-
 
+
-
'''For ARM only:'''
+
-
* Debian / Ubuntu
+
-
*: <pre>$ sudo apt-get install meego-sdk-armv7l</pre>
+
-
* Fedora
+
-
*: <pre># yum install meego-sdk-armv7l</pre>
+
-
* OpenSUSE
+
-
*: <pre># zypper install meego-sdk-armv7l</pre>
+
-
 
+
-
'''For IA32 only:'''
+
-
* Debian / Ubuntu
+
-
*: <pre>$ sudo apt-get install meego-sdk-ia32</pre>
+
-
* Fedora
+
-
*: <pre># yum install meego-sdk-ia32</pre>
+
-
* OpenSUSE
+
-
*: <pre># zypper install meego-sdk-ia32</pre>
+
-
 
+
-
== Creating and testing a target with MADDE ==
+
-
 
+
-
# Create MeeGo target in MADDE:
+
-
#: <pre>$ sudo mad-admin create -f <target> </pre>
+
-
#:Where <target> is '''meego-core-armv7l-1.1''' , '''meego-handset-ia32-1.1''' or '''meego-netbook-ia32-1.1'''. Note that the <code>-f</code> flag instructs MADDE to download and install the appropriate sysroot tarball first.If you counter some problems,you can get a solution from http://wiki.meego.com/MeeGo_SDK_Troubleshooting#General_SDK_Errors
+
-
# To check that target and toolchain are found in MADDE:
+
-
#: <pre>$ mad -t <target> pscreate -t qt-simple qthello</pre>
+
-
#: <pre>$ cd qthello</pre>
+
-
#: <pre>$ mad -t <target> qmake</pre>
+
-
#: <pre>$ mad -t <target> make</pre>
+
-
#:Where <target> is '''meego-core-armv7l-1.1''' , '''meego-handset-ia32-1.1''' or '''meego-netbook-ia32-1.1'''
+
-
# To check that the qt-simple application is created for the correct target, run:
+
-
#: <pre>file build/qthello</pre>
+
-
MADDE can also be used to create ''runtimes'' (emulated MeeGo devices) for running and debugging applications. However, you are not required to create runtimes if you only intend to develop against real hardware running MeeGo.
+
See [http://wiki.meego.com/SDK/Docs/1.1/Configuring_QEMU_runtimes#Configuring_access_to_an_emulated_device_in_Qt_Creator Downloading a Runtime and Using QEMU]
== Configuring Qt Creator to use the MeeGo toolchain(s) ==
== Configuring Qt Creator to use the MeeGo toolchain(s) ==
Line 130: Line 163:
To remove installed components, run:
To remove installed components, run:
-
 
+
  $ sudo apt-get remove --purge meego-sdk-qtcreator madde qt-tools qrm-2009ql qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu
-
  $ sudo apt-get remove --purge meego-sdk-qtcreator
+
-
 
+
-
$ sudo apt-get remove --purge madde qt-tools
+
-
 
+
-
$ sudo apt-get remove --purge arm-2009q1
+
-
 
+
-
$ sudo apt-get remove --purge qemu-arm qemu-gl
+
To remove dependencies related to installed components, run:
To remove dependencies related to installed components, run:
  $ sudo apt-get autoremove
  $ sudo apt-get autoremove
-
To remove MADDE directory:
+
To remove MADDE directory (it is not automatically removed when "madde" package is uninstalled):
  $ sudo rm -rf /usr/lib/madde
  $ sudo rm -rf /usr/lib/madde
Line 151: Line 177:
To remove installed components, run:
To remove installed components, run:
-
 
+
  $ sudo zypper remove -u meego-sdk-qt-creator madde qt-tools arm-2009ql qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu
-
  # zypper remove -u meego-sdk-qt-creator
+
-
 
+
-
# zypper remove -u madde qt-tools
+
-
 
+
-
# zypper remove -u arm-2009q1
+
-
 
+
-
# zypper remove -u qemu-arm qemu-gl
+
To remove MADDE directory:
To remove MADDE directory:
-
  # rm -rf /usr/lib/madde
+
  $ sudo rm -rf /usr/lib/madde

Revision as of 01:46, 15 November 2010

This page describes how to install and configure the MeeGo 1.1 SDK on your Linux development system.

Contents

Prerequisites

  • Hardware: Any reasonably modern hardware, such as 32-bit Intel Atom or Intel Core 2 CPU. To use QEMU to run MeeGo in a virtual machine your system must have support for Virtualization Technology (VT). See the Graphics Acceleration page for details.
  • Software: The MeeGo 1.1 SDK has been validated on 32-bit versions of Fedora 12, [Fedora 13, Ubuntu 9.10, and Ubuntu 10.04 LTS. For support status and issues using other host OS's see this page.
  • Root privileges: To install the SDK you will need to have root privileges. Commands that require root privileges are prefaced with "sudo". For convenience, you may wish to setup "sudo" capabilities to easily switch between root and normal user privileges (see sudoers manpage.)
  • Commands: Terminal commands are prefaced with "$". Do not enter $ when entering the commands in your terminal.

Configuring distributions package manager

On Ubuntu or Debian

  1. Add the following line to /etc/apt/sources.list.d/meego-sdk.list.
    Replace ${distribution}/${version} with one of the following: "ubuntu/09.10", "ubuntu/10.04", or "debian/5.0".
    deb http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/ / 
  2. Add the repository public key:
    $ sudo gpg --keyserver pgpkeys.mit.edu --recv 0BC7BEC479FC1F8A
    $ sudo gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
  3. Update the packages database:
    $ sudo apt-get update
  4. To check that the MeeGo repository has been correctly added, run the following command. The details of the MADDE package should be printed.
    $ sudo apt-cache policy madde

On Fedora

  1. Go to the yum repository directory:
    $ cd /etc/yum.repos.d/ 
  2. Add the MeeGo SDK yum repository.
    Replace ${distribution}/${version} with one of the following: "fedora/12" or "fedora/13".
    $ sudo wget http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo
  3. Install the signing key:
    $ sudo rpm --import http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/repodata/repomd.xml.key 
  4. Update the packages database:
    $ sudo yum update

On MeeGo

  • To add the MeeGo SDK repository on a system running MeeGo, run the following command.
    Replace ${distribution}/${version} with one of the following values: "meego/1.1" or "meego/trunk".
    $ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo

On openSUSE

  • To add the MeeGo repository, run the following command.
    Replace ${distribution}/${version} with one of the following values: "opensuse/11.2" or "opensuse/11.3".
    $ sudo zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo

Installing the MeeGo SDK

  • Debian / Ubuntu
    $ sudo apt-get install meego-sdk
  • Fedora
    $ sudo yum install meego-sdk
  • OpenSUSE
    $ sudo zypper install meego-sdk

For ARM only:

  • Debian / Ubuntu
    $ sudo apt-get install meego-sdk-armv7l
  • Fedora
    $ sudo yum install meego-sdk-armv7l
  • OpenSUSE
    $ sudo zypper install meego-sdk-armv7l

For IA32 only:

  • Debian / Ubuntu
    $ sudo apt-get install meego-sdk-ia32
  • Fedora
    $ sudo yum install meego-sdk-ia32
  • OpenSUSE
    $ sudo zypper install meego-sdk-ia32

Install MeeGo Target

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).

  1. Create a MeeGo target using MADDE
    Run the command below. Replace <target> with one of
    • meego-core-armv7l-1.1: Build applications for ARM handheld devices (such as N900)
    • meego-handset-ia32-1.1: Build applications for x86 handheld devices (such as Aava)
    • meego-netbook-ia32-1.1: Build applications for x86 netbooks.
    Note that the -f flag instructs MADDE to download the Target tarball (bz2) first.
    $ sudo mad-admin create -f <target> 

    If you counter problems, check the Troubleshooting page

  2. To check that the target has been installed correctly, run the following.
    Replace <target> with one of the values described in the previous step
    $ mad -t <target> pscreate -t qt-simple qthello
    $ cd qthello
    $ mad -t <target> qmake
    $ mad -t <target> make
    
  3. To check that the qt-simple application is created for the correct target, run:
    $ file build/qthello

Install MeeGo Runtime

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

Configuring Qt Creator to use the MeeGo toolchain(s)

Start Qt Creator by selecting Applications > Programming > Qt Creator.

Configure Qt Creator to use the MeeGo toolchain(s):

  1. Go to Tools > Options > Qt4 > Qt Versions.
  2. 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.
  3. On the Version Name line, specify a name for the new version.
  4. On the qmake location line, specify a qmake location for the new version. The toolchain installs by default to usr/lib/madde/linux-i686/targets/<target>/bin/qmake.
  5. Click Rebuild, Apply and OK.
Adding the MeeGo toolchain(s) in Qt Creator

Developing with the SDK

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).

Removing components

On Ubuntu

To remove installed components, run:

$ sudo apt-get remove --purge meego-sdk-qtcreator madde qt-tools qrm-2009ql qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu

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

On openSUSE

To remove installed components, run:

$ sudo zypper remove -u meego-sdk-qt-creator madde qt-tools arm-2009ql qemu-arm qemu-gl meego-sdk-i586-toolchain meego-qemu

To remove MADDE directory:

$ sudo rm -rf /usr/lib/madde
Personal tools