(→Download and unpack a MeeGo image) |
(→MeeGo SDK images vs. stock MeeGo images) |
||
| Line 30: | Line 30: | ||
'''Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image).''' | '''Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image).''' | ||
| - | |||
| - | |||
== Pre-requisites == | == Pre-requisites == | ||
This document describes how to create a MeeGo chroot environment from a stock image.
If you want a really quick method for developing on MeeGo where you don't need to build the chroot, use a MeeGo SDK download. The MeeGo SDK includes images tailored for QEMU and the needs of application development.
However, it can be useful to develop or test on a specific image, such as a recent weekly build. In this case, you may want to build your own chroot environment. However, additional disk space and manual steps may be needed to use these images; and features such as QEMU may not always be usable.
To help you decide what you need, here are the differences between stock MeeGo OS images and MeeGo SDK images:
| MeeGo SDK images | Stock MeeGo images |
|---|---|
|
|
If you think an SDK download would be best, see Hello World - MeeGo x86 development on Linux for details.
Otherwise, follow the steps below to build your own chroot environment.
Note that the approach covered here uses an x86 CPU to build software for an x86 version of MeeGo (e.g. a netbook image).
Contents |
All that's required for this is a reasonably modern Linux distribution (e.g. Fedora 11, Ubuntu 9.10).
Get an image or tarball (with a UX) for either netbook or handset from one of these locations:
wget:
$ wget --continue <link to image file>
$ md5sum <image file>
The process for unpacking is slightly different, depending on the type of image.
sudo mic-chroot --unpack-only -s /path/to/meego-chroot <image file>.usbimg
Replace /path/to/meego-chroot with your desired path.
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 rsync -av ~/tmp-mnt ~/meego-chroot sudo umount ~/tmp-mnt
sudo kpartx -d -v ./meego-0.90-preview-shcdk-20100512-001-sda.bin
rmdir ~/tmp-mnt
Chroot into the image using mic-chroot.
To use the script with the unpacked chroot:
sudo mic-chroot /path/to/meego-chroot