Getting started with the MeeGo SDK for Linux

Getting started with the MeeGo SDK for Linux

From MeeGo wiki

 

Contents

[hide ]

Introduction

The MeeGo SDK consists of:

  1. A MeeGo chroot environment, which contains a Simulator for MeeGo applications (Linux only), based on Xephyr (http://www.freedesktop.org/wiki/Software/Xephyr ), some scripts to start/stop a MeeGo desktop inside Xephyr, and Qt Creator which can be configured to deploy to remote MeeGo devices
  2. A meego-sdk-chroot script to setup a MeeGo chroot environment for running the Simulator and Qt Creator

The easiest way to install the MeeGo SDK is to download and install packaged versions of these components, as described below.

Pre-requisites

All that's required to run MeeGo inside Xephyr is a reasonably modern Linux distribution (e.g. Fedora 11, Ubuntu 9.10) running on Intel hardware. The hardware should meet the following specifications:

  • CPU: 32bit Intel(r) Atom(tm) or Intel(r) Core(tm) 2 CPU

Install the MeeGo chroot

The MeeGo chroot archive is a big file (just over 600Mb). It contains pretty much all the libraries for a full MeeGo distribution plus some other stuff (Xephyr, scripts, Qt Creator):

wget http://download3.meego.com/meego-sdk-0524.tar.bz2

Unpack the MeeGo chroot archive file:

tar jxvf meego-sdk-0524.tar.bz2

 

Install the meego-sdk-chroot script

The meego-sdk-chroot script sets up mountpoints for the chroot environment, then starts the chroot proper; it also attempts to unmount everything when it exits and clear up any processes started in the chroot. Get it with:

wget http://download3.meego.com/meego-sdk-chroot

Make the chroot script executable:

chmod +x meego-sdk-chroot

Move it to /usr/bin :

mv meego-sdk-chroot /usr/bin

Configure the host ready for the Simulator

Next, configure X on the host machine to enable the Simulator (running from the chroot) to access the display of the normal user:

xhost +local:

(You need to do this once before running the Simulator or Qt Creator after each reboot.)

Enter the MeeGo chroot environment

The meego-sdk-chroot script sets up a MeeGo chroot environment and drops you into a shell inside it:

sudo meego-sdk-chroot ~/meego-sdk-0524

(replace ~/meego-sdk-0524 with the path to the chroot directory)

Note that this uses the chroot command, which may not be on root's PATH (on Fedora the chroot command is in /usr/sbin ). You can fix this by adding an alias to the top of the meego-sdk-chroot script:

alias chroot='/usr/sbin/chroot'

The output from running the script should look like this:

mount --bind /proc /home/ell/meego-sdk-0524/proc
mount --bind /sys /home/ell/meego-sdk-0524/sys
mount --bind /dev /home/ell/meego-sdk-0524/dev
mount --bind /dev/pts /home/ell/meego-sdk-0524/dev/pts
mount --bind /tmp /home/ell/meego-sdk-0524/tmp
mount --bind /var/lib/dbus /home/ell/meego-sdk-0524/var/lib/dbus
mount --bind /var/run/dbus /home/ell/meego-sdk-0524/var/run/dbus
cp /etc/resolv.conf /home/ell/meego-sdk-0524/etc/resolv.conf
root@meego-netbook-sdk:/#

Installing other software

It's possible to install software from the standard locations (at least it is in netbook images) into the chroot.

Enter the chroot , then run:

zypper install <package>

It should also be possible to upgrade the whole MeeGo image using:

zypper dist-upgrade

Setting host display before running Simulator

Xephyr does not see DISPLAY env variable from host system since it is running as chroot. As chroot, set DISPLAY variable before running "startmeego" that calls Xephyr.

export DISPLAY=:0

Run the Simulator

From inside the chroot, as root do:

startmeego &

This starts the Xephyr server then runs a script to boot the MeeGo desktop into it.

If you want to run applications from the chroot and have them display in the Simulator window, you can do:

DISPLAY=:2 glxgears

(replacing glxgears with the command you want to run).

Debugging the Simulator

If you are having issues with the Simulator, use the debug script to see what's happening:

startmeego-debug

This shows the console output from the script, which may give you some clues if it's not working correctly.

Netbook UX in the Simulator

Here's what it looks like:

File:Simulator_running_netbook_ux.png

Known issues:

  • Panels which rely on DBus (like the battery, networking) don't report devices properly.

Stop the Simulator

To stop the Simulator, just exit the chroot shell with:

exit

This closes down any processes started inside the Simulator and unmounts directories used by the chroot environment. The output should look something like this:

exit
umount /home/ell/meego-sdk-0524/proc
umount /home/ell/meego-sdk-0524/sys
umount /home/ell/meego-sdk-0524/dev/pts
umount /home/ell/meego-sdk-0524/dev
umount /home/ell/meego-sdk-0524/tmp
umount /home/ell/meego-sdk-0524/var/lib/dbus
umount /home/ell/meego-sdk-0524/var/run/dbus
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章