(→Set up and enter the chroot) |
This is work in progress. It references various components which are not available publicly, but will be made available around the time of the MeeGo 1.0 release (some time in May 2010).
This document describes how to run a MeeGo desktop inside Xephyr.
You'll do this by creating a MeeGo Simulator, which consists of:
Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image).
If you want a really quick method for developing on MeeGo where you don't need to build the Simulator, see Hello World - MeeGo x86 development on Linux.
Also note that people outside Intel won't be able to do this until we release MeeGo with a UX.
Contents |
All that's required for this is a reasonably modern Linux distribution (e.g. Fedora 11, Ubuntu 9.10) running on Intel hardware. The hardware should meet the following specifications:
Basically, on the Linux machine (which should meet the above requirements):
Get an image or tarball (with a UX) from http://repo.meego.com/MeeGo/releases/; either a netbook or handset image.
The process for unpacking is slightly different, depending on the type of image.
sudo mic-chroot --unpack-only -s ~/meego-chroot <image file>.usbimg
yum install kpartx
or on non-RPM distros:
apt-get install kpartx
tar jxvf meego-0.90-preview-shcdk-20100512-001.tar.bz2
This leaves you with a directory which contains the raw disk image you're interested in.
cd meego-0.90-preview-shcdk-20100512-001 sudo kpartx -a -v ./meego-0.90-preview-shcdk-20100512-001-sda.bin
Note that this maps the first partition (p1) of the disk image onto the loop device /dev/loop0.
mkdir ~/tmp-mnt # temporary mount point sudo mount /dev/mapper/loop0p1 ~/tmp-mnt -o loop,ro mkdir ~/meego-chroot sudo cp -a ~/tmp-mnt ~/meego-chroot sudo umount ~/tmp-mnt
sudo kpartx -d -v ./meego-0.90-preview-shcdk-20100512-001-sda.bin
rmdir ~/tmp-mnt
From RPM???
From RPM???
With everything installed, you should now be able to run the Simulator.
You could also now continue with the "Hello World" tutorial, as the Simulator you've built should fairly similar to packaged one (it may be missing a few libraries, but you can always install those yourself).
This is only recommended if the provided RPMs don't work
You can build a Simulator in the chroot by building the two main components from source:
The Simulator needs two binaries:
Both can be built in the chroot (unless you'd rather build them using a cross-compiler on the host).
To do both, you first need to install some development tools into the chroot:
zypper install gcc xorg-x11-util-macros libtool xorg-x11-xtrans-devel libX*-devel xorg-x11-proto-* \ mesa-libGL-deve mesa-dri-drivers-devel libdrm-devel openssl-devel libxkbfile-devel make git
git clone git://gitorious.org/xserver-with-gl-accelerated-xephyr/xserver-with-gl-accelerated-xephyr.git cd xserver-with-gl-accelerated-xephyr/ ./autogen.sh --enable-debug --enable-kdrive --enable-dri2 --enable-xephyr --with-dri-driver-path=/usr/lib/dri/ \ --disable-xorg --prefix=/usr make make install
This is part of the xephyr-utils distribution (which we already checked out on the host); but you need to build it inside the chroot.
cd xephyr-utils sudo cp -a target/src ~/meego-chroot/
cd src make install
The version of Xephyr included in the RPM is actually slightly different from the one you built above. The RPM is built directly from the X server sources on OBS, with some patches applied. These patches are on their way upstream, so hopefully you should soon be able to build Xephyr from the upstream X sources rather than from the gitorious project.
For the moment, the easiest way to build Xephyr yourself is to use the project linked to above.
The meego-netbook-sdk-utils package is generated from the MeeGo SDK utils project. This was started by Haitao Feng (Intel) and includes some scripts and documents to assist in the process of building a MeeGo chroot + Simulator. It is possible to install this into a chroot manually (if for some reason the packaged version doesn't work for your chroot).
The source code is here:
http://gitorious.org/xephyr-utils
You need to check these out into the chroot with:
git clone git://gitorious.org/xephyr-utils/xephyr-utils.git
The project includes some instructions in target/netbook/BUILD-MEEGO-NETBOOK-CHROOT-WITH-XEPHYR and target/shcdk/BUILD-MEEGO-SHCDK-CHROOT-WITH-XEPHYR.
Once you have checked out the source, and while still in the chroot, do:
cd xephyr-utils/target
make netbook
make shcdk
make install