(→Install developer packages) |
(→Using the chroot) |
||
| (10 intermediate revisions not shown) | |||
| Line 3: | Line 3: | ||
This document describes how to create a MeeGo chroot environment from a stock image. | 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. See [[SDK/Docs/1.2/ | + | 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. See [[SDK/Docs/1.2/Installing_and_configuring_MeeGo_SDK_for_Linux|this page]] for details. |
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 by following the steps below. However, additional disk space and manual steps may be needed to use these images; and features such as QEMU may not always be usable. | 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 by following the steps below. However, additional disk space and manual steps may be needed to use these images; and features such as QEMU may not always be usable. | ||
| Line 10: | Line 10: | ||
<table border="1"> | <table border="1"> | ||
| - | <tr><th>MeeGo | + | <tr><th>MeeGo QEMU images</th><th>Stock MeeGo images</th></tr> |
<tr> | <tr> | ||
<td> | <td> | ||
| Line 32: | Line 32: | ||
== Download and unpack a MeeGo image == | == Download and unpack a MeeGo image == | ||
| - | Get an image or tarball (with a UX) | + | Get an image or tarball (with a UX) from one of these locations: |
# '''Release images''' | # '''Release images''' | ||
| Line 38: | Line 38: | ||
# '''Recently-built images''' | # '''Recently-built images''' | ||
#* These images have been smoke tested, but may have issues. They can be found here: http://repo.meego.com/MeeGo/builds/trunk/. | #* These images have been smoke tested, but may have issues. They can be found here: http://repo.meego.com/MeeGo/builds/trunk/. | ||
| - | #* Follow the links to the directory with the image type you want: for example, you might drill down from there through '' | + | #* Follow the links to the directory with the image type you want: for example, you might drill down from there through ''latest > images > meego-netbook-ia32''. The image file will be either uncompressed (*.img) or compressed (*.tar.bz2). |
=== Download tips === | === Download tips === | ||
| Line 52: | Line 52: | ||
Please use the instructions at http://wiki.meego.com/Image_Creation#Installation | Please use the instructions at http://wiki.meego.com/Image_Creation#Installation | ||
| - | === Unpacking a .img | + | === Unpacking a .img image === |
| - | + | Unpack the image using MIC2:<br/> | |
| - | + | <pre>sudo mic-chroot --unpack-only -s ~/meego-chroot <image file>.img</pre> | |
| - | Unpack the image using | + | |
| - | <pre>sudo mic-chroot --unpack-only -s ~/meego-chroot <image file>. | + | |
| - | + | ||
| - | + | ||
Replace <code>~/meego-chroot</code> with your another path if this one is not suitable for your environment. | Replace <code>~/meego-chroot</code> with your another path if this one is not suitable for your environment. | ||
| + | |||
| + | '''Note:''' This directory should not exist before you run mic-chroot. | ||
=== Unpacking a .bin handset image === | === Unpacking a .bin handset image === | ||
| Line 81: | Line 79: | ||
sudo kpartx -a -v ./meego-handset-ia32-aava-mtf-1.1-sda.bin | sudo kpartx -a -v ./meego-handset-ia32-aava-mtf-1.1-sda.bin | ||
</pre> | </pre> | ||
| - | Please watch the output of this command. For | + | Please watch the output of this command. For example, the output may be "add map loop0p1 (252:2): 0 3320312 linear /dev/loop0 1". This means that the first partition (p1) of the disk image is mapped onto the loop device <code>/dev/loop0</code>. You can then use <code>/dev/mapper/loop0p1</code> to access the partition. |
</li> | </li> | ||
<li> | <li> | ||
| Line 108: | Line 106: | ||
== Using the chroot == | == Using the chroot == | ||
| - | Chroot into the image using <code>mic-chroot</code> | + | Chroot into the image using <code>mic-chroot</code>: |
| - | + | ||
| - | + | ||
sudo mic-chroot ~/meego-chroot | sudo mic-chroot ~/meego-chroot | ||
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. See this page for details.
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 by following the steps below. 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 QEMU images | Stock MeeGo images |
|---|---|
|
|
Contents |
All that's required for this is a reasonably modern Linux distribution (e.g. Fedora 13, Ubuntu 9.10).
Get an image or tarball (with a UX) 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.
Please use the instructions at http://wiki.meego.com/Image_Creation#Installation
Unpack the image using MIC2:
sudo mic-chroot --unpack-only -s ~/meego-chroot <image file>.img
Replace ~/meego-chroot with your another path if this one is not suitable for your environment.
Note: This directory should not exist before you run mic-chroot.
yum install kpartx
or on non-RPM distros:
apt-get install kpartx
bunzip2 meego-handset-ia32-aava-mtf-1.1-sda.bin.bz2
This leaves you with a raw disk image you're interested in. (meego-handset-ia32-aava-mtf-1.1-sda.bin.bz2 is a release image from http://meego.com/downloads/.)
Note you need an Aava image for Atom rather than an N900 image for ARM.
sudo kpartx -a -v ./meego-handset-ia32-aava-mtf-1.1-sda.bin
Please watch the output of this command. For example, the output may be "add map loop0p1 (252:2): 0 3320312 linear /dev/loop0 1". This means that the first partition (p1) of the disk image is mapped onto the loop device /dev/loop0. You can then use /dev/mapper/loop0p1 to access the partition.
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-handset-ia32-aava-mtf-1.1-sda.bin
rmdir ~/tmp-mnt
Chroot into the image using mic-chroot:
sudo mic-chroot ~/meego-chroot
Once you are inside the chroot, all of the standard MeeGo command line tools are available. This makes it possible to install new software using zypper, run applications etc.
The MeeGo OS images do not have many necessary devel packages installed. From inside the MeeGo chroot terminal, run the following to install the same set of -devel packages as the SDK image (tailor for your needs). You might need to set http proxy before installing the packages.
$ export http_proxy=<your proxy> (optional) $ zypper install man qt-creator qt-devel make libmeegotouch-devel gcc gcc-c++ gdb wget
Note: The first time you try to install something, you might get warnings such as the following:
Building repository 'adobe' cache [done] Signature verification failed for file 'repomd.xml' from repository 'core'. Warning: This might be caused by a malicious change in the file! Continuing might be risky. Continue anyway? [yes/no] (no):
Answer yes at the prompts.
See MeeGo SDK with Xephyr for more information about using a chroot for development.