Meego Wiki
Views

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

From MeeGo wiki
< SDK | Docs | 1.1
Revision as of 11:52, 12 November 2010 by Fabo (Talk | contribs)
Jump to: navigation, search


This page instructs in setting up your MeeGo 1.1 development environment on Linux.

Contents

Prerequisites

  • To use the MeeGo SDK, you should be running a reasonably modern Linux distribution (such as Fedora 13, Ubuntu 10.04 LTS, openSUSE 11.3) on reasonably modern hardware, such as 32-bit Intel Atom or Intel Core 2 CPU.
  • If you intend to use QEMU, you will get reasonable performance only if your host system has VT support. See this page for details of how to check your system's capabilities.
  • To install the necessary components, you need to be logged in as root user:
    sudo -i
    Give your password when prompted.

Configuring distributions package manager

On Debian or Ubuntu

  1. Add the following line to /etc/apt/sources.list file or create a /etc/apt/sources.list.d/meego-sdk.list file containing the following line:
    deb http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/ /
    Note: replace ${distribution}/${version} pair with one of the following values, depending on your Linux distribution: "debian/5.0", "ubuntu/09.10" or "ubuntu/10.04".
  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 packages database:
    $ sudo apt-get update
  4. Check that the MeeGo repository has been added to the file with, for example, the following command:
    $ sudo apt-cache policy madde
    If the repository has been successfully added, the command prints the details of the MADDE package.

On Fedora

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

On MeeGo

To add MeeGo repository, do one of the following:

  • Use the command:
zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo

Note: replace ${distribution}/${version} pair with one of the following values, depending on your Linux distribution: "meego/1.1" or "meego/trunk".

On openSUSE

To add MeeGo repository, do one of the following:

  • Use the command:
zypper addrepo -f http://repo.meego.com/MeeGo/sdk/host/repos/${distribution}/${version}/meego-sdk.repo

Note: replace ${distribution}/${version} pair with one of the following values, depending on your Linux distribution: "opensuse/11.2" or "opensuse/11.3".

Installing MeeGo SDK

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

For ARM only:

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

For IA32 only:

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

Creating and testing a target with MADDE

  1. Create MeeGo target in MADDE:
    $ sudo mad-admin create -f <target> 
    Where <target> is meego-core-armv7l-1.1 , meego-handset-ia32-1.1 or meego-netbook-ia32-1.1. Note that the -f 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
  2. To check that target and toolchain are found in MADDE:
    $ mad -t <target> pscreate -t qt-simple qthello
    $ cd qthello
    $ mad -t <target> qmake
    $ mad -t <target> make
    Where <target> is meego-core-armv7l-1.1 , meego-handset-ia32-1.1 or meego-netbook-ia32-1.1
  3. To check that the qt-simple application is created for the correct target, run:
    file build/qthello

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.

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
$ 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:

$ sudo apt-get autoremove

To remove MADDE directory:

$ 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:

# 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:

# rm -rf /usr/lib/madde
Personal tools